gnokii-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

which usb device to use (old kernel)


From: Warren Burstein
Subject: which usb device to use (old kernel)
Date: Mon, 27 May 2013 03:16:49 +0300

I'm trying to set up gnokii.  Unfortunately the linux that I was given to do it on is a Centos 3.4 with a 2.4.21 kernel.  Yes, I know this is ancient (2004) but that's what there is.

There's a Sony Ericsson phone plugged in to a USB port (not on the supported phones list, but I thought it's worth a try), and it shows up in lsusb

$ lsusb
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 002 Device 002: ID 0fce:e12d Sony Ericsson Mobile Communications AB
Bus 001 Device 001: ID 0000:0000

And there are ttyUSB devices in /dev

$ ls -l /dev/ttyUSB*
crw-rw----    1 root     uucp     188,   0 Sep  9  2004 /dev/ttyUSB0
crw-rw----    1 root     uucp     188,   1 Sep  9  2004 /dev/ttyUSB1
crw-rw----    1 root     uucp     188,  10 Sep  9  2004 /dev/ttyUSB10
crw-rw----    1 root     uucp     188,  11 Sep  9  2004 /dev/ttyUSB11
crw-rw----    1 root     uucp     188,  12 Sep  9  2004 /dev/ttyUSB12
crw-rw----    1 root     uucp     188,  13 Sep  9  2004 /dev/ttyUSB13
crw-rw----    1 root     uucp     188,  14 Sep  9  2004 /dev/ttyUSB14
crw-rw----    1 root     uucp     188,  15 Sep  9  2004 /dev/ttyUSB15
crw-rw----    1 root     uucp     188,   2 Sep  9  2004 /dev/ttyUSB2
crw-rw----    1 root     uucp     188,   3 Sep  9  2004 /dev/ttyUSB3
crw-rw----    1 root     uucp     188,   4 Sep  9  2004 /dev/ttyUSB4
crw-rw----    1 root     uucp     188,   5 Sep  9  2004 /dev/ttyUSB5
crw-rw----    1 root     uucp     188,   6 Sep  9  2004 /dev/ttyUSB6
crw-rw----    1 root     uucp     188,   7 Sep  9  2004 /dev/ttyUSB7
crw-rw----    1 root     uucp     188,   8 Sep  9  2004 /dev/ttyUSB8
crw-rw----    1 root     uucp     188,   9 Sep  9  2004 /dev/ttyUSB9

That's the right major device for the usbserial driver.  I couldn't figure out which of them to use, so I wrote a small C program to try to open each of these, with flags O_RDWR | O_NONBLOCK | O_NOCTTY.  I ran it at superuser.  I thought that whichever port the phone was connected to would open and the others would fail to open.  Unfortunately, I got ENODEV on all ports.  I thought that maybe it might be a higher minor device, so I mknod'd with minor device up to 255 and still they all fail to open, same error code.

I looked in the output of dmesg for lines having to do with usb, there were quite a lot

usb.c: registered new driver usbdevfs
usb.c: registered new driver hub
usb-uhci.c: $Revision: 1.275 $ time 02:04:06 Sep  9 2004
usb-uhci.c: High bandwidth mode enabled
PCI: Setting latency timer of device 00:1d.0 to 64
usb-uhci.c: USB UHCI at I/O 0xc800, IRQ 23
usb-uhci.c: Detected 2 ports
usb.c: new USB bus registered, assigned bus number 1
hub.c: USB hub found
hub.c: 2 ports detected
PCI: Setting latency timer of device 00:1d.1 to 64
usb-uhci.c: USB UHCI at I/O 0xcc00, IRQ 19
usb-uhci.c: Detected 2 ports
usb.c: new USB bus registered, assigned bus number 2
hub.c: USB hub found
hub.c: 2 ports detected
PCI: Setting latency timer of device 00:1d.2 to 64
usb-uhci.c: USB UHCI at I/O 0xd000, IRQ 18
usb-uhci.c: Detected 2 ports
usb.c: new USB bus registered, assigned bus number 3
hub.c: USB hub found
hub.c: 2 ports detected
PCI: Setting latency timer of device 00:1d.3 to 64
usb-uhci.c: USB UHCI at I/O 0xd400, IRQ 16
usb-uhci.c: Detected 2 ports
usb.c: new USB bus registered, assigned bus number 4
hub.c: USB hub found
hub.c: 2 ports detected
usb-uhci.c: v1.275:USB Universal Host Controller Interface driver
PCI: Setting latency timer of device 00:1d.7 to 64
ehci-hcd 00:1d.7: PCI device 8086:265c (Intel Corp.)
ehci-hcd 00:1d.7: irq 23, pci mem f8899c00
usb.c: new USB bus registered, assigned bus number 5
ehci-hcd 00:1d.7: enabled 64bit PCI DMA
PCI: 00:1d.7 PCI cache line size set incorrectly (0 bytes) by BIOS/FW.
PCI: 00:1d.7 PCI cache line size corrected to 128.
ehci-hcd 00:1d.7: USB 2.0 enabled, EHCI 1.00, driver 2003-Jan-22
hub.c: USB hub found
hub.c: 8 ports detected
usb.c: registered new driver hiddev
usb.c: registered new driver hid
hid-core.c: v1.8.1 Andreas Gal, Vojtech Pavlik <address@hidden>
hid-core.c: USB HID support drivers
mice: PS/2 mouse device common for all mice
hub.c: connect-debounce failed, port 1 disabled
hub.c: new USB device 00:1d.1-1, assigned address 2
usb.c: USB device 2 (vend/prod 0xfce/0xe12d) is not claimed by any active driver.
Initializing USB Mass Storage driver...
usb.c: registered new driver usb-storage
scsi2 : SCSI emulation for USB Mass Storage devices
usb-uhci.c: interrupt, status 3, frame# 906
  Vendor: Sony Eri  Model: Memory Card       Rev: 0000
  Type:   Direct-Access                      ANSI SCSI revision: 02

I noticed that line saying 'usb.c: USB device 2 (vend/prod 0xfce/0xe12d) is not claimed by any active driver.', that's the same vendor/product displayed by lsusb, and 0xfce is Sony Ericsson's vendor code.  It also seems to have found the memory card on the phone, but I'm not trying to use that.

also at the very end of dmesg's output it said

usb.c: registered new driver serial
usbserial.c: USB Serial support registered for Generic
usbserial.c: USB Serial Driver core v1.4

Poking around the documentation for the kernel, I found in linux-2.4.21/Documentation/usb/usb-serial.txt to pass the vendor and product to an insmod command.  usbserial was already loaded so I did

# rmmod usbserial
# insmod usbserial vendor=0x0fce product=0xe12d
Using /lib/modules/2.4.21-20.EL.c0smp/kernel/drivers/usb/serial/usbserial.o


That added the following lines to the output of dmesg, but still, all 256 ttyUSB ports fail to open with ENODEV.

usbserial.c: USB Serial deregistering driver Generic
usb.c: deregistering driver serial
usb.c: registered new driver serial
usbserial.c: USB Serial support registered for Generic
usbserial.c: USB Serial Driver core v1.4

Should I do something else to locate the correct device?  Do I need to do something else to get the device to work?

thanks

reply via email to

[Prev in Thread] Current Thread [Next in Thread]