Serial port selection generalities

From ArmadeusWiki
Jump to: navigation, search
  • In this example, we assume that your serial port is /dev/ttyS0 (first serial port). Change this to the appropriate value if necessary. For example if you use an USB <-> Serial converter then serial port would surely be named like that: /dev/ttyUSB0 or /dev/ttyACM0
  • If your USB <-> Serial converter doesn't seem to work, run the dmesg command. You should read this thread if you see some disconnection data like this :
[ 2445.568000] usb 1-1.4: new full speed USB device using uhci_hcd and address 22
[ 2446.964000] ftdi_sio ttyUSB0: FTDI USB Serial Device converter now disconnected from ttyUSB0
[ 2446.964000] ftdi_sio 1-1.4:1.0: device disconnected
  • Check that you have read/write rights on /dev/ttyS0 (ie your serial port): your user ID (here julien) should be part of the serial port access group (here dialout):
$ ls -al /dev/ttyS0
crw-rw---- 1 root dialout 4, 64 2009-05-15 14:56 /dev/ttyS0
$ id
uid=1000(julien) gid=1000(julien) groupes=4(adm),20(dialout),...