DETECT THE DEVICE - USB
Open a Linux Terminal window and cut/paste the following commands with the USB to Serial Adapter unplugged from
a USB port.
larry@ubuntu:~$ dmesg | tail
[10797.964432] domain 0: span 03
[10797.964434] groups: 01 02
[10797.964436] domain 1: span 03
[10797.964438] groups: 03
[10797.964440] CPU1 attaching sched-domain:
[10797.964441] domain 0: span 03
[10797.964443] groups: 02 01
[10797.964446] domain 1: span 03
[10797.964447] groups: 03
[12071.044928] usb 6-1: USB disconnect, address 3
larry@ubuntu:~$ lsusb
Bus 008 Device 001: ID 0000:0000
Bus 007 Device 003: ID 04f2:b091 Chicony Electronics Co., Ltd
Bus 007 Device 002: ID 0bda:0158 Realtek Semiconductor Corp.
Bus 007 Device 001: ID 0000:0000
Bus 006 Device 001: ID 0000:0000
Bus 005 Device 001: ID 0000:0000
Bus 004 Device 001: ID 0000:0000
Bus 003 Device 001: ID 0000:0000
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 001: ID 0000:0000
Then plug in the USB-Serial Port adaptor to one of your USB ports. (REMEMBER to ALWAYS use this
same port for when using your Device). Wait for about 10 seconds, then cut and paste the following
command in your Linux Terminal Window:
You should see these messages:
larry@ubuntu:~$ dmesg | tail
[10797.964440] CPU1 attaching sched-domain:
[10797.964441] domain 0: span 03
[10797.964443] groups: 02 01
[10797.964446] domain 1: span 03
[10797.964447] groups: 03
[12071.044928] usb 6-1: USB disconnect, address 3
[12091.200574] usb 6-1: new full speed USB device using uhci_hcd and address 4
[12091.358706] usb 6-1: configuration #1 chosen from 1 choice
[12091.363887] /build/buildd/linux-2.6.24/drivers/usb/class/cdc-acm.c: This
device cannot do calls on its own. It is no modem.
[12091.363914] cdc_acm 6-1:1.0: ttyACM0: USB ACM device
My device is /dev/ttyACM0
larry@ubuntu:~$ lsusb
Bus 008 Device 001: ID 0000:0000
Bus 007 Device 003: ID 04f2:b091 Chicony Electronics Co., Ltd
Bus 007 Device 002: ID 0bda:0158 Realtek Semiconductor Corp.
Bus 007 Device 001: ID 0000:0000
Bus 006 Device 003: ID 058f:9720 Alcor Micro Corp. USB-Serial Adapter
Bus 006 Device 001: ID 0000:0000
Bus 005 Device 001: ID 0000:0000
Bus 004 Device 001: ID 0000:0000
Bus 003 Device 001: ID 0000:0000
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 001: ID 0000:0000
Now, cut and paste the following command in your Linux Terminal Window:
The
058f:9720 is the Device ID.
Bus 006 Device 003: ID 058f:9720 Alcor Micro Corp.
USB-Serial Adapter Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.10
bDeviceClass 2 Communications
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 8
idVendor 0x058f Alcor Micro Corp.
idProduct 0x9720 USB-Serial Adapter
bcdDevice 0.00
LINKING the COMM PORT: SYMBOLIC vs HARD
To locate the possible COMM PORTS in Linux, cut and paste the following commands with the
USB to RS-232C Adapter plugged in.:
Notice that ttyS0 through ttyS3 are detected as shown. You may have /dev/ttyUSB0 if it was properly
detected. Mine was NOT, because it was a Sabrent SBT-USC1M USB to Serial Converter..
crw-rw---- 1 root dialout 4, 64 2009-11-27 15:26 /dev/ttyS0
crw-rw---- 1 root dialout 4, 65 2009-11-27 15:26 /dev/ttyS1
crw-rw---- 1 root dialout 4, 66 2009-11-27 15:26 /dev/ttyS2
crw-rw---- 1 root dialout 4, 67 2009-11-27 15:26 /dev/ttyS3
Note that user is a member of dialout and has permissions of 6 (rw) to be able to use the Port.
The Baud, Bits per Char, Stop Bits, and Parity are yet to be defined.
I couldn't make a symbolic link work, so I decided to create a hard link, replacing /dev/ttyS3.
First remove /dev/ttyS3:
Code: Select all
sudo rm /dev/ttyS3
sudo ln /dev/ttyACM0 /dev/ttyS3
Running the command again:
gives:
crw-rw---- 1 root dialout 4, 64 2010-11-10 11:59 /dev/ttyS0
crw-rw---- 1 root dialout 4, 65 2010-11-10 11:59 /dev/ttyS1
crw-rw---- 1 root dialout 4, 66 2010-11-10 11:59 /dev/ttyS2
crw-rw---- 2 root dialout 166, 0 2010-11-10 12:59 /dev/ttyS3
If you don't have rw priviledges remove /dev/ttyS3 and create it again.
We can determine the Baud rate of the Port:
and to change it to 9600:
Code: Select all
man stty
stty -F /dev/ttyS3 9600
stty -F /dev/ttyS3 -a
If you connect to a modem for testing you can transmit out an "ATZ" causing the Modem to flash the
lights and reset with:
Which proves characters routed to /dev/ttyS3 get sent to /dev/ttyACM0, the USB to Serial Converter.
You may also need to fiddle in the Wine Registry to get the Software to to access the Serial Port.
All that remains is to connect the Serial Cable to the Device, and run the Application Software.
Thanks.
Larry