Automatic Activation, Hotplug and UDEV, Configuration
Post Reply
cyril
Posts: 4
Joined: 20 Jan 2012, 15:54

No switching method given - udev problem

Post by cyril » 20 Jan 2012, 16:12

Hi Josh,

Congrats for your amazing work ! I'm using usb_modeswitch on my laptop, it runs flawless :)

But I have a problem on an old debian 5 with a 2.6.30 kernel. (I cannot change this)

When I plug my Alcatel X220D (1bbb:f000) on a debian 6, no problems, I can use it right away. But the same dongle on my box gives me headache. I have to be honnest, playing with udev is not my cup of tea.

I use usb_modeswitch 1.2.1 compiled by hand, with the last datas package.

My dmesg after unplug / replug :

Code: Select all

[ 2207.379505] usb 2-1: USB disconnect, address 5
[ 2217.994256] usb 2-1: new high speed USB device using ehci_hcd and address 6
[ 2218.112506] usb 2-1: configuration #1 chosen from 1 choice
[ 2218.115034] scsi3 : SCSI emulation for USB Mass Storage devices
[ 2218.121733] usb-storage: device found at 6
[ 2218.121758] usb-storage: waiting for device to settle before scanning
[ 2223.124944] scsi 3:0:0:0: Direct-Access     ALCATEL  Mass Storage     2.31 PQ: 0 ANSI: 2
[ 2223.127354] usb-storage: device scan complete
[ 2223.136516] sd 3:0:0:0: [sda] Attached SCSI removable disk
Maybe this is enough for you to diagnose, but the only thing I can say is that usb_modeswitch udev rules seems to be ignored.

I try usb_modeswitch anyway :

Code: Select all

root ~ # usb_modeswitch -v 1bbb -p f000 -W
Taking all parameters from the command line


 * usb_modeswitch: handle USB devices with multiple modes
 * Version 1.2.1 (C) Josua Dietze 2011
 * Based on libusb0 (0.1.12 and above)

 ! PLEASE REPORT NEW CONFIGURATIONS !

DefaultVendor=  0x1bbb
DefaultProduct= 0xf000
TargetVendor=   not set
TargetProduct=  not set
TargetClass=    not set
TargetProductList=""

DetachStorageOnly=0
HuaweiMode=0
SierraMode=0
SonyMode=0
QisdaMode=0
GCTMode=0
KobilMode=0
SequansMode=0
MobileActionMode=0
CiscoMode=0
MessageEndpoint=  not set
MessageContent=""
NeedResponse=0
ResponseEndpoint= not set

InquireDevice enabled (default)
Success check disabled
System integration mode disabled


usb_set_debug: Setting debugging level to 15 (on)
usb_os_find_busses: Found 004
usb_os_find_busses: Found 003
usb_os_find_busses: Found 002
usb_os_find_busses: Found 001
usb_os_find_devices: Found 001 on 004
usb_os_find_devices: Found 001 on 003
usb_os_find_devices: Found 005 on 002
usb_os_find_devices: Found 001 on 002
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 002 on 001
skipped 10 class/vendor specific interface descriptors
skipped 2 class/vendor specific interface descriptors
skipping descriptor 0x25
skipped 1 class/vendor specific endpoint descriptors
skipped 2 class/vendor specific interface descriptors
skipping descriptor 0x25
skipped 1 class/vendor specific endpoint descriptors
skipped 1 class/vendor specific interface descriptors
usb_os_find_devices: Found 001 on 001
error obtaining child information: Inappropriate ioctl for device
Looking for default devices ...
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 1bbb:f000
   found matching vendor ID
   found matching product ID
   adding device
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 0d8c:0008
  searching devices, found USB ID 1d6b:0001
 Found device in default mode, class or configuration (1)
Accessing device 005 on bus 002 ...
Getting the current device configuration ...
 OK, got current device configuration (1)
