Automatic Activation, Hotplug and UDEV, Configuration
Post Reply
darnis
Posts: 3
Joined: 09 Nov 2015, 16:17

How can i fix the "No devices in target mode or class found"

Post by darnis » 09 Nov 2015, 17:23

Hi, everybody:
I bought a coolee X8 4G modem(Chinese product), lsusb information like following:

Bus 001 Device 008: ID 05c6:f000 Qualcomm, Inc.

It connect to internet fine in windows, and i record the necessary information for modem:
product id is 0x05c6:0xf000 when it's in storage mode,
product id is 0x05c6:0x6000 when it has been connected to internet.


When I use usb_modeswitch -v 0x05c6 -p 0xf000 -V 0x05c6 -P 0x6000, it's fail and return following message:
>>>>
darnis@romee:~$ sudo usb_modeswitch -v 0x05c6 -p 0xf000 -V 0x05c6 -P 0x6000
Look for target devices ...
No devices in target mode or class found
Look for default devices ...
product ID matched
Found devices in default mode (1)
Access device 008 on bus 001
Current configuration number is 1
Use interface number 0

USB description data (for identification)
-------------------------
Manufacturer: Qualcomm, Incorporated
Product: Qualcomm CDMA Technologies MSM
Serial No.: 1234567890ABCDEF
-------------------------
Warning: no switching method given. See documentation
-> Run lsusb to note any changes. Bye!

<<<<<

NOT Looking for taget device( 05c6:6000), so i create the file in /etc/usb_modeswitch.d/05c6:6000, and append :
# FILE START
DefaultVendor=0x05c6
DefaultProduct=0x6000

TargetClass=0xff

CheckSuccess=20

MessageContent="5553424312345678000000000000061b000000020000000000000000000000"
# FILE END

I retried the usb_modeswitch -v 0x05c6 -p 0xf000 -V 0x05c6 -P 0x6000, the same result upon.

And I tried the folowing method, it's fail:
1. Create /etc/usb_modeswitch.conf , it contain:
DefaultVendor= 0x05c6
DefaultProduct= 0xf000
TargetVendor= 0x05c6
TargetProduct= 0x6000
MessageContent="5553424312345678000000000000061b000000020000000000000000000000"

2. Run the command: sudo usb_modeswitch -W -c /etc/usb_modeswitch.conf, shows:
Read config file: /etc/usb_modeswitch.conf

* usb_modeswitch: handle USB devices with multiple modes
* Version 2.2.5 (C) Josua Dietze 2015
* Based on libusb1/libusbx

! PLEASE REPORT NEW CONFIGURATIONS !

DefaultVendor= 0x05c6
DefaultProduct= 0xf000
TargetVendor= 0x05c6
TargetProduct= 0x6000
MessageContent="5553424312345678000000000000061b000000020000000000000000000000"
NeedResponse=0

Look for target devices ...
found USB ID 8087:8001
found USB ID 1d6b:0002
found USB ID 1d6b:0003
found USB ID 1bcf:2c70
found USB ID 8087:07dc
found USB ID 05c6:f000
vendor ID matched
found USB ID 046d:c062
found USB ID 1d6b:0002
No devices in target mode or class found
Look for default devices ...
found USB ID 8087:8001
found USB ID 1d6b:0002
found USB ID 1d6b:0003
found USB ID 1bcf:2c70
found USB ID 8087:07dc
found USB ID 05c6:f000
vendor ID matched
product ID matched
found USB ID 046d:c062
found USB ID 1d6b:0002
Found devices in default mode (1)
Access device 008 on bus 001
Current configuration number is 1
Use interface number 0
Use endpoints 0x01 (out) and 0x81 (in)

USB description data (for identification)
-------------------------
Manufacturer: Qualcomm, Incorporated
Product: Qualcomm CDMA Technologies MSM
Serial No.: 1234567890ABCDEF
-------------------------
Looking for active driver ...
No active driver found. Detached before or never attached
Set up interface 0
Use endpoint 0x01 for message sending ...
Trying to send message 1 to endpoint 0x01 ...
Sending the message returned error -7. Try to continue
Reset response endpoint 0x81
Reset message endpoint 0x01
-> Run lsusb to note any changes. Bye!

And lsusb Information:
darnis@romee:/etc/usb_modeswitch.d$ lsusb
Bus 003 Device 002: ID 8087:8001 Intel Corp.
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 1bcf:2c70 Sunplus Innovation Technology Inc.
Bus 001 Device 003: ID 8087:07dc Intel Corp.
Bus 001 Device 008: ID 05c6:f000 Qualcomm, Inc.
Bus 001 Device 005: ID 046d:c062 Logitech, Inc. M-UAS144 [LS1 Laser Mouse]
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

There has no 05c6:6000 usb device! It likes the reason of "No devices in target mode or class found".. I don't understand. :P

