[Noisebridge-discuss] read/write to usb serial port with gcc

Robby robwasab at gmail.com
Fri Aug 26 08:13:39 UTC 2011


I don't know if I'm asking the wrong question, but in short, I want to
create a program that writes to a serial port on my macbook (OS X) using
gcc.

I've been googling for hours on end and can't find any powerful libraries
specifically tailored for mac.

but, because mac is unix, its pretty compatible with linux stuff?
I found a library that was tested/compiled under gcc, but some of its
functions refer to
USB0          as 0
USB1          as 1
USB2          as 2

but in mac land, all i get under /dev is a bunch of tty stuff, and I'm
aiming for a usb-serial convert that's called tty.usbserial###. And i have
no idea how that even relates to the above.

Does anybody have any experience with writing code that talks to serial
ports in c or c++, at a glance it seems like there would be a dead shot YES,
but after looking there really isn't anything standardized like cout, but i
could be an idiot.

p.s. what is the difference between cu.usbserial and tty.usbserial?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.noisebridge.net/pipermail/noisebridge-discuss/attachments/20110826/601c9703/attachment-0002.html>


More information about the Noisebridge-discuss mailing list