Using first interface: 0x00
Using endpoints 0x01 (out) and 0x81 (in)
Inquiring device details; driver will be detached ...
Looking for active driver ...
USB error: could not get bound driver: No data available
 No driver found. Either detached before or never attached

SCSI inquiry data (for identification)
-------------------------
  Vendor String: ALCATEL 
   Model String: Mass Storage    
Revision String: 2.31
-------------------------

USB description data (for identification)
-------------------------
Manufacturer: USBModem
     Product: HSPA Data Card
  Serial No.: 1234567890ABCDEF
-------------------------
Warning: no switching method given.
-> Run lsusb to note any changes. Bye.
It says no driver found. This is probably linked to the udev problem. But I've tried something (without understanding anything) :

Code: Select all

modprobe -v usb-storage
And now the usb_modeswitch -v 1bbb -p f000 -W output is slightly different, the driver is found ! But I'm stuck with the "No switching method given"

Any clues ? Should I take the problem at the begining ? (dmesg output) And how ?

Thank you !!

This is the output with driver detected :

Code: Select all

root ~# usb_modeswitch -v 1bbb -p f000 -W
Taking all parameters from the command line


 * usb_modeswitch: handle USB devices with multiple modes
 * Version 1.2.1 (C) Josua Dietze 2011
 * Based on libusb0 (0.1.12 and above)

 ! PLEASE REPORT NEW CONFIGURATIONS !

DefaultVendor=  0x1bbb
DefaultProduct= 0xf000
TargetVendor=   not set
TargetProduct=  not set
TargetClass=    not set
TargetProductList=""

DetachStorageOnly=0
HuaweiMode=0
SierraMode=0
SonyMode=0
QisdaMode=0
GCTMode=0
KobilMode=0
SequansMode=0
MobileActionMode=0
CiscoMode=0
MessageEndpoint=  not set
MessageContent=""
NeedResponse=0
ResponseEndpoint= not set

InquireDevice enabled (default)
Success check disabled
System integration mode disabled


usb_set_debug: Setting debugging level to 15 (on)
usb_os_find_busses: Found 004
usb_os_find_busses: Found 003
usb_os_find_busses: Found 002
usb_os_find_busses: Found 001
usb_os_find_devices: Found 001 on 004
usb_os_find_devices: Found 001 on 003
usb_os_find_devices: Found 006 on 002
usb_os_find_devices: Found 001 on 002
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 002 on 001
skipped 10 class/vendor specific interface descriptors
skipped 2 class/vendor specific interface descriptors
skipping descriptor 0x25
skipped 1 class/vendor specific endpoint descriptors
skipped 2 class/vendor specific interface descriptors
skipping descriptor 0x25
skipped 1 class/vendor specific endpoint descriptors
skipped 1 class/vendor specific interface descriptors
usb_os_find_devices: Found 001 on 001
error obtaining child information: Inappropriate ioctl for device
Looking for default devices ...
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 1bbb:f000
   found matching vendor ID
   found matching product ID
   adding device
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 0d8c:0008
  searching devices, found USB ID 1d6b:0001
 Found device in default mode, class or configuration (1)
Accessing device 006 on bus 002 ...
Getting the current device configuration ...
 OK, got current device configuration (1)
Using first interface: 0x00
Using endpoints 0x01 (out) and 0x81 (in)
Inquiring device details; driver will be detached ...
Looking for active driver ...
 OK, driver found ("usb-storage")
 OK, driver "usb-storage" detached

SCSI inquiry data (for identification)
-------------------------
  Vendor String: ALCATEL 
   Model String: Mass Storage    
Revision String: 2.31
-------------------------

USB description data (for identification)
-------------------------
Manufacturer: USBModem
     Product: HSPA Data Card
  Serial No.: 1234567890ABCDEF
-------------------------
Warning: no switching method given.
-> Run lsusb to note any changes. Bye.

Josh
Site Admin
Posts: 6570
Joined: 03 Nov 2007, 00:30

Post by Josh » 20 Jan 2012, 19:42

