Go Down

Topic: OSX recognizing Arduino Uno as CDC not RS232 device (Read 1 time) previous topic - next topic

ukiller

Good morning (if in my timezone),

I have set up the Uno without hassle, works like a charme on my MacBook with 10.6.8. A little question remains though: how can I show the interface as RS232 and not CDC to my OSX applications? I am using ZTerm and it won't recognize the board in this mode as RS232, so I can't communicate with it directly. Is there any easy solution for this? I googled and binged around, but didn't get a good answer.

Any hints?

Regards,
    Udo


dhunt

#1
Jun 29, 2011, 08:12 am Last Edit: Jun 29, 2011, 09:30 am by dhunt Reason: 1
I use OSX 10.6.8 with an Uno, and it shows up as /dev/tty.usbmodem421.  I have no problem using that device as a serial device (I've tested it from python with pySerial).

I'm not sure what a CDC device is - can you clarify that?

Here's an example python script to read lines from the serial port and print them.

Code: [Select]
#!/usr/bin/env python

import sys
import getopt
import serial

def main():
   port="/dev/tty.usbmodem421"
   baud=9600

   try:
       options, args = getopt.getopt(sys.argv[1:], "hd:b:", ["help","device","baud"])
   except getopt.error, msg:
       print msg
       print "for help use --help"
       sys.exit(2)
   # process options
   for opt, arg in options:
       if opt in ("-h", "--help"):
           print __doc__
           sys.exit(0)
       if opt in ("-d", "--device"):
           port = arg
       if opt in ("-b", "--baud"):
           baud = arg

   ser = serial.Serial(port, baud)
   while 1:
       line = ser.readline()
       print line,

if __name__ == "__main__":
   main()


Edit: Added python code example.

kg4wsv

I've used a (non-Arduino) CDC device on the mac, no problems.  My guess is that zterm is broken, or something else (like OS X networking) grabbed the "modem" before you did.  I use kermit, and it worked fine.

USB CDC is "communications device class".  Just as USB defines a standard for mass storage devices, so we don't need drivers for every single type of thumb drive, USB also defined an interface for rs232 serial type devices and called it CDC.

Why no vendors actually use CDC instead of sticking us with driver installs is beyond me.  Maybe there's some basic design flaw in CDC, or maybe there are just lots of idiots in the world.  I guess I shouldn't complain, since I like FTDI's driver better that the OS X CDC driver anyway.

-j

ukiller

Thanks for your replies. I'll have a look if this is an issue with another terminal app or my own applications. Following your posts, I assume it will be no problem at all. If not - I'll post again.

Regards
   Udo

Go Up