/dev/ttyUSB0

Started by ThomasW, October 17, 2013, 04:45:50 PM

Previous topic - Next topic

ThomasW

Hi all,

i have build a RFID offline tester Software (Perl-Tk) on my Notebook (Debian) and try now to implement it to a OLinuXino A13 wifi.

The A13 image is the "A13_debian_WIFI_GCC_GPIO_IN_OUT_X_I2C_100KHz_scratch_UVC_python_opencv_4G_sixth_release.rar" from the wiki page.
A 7'' TS-Display is connected to the A13 and works well.

My Software have 2 main parts.

The first part make a connection with LLRP over socket (IP, Port) to a speedway revolution Box to read the RFID TID and count them up.
That part runs well on the A13 wifi.

The second part use a Atmega232 (asembler) and a Sensor to count the black marks on the backside of the roll.
With this part i have a problem on the A13.

The Atmega232 is connected over a Max232 chip to a serial-usb interface.
That part runs on my notebook very well with /dev/ttyUSB0 but on the A13 i don't found /dev/ttyUSB0.

If i connect the usb2ser adapter to the A13 i got:
<6>usb 2-1.3: new full speed USB device number 5 using sw-ehci
[ 2489.920000] usb 2-1.3: new full speed USB device number 5 using sw-ehci

The lsusb command says:
Bus 002 Device 003: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC

lsusb -t says:
2-1.3:1.0: No such file or directory
/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=sw-ohci/1p, 12M
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=sw-ehci/1p, 480M
    |__ Port 1: Dev 2, If 0, Class=hub, Driver=hub/4p, 480M
        |__ Port 3: Dev 5, If 0, Class=vend., Driver=, 12M
        |__ Port 4: Dev 4, If 0, Class=vend., Driver=rtl8192cu, 480M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=sw_hcd_host0/1p, 480M

lsmod says:
uvcvideo               60268  0
sun4i_ts               16094  0

The last days i read a lot of documents and web pages but i don't found a solution.
So please help. What can/must i do to get /dev/ttyUSB0 on the A13?

thanks in advance
Thomas





davidefa

You need the ftdi driver ( which is not included in the image you used )
If you can't find the driver ( for your kernel ) you need to compile it yourself

progmetalbg

Coonect the USB-to-Serial cable to your notebook and provide us a list of the loaded modules and end of dmesg:
lsmod
dmesg | tail

That will tell us what is the proper driver for the chip in this cable.
I'm using the Olimex cable and driver is pl2303.
Then check the config of the kernel on the A13-OLinuXino:
zgrep -i USB_SERIAL /proc/config.gz
In the list you should see line CONFIG_USB_SERIAL_XXXXXXXX=m, where XXXXXXXX is the driver name.
Try to load the driver manually (with root user):
modprobe xxxxxxxx
Check if /dev/ttyUSB0 device is created or dmesg, /var/log/messages for errors

ThomasW

Hi progmetalbg,

thanks for the quick replay!

on my notebook dmesg says:
[ 5953.470205] USB Serial support registered for FTDI USB Serial Device
[ 5953.470366] ftdi_sio 1-1.2:1.0: FTDI USB Serial Device converter detected
[ 5953.470424] usb 1-1.2: Detected FT232RL
[ 5953.470427] usb 1-1.2: Number of endpoints 2
[ 5953.470431] usb 1-1.2: Endpoint 1 MaxPacketSize 64
[ 5953.470434] usb 1-1.2: Endpoint 2 MaxPacketSize 64
[ 5953.470437] usb 1-1.2: Setting MaxPacketSize 64
[ 5953.470844] usb 1-1.2: FTDI USB Serial Device converter now attached to ttyUSB0
[ 5953.470880] usbcore: registered new interface driver ftdi_sio
[ 5953.470885] ftdi_sio: v1.6.0:USB FTDI Serial Converters Driver

So i think it is a ftdi_sio driver with the name FT232RL. is that right?

lsmod says:
ftdi_sio               35831  0
usbserial              37201  1 ftdi_sio

Now to the A13
zgrep -i USB_SERIAL /proc/config.gz says:
# CONFIG_USB_SERIAL is not set

does that mean that i must create a new kernel or is it possible to set the Variable?

thanks
Thomas


progmetalbg

Hi,

