Activation Codes and Methods, Hardware Details, Sniffing
Post Reply
yjh
Posts: 4
Joined: Tue Jun 28, 2011 5:44 am

Longcheer SU9800 does not work in linux

Post by yjh » Tue Jun 28, 2011 10:30 am

Longcheer SU9800 does not work in linux, it seems there is something wrong when usb_modeswitch.
I have also test SU9800 in windows using usb-sniffer, it shows the vendorid and productid both is 1c9e:9800 for SU9800 either before switched or after switched.

[root@vivian Downloads]# vim /etc/usb_modeswitch.d/1c9e:9800
########################################################
# MobiData MBD-200HU and others

DefaultVendor= 0x1c9e
DefaultProduct=0x9800

TargetProductList="9000,9603,9605,9800"

CheckSuccess=20

MessageContent="55534243123456788000000080000606f50402527000000000000000000000"

NeedResponse=1

[root@vivian Downloads]# usb_modeswitch -W -I -c /etc/usb_modeswitch.d/1c9e:9800
USB_ModeSwitch log from Wed Jun 29 14:34:25 CST 2011

Using global config file: /etc/usb_modeswitch.conf
raw args from udev: /1-6:1.0
Bus ID for device not given by udev.
Trying to determine it from kernel name (1-6:1.0) ...
USB dir exists: /sys/bus/usb/devices/1-6
----------------
USB values from sysfs:
manufacturer USB Modem
product USB Modem
serial 1234567890ABCDEF
----------------
SCSI attributes not needed, moving on
checking config: /etc/usb_modeswitch.d/1c9e:9800
! matched, now switching
(running command: /usr/sbin/usb_modeswitch -I -W -c /etc/usb_modeswitch.d/1c9e:9800)

verbose output of usb_modeswitch:
--------------------------------
usb_set_debug: Setting debugging level to 15 (on)
usb_os_find_busses: Found 001
usb_os_find_busses: Found 005
usb_os_find_busses: Found 004
usb_os_find_busses: Found 003
usb_os_find_busses: Found 002
usb_os_find_devices: Found 019 on 001
usb_os_find_devices: Found 003 on 001
skipping descriptor 0xB
skipped 1 class/vendor specific endpoint descriptors
skipped 5 class/vendor specific interface descriptors
skipping descriptor 0x25
skipped 1 class/vendor specific endpoint descriptors
skipped 11 class/vendor specific interface descriptors
usb_os_find_devices: Found 001 on 001
error obtaining child information: Inappropriate ioctl for device
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 001 on 005
usb_os_find_devices: Found 001 on 004
usb_os_find_devices: Found 001 on 003
usb_os_find_devices: Found 001 on 002

Reading config file: /etc/usb_modeswitch.d/1c9e:9800
Warning: TargetProductList overrides TargetProduct!
* usb_modeswitch: handle USB devices with multiple modes
* Version 1.1.4 (C) Josua Dietze 2010
* Based on libusb0 (0.1.12 and above)

! PLEASE REPORT NEW CONFIGURATIONS !

DefaultVendor= 0x1c9e
DefaultProduct= 0x9800
TargetVendor= not set
TargetProduct= not set
TargetClass= not set
TargetProductList="9000,9603,9605,9800"

DetachStorageOnly=0
HuaweiMode=0
SierraMode=0
SonyMode=0
GCTMode=0
MessageEndpoint= not set
MessageContent="55534243123456788000000080000606f50402527000000000000000000000"
NeedResponse=1
ResponseEndpoint= not set
Interface=0x00

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

Looking for default devices ...
searching devices, found USB ID 1c9e:9800
found matching vendor ID
found matching product ID
adding device
searching devices, found USB ID 0ac8:c447
searching devices, found USB ID 1d6b:0002
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
Found devices in default mode or class (1)
Accessing device 019 on bus 001 ...
Using endpoints 0x01 (out) and 0x81 (in)
Using endpoints 0x01 (out) and 0x81 (in)

USB description data (for identification)
-------------------------
Manufacturer: USB Modem
Product: USB Modem
Serial No.: 1234567890ABCDEF
-------------------------
Looking for active driver ...
OK, driver found ("usb-storage")
OK, driver "usb-storage" detached
Setting up communication with interface 0 ...
Using endpoint 0x01 for message sending ...
Trying to send message 1 to endpoint 0x01 ...
USB error: could not claim interface 0: No such device
OK, message successfully sent
Reading the response to the message (CSW) ...
OK, response successfully read (128 bytes).
Resetting response endpoint 0x81
Resetting message endpoint 0x01

