Woo! It connects first time now. Took a hex snapshot of the termios struct after running screen and replicated it in the connect function. Success.