Serial Port (USB) on OS X?
Posted: Wed Mar 21, 2012 4:04 am
Hello all,
Lately, I've been porting an application from Windows to Mac OS X. I use a USB/Serial cable (Prolific chip) for the serial port. Looks like it's working fine at the OS level. I've got a "/dev/tty.usbserial" that works (did a quick test).
Now, if I try in PureBasic, it doesn't seem to work, here's how I do it:
-> OpenSerialPort(0, "/dev/tty.usbserial", 115200, #PB_SerialPort_NoParity, 8, 1, #PB_SerialPort_NoHandshake, 1024, 1024)
The function returns "0" (so, it's supposed to be successful) but when I try sending something to the opened port (using WriteSerialPortString) nothing happens... No data gets through.
I'm using Lion (10.7.3) and XCode 4.3.1. Anyone here successfully opened a serial port at 115200 Bauds on OS X? Thanks in advance.
Marc Girard aka Khorus
Lately, I've been porting an application from Windows to Mac OS X. I use a USB/Serial cable (Prolific chip) for the serial port. Looks like it's working fine at the OS level. I've got a "/dev/tty.usbserial" that works (did a quick test).
Now, if I try in PureBasic, it doesn't seem to work, here's how I do it:
-> OpenSerialPort(0, "/dev/tty.usbserial", 115200, #PB_SerialPort_NoParity, 8, 1, #PB_SerialPort_NoHandshake, 1024, 1024)
The function returns "0" (so, it's supposed to be successful) but when I try sending something to the opened port (using WriteSerialPortString) nothing happens... No data gets through.
I'm using Lion (10.7.3) and XCode 4.3.1. Anyone here successfully opened a serial port at 115200 Bauds on OS X? Thanks in advance.
Marc Girard aka Khorus