It is currently Wed May 22, 2013 4:36 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Serial Port (USB) on OS X?
PostPosted: Wed Mar 21, 2012 4:04 am 
Offline
User
User

Joined: Sat Nov 13, 2010 11:22 pm
Posts: 23
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


Top
 Profile  
 
 Post subject: Re: Serial Port (USB) on OS X?
PostPosted: Sat Mar 31, 2012 2:51 pm 
Offline
User
User

Joined: Sat Nov 13, 2010 11:22 pm
Posts: 23
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)


Top
 Profile  
 
 Post subject: Re: Serial Port (USB) on OS X?
PostPosted: Sat Mar 31, 2012 5:55 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Tue Aug 21, 2007 2:44 pm
Posts: 426
Location: USA (Cincinnati)
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 (using Basic4Android for development)


Top
 Profile  
 
 Post subject: Re: Serial Port (USB) on OS X?
PostPosted: Sat Mar 31, 2012 8:11 pm 
Offline
User
User

Joined: Sat Nov 13, 2010 11:22 pm
Posts: 23
Yes, I installed the latest Prolific drivers, the /dev/tty.usbserial doesn't appear if it's not installed.


Top
 Profile  
 
 Post subject: Re: Serial Port (USB) on OS X?
PostPosted: Sat Sep 01, 2012 8:21 pm 
Offline
User
User

Joined: Sun Aug 24, 2003 10:11 am
Posts: 42
Location: France
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye