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
Serial Port (USB) on OS X?
Re: Serial Port (USB) on OS X?
Hello again all,
I just recently made a test just to make sure it wasn't my configuration causing troubles. I tested my serial line with "screen" (in the Terminal) using 115200 bauds and my tests worked out fine. So, is there a bug in PureBasic that keeps us from using a serial USB adapter in MacOS X? Thank you!
Marc Girard
(aka Khorus)
I just recently made a test just to make sure it wasn't my configuration causing troubles. I tested my serial line with "screen" (in the Terminal) using 115200 bauds and my tests worked out fine. So, is there a bug in PureBasic that keeps us from using a serial USB adapter in MacOS X? Thank you!
Marc Girard
(aka Khorus)
Re: Serial Port (USB) on OS X?
Have you installed the Prolific driver? I don't have Lion but on earlier versions I saw "/dev/tty.usbserial" but still needed the driver to use it.
http://davehouston.org
Mac Mini (Intel) 10.6.8 - iMac G4 (PPC) 10.4.11
Dell Dimension 2400 W98SE,W2K,XP,Vista,W7,Debian,Ubuntu,Kubuntu,Xubuntu,Fedora,Mandriva,Mint
(on swappable HDDs)
Vizio VTAB1008 - Android 3.1
MK808 miniAndroidPC (Android 4.1)
Mac Mini (Intel) 10.6.8 - iMac G4 (PPC) 10.4.11
Dell Dimension 2400 W98SE,W2K,XP,Vista,W7,Debian,Ubuntu,Kubuntu,Xubuntu,Fedora,Mandriva,Mint
(on swappable HDDs)
Vizio VTAB1008 - Android 3.1
MK808 miniAndroidPC (Android 4.1)
Re: Serial Port (USB) on OS X?
Yes, I installed the latest Prolific drivers, the /dev/tty.usbserial doesn't appear if it's not installed.
Re: Serial Port (USB) on OS X?
Hi,
It's a 6 months old post but it could be linked to a problem I have, see this post
Could you try at 9600 bds if it works ? Thank you
It's a 6 months old post but it could be linked to a problem I have, see this post
Could you try at 9600 bds if it works ? Thank you