dmesg | grep usb:
[ 805.802713] Modules linked in: option usb_wwan usbserial uas usb_storage drbg ansi_cprng ctr ccm rfcomm pci_stub vboxpci(OE) vboxnetadp(OE) vboxnetflt(OE) vboxdrv(OE) bnep nls_iso8859_1 fglrx(POE+) arc4 uvcvideo videobuf2_vmalloc videobuf2_memops videobuf2_core v4l2_common videodev media btusb btrtl btbcm btintel bluetooth iwlmvm mac80211 snd_hda_codec_hdmi snd_hda_codec_conexant snd_hda_codec_generic snd_hda_intel snd_hda_codec snd_hda_core snd_hwdep snd_pcm intel_rapl thinkpad_acpi iosf_mbi x86_pkg_temp_thermal nvram intel_powerclamp coretemp snd_seq_midi snd_seq_midi_event snd_rawmidi rtsx_pci_ms memstick kvm_intel amd_iommu_v2 input_leds kvm crct10dif_pclmul crc32_pclmul snd_seq ghash_clmulni_intel snd_seq_device aesni_intel snd_timer snd aes_x86_64 lrw gf128mul mei_me iwlwifi joydev serio_raw
[ 805.802758] glue_helper ablk_helper cryptd cfg80211 mei soundcore shpchp lpc_ich mac_hid parport_pc ppdev lp parport autofs4 hid_generic usbhid hid rtsx_pci_sdmmc i915 psmouse amdgpu ttm i2c_algo_bit drm_kms_helper e1000e rtsx_pci ahci drm ptp libahci pps_core wmi video
[ 2981.033234] usbcore: registered new interface driver qcserial
[ 2981.033258] usbserial: USB Serial support registered for Qualcomm USB modem
[ 7178.126295] usb 1-3: USB disconnect, device number 6
[ 7178.398195] usb 1-3: new high-speed USB device number 7 using xhci_hcd
[ 9843.813846] usb 1-3: new high-speed USB device number 8 using xhci_hcd
[ 9843.944848] usb 1-3: New USB device found, idVendor=05c6, idProduct=f000
[ 9843.944852] usb 1-3: New USB device strings: Mfr=3, Product=2, SerialNumber=4
[ 9843.944854] usb 1-3: Product: Qualcomm CDMA Technologies MSM
[ 9843.944855] usb 1-3: Manufacturer: Qualcomm, Incorporated
[ 9843.944856] usb 1-3: SerialNumber: 1234567890ABCDEF
[ 9843.953399] usb-storage 1-3:1.0: USB Mass Storage device detected
[ 9843.953498] scsi host4: usb-storage 1-3:1.0


