You are not logged in.
Pages: 1
Dear all,
This is my first post so please be indulgent with me.
I have installed SliTaz 4.0 in an industrial computer from iEi just a couple of weeks ago.
It has a 2 GB CompactFlash "drive" and there's where I put SliTaz to work.
By the way, it's amazing what SliTaz have achieved with so little a footprint.
Everything is running smooth. However, I had a demonstration last Wednesday in a customer's facility and they managed to ruin my USB-to-serial adapter and the industrial computer serial port, which is how it was intended to receive commanding orders from outdoors.
I borrowed a second USB-serial adapter from my customer and put an old one of mine to work. Before plugging them into the industrial computer (with SliTaz 4.0), I checked both of them in my XUbuntu 12.04 based laptop. Fine.
So I went to the damaged computer and tried to use one of the new USB-to-serial adapters (from Belkin) to work on it (it has three USB ports). No luck. It recognizes the USB device, but refuses to open the ttyUSB0 it was supposed to.
I tried my old adapter (from Targus, with a printer connection and a serial connection, on top of a USB replicator), and it registered properly as USB device attached. It even managed to register the printer connection (/dev/lp0) through SliTaz 4.0, but nothing for the serial port.
I have resorted to google. It brings me to this forum no matter how I formulate my request.
I tried to read whatever this forum has to say, but found the posts were too old to cover the new release (4.0), or so they seem.
Even if I installed 'usbids' package, 'lsusb' keeps yielding just the port, location, vendor and product codes; 'lsusb' says nothing about manufacturer, the part itself, or whatever.
'/dev' has no 'ttyUSBx', no matter where I plug my adapter, even if it registers 'lp0'.
There's a '/dev/usb' directory, populated by six 'hiddevx' directories, but nothing about 'ttyUSBx' there either.
I read some posts in this forum saying SliTaz kernel has no support for USB Serial adapters, that you may recompile the kernel or just a module to include support for them. However, I am afraid this is something beyond my current skills.
I usually need no more than a hint on where to look / try. I has not been enough this time.
Any clue on where to start from?
Any hint on how to get those adapters working?
Thanks a lot for being there!
Kind regards,
Offline
What exactly does lsusb and dmesg say when you plug it in?
Offline
Did you load the Linux kernel module “usbserial” to activate the USB-Serial Adapter?
[c]$ su root
Password:
root@slitaz:# modprobe usbserial
root@slitaz:#[/c]
If your adapter is brand new and thus not recognized, unplug the device and run lsusb:
[c]root@slitaz:# lsusb
Bus 001 Device 001: ID 1d6b:0002
Bus 002 Device 001: ID 1d6b:0001
Bus 003 Device 001: ID 1d6b:0001
Bus 004 Device 001: ID 1d6b:0001
root@slitaz:#[/c]
Plug in the USB-Serial Adapter back, and run “lsusb” again, and you shall see an additional line:
[c]root@slitaz:# lsusb
Bus 001 Device 001: ID 1d6b:0002
Bus 002 Device 001: ID 1d6b:0001
Bus 003 Device 001: ID 1d6b:0001
Bus 004 Device 001: ID 1d6b:0001
Bus 003 Device 002: ID 046d:c016 <-- new device
root@slitaz:#[/c]
Then load the kernel module by specifing the vendor id and the product id of the device:
[c]root@slitaz:# modprobe usbserial vendor=0x046d product=0xc016
root@slitaz:#[/c]
Offline
When I plug my Belkin USB serial adapter in the system, 'lsusb' adds a line to its listing with
[c]Bus 004 Device 003: ID 050d:0109[/c]
'dmesg' says:
[c]usb 4-2: new full speed USB device using uhci_hcd and address 3[/c]
So, as per my former writing, the system actually detects and identifies the new USB device. It just doesn't seem to properly register it as to assigning a file name (as ttyUSB0, for example).
Coming to domcox advice, I think I have already tried it. In fact, I have tried so many possible alternate solutions that I'm not really sure.
I'll try again and post the results here.
Thanks a lot to you all.
Kind regards,
Offline
Hi arodulfo,
Googling for "050d:0109" and found this page: http://cateee.net/lkddb/web-lkddb/USB_SERIAL_MCT_U232.html
Seems like you need "mct_u232" (or "mct-u232") kernel module. Searching for this file in http://pkgs.slitaz.org gives me none. So, SliTaz have no this module. Ask developers to create it?..
+++++
Searching for module in kernel config in running SliTaz 4.0:
[c]tux@slitaz:~$ zcat /proc/config.gz | grep -i 'u232'
# CONFIG_USB_SERIAL_MCT_U232 is not set
tux@slitaz:~$[/c]
Module not set, need to kernel recompiling.
+++++
SliTaz 4.0 have following USB-Serial modules:
[c]zcat /proc/config.gz | grep -i -e 'usb_serial.*='
CONFIG_USB_SERIAL=m
CONFIG_USB_SERIAL_GENERIC=y
CONFIG_USB_SERIAL_CH341=m
CONFIG_USB_SERIAL_PL2303=m
CONFIG_USB_SERIAL_WWAN=m
CONFIG_USB_SERIAL_OPTION=m[/c]
Offline
@Trixar_za and @domcox,
This time, I managed to ensure I was playing root when running modprobe.
Now, as soon as I plug my Belkin USB Serial Adapter into the free USB port, the system detects it and a /dev/ttyUSB0 appears. You were right!
Fine, isn't it? Well, not that fast! I use minicom to communicate with my laptop. I had been using it with ttyS0 before our customer ruined it (along with my own serial adapter), so it was already configured to match flow control (no), speed, parity, and so on (9600, n,8,1) in the laptop. After reconfiguring it to use ttyUSB0 instead of ttyS0, I try to open the communications channel up and it miserably fails to show any life.
What else I'm failing to do?
Should I set anything else up?
Second to it, but important as well: how do I set this up so that it is automatically or permanently configured? I have noticed the 'modprobe' trick works for the current session only and I should run it every time I restart the o.s. Moreover, it just works with whatever vendor+product codes I write along with modprobe; I wouldn't be free to use any adapter, but the one I put in .profile or wherever.
Last comment (it could be normal, but I must mention it anyway): I am using USB keyboard and mouse; as soon as I plug the USB serial adapter in, the keyboard freezes for a while; I assume it does so for as long as it takes for the o.s. to register the adapter, identify it and establish the new driver. It is not important: the application should run with no keyboard or mouse attached. I mention it just to report everything I have seen; I can't tell if it is important or not.
Kind regards,
Offline
@Aleksej,
I had already went down that path.
I have even been browsing the proposed driver code.
I'm not afraid of going into whatever might be needed to get a module from that code and use it as an extra module for the kernel; however, I feel my skills are short of that.
As I see it, there are two tasks here:
TASK1: Compiling the proposed driver code as a module for SliTaz
TASK2: Including the new module among the ones already loaded with the kernel at startup and set it as the module being called when needed.
Any hints here?
Thank you so much in advance!
Kind regards,
Offline
Aleksej: That shouldn't matter - usbserial or option with modprobe should still work.
arodulfo: You can add it to local.sh at boot. You also misunderstand: The USB ID is not specific to just one device. It's shared by all devices of the same product type and manufacturer, meaning once configured any device that's similar to the one you used will work with the settings.
Offline
@Trixar_za: I'm sure there are many things I didn't get properly.
So, back to basics, let's assume I add a line to '/etc/init.d/local.sh' (or to $HOME/.profile; it should also work, isn't it?) with
[c]modprobe usbserial vendor=0x050d product=0x0109[/c]
It means every startup would also configure the usbserial module for Belkin (0x050d) USB-to-serial adapters...
So only Belkin devices and Belkin-compatibble USB-to-serial adapters should work with this setup, isn't it?
Moreover, even when the system recognizes the adapter and opens the matching ttyUSBx, it still doesn't work as expected...
Any hint here?
Should I still take the module-compiling way?
Please help.
Thanks a lot.
KRegards,
Offline
Download attached linux-mct-u232-2.6.37.tazpkg
[c]# tazpkg install linux-mct-u232-2.6.37.tazpkg[/c]
[c]# modprobe mct-u232[/c]
To autoload module on boot:
[c]# leafpad /etc/rcS.conf[/c]
LOAD_MODULES="mct-u232"
Offline
arodulfo: Pretty much, but other devices may be called automatically. For example my 3G Modem doesn't work without switching the device and modprobing option for it. My Nokia phone, on the other hand, automatically loads to ttyACMO - It depends on the device.
Luckily mojo above created the module you need for your current device. Just use his instructions 
Offline
@mojo: You're great!!!! I was ready to take the hard way but, to be honest, I felt some troubles in my knees and was not very sure about the results.
@Trixar_za: Think seriously on including mojo's work in future releases on the system. SliTaz is so good, it deserves a better support in this area.
Here's what I got once I followed mojo's directions. After having edited /etc/rcS.conf to include the module among those automatically loaded at startup, dmesg reports:
[c]USB Serial support registered for MCT U232
usbcore: registered new interface driver mct_u232
mct_u232: z2.1:Magic Control Technology USB-RS232 converter driver[/c]
Then, I plug my old device in a free USB port, and lsusb reports:
[c]ID 0451:2036
ID 0711:0300
ID 0711:0230[/c]
that correspond to USB hub, printer port and serial port; dmesg reports:
[c]usb 4-2: new full speed USB device using uhci_hcd and address 3
hub 4-2:1.0: USB hub found
hub 4-2:1.0: 3 ports detected
usb 4-2.1: new full speed USB device using uhci_hcd and address 4
usblp0: USB Bidirectional printer dev 4 if 0 alt 1 proto 2 vid 0x0711 pid 0x0300
usbcore: registered new interface driver usblp
usb 4-2.2: new full speed USB device using uhci_hcd and address 5
mct_u232 4-2.2:1.0: MCT U232 converter detected
usb 4-2.2: MCT U232 converter now attached to ttyUSB0[/c]
I ended launching minicom over ttyUSB0 and tested it against my laptop, equipped with the Belkin adapter. Everything went as smooth as expected.
Thanks a lot!!!!
Long life to SliTaz and to its developers and supporters!!!!
I just hope I someday will be able to give other people this kind of support..
Kind regards,
Offline
arodulfo,
@Trixar_za: Think seriously on including mojo's work in future releases on the system.
Pascal Bellard already added today this kernel module to the wok (commit). This change is sure to come in Rolling and 5.0.
Offline
Pages: 1
[ Generated in 0.034 seconds, 7 queries executed - Memory usage: 1.57 MiB (Peak: 1.77 MiB) ]