Yes, you need to recompile the kernel with CONFIG_USB_SERIAL and CONFIG_USB_SERIAL_FTDI_SIO built as modules.
Here is the output of "zgrep -i USB_SERIAL /proc/config.gz" on my custom built kernel on A20-OLinuXino:

CONFIG_USB_SERIAL=m
CONFIG_USB_SERIAL_GENERIC=y
CONFIG_USB_SERIAL_AIRCABLE=m
CONFIG_USB_SERIAL_ARK3116=m
CONFIG_USB_SERIAL_BELKIN=m
CONFIG_USB_SERIAL_CH341=m
CONFIG_USB_SERIAL_WHITEHEAT=m
CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
CONFIG_USB_SERIAL_CP210X=m
CONFIG_USB_SERIAL_CYPRESS_M8=m
CONFIG_USB_SERIAL_EMPEG=m
CONFIG_USB_SERIAL_FTDI_SIO=m
CONFIG_USB_SERIAL_FUNSOFT=m
CONFIG_USB_SERIAL_VISOR=m
CONFIG_USB_SERIAL_IPAQ=m
CONFIG_USB_SERIAL_IR=m
CONFIG_USB_SERIAL_EDGEPORT=m
CONFIG_USB_SERIAL_EDGEPORT_TI=m
CONFIG_USB_SERIAL_F81232=m
CONFIG_USB_SERIAL_GARMIN=m
CONFIG_USB_SERIAL_IPW=m
CONFIG_USB_SERIAL_IUU=m
CONFIG_USB_SERIAL_KEYSPAN_PDA=m
CONFIG_USB_SERIAL_KEYSPAN=m
CONFIG_USB_SERIAL_KLSI=m
CONFIG_USB_SERIAL_KOBIL_SCT=m
CONFIG_USB_SERIAL_MCT_U232=m
CONFIG_USB_SERIAL_METRO=m
CONFIG_USB_SERIAL_MOS7720=m
CONFIG_USB_SERIAL_MOS7715_PARPORT=y
CONFIG_USB_SERIAL_MOS7840=m
CONFIG_USB_SERIAL_MOTOROLA=m
CONFIG_USB_SERIAL_NAVMAN=m
CONFIG_USB_SERIAL_PL2303=m
CONFIG_USB_SERIAL_OTI6858=m
CONFIG_USB_SERIAL_QCAUX=m
CONFIG_USB_SERIAL_QUALCOMM=m
CONFIG_USB_SERIAL_SPCP8X5=m
CONFIG_USB_SERIAL_HP4X=m
# CONFIG_USB_SERIAL_SAFE is not set
CONFIG_USB_SERIAL_SIEMENS_MPI=m
CONFIG_USB_SERIAL_SIERRAWIRELESS=m
CONFIG_USB_SERIAL_SYMBOL=m
CONFIG_USB_SERIAL_TI=m
CONFIG_USB_SERIAL_CYBERJACK=m
CONFIG_USB_SERIAL_XIRCOM=m
CONFIG_USB_SERIAL_WWAN=m
CONFIG_USB_SERIAL_OPTION=m
CONFIG_USB_SERIAL_OMNINET=m
CONFIG_USB_SERIAL_OPTICON=m
CONFIG_USB_SERIAL_VIVOPAY_SERIAL=m
# CONFIG_USB_SERIAL_ZIO is not set
CONFIG_USB_SERIAL_SSU100=m
# CONFIG_USB_SERIAL_DEBUG is not set
# CONFIG_USB_SERIAL_QUATECH2 is not set
# CONFIG_USB_SERIAL_QUATECH_USB2 is not set


ThomasW

Hi,

i found a nice instruction to build a ARM Distribution / kernel.

http://wordpress.labs.fhv.at/openlabs/files/2013/06/Distribution_v1.01.pdf

So this weekend i will try to build a new one.

Again Thanks

Thomas

progmetalbg

Hi,

Check also the tutorial from Olimex:

http://olimex.wordpress.com/2012/10/12/building-bootable-sd-card-with-debian-linux-image-for-a13-olinuxino/

However, pay attention that many things changed in the last year and if you just copy/paste commands it might not work.
My guide is for A20-Olinuxino with Arch Linux ARM, but should also give you an idea how to compile kernel and modules for your board:

http://alarma20.wordpress.com/2013/09/13/howto-build-arch-linux-arm-for-a20-olinuxino-micro/