11 years, 11 months ago.

Has anyone gotten USBSerial to talk to Mac OS X Lion

I'm a Mac newb. Using OS X Lion 10.7.4. I connect my LPC1768 (plugged in to a coolcomponents workshop board) to a USB port on my Mac. The device shows up as /dev/tty.usbmodemfd121. If I then run

screen /dev/tty.usbmodemfd121

I see a couple of characters from my test message and nothing further. I've seen some discussion on various forums about alternate serial port USB drivers but they seem to be specific to one serial port to USB adaptor or another. I've also seen some mention of 32-bit vs 64-bit drivers. Is there a particular driver that I ought to be using? Or do I need to do Something Special when I invoke screen?

BTW, when I connect the mbed to my Linux system things work fine so I think my wiring, program logic, etc. is OK.

Question relating to:

Hi, I updated the USBDevice library. The problem should be fixed. Try to update it :)

posted by Samuel Mokrani 20 Dec 2012

It works fine for me with CoolTerm for MAC freeware

posted by Thom Belford 20 Dec 2012

3 Answers

11 years, 11 months ago.

Hi Hugh,

We noticed that there was this problem on mac, you are right.

After the tests I did, it seems that the serial port is not working only if you call 'printf'. For instance if you call directly _putc() or writeBlock(), the serial port shouldn't block.

Cheers, Sam

Accepted Answer
11 years, 11 months ago.

Hi Hugh,

I use a mac with MBED. In your program you established some baud rate. In my unit I use 38400. So if you used the same it would be: screen /dev/tty.usbmodemfd121 38400. It appears you did not specify the baud rate. Hope this helps. Also on some serial devices I use (USB to RS485 adaptor) I have to boot up with the 3 & 2 keys depressed and use the 32 bit mode. Maybe I could download the latest 64 bit driver but I'm lazy. If I don't my driver will not be recognized in the /dev/tty.* directory.

Dennis

11 years, 11 months ago.

Hi Hugh,

I have a mid 2011 Mac mini running OS X Lion 10.7.4. I do not use screen but instead use the CoolTerm serial port terminal application. It is a free download from http://freeware.the-meiers.org.

I plug the mbed USB cable directly into one of the USB ports at the rear of the Mac mini. I run at the mbed default 9600 baud and have no problems whatsoever with printf or putc output, I have not installed any drivers on the Mac. I made one small change to the app's setup, namely Options, Terminal, Enter Key Emulation = CR.

Hope this helps.

Paul

Hi Dennis, Paul, The problem is not with the built-in USB socket. It is when we are using the USBDevice running directly into the mbed using the USB port on p31 and p32 pins. You can take a look on the USBDevice webpage for more info.

posted by Samuel Mokrani 20 Dec 2012