If you hand-installed the data package with "make install", then you have the unpacked, ready-to-use config files in "/usr/share/usb_modeswitch". That's good, because you can just use the files without worrying about all the parameters.

Try to run: usb_modeswitch -W -I -c /usr/share/usb_modeswitch/1bbb:f000
What is happening?

Giving the device ID on the command line is not enough for the mode switching. You also have to provide the "magic" command that triggers the mode switch for the particular device. It's contained in the config file though, so you don't have to worry about it.


cyril
Posts: 4
Joined: 20 Jan 2012, 15:54

Post by cyril » 23 Jan 2012, 10:05

Hi Josh,

Thank you for your answer ! It's better now, but I cannot get it working.

So I tried your command (the -l option is unknown, but it works without) :

Code: Select all

root ~ # usb_modeswitch -W -c /usr/share/usb_modeswitch/1bbb\:f000

Reading config file: /usr/share/usb_modeswitch/1bbb:f000

 * usb_modeswitch: handle USB devices with multiple modes
 * Version 1.2.1 (C) Josua Dietze 2011
 * Based on libusb0 (0.1.12 and above)

 ! PLEASE REPORT NEW CONFIGURATIONS !

DefaultVendor=  0x1bbb
DefaultProduct= 0xf000
TargetVendor=   0x1bbb
TargetProduct=  not set
TargetClass=    not set
TargetProductList="0000,0017"

DetachStorageOnly=0
HuaweiMode=0
SierraMode=0
SonyMode=0
QisdaMode=0
GCTMode=0
KobilMode=0
SequansMode=0
MobileActionMode=0
CiscoMode=0
MessageEndpoint=  not set
MessageContent="55534243123456788000000080000606f50402527000000000000000000000"
NeedResponse=0
ResponseEndpoint= not set

InquireDevice enabled (default)
Success check enabled, max. wait time 20 seconds
System integration mode disabled


usb_set_debug: Setting debugging level to 15 (on)
usb_os_find_busses: Found 004
usb_os_find_busses: Found 003
usb_os_find_busses: Found 002
usb_os_find_busses: Found 001
usb_os_find_devices: Found 001 on 004
usb_os_find_devices: Found 001 on 003
usb_os_find_devices: Found 009 on 002
usb_os_find_devices: Found 001 on 002
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 002 on 001
skipped 10 class/vendor specific interface descriptors
skipped 2 class/vendor specific interface descriptors
skipping descriptor 0x25
skipped 1 class/vendor specific endpoint descriptors
skipped 2 class/vendor specific interface descriptors
skipping descriptor 0x25
skipped 1 class/vendor specific endpoint descriptors
skipped 1 class/vendor specific interface descriptors
usb_os_find_devices: Found 001 on 001
error obtaining child information: Inappropriate ioctl for device
Looking for target devices ...
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 1bbb:f000
   found matching vendor ID
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 0d8c:0008
  searching devices, found USB ID 1d6b:0001
 No devices in target mode or class found
Looking for default devices ...
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 1bbb:f000
   found matching vendor ID
   found matching product ID
   adding device
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 0d8c:0008
  searching devices, found USB ID 1d6b:0001
 Found device in default mode, class or configuration (1)
Accessing device 009 on bus 002 ...
Getting the current device configuration ...
 OK, got current device configuration (1)
Using first interface: 0x00
Using endpoints 0x01 (out) and 0x81 (in)
Inquiring device details; driver will be detached ...
Looking for active driver ...
 OK, driver found ("usb-storage")
 OK, driver "usb-storage" detached

SCSI inquiry data (for identification)
-------------------------
  Vendor String: ALCATEL 
   Model String: Mass Storage    
Revision String: 2.31
-------------------------

USB description data (for identification)
-------------------------
Manufacturer: USBModem
     Product: HSPA Data Card
  Serial No.: 1234567890ABCDEF
-------------------------
Setting up communication with interface 0
Using endpoint 0x01 for message sending ...
Trying to send message 1 to endpoint 0x01 ...
 OK, message successfully sent
