Pages: [1]   Go Down
Author Topic: OSX recognizing Arduino Uno as CDC not RS232 device  (Read 1362 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Logged

Wellington, New Zealand
Offline Offline
Sr. Member
****
Karma: 1
Posts: 404
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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:
#!/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.
« Last Edit: June 29, 2011, 02:30:48 am by dhunt » Logged


0
Offline Offline
Faraday Member
**
Karma: 8
Posts: 2526
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Pages: [1]   Go Up
Jump to: