Automatic Activation, Hotplug and UDEV, Configuration
Post Reply
sting
Posts: 3
Joined: 18 Oct 2011, 10:21

Nubie trying to figure this stuff out.

Post by sting » 18 Oct 2011, 11:08

I have one of those really cheap Philips modems and I can't figure out how to make traction. I have read many submissions, for some reason I still can't make any progress.

First I used lsusb and found:

Bus = 006 Device = 004 ID = 0471:1210 Philips (or NXP)

I found the device in /etc/usb_modeswitch.d directory so someone got it to work

I attempt
~$ usb_modeswitch -v 0x0471 -p 0x1210 -V 0x0471 -m 0x03 -c /home/ray/aircard.conf

Looking for target devices ...
No devices in target mode or class found
Looking for default devices ...
Found devices in default mode, class or configuration (1)
Accessing device 000 on bus 006 ...
Getting the current device configuration ...
Error: getting the current configuration failed (error -1). Aborting.

The device is 004 not 000, how do I tell the command to find the right device?
What configuration is it looking for?

I set the EnableLogging flag, but the log file does not exist.

Any help would be appreciated.
Thanks in advance

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

Post by Josh » 19 Oct 2011, 08:08

If you find your device ID among the configuration files, the switching should happen automatically.

The logging will only happen during an automatic mode switch.

So, the question in your case is: does the automatic way work?
Did you check if "Tcl" is installed on your system? What do you get if you type "which tclsh" in a terminal?

If you are running usb_modeswitch manually, do so as "root" or with "sudo". Otherwise the hardware access will fail.
If your device data - like "DefaultVendor" - is contained in "aircard.conf", you don't have to provide it on the command line as well.


sting
Posts: 3
Joined: 18 Oct 2011, 10:21

Post by sting » 19 Oct 2011, 18:25

which tclsh yields /usr/bin/tclsh

I am just trying to understand how to do it automatically.

For some reason, I removed all of the parameters from the command line and just used the configuration file and it worked properly. Now I have to figure it out automatically.

Thanks for your help and the work to make this possible.

sting
Posts: 3
Joined: 18 Oct 2011, 10:21

No gsmmodem device

Post by sting » 19 Oct 2011, 19:04

When I look in dmesg it seems like the switch has worked.

Code: Select all

[   57.109734] usbcore: registered new interface driver uas

[   57.115798] Initializing USB Mass Storage driver...

[   57.115894] scsi14 : usb-storage 6-1:1.0

[   57.116088] usbcore: registered new interface driver usb-storage

[   57.116090] USB Mass Storage support registered.

[  180.253893] usb 6-1: usbfs: process 1792 (usb_modeswitch) did not claim interface 0 before use

[  180.280916] usb 6-1: USB disconnect, address 2

[  184.868452] usb 6-1: new full speed USB device using uhci_hcd and address 3

[  185.101582] cdc_acm 6-1:1.0: ttyACM0: USB ACM device

[  185.103818] usbcore: registered new interface driver cdc_acm

[  185.103822] cdc_acm: v0.26:USB Abstract Control Model driver for USB modems and ISDN
And it seems the device is at /dev/ttyACM0

When I look in the log for usb_modeswitch I see

Code: Select all

DefaultVendor=  0x0471
DefaultProduct= 0x1210
TargetVendor=   0x1dbc
TargetProduct=  0x0005
TargetClass=    not set
TargetProductList=""

DetachStorageOnly=0
HuaweiMode=0
SierraMode=0
SonyMode=0
GCTMode=0
KobilMode=0
MessageEndpoint=  not set
MessageContent="5553424312345678000000000000061b000000020000000000000000000000"
NeedResponse=1
ResponseEndpoint= not set
Interface=0x00

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


Looking for target devices ...
  searching devices, found USB ID 1d6b:0003
  searching devices, found USB ID 0557:2221
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 0471:1210
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 1d6b:0001

  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 1d6b:0002
 No devices in target mode or class found
Looking for default devices ...
  searching devices, found USB ID 1d6b:0003
  searching devices, found USB ID 0557:2221
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 0471:1210
   found matching vendor ID
   found matching product ID
   adding device
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 1d6b:0002
 Found devices in default mode, class or configuration (1)
Accessing device 002 on bus 006 ...
Getting the current device configuration ...
 OK, got current device configuration (1)
Ambiguous Class/InterfaceClass: 0x02/0x08
Using endpoints 0x03 (out) and 0x83 (in)
Using endpoints 0x03 (out) and 0x83 (in)

USB description data (for identification)
-------------------------
Manufacturer: Wisue Technology
     Product: Mass Storage
  Serial No.: 000000-00-000000
-------------------------
Looking for active driver ...
 OK, driver found ("usb-storage")
 OK, driver "usb-storage" detached
Setting up communication with interface 0 ...
Using endpoint 0x03 for message sending ...
Trying to send message 1 to endpoint 0x03 ...
 OK, message successfully sent
Reading the response to the message (CSW) ...
 OK, response successfully read (13 bytes).
Resetting response endpoint 0x83
Resetting message endpoint 0x03

Checking for mode switch (max. 20 times, once per second) ...
 Waiting for original device to vanish ...
 Waiting for original device to vanish ...
 Waiting for original device to vanish ...
 Waiting for original device to vanish ...
 Waiting for original device to vanish ...
 Waiting for original device to vanish ...
 Waiting for original device to vanish ...
 Waiting for original device to vanish ...
 Waiting for original device to vanish ...
 Waiting for original device to vanish ...
 Waiting for original device to vanish ...
 Waiting for original device to vanish ...
 Waiting for original device to vanish ...
 Waiting for original device to vanish ...
 Waiting for original device to vanish ...
 Waiting for original device to vanish ...
 Waiting for original device to vanish ...
 Waiting for original device to vanish ...
 Waiting for original device to vanish ...
 Waiting for original device to vanish ...
 Original device still present after the timeout

Mode switch most likely failed. Bye.

fail:

--------------------------------
(end of usb_modeswitch output)

USB dir exists: /sys/bus/usb/devices/6-1

All done, exiting
It seems that usb_modeswitch doesn't think it has worked and I can't use the device /dev/ttyACM0 and there does not seem to be a device gsmmodem?

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

Post by Josh » 23 Oct 2011, 09:08

I recommend using the current version of usb_modeswitch. There were several fixes and changes since the previous ones.

What is your usb_modeswitch version and what is your system?

Post Reply