Page 1 of 1

install ModeSwitch on QNap x86

Posted: 10 Mar 2012, 19:15
by ju
Hallo

i had successfull compiled the usb-modeswitch on the qnap, but after i copy the files to the locations it doesn't works. A udev isn't there and thats the secounds problem.

the frist one is the modem:

Code: Select all

[/usr/sbin] # lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 002: ID 1005:b155 Apacer Technology, Inc.
Bus 002 Device 007: ID 12d1:1446 Huawei Technologies Co., Ltd. E1552 (HSPA modem)
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 009 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
and if i start with this config:

Code: Select all

DisableSwitching=0

EnableLogging=1

DefaultVendor= 0x12d1
DefaultProduct=0x1446

MessageEndpoint = 0x0f
MessageContent="55534243123456780000000000000011060000000000000000000000000000"

TargetVendor= 0x12d1
TargetProductList="1001,1406,140b,140c,1412,141b,1433,14ac,1506"
TargetProduct=0x140c
i got this result:

Code: Select all

[/usr/sbin] # ./usb_modeswitch -c /etc/usb_modeswitch.conf
Warning: TargetProductList overrides TargetProduct!

Looking for target devices ...
 No devices in target mode or class found
Looking for default devices ...
   found matching product ID
   adding device
 Found device in default mode, class or configuration (1)
Accessing device 007 on bus 002 ...
Getting the current device configuration ...
 OK, got current device configuration (1)
Using first interface: 0x00
Using endpoints 0x0f (out) and 0x81 (in)
Inquiring device details; driver will be detached ...
Looking for active driver ...
 No driver found. Either detached before or never attached
 Could not send INQUIRY message (error -5)

USB description data (for identification)
-------------------------
Manufacturer: Huawei Incorporated
     Product: HUAWEI Mobile Connect
  Serial No.: 1234567890ABCDEF
-------------------------
Looking for active driver ...
 No driver found. Either detached before or never attached
Setting up communication with interface 0
Using endpoint 0x0f for message sending ...
Trying to send message 1 to endpoint 0x0f ...
 Sending the message returned error -5. Trying to continue
Resetting response endpoint 0x81
Resetting message endpoint 0x0f
 Could not reset endpoint (probably harmless): -2
-> Run lsusb to note any changes. Bye.

[/usr/sbin] # lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 002: ID 1005:b155 Apacer Technology, Inc.
Bus 002 Device 007: ID 12d1:1446 Huawei Technologies Co., Ltd. E1552 (HSPA modem)
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 009 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
[/usr/sbin] #
so, the modem don't switch, but i don't know why. i prob it with a t-mobile stick before and this doesn't works too on the qnap. what can i do to find a working configuration?

kind regards

ju

Posted: 16 Mar 2012, 18:19
by Josh
Back from vacation ...

If udev is not on your system, automatic mode will not work.
If you have the files installed at the original places, you should be able to run manually though.

Try running (as root or with sudo):

Code: Select all

# usb_modeswitch -W -c /usr/share/usb_modeswitch/12d1\:1446
Don't use the global config file for device configurations!


Posted: 16 Mar 2012, 18:39
by ju
Hi Josh,

i use this command via shell, but it doesn't work.

he send the command to the modem or the script think so, but nothing happens. the modem will be in the old state.

a sudo command is not availible on the qnap nas, you are everytime connected as root

did you have another idea?

kind regards

Posted: 17 Mar 2012, 11:00
by Josh
Working or not, I would like to see the complete output of that line.