Difference between revisions of "Serial port selection generalities"
From ArmadeusWiki
(Factorize doc) |
|||
Line 1: | Line 1: | ||
− | * 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'' | + | * 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 [http://ubuntuforums.org/archive/index.php/t-392791.html this thread] if you see some disconnection data like this : | * If your ''USB <-> Serial'' converter doesn't seem to work, run the ''dmesg'' command. You should read [http://ubuntuforums.org/archive/index.php/t-392791.html 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 | [ 2445.568000] usb 1-1.4: new full speed USB device using uhci_hcd and address 22 |
Latest revision as of 07:14, 11 April 2012
- 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),...