USB serial port UBUNTU

04 Sep 2009 . Edited: 04 Sep 2009

hi,guys

how to use serial port on ubuntu? when I use the command "ls /dev/ttyACM*", there is error

"can not access /dev/ttyACM*,there is no the directory or file".

Anyone can help me?

Thank you!

04 Sep 2009

Hi,

sun haifeng wrote:
how to use serial port on ubuntu? when I use the command "ls /dev/ttyACM*", there is error "can not access /dev/ttyACM*,there is no the directory or file".

It is perhaps not called something starting with ttyACM*; perhaps try "ls /dev/tty*"?

Another thing i've seen work is "dmesg | grep tty"

Also, it may be a standard problem, so a search on the ubuntu forums or google may give you some clues.

I haven't got an Ubuntu box in front of me, so please try these and report back! It'd be good to update the docs to something more useful!

Simon

04 Sep 2009

Hi,

 

as far as I know from my laptop it's named something like /dev/ttyUSB* or /dev/ttyUSB/* depending on the ubuntu version.

Rolf

05 Sep 2009

Hi,

just tested on ubuntu 9.04, 64bit.

 

When plugging the mbed in,

sudo tail -f /var/log/messages

gives:

Sep  5 19:12:41 ubu64 kernel: [  217.032014] usb 5-2: new full speed USB device using uhci_hcd and address 2
Sep  5 19:12:41 ubu64 kernel: [  217.215082] usb 5-2: configuration #1 chosen from 1 choice
Sep  5 19:12:41 ubu64 kernel: [  217.283715] Initializing USB Mass Storage driver...
Sep  5 19:12:41 ubu64 kernel: [  217.285269] scsi4 : SCSI emulation for USB Mass Storage devices
Sep  5 19:12:41 ubu64 kernel: [  217.285505] usbcore: registered new interface driver usb-storage
Sep  5 19:12:41 ubu64 kernel: [  217.285509] USB Mass Storage support registered.
Sep  5 19:12:41 ubu64 kernel: [  217.291240] cdc_acm 5-2:1.1: ttyACM0: USB ACM device
Sep  5 19:12:41 ubu64 kernel: [  217.307143] usbcore: registered new interface driver cdc_acm
Sep  5 19:12:41 ubu64 kernel: [  217.307148] cdc_acm: v0.26:USB Abstract Control Model driver for USB modems and ISDN adapters
Sep  5 19:12:46 ubu64 kernel: [  222.288466] scsi 4:0:0:0: Direct-Access     mbed     Microcontroller  1.0  PQ: 0 ANSI: 0 CCS
Sep  5 19:12:46 ubu64 kernel: [  222.317141] sd 4:0:0:0: [sdb] 4096 512-byte hardware sectors: (2.09 MB/2.00 MiB)
Sep  5 19:12:46 ubu64 kernel: [  222.322133] sd 4:0:0:0: [sdb] Write Protect is off
Sep  5 19:12:46 ubu64 kernel: [  222.334140] sd 4:0:0:0: [sdb] 4096 512-byte hardware sectors: (2.09 MB/2.00 MiB)
Sep  5 19:12:46 ubu64 kernel: [  222.339134] sd 4:0:0:0: [sdb] Write Protect is off
Sep  5 19:12:46 ubu64 kernel: [  222.339143]  sdb:
Sep  5 19:12:46 ubu64 kernel: [  222.359239] sd 4:0:0:0: [sdb] Attached SCSI removable disk
Sep  5 19:12:46 ubu64 kernel: [  222.359317] sd 4:0:0:0: Attached scsi generic sg3 type 0

after that, a

ls -l /dev/tty????

gives

crw-rw---- 1 root dialout 166, 0 2009-09-05 19:12 ttyACM0

so, I have to be in group dialout.

id `whoami`

uid=1000(kevin) gid=1000(kevin) groups=1000(kevin),4(adm),20(dialout),24(cdrom),46(plugdev),106(lpadmin),121(admin),122(sambashare)

..for me it works fine on a fresh ubuntu64 9.04 install..

 

I've never changed the mbed serial Port settings (mbed.ini on mbed) as you can see here:

ls -a /media/MBED/

.  ..  CanBusExample1.bin  MBED.HTM  .Trash-1000

 

..Good Luck!

05 Sep 2009

I've never changed the mbed serial Port settings (mbed.ini on mbed) as you can see here:

For reference, the mbed.ini is no longer needed on any platform! We've done a new version of the windows driver that works without reconfiguration; it is not perfect yet, but hopefully better.

To try out the new driver, see:

http://mbed.org/handbook/WindowsSerialConfiguration

(Currently only 32-bit windows only, but we'll put out the 64-bit one soon)

If you are usning an mbed with an mbed.ini file on windows, please try deleting it and updating to the driver above. This should make it much easier to move between platforms too, as it will work without reconfiguration.

Simon