Difference between revisions of "USB to serial adapter"

From ArmadeusWiki
Jump to: navigation, search
m (Installation)
 
(10 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Under_Construction}}
+
This type of adapter allows you to add several serial (RS232) ports to your APF board, through the USB Host interface (available on [[APF9328DevFull | DevFull]], [[APF27Dev]], [[APF51Dev]] and [[APF28Dev]])
 
+
This type of adapter allows you to add several serial (RS232) ports to your APF board, through the USB Host interface (only available on [[APF9328DevFull | DevFull]] & [[APF27]])
+
  
 
==Tested materials==
 
==Tested materials==
 +
{{Warning| Due to some bugs in the (uggly) [[ISP1761_Linux_driver|ISP1761 driver]], USB to serial adapters are currently not usable on the APF9328 !}}
 +
 
The commercial adapters can be separated in 2 categories, because there are only 2 USB<->serial low cost chipmakers:
 
The commercial adapters can be separated in 2 categories, because there are only 2 USB<->serial low cost chipmakers:
 
* FTDI one
 
* FTDI one
Line 10: Line 10:
 
{| border="1" cellpadding="5" cellspacing="0" summary="Adapters"
 
{| border="1" cellpadding="5" cellspacing="0" summary="Adapters"
 
|- style="background:#efefef;"
 
|- style="background:#efefef;"
!'''Model''' || Chip || '''Status''' | '''Driver''' || '''Comments'''
+
!'''Adapter Model''' || Chip || colspan=4 | '''Status'''<br> APF9328 / APF27 / APF51 / APF28 || '''Driver''' || '''Comments'''
 
|----------------
 
|----------------
|'''Trendnet TU-S9''' || pl2303 || NT || NA
+
|'''Trendnet TU-S9''' || pl2303 || style="background:#ff0000;" | KO || style="background:#00ff00;" | OK || NT || NT || pl2303 ||
 
|----------------
 
|----------------
|''' ''' || style="background:#00ff00;" |working || NT || NA
+
|''' XXXX ''' || || || || || || ||
 
|----------------
 
|----------------
 
|}
 
|}
Line 20: Line 20:
 
==Installation==
 
==Installation==
 
<pre class="host">
 
<pre class="host">
  $ make linux26-menuconfig
+
  $ make linux-menuconfig
 
</pre>
 
</pre>
 
<pre class="config">
 
<pre class="config">
Line 33: Line 33:
 
</pre>
 
</pre>
 
<pre class="host">
 
<pre class="host">
  $ make linux26 && make
+
  $ make linux && make
 
</pre>
 
</pre>
  
Line 43: Line 43:
 
==Usage==
 
==Usage==
 
* be sure that your USB Host is running on your board: [[USB_Host#Controller|explanations are here]]
 
* be sure that your USB Host is running on your board: [[USB_Host#Controller|explanations are here]]
*Load the module, for example if you have a Prolific based adapter:
+
* plug your USB adapter (here a Prolific one)
 +
<pre class="apf">
 +
usb 1-1: full speed USB device using mxc-ehci and address 2
 +
usb 1-1: configuration #1 chosen from 1 choice
 +
usb 1-1: New USB device found, idVendor=067b, idProduct=2303
 +
usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
 +
usb 1-1: Product: USB-Serial Controller D
 +
usb 1-1: Manufacturer: Prolific Technology Inc.
 +
</pre>
 +
* Load the module, for example if you have a Prolific based adapter:
  
 
<pre class="apf">
 
<pre class="apf">
Line 59: Line 68:
  
 
* a new serial device will then appear under /dev/ttyUSBN (N starting at 0 and depending on the number of adapters detected).
 
* a new serial device will then appear under /dev/ttyUSBN (N starting at 0 and depending on the number of adapters detected).
 +
 +
{{Note|You can now use this new device [[Serial_ports_usage_on_Linux| like a standard Linux serial port]]}}
 +
 +
==Troubleshooting==
 +
* 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
 +
...
 +
[ 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
  
 
==Links==
 
==Links==

Latest revision as of 10:24, 30 April 2014

This type of adapter allows you to add several serial (RS232) ports to your APF board, through the USB Host interface (available on DevFull, APF27Dev, APF51Dev and APF28Dev)

Tested materials

Warning Warning: Due to some bugs in the (uggly) ISP1761 driver, USB to serial adapters are currently not usable on the APF9328 !


The commercial adapters can be separated in 2 categories, because there are only 2 USB<->serial low cost chipmakers:

  • FTDI one
  • Prolific one (pl23xx)
Adapter Model Chip Status
APF9328 / APF27 / APF51 / APF28
Driver Comments
Trendnet TU-S9 pl2303 KO OK NT NT pl2303
XXXX

Installation

 $ make linux-menuconfig
 Device Drivers  ---> 
     [*] USB support  --->
         ...
               *** USB port drivers ***
         <M>   USB Serial Converter support
             ...
             <M>   USB FTDI Single Port Serial Driver
             <M>   USB Prolific 2303 Single Port Serial Driver
 $ make linux && make

copy following drivers on your target or reflash your rootfs (for more infos, see this page)

drivers/usb/serial/ftdi_sio.ko
drivers/usb/serial/pl2303.ko
drivers/usb/serial/usbserial.ko

Usage

  • be sure that your USB Host is running on your board: explanations are here
  • plug your USB adapter (here a Prolific one)
usb 1-1: full speed USB device using mxc-ehci and address 2
usb 1-1: configuration #1 chosen from 1 choice
usb 1-1: New USB device found, idVendor=067b, idProduct=2303
usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 1-1: Product: USB-Serial Controller D
usb 1-1: Manufacturer: Prolific Technology Inc.
  • Load the module, for example if you have a Prolific based adapter:
# modprobe pl2303

usbcore: registered new interface driver usbserial
usbserial: USB Serial Driver core
usbserial: USB Serial support registered for pl2303
pl2303 1-1.1:1.0: pl2303 converter detected
usb 1-1.1: pl2303 converter now attached to ttyUSB0
usbcore: registered new interface driver pl2303
pl2303: Prolific PL2303 USB to serial adaptor driver
#
  • a new serial device will then appear under /dev/ttyUSBN (N starting at 0 and depending on the number of adapters detected).
Note Note: You can now use this new device like a standard Linux serial port


Troubleshooting

  • 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

Links