Page 1 of 2
help China TeleCom CBP7.0 15eb:7153 message content
Posted: 22 Jul 2012, 16:08
by tricky
Code: Select all
$ lsusb | grep 15eb
Bus 004 Device 051: ID 15eb:7153
defaultvendor = targetvendor = 0x15eb
defaultproduct = 0x7153
targetproduct = 0x7152
usbsnoop.log from winxp
Code: Select all
[... edited for brevity ...]
[30 ms] >>> URB 8 going down >>>
-- URB_FUNCTION_SELECT_CONFIGURATION:
ConfigurationDescriptor = 0x897d31a8 (configure)
ConfigurationDescriptor : bLength = 9
ConfigurationDescriptor : bDescriptorType = 0x00000002
ConfigurationDescriptor : wTotalLength = 0x00000020
ConfigurationDescriptor : bNumInterfaces = 0x00000001
ConfigurationDescriptor : bConfigurationValue = 0x00000001
ConfigurationDescriptor : iConfiguration = 0x00000004
ConfigurationDescriptor : bmAttributes = 0x00000040
ConfigurationDescriptor : MaxPower = 0x00000000
ConfigurationHandle = 0x00000000
Interface[0]: Length = 56
Interface[0]: InterfaceNumber = 0
Interface[0]: AlternateSetting = 0
[67 ms] UsbSnoop - MyInternalIOCTLCompletion(a7e23126) : fido=00000000, Irp=8999f008, Context=8977f278, IRQL=0
[67 ms] <<< URB 8 coming back <<<
-- URB_FUNCTION_SELECT_CONFIGURATION:
ConfigurationDescriptor = 0x897d31a8 (configure)
ConfigurationDescriptor : bLength = 9
ConfigurationDescriptor : bDescriptorType = 0x00000002
ConfigurationDescriptor : wTotalLength = 0x00000020
ConfigurationDescriptor : bNumInterfaces = 0x00000001
ConfigurationDescriptor : bConfigurationValue = 0x00000001
ConfigurationDescriptor : iConfiguration = 0x00000004
ConfigurationDescriptor : bmAttributes = 0x00000040
ConfigurationDescriptor : MaxPower = 0x00000000
ConfigurationHandle = 0x897a2e48
Interface[0]: Length = 56
Interface[0]: InterfaceNumber = 0
Interface[0]: AlternateSetting = 0
Interface[0]: Class = 0x00000008
Interface[0]: SubClass = 0x00000006
Interface[0]: Protocol = 0x00000050
Interface[0]: InterfaceHandle = 0x89b513c0
Interface[0]: NumberOfPipes = 2
Interface[0]: Pipes[0] : MaximumPacketSize = 0x00000040
Interface[0]: Pipes[0] : EndpointAddress = 0x00000004
Interface[0]: Pipes[0] : Interval = 0x00000000
Interface[0]: Pipes[0] : PipeType = 0x00000002 (UsbdPipeTypeBulk)
Interface[0]: Pipes[0] : PipeHandle = 0x89b513dc
Interface[0]: Pipes[0] : MaxTransferSize = 0x00001000
Interface[0]: Pipes[0] : PipeFlags = 0x00000000
Interface[0]: Pipes[1] : MaximumPacketSize = 0x00000040
Interface[0]: Pipes[1] : EndpointAddress = 0x00000084
Interface[0]: Pipes[1] : Interval = 0x00000000
Interface[0]: Pipes[1] : PipeType = 0x00000002 (UsbdPipeTypeBulk)
Interface[0]: Pipes[1] : PipeHandle = 0x89b513fc
Interface[0]: Pipes[1] : MaxTransferSize = 0x00001000
Interface[0]: Pipes[1] : PipeFlags = 0x00000000
[67 ms] UsbSnoop - FilterDispatchAny(a7e22fd2) : IRP_MJ_INTERNAL_DEVICE_CONTROL
[67 ms] UsbSnoop - FdoHookDispatchInternalIoctl(a7e231ea) : fdo=897e4a98, Irp=8999f008, IRQL=0
[67 ms] >>> URB 9 going down >>>
-- URB_FUNCTION_SELECT_INTERFACE:
ConfigurationHandle = 0x897a2e48
Interface: Length = 56
Interface: InterfaceNumber = 0
Interface: AlternateSetting = 0
Interface: Class = 0x00000008
Interface: SubClass = 0x00000006
Interface: Protocol = 0x00000050
Interface: InterfaceHandle = 89b513c0
Interface: NumberOfPipes = 2
[102 ms] UsbSnoop - MyInternalIOCTLCompletion(a7e23126) : fido=00000000, Irp=8999f008, Context=8977f278, IRQL=0
[102 ms] <<< URB 9 coming back <<<
-- URB_FUNCTION_SELECT_INTERFACE:
ConfigurationHandle = 0x897a2e48
Interface: Length = 56
Interface: InterfaceNumber = 0
Interface: AlternateSetting = 0
Interface: Class = 0x00000008
Interface: SubClass = 0x00000006
Interface: Protocol = 0x00000050
Interface: InterfaceHandle = 89b50670
Interface: NumberOfPipes = 2
Interface: Pipes[0] : MaximumPacketSize = 0x00000040
Interface: Pipes[0] : EndpointAddress = 0x00000004
Interface: Pipes[0] : Interval = 0x00000000
Interface: Pipes[0] : PipeType = 0x00000002 (UsbdPipeTypeBulk)
Interface: Pipes[0] : PipeHandle = 0x89b5068c
Interface: Pipes[0] : MaxTransferSize = 0x00010000
Interface: Pipes[0] : PipeFlags = 0x00000000
Interface: Pipes[1] : MaximumPacketSize = 0x00000040
Interface: Pipes[1] : EndpointAddress = 0x00000084
Interface: Pipes[1] : Interval = 0x00000000
Interface: Pipes[1] : PipeType = 0x00000002 (UsbdPipeTypeBulk)
Interface: Pipes[1] : PipeHandle = 0x89b506ac
Interface: Pipes[1] : MaxTransferSize = 0x00010000
Interface: Pipes[1] : PipeFlags = 0x00000000
[... edited for brevity ...]
[645 ms] >>> URB 37 going down >>>
-- URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER:
PipeHandle = 89b5068c [endpoint 0x00000004]
TransferFlags = 00000000 (USBD_TRANSFER_DIRECTION_OUT, ~USBD_SHORT_TRANSFER_OK)
TransferBufferLength = 0000001f
TransferBuffer = 892ced80
TransferBufferMDL = 00000000
00000000: 55 53 42 43 b8 a8 20 89 00 00 00 00 00 00 06 1b
00000010: 00 00 00 02 00 00 00 00 00 00 00 00 00 00 00
UrbLink = 00000000
[647 ms] UsbSnoop - MyInternalIOCTLCompletion(a7e23126) : fido=89902ea0, Irp=8920a8b8, Context=8977f278, IRQL=2
[647 ms] <<< URB 37 coming back <<<
-- URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER:
PipeHandle = 89b5068c [endpoint 0x00000004]
TransferFlags = 00000000 (USBD_TRANSFER_DIRECTION_OUT, ~USBD_SHORT_TRANSFER_OK)
TransferBufferLength = 0000001f
TransferBuffer = 892ced80
TransferBufferMDL = 89983818
UrbLink = 00000000
[647 ms] UsbSnoop - FilterDispatchAny(a7e22fd2) : IRP_MJ_INTERNAL_DEVICE_CONTROL
[647 ms] UsbSnoop - FdoHookDispatchInternalIoctl(a7e231ea) : fdo=897e4a98, Irp=8920a8b8, IRQL=2
[647 ms] >>> URB 38 going down >>>
-- URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER:
PipeHandle = 89b506ac [endpoint 0x00000084]
TransferFlags = 00000000 (USBD_TRANSFER_DIRECTION_OUT, ~USBD_SHORT_TRANSFER_OK)
TransferBufferLength = 0000000d
TransferBuffer = 892ced80
TransferBufferMDL = 00000000
00000000: 55 53 42 43 b8 a8 20 89 00 00 00 00 00
UrbLink = 00000000
[650 ms] UsbSnoop - MyInternalIOCTLCompletion(a7e23126) : fido=89902ea0, Irp=8920a8b8, Context=8977f278, IRQL=2
[650 ms] <<< URB 38 coming back <<<
-- URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER:
PipeHandle = 89b506ac [endpoint 0x00000084]
TransferFlags = 00000001 (USBD_TRANSFER_DIRECTION_IN, ~USBD_SHORT_TRANSFER_OK)
TransferBufferLength = 00000000
TransferBuffer = 892ced80
TransferBufferMDL = 89983818
UrbLink = 00000000
[650 ms] UsbSnoop - FilterDispatchAny(a7e22fd2) : IRP_MJ_INTERNAL_DEVICE_CONTROL
[650 ms] UsbSnoop - FdoHookDispatchInternalIoctl(a7e231ea) : fdo=897e4a98, Irp=897d1598, IRQL=0
[1163 ms] UsbSnoop - FilterDispatchPnp(a7e2745c) : IRP_MJ_PNP (IRP_MN_QUERY_DEVICE_RELATIONS)
[1163 ms] UsbSnoop - FdoHookDispatchPnp(a7e2745c) : IRP_MJ_PNP (IRP_MN_QUERY_DEVICE_RELATIONS)
[1163 ms] UsbSnoop - FilterDispatchPnp(a7e2745c) : IRP_MJ_PNP (IRP_MN_QUERY_DEVICE_RELATIONS)
[1163 ms] UsbSnoop - FdoHookDispatchPnp(a7e2745c) : IRP_MJ_PNP (IRP_MN_QUERY_DEVICE_RELATIONS)
[1175 ms] UsbSnoop - FilterDispatchPnp(a7e2745c) : IRP_MJ_PNP (IRP_MN_SURPRISE_REMOVAL)
[1175 ms] UsbSnoop - FdoHookDispatchPnp(a7e2745c) : IRP_MJ_PNP (IRP_MN_SURPRISE_REMOVAL)
[1274 ms] UsbSnoop - FilterDispatchPnp(a7e2745c) : IRP_MJ_PNP (IRP_MN_REMOVE_DEVICE)
for what i understand i have to try every Messageecontent looking string. so first i extracted and formated every string like this
Code: Select all
1201100100000040eb155371000001020b01
8006000100001200
090220000101044000
8006000200000900
0902200001010440000904000002080650090705040240000007058402400000
8006000200002000
0403
8006000300000200
04030904
8006000300000400
1603
80060b0309040200
1603ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00
80060b0309041600
00
a1fe000000000100
5553424308f099892400000080000612000000240000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000
058002001f0000004556444f2020200052655620412020202020202020202000372e3030
5553424308f099892400000080
5553425308f099890000000000
5553424308902c892400000080000612000000240000000000000000000000
000000000000000000000000000000000000288900000000000000000000000000000000
058002001f0000004556444f2020200052655620412020202020202020202000372e3030
5553424308902c892400000080
5553425308902c890000000000
5553424308902c892400000080000612000000240000000000000000000000
058002001f0000004556444f2020200052655620412020202020202020202000372e3030
058002001f0000004556444f2020200052655620412020202020202020202000372e3030
5553424308902c892400000080
5553425308902c890000000000
5553424308a06f890800000080000a25000000000000000000000000000000
0000000000000000
5553424308a06f890800000080
5553425308a06f890800000001
5553424308a06f891200000080000c03000000120000000000000000000000
000000000000000000000000000000000000
700002000000000a000000003a0000000000
5553424308a06f891200000080
5553425308a06f890000000000
5553424308902c890800000080000a4a010000000000000800000000000000
0000000000000000
5553424308902c890800000080
5553425308902c890800000000
5553424308902c890800000080000a4a010000000000000800000000000000
0000000000000000
5553424308902c890800000080
5553425308902c890800000000
55534243084079890000000000000600000000000000000000000000000000
55534243084079890000000000
55534253084079890000000001
55534243084079891200000080000c03000000120000000000000000000000
000000000000000000000000000000000000
700002000000000a000000003a0000000000
55534243084079891200000080
55534253084079890000000000
55534243b8a82089000000000000061b000000020000000000000000000000
55534243b8a820890000000000
so i have tried every string which starts with 55 and 36 chars long. but still product wont change to 0x7152. every time i get error like this
Code: Select all
Taking all parameters from the command line
* usb_modeswitch: handle USB devices with multiple modes
* Version 1.2.3 (C) Josua Dietze 2012
* Based on libusb0 (0.1.12 and above)
! PLEASE REPORT NEW CONFIGURATIONS !
DefaultVendor= 0x15eb
DefaultProduct= 0x7153
TargetVendor= 0x15eb
TargetProduct= 0x7152
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=0xffffffff
MessageContent=""
NeedResponse=1
ResponseEndpoint= not set
InquireDevice enabled (default)
Success check disabled
System integration mode disabled
Looking for target devices ...
searching devices, found USB ID 1058:0740
searching devices, found USB ID 1d6b:0003
searching devices, found USB ID 8087:0024
searching devices, found USB ID 1d6b:0002
searching devices, found USB ID 04f2:b23d
searching devices, found USB ID 0cf3:3005
searching devices, found USB ID 8087:0024
searching devices, found USB ID 1d6b:0002
searching devices, found USB ID 15eb:7153
found matching vendor ID
searching devices, found USB ID 0461:4d0f
searching devices, found USB ID 1d6b:0002
No devices in target mode or class found
Looking for default devices ...
searching devices, found USB ID 1058:0740
searching devices, found USB ID 1d6b:0003
searching devices, found USB ID 8087:0024
searching devices, found USB ID 1d6b:0002
searching devices, found USB ID 04f2:b23d
searching devices, found USB ID 0cf3:3005
searching devices, found USB ID 8087:0024
searching devices, found USB ID 1d6b:0002
searching devices, found USB ID 15eb:7153
found matching vendor ID
found matching product ID
adding device
searching devices, found USB ID 0461:4d0f
searching devices, found USB ID 1d6b:0002
Found device in default mode, class or configuration (1)
Accessing device 047 on bus 004 ...
Getting the current device configuration ...
OK, got current device configuration (1)
Using first interface: 0x00
Using endpoints 0xffffffff (out) and 0x84 (in)
Inquiring device details; driver will be detached ...
Looking for active driver ...
No driver found. Either detached before or never attached
libusbx: error [op_clear_halt] clear_halt failed error -1 errno 22
libusb-compat warning: usb_bulk_write: endpoint 1f has excessive IN direction bit, fixing
libusbx: error [submit_bulk_transfer] submiturb failed error -1 errno=22
Could not send INQUIRY message (error -5)
libusbx: error [op_clear_halt] clear_halt failed error -1 errno 22
USB description data (for identification)
-------------------------
Manufacturer: China TeleCom
Product: CBP7.0
Serial No.: ����������
-------------------------
Warning: no switching method given.
-> Run lsusb to note any changes. Bye.
thanks
ps. however i could change productid by ejecting driver_cdrom (sr1). and by modprobe usbserial vendor=0x15eb product=0x7152 i could get even wvdial to work. but still wvdial would me error like no carrier.#65533;
Posted: 22 Jul 2012, 18:59
by tricky
i just noticed that i used -m for messagecontent instead of -M. so i did the whole process again.
Code: Select all
# cat log.apparentmc
5553424308f099892400000080000612000000240000000000000000000000
5553424308902c892400000080000612000000240000000000000000000000
5553424308a06f890800000080000a25000000000000000000000000000000
5553424308a06f891200000080000c03000000120000000000000000000000
5553424308902c890800000080000a4a010000000000000800000000000000
5553424308902c890800000080000a4a010000000000000800000000000000
55534243084079890000000000000600000000000000000000000000000000
55534243084079891200000080000c03000000120000000000000000000000
55534243b8a82089000000000000061b000000020000000000000000000000
# cat log.apparentmc | while read f; do echo "\$$f" && usb_modeswitch -Wn -v 15eb -p 7153 -V 15eb -P 7152 -M "$f" && lsusb && sleep 10; done
[... edited for brevity ...]
$55534243b8a82089000000000000061b000000020000000000000000000000
Taking all parameters from the command line
* usb_modeswitch: handle USB devices with multiple modes
* Version 1.2.3 (C) Josua Dietze 2012
* Based on libusb0 (0.1.12 and above)
! PLEASE REPORT NEW CONFIGURATIONS !
DefaultVendor= 0x15eb
DefaultProduct= 0x7153
TargetVendor= 0x15eb
TargetProduct= 0x7152
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="55534243b8a82089000000000000061b000000020000000000000000000000"
NeedResponse=1
ResponseEndpoint= not set
InquireDevice enabled (default)
Success check disabled
System integration mode disabled
Looking for target devices ...
searching devices, found USB ID 1058:0740
searching devices, found USB ID 1d6b:0003
searching devices, found USB ID 8087:0024
searching devices, found USB ID 1d6b:0002
searching devices, found USB ID 04f2:b23d
searching devices, found USB ID 0cf3:3005
searching devices, found USB ID 8087:0024
searching devices, found USB ID 1d6b:0002
searching devices, found USB ID 15eb:7153
found matching vendor ID
searching devices, found USB ID 0461:4d0f
searching devices, found USB ID 1d6b:0002
No devices in target mode or class found
Looking for default devices ...
searching devices, found USB ID 1058:0740
searching devices, found USB ID 1d6b:0003
searching devices, found USB ID 8087:0024
searching devices, found USB ID 1d6b:0002
searching devices, found USB ID 04f2:b23d
searching devices, found USB ID 0cf3:3005
searching devices, found USB ID 8087:0024
searching devices, found USB ID 1d6b:0002
searching devices, found USB ID 15eb:7153
found matching vendor ID
found matching product ID
adding device
searching devices, found USB ID 0461:4d0f
searching devices, found USB ID 1d6b:0002
Found device in default mode, class or configuration (1)
Accessing device 088 on bus 004 ...
Getting the current device configuration ...
OK, got current device configuration (1)
Using first interface: 0x00
Using endpoints 0x04 (out) and 0x84 (in)
Inquiring device details; driver will be detached ...
Looking for active driver ...
OK, driver found; name unknown, limitation of libusb1
OK, driver "unkown" detached
SCSI inquiry data (for identification)
-------------------------
Vendor String: EVDO \00
Model String: ReV A \00
Revision String: 7.00
-------------------------
USB description data (for identification)
-------------------------
Manufacturer: China TeleCom
Product: CBP7.0
Serial No.: \FF\FF\FF\FF\FF\FF\FF\FF\FF\FF
-------------------------
Setting up communication with interface 0
Using endpoint 0x04 for message sending ...
Trying to send message 1 to endpoint 0x04 ...
OK, message successfully sent
Reading the response to message 1 (CSW) ...
OK, response successfully read (13 bytes).
Resetting response endpoint 0x84
Resetting message endpoint 0x04
Device is gone, skipping any further commands
-> Run lsusb to note any changes. Bye.
Bus 002 Device 002: ID 1058:0740 Western Digital Technologies, Inc. My Passport 1TB
Bus 003 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 004 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 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 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 003: ID 04f2:b23d Chicony Electronics Co., Ltd
Bus 003 Device 005: ID 0cf3:3005 Atheros Communications, Inc. AR3011 Bluetooth
Bus 004 Device 088: ID 15eb:7153
Bus 004 Device 053: ID 0461:4d0f Primax Electronics, Ltd HP Optical Mouse
in those 10 seconds i would reinsert usb modem.
as it can be seen, product still wont change.
thanks
Posted: 22 Jul 2012, 20:31
by Josh
Uh oh, I think you overdid it a tiny little bit ...
It's not necessary to test all bulk transfers - the one that is important must be near the end because, well, it will make the device "end" (cease to exist).
The command close to the end containing "061b" is well known and often used - it's basically a SCSI EJECT. You can find it in many other device config file and in the "device_reference" linked on the main doc page.
So my advice for this modem: use only the very last bulk message in your list.
Also, ten seconds may not be enough for re-plugging and device discovery (depending on the specific device).
Posted: 22 Jul 2012, 21:50
by tricky
ok still it would not change . i have watched lsusb for atleast a min, though the cdrom does disappears.
edit:
i forgot to mention dmesg.
Code: Select all
usb 2-1: usbfs: process 3572 (usb_modeswitch) did not claim interface 0 before use
hope it helps.
thanks
Posted: 23 Jul 2012, 09:17
by Josh
Is this a main-stream system? I have had such reports from people working on embedded systems. There may be driver issues involved.
BTW, dmesg should show "device disconnected" right after running your command.
Anyway, here is a couple of things to try:
1. Use two messages (on the command line with -M and -2):
MessageContent="5553424312345678000000000000061e000000000000000000000000000000"
MessageContent2="5553424312345679000000000000061b000000020000000000000000000000"
2. Use the ReleaseDelay parameter (command line -w). This shields the device from further system access after the transfer of the switching command. Has helped with some modem models. Give any number of milliseconds (see "man usb_modeswitch").
Posted: 23 Jul 2012, 09:54
by tricky
yes it arch with kernel 3.4.5-1.
there only one new line in dmesg and thats the usbfs error
Code: Select all
$ #plugin device
$ dmesg
...
[30959.565203] scsi 21:0:0:0: CD-ROM EVDO ReV A 7.00 PQ: 0 ANSI: 2
[30959.569366] sr1: scsi-1 drive
[30959.569637] sr 21:0:0:0: Attached scsi CD-ROM sr1
$ usb_modeswitch -Wn -v 15eb -p 7153 -V 15eb -P 7152 -M "5553424312345678000000000000061e000000000000000000000000000000" -2 "55534243b8a82089000000000000061b000000020000000000000000000000" -w 500
Taking all parameters from the command line
* usb_modeswitch: handle USB devices with multiple modes
* Version 1.2.3 (C) Josua Dietze 2012
* Based on libusb0 (0.1.12 and above)
! PLEASE REPORT NEW CONFIGURATIONS !
DefaultVendor= 0x15eb
DefaultProduct= 0x7153
TargetVendor= 0x15eb
TargetProduct= 0x7152
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="5553424312345678000000000000061e000000000000000000000000000000"
MessageContent2="55534243b8a82089000000000000061b000000020000000000000000000000"
NeedResponse=1
ResponseEndpoint= not set
InquireDevice enabled (default)
Success check disabled
System integration mode disabled
Looking for target devices ...
searching devices, found USB ID 1058:0740
searching devices, found USB ID 1d6b:0003
searching devices, found USB ID 8087:0024
searching devices, found USB ID 1d6b:0002
searching devices, found USB ID 04f2:b23d
searching devices, found USB ID 0cf3:3005
searching devices, found USB ID 8087:0024
searching devices, found USB ID 1d6b:0002
searching devices, found USB ID 15eb:7153
found matching vendor ID
searching devices, found USB ID 1d6b:0002
No devices in target mode or class found
Looking for default devices ...
searching devices, found USB ID 1058:0740
searching devices, found USB ID 1d6b:0003
searching devices, found USB ID 8087:0024
searching devices, found USB ID 1d6b:0002
searching devices, found USB ID 04f2:b23d
searching devices, found USB ID 0cf3:3005
searching devices, found USB ID 8087:0024
searching devices, found USB ID 1d6b:0002
searching devices, found USB ID 15eb:7153
found matching vendor ID
found matching product ID
adding device
searching devices, found USB ID 1d6b:0002
Found device in default mode, class or configuration (1)
Accessing device 013 on bus 004 ...
Getting the current device configuration ...
OK, got current device configuration (1)
Using first interface: 0x00
Using endpoints 0x04 (out) and 0x84 (in)
Inquiring device details; driver will be detached ...
Looking for active driver ...
OK, driver found; name unknown, limitation of libusb1
OK, driver "unkown" detached
SCSI inquiry data (for identification)
-------------------------
Vendor String: EVDO
Model String: ReV A
Revision String: 7.00
-------------------------
USB description data (for identification)
-------------------------
Manufacturer: China TeleCom
Product: CBP7.0
Serial No.: ����������
-------------------------
Setting up communication with interface 0
Using endpoint 0x04 for message sending ...
Trying to send message 1 to endpoint 0x04 ...
OK, message successfully sent
Reading the response to message 1 (CSW) ...
OK, response successfully read (13 bytes).
Trying to send message 2 to endpoint 0x04 ...
OK, message successfully sent
Reading the response to message 2 (CSW) ...
OK, response successfully read (13 bytes).
Resetting response endpoint 0x84
Resetting message endpoint 0x04
Blocking the interface for 500 ms before releasing ...
Device is gone, skipping any further commands
-> Run lsusb to note any changes. Bye.
$ sleep 20
$ dmesg
...
[30971.050156] usb 4-1.2: usbfs: process 30149 (usb_modeswitch) did not claim interface 0 before use
appreciate your time
Posted: 23 Jul 2012, 18:55
by Josh
O.K., more tricks ...
1. Add the "-I" parameter to the command line. This will skip the SCSI request. Has helped occasionally.
2. Add the "-R" parameter. This will send a "device reset" command after all other processes are complete.
Posted: 23 Jul 2012, 19:37
by tricky
Code: Select all
$ usb_modeswitch -Wn -v 15eb -p 7153 -V 15eb -P 7152 -M "5553424312345678000000000000061e000000000000000000000000000000" -2 "55534243b8a82089000000000000061b000000020000000000000000000000" -w 500 -R -I
Taking all parameters from the command line
* usb_modeswitch: handle USB devices with multiple modes
* Version 1.2.3 (C) Josua Dietze 2012
* Based on libusb0 (0.1.12 and above)
! PLEASE REPORT NEW CONFIGURATIONS !
DefaultVendor= 0x15eb
DefaultProduct= 0x7153
TargetVendor= 0x15eb
TargetProduct= 0x7152
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="5553424312345678000000000000061e000000000000000000000000000000"
MessageContent2="55534243b8a82089000000000000061b000000020000000000000000000000"
NeedResponse=1
ResponseEndpoint= not set
InquireDevice disabled
Success check disabled
System integration mode disabled
Looking for target devices ...
searching devices, found USB ID 1058:0740
searching devices, found USB ID 1d6b:0003
searching devices, found USB ID 8087:0024
searching devices, found USB ID 1d6b:0002
searching devices, found USB ID 04f2:b23d
searching devices, found USB ID 0cf3:3005
searching devices, found USB ID 8087:0024
searching devices, found USB ID 1d6b:0002
searching devices, found USB ID 15eb:7153
found matching vendor ID
searching devices, found USB ID 1d6b:0002
No devices in target mode or class found
Looking for default devices ...
searching devices, found USB ID 1058:0740
searching devices, found USB ID 1d6b:0003
searching devices, found USB ID 8087:0024
searching devices, found USB ID 1d6b:0002
searching devices, found USB ID 04f2:b23d
searching devices, found USB ID 0cf3:3005
searching devices, found USB ID 8087:0024
searching devices, found USB ID 1d6b:0002
searching devices, found USB ID 15eb:7153
found matching vendor ID
found matching product ID
adding device
searching devices, found USB ID 1d6b:0002
Found device in default mode, class or configuration (1)
Accessing device 048 on bus 004 ...
Getting the current device configuration ...
OK, got current device configuration (1)
Using first interface: 0x00
Using endpoints 0x04 (out) and 0x84 (in)
USB description data (for identification)
-------------------------
Manufacturer: China TeleCom
Product: CBP7.0
Serial No.: ����������
-------------------------
Looking for active driver ...
OK, driver found; name unknown, limitation of libusb1
OK, driver "unkown" detached
Setting up communication with interface 0
Using endpoint 0x04 for message sending ...
Trying to send message 1 to endpoint 0x04 ...
OK, message successfully sent
Reading the response to message 1 (CSW) ...
OK, response successfully read (13 bytes).
Trying to send message 2 to endpoint 0x04 ...
OK, message successfully sent
Reading the response to message 2 (CSW) ...
OK, response successfully read (13 bytes).
Resetting response endpoint 0x84
Resetting message endpoint 0x04
Blocking the interface for 500 ms before releasing ...
Resetting usb device .
OK, device was reset
-> Run lsusb to note any changes. Bye.
$ sleep 20
$ lsusb
...
Bus 004 Device 048: ID 15eb:7153
$ dmesg
...
[66224.711158] usb 4-1.2: reset full-speed USB device number 48 using ehci_hcd
still no luck.
thanks
Posted: 23 Jul 2012, 22:51
by Josh
I assume you ran all these commands as root or with sudo ...
Then, I'm afraid I am almost out of my wit. I'm sure the command is correct though.
Does the device (the pseudo CD-ROM) get mounted automatically after plugging?
Posted: 24 Jul 2012, 00:27
by tricky
yes. all commands are run as root.
yes it does gets automatically mounted at /dev/sr1.
if changing the product id is the aim. it could be achieved just by ejecting /dev/sr1. modprobe usbserial vendor=0x15eb product=0x7152 would even create /dev/ttyUSB{0,1,2,3}. but wvdial fails with no carrier. pppd fails with loopback detected.
right now to make my modem work in linux, i have to "switch" it using virtualboxed win7. as you can imagine its tedious and cannot-be-used-in-script kind of process. so thats why i am here.
thanks for your time.
Posted: 24 Jul 2012, 12:20
by Josh
There may be an issue with timing.
You could try to include your configuration as a usb_modeswitch config file, putting it in the folder
/etc/usb_modeswitch.d. Then add a line for your ID to the "rules" file:
/lib/udev/rules.d/40-usb_modeswitch.rules
If you have installed the whole "framework" of usb_modeswitch, then you should get an automatic action as soon as you plug in. The difference against your manual attempts is that the switching action happens very early, before the system is able to use the storage.
For the config file, you could copy and adapt any existing file that has the "061b" command in it.
Posted: 24 Jul 2012, 22:52
by tricky
i have tried adding
Code: Select all
ATTRS{idVendor}=="15eb", ATTRS{idProduct}=="7153", RUN+="usb_modeswitch '%b/%k'"
and
ATTRS{idVendor}=="15eb", ATTRS{idProduct}=="7153", RUN+="usb_modeswitch '%b/%k' -c /etc/usb_modeswitch.d/evdo.conf"
both to /lib/udev/rules.d/40-usb_modeswitch.rules but it does not seems to work.
my evdo.conf is
Code: Select all
DefaultVendor= 0x15eb
DefaultProduct= 0x7153
TargetVendor= 0x15eb
TargetProduct= 0x7152
MessageContent="5553424312345678000000000000061e000000000000000000000000000000"
MessageContent2="55534243b8a82089000000000000061b000000020000000000000000000000"
thanks
Posted: 25 Jul 2012, 08:22
by Josh
Do you have the "Tcl" package installed? It is required (unless you are using the Ubuntu package)
If you have, try switching on usb_modeswitch's logging in the global config file
/etc/usb_modeswitch.conf, just to make sure that at least it is run when plugging in the stick.
Posted: 25 Jul 2012, 19:34
by tricky
yes i have tcl installed.
ok EnableLogging=1. but log file says the same thing.
Code: Select all
...
Reading attributes ...
Target config not matching - current values are
3-1.2:1.0/bInterfaceClass: 08
bConfigurationValue: 1
bNumConfigurations: 1
busnum: 3
devnum: 16
idProduct: 7153
idVendor: 15eb
manufacturer: China TeleCom
product: CBP7.0
serial: <C3><BF><C3><BF><C3><BF><C3><BF><C3><BF><C3><BF><C3><BF><C3><BF><C3><BF><C3><BF>
Mode switching may have failed. Exiting
unexpectdly, the flash storage does contain deb package for i686. i found these files.
Code: Select all
$ find . -type f | while read f; do file "$f" ; done
./lib/udev/rules.d/61-linktop.rules: ASCII text
./opt/3GModem/ModemClient: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, stripped
./opt/3GModem/signal_bg_off.png: PNG image data, 82 x 82, 8-bit/color RGBA, non-interlaced
./opt/3GModem/firstrun.sh: POSIX shell script, ASCII text executable
./opt/3GModem/modemon: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), statically linked, for GNU/Linux 2.6.15, not stripped
./opt/3GModem/deconnectnet.sh: POSIX shell script, ASCII text executable
./opt/3GModem/devicerule.sh: POSIX shell script, ASCII text executable
./opt/3GModem/connectrule.sh: POSIX shell script, ASCII text executable
./opt/3GModem/Help flie-Linux1.pdf: PDF document, version 1.4
./opt/3GModem/61-linktop.rules: ASCII text
./opt/3GModem/ppp/peers/cdmadialer: ASCII text
./opt/3GModem/ppp/options: ASCII text
./opt/3GModem/ppp/chat.conf: ASCII text
./opt/3GModem/ppp/pap-secrets: ASCII text
./opt/3GModem/ppp/chap-secrets: ASCII text
./opt/3GModem/database.db: SQLite 3.x database
./usr/share/applications/3GModem.desktop: ASCII text
$ cd opt/3GModem
$ cat 61-linktop.rules
ACTION=="add", ENV{ID_CDROM}=="1", ENV{ID_VENDOR_ID}=="15eb", ENV{ID_MODEL_ID}=="7153", RUN+="/opt/3GModem/devicerule.sh %k"
$ cat devicerule.sh
#!/bin/sh
FIRSTRUNPATH=/opt/3GModem/firstrun.sh
echo $1
if [ -e $FIRSTRUNPATH ];then
echo "success rm"
sudo rm $FIRSTRUNPATH
fi
sleep 12
eject $1
sudo modprobe usbserial vendor=0x15EB product=0x7152
echo "modprobe"
sudo /opt/3GModem/modemon
$ cat connectrule.sh
#!/bin/sh
echo $1
echo $2
gksudo sed "1s/.*/$1 * $2/" /etc/ppp/chap-secrets >/opt/3GModem/linktop
sudo mv /opt/3GModem/linktop /etc/ppp/chap-secrets
sudo sed "1s/.*/$1 * $2/" /etc/ppp/pap-secrets >/opt/3GModem/linktop
sudo mv /opt/3GModem/linktop /etc/ppp/pap-secrets
sudo sed "/user/ c\user $1" /etc/ppp/peers/cdmadialer >/opt/3GModem/linktop
sudo mv /opt/3GModem/linktop /etc/ppp/peers/cdmadialer
sudo /opt/3GModem/modemon
sleep 3
sudo pppd call cdmadialer &
exit 0
its the same steps i first did, which creates ttyUSB* . but pppd fails with loopback error, as i said earlier.
i even managed to execute modemon which outputs "modemon is success". still pppd fails with same error. however ModemClient need ancient i686 libs where my distro is arch 64bit. so even here i am screwed.
i am reaching out of depth here, but cant we just get modem working by echoing "some string or may be messagecontent" in any of ttyUSB* ?
thanks
Posted: 25 Jul 2012, 20:51
by Josh
No, I'm afraid once the thing has switched the mode, there is not much you can do.
I would strongly recommend to use the 3G modem driver of Linux instead of the generic "usbserial".
It's called "option" for historical reasons (Option is a pioneer 3G modem manufacturer).
Once the switch has happened, do this:
Code: Select all
# modprobe -v option
# echo "15eb 7152" > /sys/bus/usb-serial/drivers/option1/new_id
Also, check the ttyUSB ports that are created for the ones that contain an endpoint with transfer type "Interrupt". The easiest way to do that is "lsusb -v -d 15eb:7152".
Usually the connection works on the first of these interrupt ports.