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

John Adams jna at retina.net
Fri Aug 26 17:41:57 UTC 2011


It's just a tty, write to it via /dev/cuaX

-j

On Fri, Aug 26, 2011 at 1:13 AM, Robby <robwasab at gmail.com> wrote:

> 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?
>
>
> _______________________________________________
> Noisebridge-discuss mailing list
> Noisebridge-discuss at lists.noisebridge.net
> https://www.noisebridge.net/mailman/listinfo/noisebridge-discuss
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.noisebridge.net/pipermail/noisebridge-discuss/attachments/20110826/cd6f77c8/attachment-0003.html>


More information about the Noisebridge-discuss mailing list