Checking for mode switch (max. 20 times, once per second) ...
Waiting for original device to vanish ...
Original device can't be accessed anymore. Good.
(For a better success check provide target IDs or class)
Original device vanished after switching

Mode switch most likely succeeded. Bye.

ok:0000:0000
--------------------------------
(end of usb_modeswitch output)

Driver module is "option", ID path is /sys/bus/usb-serial/drivers/option1

Now checking for newly created serial devices ...
no new serial devices found
USB dir exists: /sys/bus/usb/devices/1-6
Trying to add ID to driver "option"
driver successfully bound
Checking for AVOID_RESET_QUIRK attribute
AVOID_RESET_QUIRK activated

All done, exiting


[root@vivian Downloads]# ls -l /dev | grep ttyU
lrwxrwxrwx 1 root root 7 6月 29 12:43 gsmmodem -> ttyUSB1
crw-rw---- 1 root dialout 188, 0 6月 29 12:50 ttyUSB0
crw-rw---- 1 root dialout 188, 1 6月 29 12:51 ttyUSB1
crw-rw---- 1 root dialout 188, 2 6月 29 12:50 ttyUSB2

although usb_modeswitch report: switch most likely succeeded, but modem-manager still begin to run. unfortunately, modem-manager sometimes open ttyUSB2, which is not normal because ttyUSB1 is right the modem. sometimes modem-manager may open ttyUSB1 and the connection can be established, but NetworkManager fail to get right DNS.

[root@vivian Downloads]# vim /etc/resolv.conf
#Generated by NetworkManager
nameserver 10.11.12.13
nameserver 10.11.12.14

i think maybe it is because the switch has failed. the message content is the best doubt. so i try to get it through usb-sniffer in windows, but at last i failed,i just can't find proper message content. the info i get is as follows:

[deleted]

Josh
Site Admin
Posts: 6556
Joined: Sat Nov 03, 2007 12:30 am

Post by Josh » Tue Jun 28, 2011 7:10 pm

Please try this config file content:

Code: Select all

DefaultVendor= 0x1c9e
DefaultProduct=0x9800

TargetClass=0xff

MessageContent="55534243123456780000000000000606f50402527000000000000000000000"

CheckSuccess=20
Add a line for your device to
/lib/udev/rules.d/40-usb_modeswitch.rules

Have a look, it's quite easy.


yjh
Posts: 4
Joined: Tue Jun 28, 2011 5:44 am

Post by yjh » Wed Jun 29, 2011 4:04 am

dear josh:
thank you for you reply, i have try your configure, but it is still failed.
the following is log gotten from /var/log:

USB_ModeSwitch log from Thu Jun 30 08:19:23 CST 2011

Using global config file: /etc/usb_modeswitch.conf
raw args from udev: /1-1:1.0
Bus ID for device not given by udev.
Trying to determine it from kernel name (1-1:1.0) ...
USB dir exists: /sys/bus/usb/devices/1-1
----------------
USB values from sysfs:
manufacturer USB Modem
product USB Modem
serial 1234567890ABCDEF
----------------
SCSI attributes not needed, moving on
checking config: /etc/usb_modeswitch.d/1c9e:9800
! matched, now switching
(running command: /usr/sbin/usb_modeswitch -I -W -c /etc/usb_modeswitch.d/1c9e:9800)

verbose output of usb_modeswitch:
--------------------------------
usb_set_debug: Setting debugging level to 15 (on)
usb_os_find_busses: Found 001
usb_os_find_busses: Found 005
usb_os_find_busses: Found 004
usb_os_find_busses: Found 003
usb_os_find_busses: Found 002
usb_os_find_devices: Found 006 on 001
usb_os_find_devices: Found 003 on 001
skipping descriptor 0xB
skipped 1 class/vendor specific endpoint descriptors
skipped 5 class/vendor specific interface descriptors
skipping descriptor 0x25
skipped 1 class/vendor specific endpoint descriptors
skipped 11 class/vendor specific interface descriptors
usb_os_find_devices: Found 001 on 001
error obtaining child information: Inappropriate ioctl for device
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 001 on 005
usb_os_find_devices: Found 001 on 004
usb_os_find_devices: Found 001 on 003
usb_os_find_devices: Found 001 on 002
Reading config file: /etc/usb_modeswitch.d/1c9e:9800
* usb_modeswitch: handle USB devices with multiple modes
* Version 1.1.4 (C) Josua Dietze 2010
* Based on libusb0 (0.1.12 and above)

