Ubuntu USB-Serial port install procedure
The procedure for using the USB adapter from the BOM wasn’t in the wiki — nor was it immediately obvious, so, here goes.
If you are using the usb -> RS232 adapter, the serial drivers may need to be installed for the device to work properly. After plugging in the device, first check the hardware messages to see the device was detected:
Torward the end of the messages, you should see this:
usb 1-1: new full speed USB device using uhci_and address 2
usb 1-1: configuration #1 chosen from 1 choice
Now, we need to figure out the device vendor number and product number to tell the usbserial driver. For this we can use lsusb. The easiest way to find the information is to first unplug the device, then run lsusb:
You will see a summary list of your USB devices on the system, I only have one:
Bus 001 Device 001: ID 0000:0000
Now, plug the device back in, and run lsusb again:
Which returns the summary list again, but now showing the new USB device:
Bus 001 Device 002: ID 4348:5523
Bus 001 Device 001: ID 0000:0000
Now, we can load up the driver for this device:
sudo modprobe usbserial vendor=0x4348 product=0x5523
Finally, check dmesg again to ensure it loaded properly.
Near the end, you should see something like:
usbserial_generic 1-1:1.0: generic converter detected
usb 1-1: generic converter now attached to ttyUSB0
usbcore: registered new interface driver usbserial_generic
Congratulations, your link is up — in this example, the device can be used on /dev/ttyUSB0. As much fun as you had doing this, there is some chance you want to do this automatically in the future. Just add this line:
usbserial vendor=0x4348 product=0x5523
to /etc/modules with the vendor and product numbers you found. Now, you should have no problem using this device for RepRap like a normal serial port. Huzzah!
Edited 1 time(s). Last edit at 08/27/2007 02:01AM by Freeman.
I DEVELOPED THE PROGRAM USING BUTTON IN JAVA.IAMUSING THE SOFTWARE eclipse.iWANT TO KNOW THE INSTALLATIONPROCEDURE FOR SERIALPORTINJAVA USING eclipse.give me the codefor buttons using serialport in java ALSO.
I DEVELOPED THE PROGRAM USING BUTTON IN JAVA.IAMUSING THE SOFTWARE eclipse.iWANT TO KNOW THE INSTALLATIONPROCEDURE FOR SERIALPORTINJAVA USING eclipse.give me the codefor buttons using serialport in java ALSO.
Wow! Thanks for the tip. You should add that to the Wiki, so that everyone can take advantage of your hard experience!
hey freeman! can u tell me the link where from i can download the drivers? i am having same vid & pid, but unfortunately the drivers that came along have different vid & pid.. i tried to change the vid & pid in the driver inf files, but still it is not working.. i also tried radioshack’s drivers after changing vid & pid to 4348 & 5523 respectively, but in vain! please help!
Edited 1 time(s). Last edit at 09/29/2007 01:54PM by Forrest Higgs.
pratik Wrote:
——————————————————-
> hey freeman! can u tell me the link where from i
> can download the drivers? i am having same vid &
> pid, but unfortunately the drivers that came along
> have different vid & pid.. i tried to change the
> vid & pid in the driver inf files, but still it is
> not working.. i also tried radioshack’s drivers
> after changing vid & pid to 4348 & 5523
> respectively, but in vain! please help!
sudo modeprobe usbserial vendor=0x4348 product=0x5523
works for me while writing to the serial port, but I could not read nicely from the serial port.
The procedure you describe for USB-serial has worked very well for me up to a point.
However, I cannot establish end to end communication to an embedded controller device.
Having established USB link as described I can cp a text file down the USB-serial adaptor cable I am using (LED shows activity on the device) but cannot communicate with minicom or gtkterm on /dev/ttyUSB#. The target device is a PC/104 cpu running linux and has been seen working through Hyperterminal.
Any help will be much appreciated.
When I inserted the RS232 serial adapter
and done dmesg , it shows the following error :
[ 3130.480028] usb 4-1: new full speed USB device using uhci_hcd and address 2
[ 3130.648050] usb 4-1: unable to read config index 0 descriptor/all
[ 3130.648060] usb 4-1: can’t read configurations, error -84
[ 3130.760027] usb 4-1: new full speed USB device using uhci_hcd and address 3
[ 3130.964054] usb 4-1: device descriptor read/all, error -84
[ 3131.076028] usb 4-1: new full speed USB device using uhci_hcd and address 4
[ 3131.112050] usb 4-1: device descriptor read/all, error -84
[ 3131.224025] usb 4-1: new full speed USB device using uhci_hcd and address 5
[ 3131.261051] usb 4-1: device descriptor read/8, error -32
[ 3131.398053] usb 4-1: device descriptor read/all, error -32
[ 3131.400054] hub 4-0:1.0: unable to enumerate USB device on port 1
[ 3175.136027] usb 4-1: new full speed USB device using uhci_hcd and address 6
[ 3175.319614] usb 4-1: configuration #1 chosen from 1 choice
[ 3175.322044] usb 4-1: can’t set config #1, error -32
can you tell me how to detect the adpater
Freeman Wrote:
——————————————————-
> The procedure for using the USB adapter from the
> BOM wasn’t in the wiki — nor was it immediately
> obvious, so, here goes.
>
>
> If you are using the usb -> RS232 adapter, the
> serial drivers may need to be installed for the
> device to work properly. After plugging in the
> device, first check the hardware messages to see
> the device was detected:
>
> dmesg
>
> Torward the end of the messages, you should see
> this:
>
> usb 1-1: new full speed USB device using uhci_and
> address 2
> usb 1-1: configuration #1 chosen from 1 choice
>
> Now, we need to figure out the device vendor
> number and product number to tell the usbserial
> driver. For this we can use lsusb. The easiest
> way to find the information is to first unplug the
> device, then run lsusb:
>
> lsusb
>
>
> You will see a summary list of your USB devices on
> the system, I only have one:
>
> Bus 001 Device 001: ID 0000:0000
>
> Now, plug the device back in, and run lsusb
> again:
>
> lsusb
>
> Which returns the summary list again, but now
> showing the new USB device:
>
> Bus 001 Device 002: ID 4348:5523
> Bus 001 Device 001: ID 0000:0000
>
>
> Now, we can load up the driver for this device:
>
> sudo modprobe usbserial vendor=0x4348
> product=0x5523
>
> Finally, check dmesg again to ensure it loaded
> properly.
>
> dmesg
>
> Near the end, you should see something like:
>
> usbserial_generic 1-1:1.0: generic converter
> detected
> usb 1-1: generic converter now attached to
> ttyUSB0
> usbcore: registered new interface driver
> usbserial_generic
>
> Congratulations, your link is up — in this
> example, the device can be used on /dev/ttyUSB0.
> As much fun as you had doing this, there is some
> chance you want to do this automatically in the
> future. Just add this line:
>
> usbserial vendor=0x4348 product=0x5523
>
> to /etc/modules with the vendor and product
> numbers you found. Now, you should have no
> problem using this device for RepRap like a normal
> serial port. Huzzah!
hi,
im getting this message at the end of the procedure.why m i not getting ttyUSB0??
thanks
[13840.081028] /build/buildd/linux-2.6.28/drivers/hid/usbhid/hid-core.c: usb_submit_urb(ctrl) failed
[13840.081034] generic-usb 0003:0764:0005.0009: timeout initializing reports
[13840.081094] generic-usb 0003:0764:0005.0009: hiddev97,hidraw3: USB HID v1.10 Device [Cyber Power System CPS RS232 USB BRIDGE for UPS] on usb-0000:00:1a.1-2/input0
I hope that someone on this can help. I need to get a usb to serial cable working. the verson of ubuntu is 9.04, the tipe of cable is a giga ware usb-a to serial cable with part # 26-949. i have triyed all the things that you have toled me to do , but it will not work for me. this is what it looks like.
[email protected]:~$ lsusb
bus 001 device 001: id 1d6b:0002 linux foundation 2.0 root hub
bus 003 device 007: id 05ad:0fba y.c. cablu u.s.sa. inc.
bus 003 device 001: id 1d6b:0001 linux foundation 1.1 root hub
bus 002 device 001: id 1d6b:0001 linux foundation 1.1 root hub
wil[email protected]:~$ sud modprobe usbserial vendor=0x05ad product=0x0fba
fatal: module usbserial not found.
this is the first real time that i have used linux of eny tipe and help would be much appreciated.
try the lsusb command first and take a look to see if it recognizes your adapter.
it should come up like this
[email protected]:/etc# lsusb
Bus 001 Device 003: ID 174f:a311 Syntek 1.3MPixel Web Cam — Asus A3A, A6J, A6K, A6M, A6R, A6T, A6V, A7T, A7sv, A7U
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 003: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
if you see a line alike the one in italic, then run the mod probe command as in the tutorial but use the numbers you get in bold as the vendor and product, being the first four the vendor and the last four the product ID.
the run a dmesg | grep «name product ID»
in my case, since i have a pl2303 i used it like this
[email protected]:/etc# dmesg | grep 2303
[ 22.727184] USB Serial support registered for pl2303
[ 22.727216] pl2303 3-1:1.0: pl2303 converter detected
[ 22.783919] usb 3-1: pl2303 converter now attached to ttyUSB0
[ 22.783938] usbcore: registered new interface driver pl2303
[ 22.783941] pl2303: Prolific PL2303 USB to serial adaptor driver
[ 28.230371] [drm] DAC-6: set mode 640×480 0
[ 966.645283] pl2303 ttyUSB0: pl2303 converter now disconnected from ttyUSB0
[ 966.645303] pl2303 3-1:1.0: device disconnected
[ 967.025161] pl2303 3-1:1.0: pl2303 converter detected
[ 967.056183] usb 3-1: pl2303 converter now attached to ttyUSB0
after you have done that and the dmesg shows the serial funcioning properly you have to go to the /dev folder and give permissions to the ttyUSBx being «x» the number assigned to the cable.
this is the command i used and after that it worked properly for me
roo[email protected]:/dev# chmod 777 ttyUSB0
Could you tell me where you got that Prolific pl2303 driver? I’ve looked on Prolifics web site but could only find a version for ‘redhat’ linux, plus windows.
how do you get it to work with Ubuntu (9.10)?
Many thanks for your reply