Resetting response endpoint 0x81
Resetting message endpoint 0x01
USB error: could not release intf 0: No such device
 Device is gone, skipping any further commands

Checking for mode switch (max. 20 times, once per second) ...
 Searching for target devices ...
usb_os_find_busses: Found 004
usb_os_find_busses: Found 003
usb_os_find_busses: Found 002
usb_os_find_busses: Found 001
usb_os_find_devices: Found 001 on 004
usb_os_find_devices: Found 001 on 003
usb_os_find_devices: Found 010 on 002
usb_os_find_devices: Found 001 on 002
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 002 on 001
skipped 10 class/vendor specific interface descriptors
skipped 2 class/vendor specific interface descriptors
skipping descriptor 0x25
skipped 1 class/vendor specific endpoint descriptors
skipped 2 class/vendor specific interface descriptors
skipping descriptor 0x25
skipped 1 class/vendor specific endpoint descriptors
skipped 1 class/vendor specific interface descriptors
usb_os_find_devices: Found 001 on 001
error obtaining child information: Inappropriate ioctl for device
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 1bbb:0017
   found matching vendor ID
   found matching product ID from list
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 0d8c:0008
  searching devices, found USB ID 1d6b:0001

Found target device, now opening

Found target device 010 on bus 002

Target device description data
-------------------------
Manufacturer: USBModem
     Product: HSPA Data Card
  Serial No.: 1234567890ABCDEF
-------------------------
 Found correct target device

Mode switch succeeded. Bye.
A few errors are triggered in this log, but at the end it says "succeeded" so I guess these errors weren't important.

After that I still have nothing in /dev :

"find /dev | grep modem -i" returns nothing
"find /dev | grep tty -i" returns nothing
"find /dev | grep usb -i" returns a lot of things but only theses seem relevants :

/dev/disk/by-id/usb-ALCATEL_Mass_Storage_1234567890ABCDEF-0:0
/dev/.udev/names/disk\x2fby-id\x2fusb-ALCATEL_Mass_Storage_1234567890ABCDEF-0:0
/dev/.udev/names/disk\x2fby-id\x2fusb-ALCATEL_Mass_Storage_1234567890ABCDEF-0:0/\x2fdevices\x2fpci0000:00\x2f0000:00:0a.1\x2fusb2\x2f2-1\x2f2-1:1.4\x2fhost7\x2ftarget7:0:0\x2f7:0:0:0\x2fblock\x2fsda

Do you have any ideas what's going on ? I dont even know why I don't have any /dev/ttyUSB*

Thank you again !
Last edited by cyril on 23 Jan 2012, 16:48, edited 1 time in total.

cyril
Posts: 4
Joined: 20 Jan 2012, 15:54

Post by cyril » 23 Jan 2012, 10:16

Ok, it seems I don't have the usbserial module. And I cannot rebuild the kernel so I'll try to figure it out and I'll keep you in touch !

cyril
Posts: 4
Joined: 20 Jan 2012, 15:54

Post by cyril » 23 Jan 2012, 16:20

Ok It's working, usbserial was there but unloaded :

modprobe -r usbserial
modprobe usbserial vendor=0x1bbb product=0x0017

and wvdial stuff and I'm good :)

Thank's again !!

rosydam
Posts: 6
Joined: 09 Jan 2024, 09:52
Contact:

Re: No switching method given - udev problem

Post by rosydam » 21 Mar 2024, 09:48

The cross-platform compatibility of Geometry Dash enables players to share their experiences and achievements across various devices.

LucyCoffee
Posts: 3
Joined: 27 Jan 2024, 08:24

Re: No switching method given - udev problem

Post by LucyCoffee » 26 Apr 2024, 10:32

This error can occur when trying to switch devices or perform certain actions using udev without specifying a valid switching method. Troubleshoot the udev configuration or consult documentation for proper tifa sexdoll usage and resolution of the issue.

Post Reply