! PLEASE REPORT NEW CONFIGURATIONS !

DefaultVendor= 0x1c9e
DefaultProduct= 0x9800
TargetVendor= not set
TargetProduct= not set
TargetClass= 0xff
TargetProductList=""

DetachStorageOnly=0
HuaweiMode=0
SierraMode=0
SonyMode=0
GCTMode=0
MessageEndpoint= not set
MessageContent="55534243123456780000000000000606f50402527000000000000000000000"
NeedResponse=0
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 1c9e:9800
found matching vendor ID
found matching product ID
target class ff not matching
searching devices, found USB ID 0ac8:c447
searching devices, found USB ID 1d6b:0002
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1d6b:0001
Reading config file: /etc/usb_modeswitch.d/1c9e:9800
* usb_modeswitch: handle USB devices with multiple modes
* Version 1.1.4 (C) Josua Dietze 2010
* Based on libusb0 (0.1.12 and above)

! PLEASE REPORT NEW CONFIGURATIONS !

DefaultVendor= 0x1c9e
DefaultProduct= 0x9800
TargetVendor= not set
TargetProduct= not set
TargetClass= 0xff
TargetProductList=""

DetachStorageOnly=0
HuaweiMode=0
SierraMode=0
SonyMode=0
GCTMode=0
MessageEndpoint= not set
MessageContent="55534243123456780000000000000606f50402527000000000000000000000"
NeedResponse=0
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 1c9e:9800
found matching vendor ID
found matching product ID
target class ff not matching
searching devices, found USB ID 0ac8:c447
searching devices, found USB ID 1d6b:0002
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1d6b:0001
No devices in target mode or class found
Looking for default devices ...
searching devices, found USB ID 1c9e:9800
found matching vendor ID
found matching product ID
target class ff not matching
adding device as default
searching devices, found USB ID 0ac8:c447
searching devices, found USB ID 1d6b:0002
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
Found devices in default mode or class (1)
Accessing device 006 on bus 001 ...
Using endpoints 0x01 (out) and 0x81 (in)
Using endpoints 0x01 (out) and 0x81 (in)

USB description data (for identification)
-------------------------
Manufacturer: USB Modem
Product: USB Modem
Serial No.: 1234567890ABCDEF
-------------------------
Looking for active driver ...
OK, driver found ("usb-storage")
OK, driver "usb-storage" detached
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

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)


All done, exiting



do you have any idea about that?

best wishes

Josh
Site Admin
Posts: 6556
Joined: Sat Nov 03, 2007 12:30 am

Post by Josh » Wed Jun 29, 2011 8:17 am

I have missed the fine differences between the MessageContent you were using at first and the one in the existing config file ...

Please try again with your original MessageContent in your new config file:

Code: Select all

DefaultVendor= 0x1c9e
DefaultProduct=0x9800

TargetClass=0xff

MessageContent="55534243123456788000000080000606f50402527000000000000000000000"

CheckSuccess=20

yjh
Posts: 4
Joined: Tue Jun 28, 2011 5:44 am

i have success,haha

Post by yjh » Thu Jun 30, 2011 3:02 pm

haha, i am glad to tell the switch has been fully successful .Can not thank you too much.maybe next time 1c9e:9800 can put into the package.

Josh
Site Admin
Posts: 6556
Joined: Sat Nov 03, 2007 12:30 am

Post by Josh » Thu Jun 30, 2011 8:09 pm

Yes, of course I will add the new device to the next data package release.

Great to hear it's really working!

yjh
Posts: 4
Joined: Tue Jun 28, 2011 5:44 am

another problem

Post by yjh » Fri Jul 01, 2011 8:43 am

dear josh:
i have another problem now, usb_modeswitch seems not work when the computer is powered on. I must re-plug in the usb modem. I have no idea about that.
can you give me some suggestion?

bestwishes

Josh
Site Admin
Posts: 6556
Joined: Sat Nov 03, 2007 12:30 am

Post by Josh » Fri Jul 01, 2011 1:42 pm

Your program version is a little dated (1.1.4). There are some specific improvements in the boot behaviour since version 1.1.6.

If you are not able to install a newer distribution package, you can always use the source package from this site. It's easy to install.

Post Reply