How can I switch my modem to serial mode ? ::(

darnis
Posts: 3
Joined: 09 Nov 2015, 16:17

Re: How can i fix the "No devices in target mode or class fo

Post by darnis » 09 Nov 2015, 17:31

Maybe the "Looking for active driver ... No active driver found. Detached before or never attached" is Important, but can't find the driver for my modem. :cry:

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

Re: How can i fix the "No devices in target mode or class fo

Post by Josh » 09 Nov 2015, 21:15

If you try to mode-switch from the command line, re-plug the modem before every new attempt !
Otherwise it's likely in an undefined state.

To issue the message sequence you are trying you can just say:
# usb_modeswitch -W -v 0560 -p f000 -K

Same thing, just shorter.

darnis
Posts: 3
Joined: 09 Nov 2015, 16:17

Re: How can i fix the "No devices in target mode or class fo

Post by darnis » 10 Nov 2015, 02:17

Thanks for you, Json.

Following Message I do that:

root@romee:~# lsusb
Bus 003 Device 002: ID 8087:8001 Intel Corp.
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 1bcf:2c70 Sunplus Innovation Technology Inc.
Bus 001 Device 003: ID 8087:07dc Intel Corp.
Bus 001 Device 007: ID 05c6:f000 Qualcomm, Inc.
Bus 001 Device 002: ID 046d:c062 Logitech, Inc. M-UAS144 [LS1 Laser Mouse]
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
root@romee:~# usb_modeswitch -W -v 05c6 -p f000 -K
Take all parameters from the command line


* usb_modeswitch: handle USB devices with multiple modes
* Version 2.2.5 (C) Josua Dietze 2015
* Based on libusb1/libusbx

! PLEASE REPORT NEW CONFIGURATIONS !

DefaultVendor= 0x05c6
DefaultProduct= 0xf000

StandardEject=1
NeedResponse=0

Look for default devices ...
found USB ID 8087:8001
found USB ID 1d6b:0002
found USB ID 1d6b:0003
found USB ID 1bcf:2c70
found USB ID 8087:07dc
found USB ID 05c6:f000
vendor ID matched
product ID matched
found USB ID 046d:c062
found USB ID 1d6b:0002
Found devices in default mode (1)
Access device 007 on bus 001
Current configuration number is 1
Use interface number 0
Use endpoints 0x01 (out) and 0x81 (in)

USB description data (for identification)
-------------------------
Manufacturer: Qualcomm, Incorporated
Product: Qualcomm CDMA Technologies MSM
Serial No.: 1234567890ABCDEF
-------------------------
Sending standard EJECT sequence
Looking for active driver ...
No active driver found. Detached before or never attached
Set up interface 0
Use endpoint 0x01 for message sending ...
Trying to send message 1 to endpoint 0x01 ...
OK, message successfully sent
Read the response to message 1 (CSW) ...
Response successfully read (13 bytes).
Trying to send message 2 to endpoint 0x01 ...
OK, message successfully sent
Read the response to message 2 (CSW) ...
Response successfully read (13 bytes).
Reset response endpoint 0x81
Reset message endpoint 0x01
-> Run lsusb to note any changes. Bye!

root@romee:~# lsusb
Bus 003 Device 002: ID 8087:8001 Intel Corp.
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 1bcf:2c70 Sunplus Innovation Technology Inc.
Bus 001 Device 003: ID 8087:07dc Intel Corp.
Bus 001 Device 007: ID 05c6:f000 Qualcomm, Inc.
Bus 001 Device 002: ID 046d:c062 Logitech, Inc. M-UAS144 [LS1 Laser Mouse]
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

root@romee:~# dmesg |grep usb
[ 0.237274] usbcore: registered new interface driver usbfs
[ 0.237285] usbcore: registered new interface driver hub
[ 0.237303] usbcore: registered new device driver usb
[ 0.797388] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[ 0.797864] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 0.798753] usb usb1: Product: xHCI Host Controller
[ 0.799194] usb usb1: Manufacturer: Linux 4.2.0-17-generic xhci-hcd
[ 0.799707] usb usb1: SerialNumber: 0000:00:14.0
[ 0.803407] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003
[ 0.803835] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 0.804686] usb usb2: Product: xHCI Host Controller
[ 0.805121] usb usb2: Manufacturer: Linux 4.2.0-17-generic xhci-hcd
[ 0.805563] usb usb2: SerialNumber: 0000:00:14.0
[ 0.826158] usb usb3: New USB device found, idVendor=1d6b, idProduct=0002
[ 0.826577] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 0.827413] usb usb3: Product: EHCI Host Controller
[ 0.827834] usb usb3: Manufacturer: Linux 4.2.0-17-generic ehci_hcd
[ 0.828247] usb usb3: SerialNumber: 0000:00:1d.0
[ 1.113874] usb 1-2: new low-speed USB device number 2 using xhci_hcd
[ 1.141896] usb 3-1: new high-speed USB device number 2 using ehci-pci
[ 1.274347] usb 3-1: New USB device found, idVendor=8087, idProduct=8001
[ 1.274989] usb 3-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[ 1.303186] usb 1-2: New USB device found, idVendor=046d, idProduct=c062
[ 1.303791] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 1.304388] usb 1-2: Product: USB Laser Mouse
[ 1.304971] usb 1-2: Manufacturer: Logitech
[ 1.305627] usb 1-2: ep 0x81 - rounding interval to 64 microframes, ep desc says 80 microframes
[ 1.315284] usbcore: registered new interface driver usbhid
[ 1.315875] usbhid: USB HID core driver
[ 1.317690] input: Logitech USB Laser Mouse as /devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2:1.0/0003:046D:C062.0001/input/input5
[ 1.318943] hid-generic 0003:046D:C062.0001: input,hidraw0: USB HID v1.10 Mouse [Logitech USB Laser Mouse] on usb-0000:00:14.0-2/input0
[ 1.474168] usb 1-7: new full-speed USB device number 3 using xhci_hcd
[ 1.603402] usb 1-7: New USB device found, idVendor=8087, idProduct=07dc
[ 1.603404] usb 1-7: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[ 1.770492] usb 1-8: new high-speed USB device number 4 using xhci_hcd
[ 1.964322] usb 1-8: New USB device found, idVendor=1bcf, idProduct=2c70
[ 1.964323] usb 1-8: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 1.964324] usb 1-8: Product: Integrated Camera
[ 1.964325] usb 1-8: Manufacturer: J8IECDBFR
[ 10.953166] usbcore: registered new interface driver btusb
[ 11.081947] input: Integrated Camera as /devices/pci0000:00/0000:00:14.0/usb1/1-8/1-8:1.0/input/input15
[ 11.082211] usbcore: registered new interface driver uvcvideo
[ 11.507998] Modules linked in: fglrx(POE+) arc4 iwlmvm mac80211 uvcvideo videobuf2_vmalloc videobuf2_memops videobuf2_core v4l2_common videodev media intel_rapl iosf_mbi x86_pkg_temp_thermal intel_powerclamp coretemp kvm_intel kvm crct10dif_pclmul crc32_pclmul ghash_clmulni_intel aesni_intel aes_x86_64 lrw gf128mul glue_helper ablk_helper cryptd btusb btrtl btbcm btintel input_leds joydev serio_raw bluetooth rtsx_pci_ms memstick iwlwifi cfg80211 snd_hda_codec_hdmi amd_iommu_v2 thinkpad_acpi nvram snd_hda_codec_conexant snd_hda_codec_generic snd_hda_intel snd_hda_codec snd_hda_core snd_hwdep snd_pcm snd_seq_midi snd_seq_midi_event snd_rawmidi snd_seq mac_hid snd_seq_device snd_timer mei_me mei snd shpchp lpc_ich soundcore parport_pc ppdev lp parport autofs4 hid_generic usbhid hid rtsx_pci_sdmmc amdgpu
[ 435.026333] usb 1-3: new high-speed USB device number 5 using xhci_hcd
[ 435.156903] usb 1-3: New USB device found, idVendor=05c6, idProduct=f000
[ 435.156906] usb 1-3: New USB device strings: Mfr=3, Product=2, SerialNumber=4
[ 435.156908] usb 1-3: Product: Qualcomm CDMA Technologies MSM
[ 435.156909] usb 1-3: Manufacturer: Qualcomm, Incorporated
[ 435.156910] usb 1-3: SerialNumber: 1234567890ABCDEF
[ 435.238029] usb-storage 1-3:1.0: USB Mass Storage device detected
[ 435.238150] scsi host3: usb-storage 1-3:1.0
[ 435.238248] usbcore: registered new interface driver usb-storage
[ 435.252508] usbcore: registered new interface driver uas
[ 438.446741] usbcore: registered new interface driver usbserial
[ 438.446752] usbcore: registered new interface driver usbserial_generic
[ 438.446761] usbserial: USB Serial support registered for generic
[ 438.479210] usbcore: registered new interface driver option
[ 438.479224] usbserial: USB Serial support registered for GSM modem (1-port)
[ 788.414068] usb 1-3: USB disconnect, device number 5
[ 794.887509] usb 1-3: new high-speed USB device number 6 using xhci_hcd
[ 795.018286] usb 1-3: New USB device found, idVendor=05c6, idProduct=f000
[ 795.018290] usb 1-3: New USB device strings: Mfr=3, Product=2, SerialNumber=4
[ 795.018291] usb 1-3: Product: Qualcomm CDMA Technologies MSM
[ 795.018293] usb 1-3: Manufacturer: Qualcomm, Incorporated
[ 795.018294] usb 1-3: SerialNumber: 1234567890ABCDEF
[ 795.026791] usb-storage 1-3:1.0: USB Mass Storage device detected
[ 795.026872] scsi host4: usb-storage 1-3:1.0
[ 910.947797] usb 1-3: USB disconnect, device number 6
[ 918.628435] usb 1-3: new high-speed USB device number 7 using xhci_hcd
[ 918.759931] usb 1-3: New USB device found, idVendor=05c6, idProduct=f000
[ 918.759935] usb 1-3: New USB device strings: Mfr=3, Product=2, SerialNumber=4
[ 918.759937] usb 1-3: Product: Qualcomm CDMA Technologies MSM
[ 918.759939] usb 1-3: Manufacturer: Qualcomm, Incorporated
[ 918.759940] usb 1-3: SerialNumber: 1234567890ABCDEF
[ 918.767692] usb-storage 1-3:1.0: USB Mass Storage device detected
[ 918.767796] scsi host5: usb-storage 1-3:1.0



The modem's product id not switch..

LOM
Posts: 1404
Joined: 11 Jul 2012, 15:14
Location: Koh Samui, TH

Re: How can i fix the "No devices in target mode or class fo

Post by LOM » 10 Nov 2015, 06:53

darnis wrote:Hi, everybody:
I bought a coolee X8 4G modem(Chinese product), lsusb information like following:

Bus 001 Device 008: ID 05c6:f000 Qualcomm, Inc.

It connect to internet fine in windows, and i record the necessary information for modem:
product id is 0x05c6:0xf000 when it's in storage mode,
product id is 0x05c6:0x6000 when it has been connected to internet.
I don't know what strange beast of modem you have there, 05c6:6000 was used for one of Qualcomms first chipsets many years ago which was CDMA (probably more 2G than 4G).
Its initial id before switching was 05c6:1000.

05c6:f000 is used as initial id for later dongles and they all switch nicely with the method usb_modeswitch uses.
Since yours doesn't then you'll have to sniff the usb communication in Windows to find the switch message(s) sent to it.

Post Reply