PC Serial Connection Ubuntu 12.04 LTS

26 Sep 2012

I haven't been able to make a serial terminal connection with the mbed and Ubuntu 12.04 LTS. I've tried two different computers, two different mbeds, and three different terminal programs. The mbeds show up as /dev/ttyACM0 as usual, and the mbed USB drive shows up. Can anyone confirm this problem? I'm switching back to Ubuntu 10.10 for now.

27 Sep 2012

Have you set up the PC's USB serial driver? Here: http://mbed.org/handbook/Windows-serial-configuration

27 Sep 2012

Try this (taken from the online help) ....

Your mbed Microcontroller can appear on your computer as a serial port. On Mac and Linux, this will happen by default.

1. Install a Terminal Application. If you do not already have it, install GNU Screen

2. Connect to the mbed using GNU Screen by typing the following command in your console window. To exit screen, press Ctrl-A, then ":quit"

screen /dev/<devicename> 

If you do need to know the identity of the serial port <devicename> use the command:

ls /dev/ttyACM*
27 Sep 2012

Thanks for the replys, I've never had any problems with the pc usb serial connection before with Ubuntu LINUX because the drivers/kernal modules for the mbed come with the operating system. It seems like this changed with Ubuntu 12. I ended up reverting to Ubuntu 10.04LTS so I could use the mbed again.

Like I first posted, this problem is with Ubuntu 12 so the windows driver isn't going to help. Also, the mbeds appear in Ubuntu 12 as /dev/ttyACM0, but I can't get a serial connection with any serial terminal programs, moserial, putty, etc.

27 Sep 2012

Did you check permissions on /dev/ttyACM0? Try running putty, etc., as root using sudo. Do you get an error message when you try to connect?

02 Oct 2012

I hit a problem on Ubuntu 12.04 that initially looked like a failure to make a serial connection. In my case, the serial port was being successfully opened but the problem was that the code I had copied to the mbed device wasn't actually starting because the file wasn't properly flushed to the device. Running the sync command after copying the firmware to the mbed device fixed the problem. The newer version of Ubuntu appears to flush the FAT a bit less regularly.

02 Oct 2012

Hi Adam, I can vouch for that problem on 12.04 too. mbedders using Dolphin or other File-Manager to copy binaries to the mbed need to take particular care: copy the binary, then right-click > "safely remove 'mbed Microcontroller'" to force pending copy actions.

Naturally, with your excellent GCC4mbed, the DEPLOY takes care of that perfectly. (The whole GCC4mbed is marvellous, BTW - I tried it yesterday, and was amazed to find that even my hacked libraries work... Many thanks for your work ).

As for the serial terminal, this only seems to work on 12.04 with root privilege, e.g.:

sudo screen /dev/ttyACM0 115200

Without the sudo, as Arthur suspected, this does not work, and gives a cryptic error:

Sorry, could not find a PTY
07 Oct 2012

I can't believe I didn't try: sudo putty Thanks... Yes GCC4mbed is awesome.

07 Dec 2012

For various obscure reasons I can't currently go and download GNUScreen, can I talk to the mBed with Ubuntu's normal terminal? It's on version 11.10 BTW

07 Dec 2012

Hi Robin, Ubuntu 11.10 does not require a download to work with GNU Screen. It's included in the distro from the first power ON.

just type:

sudo screen /dev/ttyACM0 115200

to get a 115200 baud feed. If you have not configured the baud rate of the mbed terminal, use 9600 in place of 115200

07 Dec 2012

Hi Rod Trying that it just comes up with command not found and GNU Screen doesn't seem to be be there. I've got the normal Terminal, and XTerm and UXTerm (not sure if they're any help!) Any suggestions? Best Robin

07 Dec 2012

Robin, there must be some corruption on your installation. Screen is available on all recent Ubuntu versions. you can just type 'screen' to check it's there. If not, Has something interfered with your environment variable PATH ?

Another nice terminal that just works on Ubuntu is hterm:


download, launch the exectutable in the directory it's in. check permissions (EXECUTABLE) first (properties in Nautilus, Dolphin)

07 Dec 2012

Thanks Rod It must be my installation, screen just isn't there. I'll give hterm a go!