Chinese HSDPA modem & linux support

Okay, I hacked it to work.
So, what was the problem?
These damned modems by default show up as a mass_storage. As a cdrom actually. Which contains drivers. For windows.
Afterwards they are switched into a regular modem mode, which linux can make use of.
To do the switch in linux we need usb-modeswitch. A nice utility that handles the task. And some sniffed data filled into the config file.
Here it is:

########################################################
# HSDPA USB modem from dealextreme
# http://www.dealextreme.com/details.dx/sku.47013
# By Andrew 'Necromant' Andrianov

DefaultVendor= 0x05c6
DefaultProduct=0x2000

TargetVendor= 0x05c6
TargetProduct= 0x0015

# This modem doesn't react fast - it pauses for some 30-40 seconds
CheckSuccess=40

MessageEndpoint=0x08
MessageContent="5553424368032c882400000080000612000000240000000000000000000000"
# Nothing will work until you read the response from device
NeedResponse=1

I obtained it looking at this dump I grabbed from windoze via usbsnoop:

[231 ms] UsbSnoop - FilterAddDevice(a6b42748) : DriverObject 898c1408, pdo 88b88b30
[232 ms] UsbSnoop - FilterDispatchPnp(a6b4245c) : IRP_MJ_PNP (IRP_MN_QUERY_LEGACY_BUS_INFORMATION)
[232 ms] UsbSnoop - FdoHookDispatchPnp(a6b4245c) : IRP_MJ_PNP (IRP_MN_QUERY_LEGACY_BUS_INFORMATION)
[232 ms] UsbSnoop - FilterDispatchPnp(a6b4245c) : IRP_MJ_PNP (IRP_MN_QUERY_RESOURCE_REQUIREMENTS)
[233 ms] UsbSnoop - FdoHookDispatchPnp(a6b4245c) : IRP_MJ_PNP (IRP_MN_QUERY_RESOURCE_REQUIREMENTS)
[233 ms] UsbSnoop - FilterDispatchPnp(a6b4245c) : IRP_MJ_PNP (IRP_MN_FILTER_RESOURCE_REQUIREMENTS)
[233 ms] UsbSnoop - FdoHookDispatchPnp(a6b4245c) : IRP_MJ_PNP (IRP_MN_FILTER_RESOURCE_REQUIREMENTS)
[233 ms] UsbSnoop - FilterDispatchPnp(a6b4245c) : IRP_MJ_PNP (IRP_MN_START_DEVICE)
[233 ms] UsbSnoop - FdoHookDispatchPnp(a6b4245c) : IRP_MJ_PNP (IRP_MN_START_DEVICE)
[233 ms] UsbSnoop - FilterDispatchAny(a6b3dfd2) : IRP_MJ_SYSTEM_CONTROL
[234 ms] UsbSnoop - FilterDispatchAny(a6b3dfd2) : IRP_MJ_INTERNAL_DEVICE_CONTROL
[234 ms] UsbSnoop - FdoHookDispatchInternalIoctl(a6b3e1ea) : fdo=8837b020, Irp=882c0368, IRQL=0
[234 ms] >>> URB 1 going down >>>
-- URB_FUNCTION_GET_DESCRIPTOR_FROM_DEVICE:
TransferBufferLength = 00000012
TransferBuffer = 883c3e50
TransferBufferMDL = 00000000
Index = 00000000
DescriptorType = 00000001 (USB_DEVICE_DESCRIPTOR_TYPE)
LanguageId = 00000000
[237 ms] UsbSnoop - MyInternalIOCTLCompletion(a6b3e126) : fido=00000000, Irp=882c0368, Context=885ea8d0, IRQL=2
[237 ms] <<< URB 1 coming back <<< -- URB_FUNCTION_CONTROL_TRANSFER: PipeHandle = 8851a600 TransferFlags = 0000000b (USBD_TRANSFER_DIRECTION_IN, USBD_SHORT_TRANSFER_OK) TransferBufferLength = 00000012 TransferBuffer = 883c3e50 TransferBufferMDL = 897ae7b8 00000000: 12 01 10 01 00 00 00 40 c6 05 00 20 00 00 01 02 00000010: 00 01 UrbLink = 00000000 SetupPacket = 00000000: 80 06 00 01 00 00 12 00 [237 ms] UsbSnoop - FilterDispatchAny(a6b3dfd2) : IRP_MJ_INTERNAL_DEVICE_CONTROL [237 ms] UsbSnoop - FdoHookDispatchInternalIoctl(a6b3e1ea) : fdo=8837b020, Irp=882c0368, IRQL=0 [238 ms] >>> URB 2 going down >>>
-- URB_FUNCTION_GET_DESCRIPTOR_FROM_DEVICE:
TransferBufferLength = 00000009
TransferBuffer = 89887a68
TransferBufferMDL = 00000000
Index = 00000000
DescriptorType = 00000002 (USB_CONFIGURATION_DESCRIPTOR_TYPE)
LanguageId = 00000000
[241 ms] UsbSnoop - MyInternalIOCTLCompletion(a6b3e126) : fido=00000000, Irp=882c0368, Context=885ea8d0, IRQL=2
[241 ms] <<< URB 2 coming back <<< -- URB_FUNCTION_CONTROL_TRANSFER: PipeHandle = 8851a600 TransferFlags = 0000000b (USBD_TRANSFER_DIRECTION_IN, USBD_SHORT_TRANSFER_OK) TransferBufferLength = 00000009 TransferBuffer = 89887a68 TransferBufferMDL = 897ae7b8 00000000: 09 02 20 00 01 01 00 a0 fa UrbLink = 00000000 SetupPacket = 00000000: 80 06 00 02 00 00 09 00 [241 ms] UsbSnoop - FilterDispatchAny(a6b3dfd2) : IRP_MJ_INTERNAL_DEVICE_CONTROL [241 ms] UsbSnoop - FdoHookDispatchInternalIoctl(a6b3e1ea) : fdo=8837b020, Irp=882c0368, IRQL=0 [242 ms] >>> URB 3 going down >>>
-- URB_FUNCTION_GET_DESCRIPTOR_FROM_DEVICE:
TransferBufferLength = 00000020
TransferBuffer = 8986bcb8
TransferBufferMDL = 00000000
Index = 00000000
DescriptorType = 00000002 (USB_CONFIGURATION_DESCRIPTOR_TYPE)
LanguageId = 00000000
[245 ms] UsbSnoop - MyInternalIOCTLCompletion(a6b3e126) : fido=00000000, Irp=882c0368, Context=885ea8d0, IRQL=2
[245 ms] <<< URB 3 coming back <<< -- URB_FUNCTION_CONTROL_TRANSFER: PipeHandle = 8851a600 TransferFlags = 0000000b (USBD_TRANSFER_DIRECTION_IN, USBD_SHORT_TRANSFER_OK) TransferBufferLength = 00000020 TransferBuffer = 8986bcb8 TransferBufferMDL = 897ae7b8 00000000: 09 02 20 00 01 01 00 a0 fa 09 04 00 00 02 08 06 00000010: 50 00 07 05 87 02 40 00 00 07 05 08 02 40 00 00 UrbLink = 00000000 SetupPacket = 00000000: 80 06 00 02 00 00 20 00 [245 ms] UsbSnoop - FilterDispatchAny(a6b3dfd2) : IRP_MJ_INTERNAL_DEVICE_CONTROL [245 ms] UsbSnoop - FdoHookDispatchInternalIoctl(a6b3e1ea) : fdo=8837b020, Irp=882c0368, IRQL=0 [246 ms] >>> URB 4 going down >>>
-- URB_FUNCTION_SELECT_CONFIGURATION:
ConfigurationDescriptor = 0x8986bcb8 (configure)
ConfigurationDescriptor : bLength = 9
ConfigurationDescriptor : bDescriptorType = 0x00000002
ConfigurationDescriptor : wTotalLength = 0x00000020
ConfigurationDescriptor : bNumInterfaces = 0x00000001
ConfigurationDescriptor : bConfigurationValue = 0x00000001
ConfigurationDescriptor : iConfiguration = 0x00000000
ConfigurationDescriptor : bmAttributes = 0x000000a0
ConfigurationDescriptor : MaxPower = 0x000000fa
ConfigurationHandle = 0x00000000
Interface[0]: Length = 56
Interface[0]: InterfaceNumber = 0
Interface[0]: AlternateSetting = 0
[306 ms] UsbSnoop - MyInternalIOCTLCompletion(a6b3e126) : fido=00000000, Irp=882c0368, Context=885ea8d0, IRQL=0
[306 ms] <<< URB 4 coming back <<< -- URB_FUNCTION_SELECT_CONFIGURATION: ConfigurationDescriptor = 0x8986bcb8 (configure) ConfigurationDescriptor : bLength = 9 ConfigurationDescriptor : bDescriptorType = 0x00000002 ConfigurationDescriptor : wTotalLength = 0x00000020 ConfigurationDescriptor : bNumInterfaces = 0x00000001 ConfigurationDescriptor : bConfigurationValue = 0x00000001 ConfigurationDescriptor : iConfiguration = 0x00000000 ConfigurationDescriptor : bmAttributes = 0x000000a0 ConfigurationDescriptor : MaxPower = 0x000000fa ConfigurationHandle = 0x88b188c0 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 = 0x899ddae0 Interface[0]: NumberOfPipes = 2 Interface[0]: Pipes[0] : MaximumPacketSize = 0x00000040 Interface[0]: Pipes[0] : EndpointAddress = 0x00000087 Interface[0]: Pipes[0] : Interval = 0x00000000 Interface[0]: Pipes[0] : PipeType = 0x00000002 (UsbdPipeTypeBulk) Interface[0]: Pipes[0] : PipeHandle = 0x899ddafc Interface[0]: Pipes[0] : MaxTransferSize = 0x00001000 Interface[0]: Pipes[0] : PipeFlags = 0x00000000 Interface[0]: Pipes[1] : MaximumPacketSize = 0x00000040 Interface[0]: Pipes[1] : EndpointAddress = 0x00000008 Interface[0]: Pipes[1] : Interval = 0x00000000 Interface[0]: Pipes[1] : PipeType = 0x00000002 (UsbdPipeTypeBulk) Interface[0]: Pipes[1] : PipeHandle = 0x899ddb1c Interface[0]: Pipes[1] : MaxTransferSize = 0x00001000 Interface[0]: Pipes[1] : PipeFlags = 0x00000000 [306 ms] UsbSnoop - FilterDispatchAny(a6b3dfd2) : IRP_MJ_INTERNAL_DEVICE_CONTROL [306 ms] UsbSnoop - FdoHookDispatchInternalIoctl(a6b3e1ea) : fdo=8837b020, Irp=882c0368, IRQL=0 [306 ms] >>> URB 5 going down >>>
-- URB_FUNCTION_SELECT_INTERFACE:
ConfigurationHandle = 0x88b188c0
Interface: Length = 56
Interface: InterfaceNumber = 0
Interface: AlternateSetting = 0
Interface: Class = 0x00000008
Interface: SubClass = 0x00000006
Interface: Protocol = 0x00000050
Interface: InterfaceHandle = 899ddae0
Interface: NumberOfPipes = 2
[369 ms] UsbSnoop - MyInternalIOCTLCompletion(a6b3e126) : fido=00000000, Irp=882c0368, Context=885ea8d0, IRQL=0
[369 ms] <<< URB 5 coming back <<< -- URB_FUNCTION_SELECT_INTERFACE: ConfigurationHandle = 0x88b188c0 Interface: Length = 56 Interface: InterfaceNumber = 0 Interface: AlternateSetting = 0 Interface: Class = 0x00000008 Interface: SubClass = 0x00000006 Interface: Protocol = 0x00000050 Interface: InterfaceHandle = 8852c5b8 Interface: NumberOfPipes = 2 Interface: Pipes[0] : MaximumPacketSize = 0x00000040 Interface: Pipes[0] : EndpointAddress = 0x00000087 Interface: Pipes[0] : Interval = 0x00000000 Interface: Pipes[0] : PipeType = 0x00000002 (UsbdPipeTypeBulk) Interface: Pipes[0] : PipeHandle = 0x8852c5d4 Interface: Pipes[0] : MaxTransferSize = 0x00010000 Interface: Pipes[0] : PipeFlags = 0x00000000 Interface: Pipes[1] : MaximumPacketSize = 0x00000040 Interface: Pipes[1] : EndpointAddress = 0x00000008 Interface: Pipes[1] : Interval = 0x00000000 Interface: Pipes[1] : PipeType = 0x00000002 (UsbdPipeTypeBulk) Interface: Pipes[1] : PipeHandle = 0x8852c5f4 Interface: Pipes[1] : MaxTransferSize = 0x00010000 Interface: Pipes[1] : PipeFlags = 0x00000000 [369 ms] UsbSnoop - FilterDispatchAny(a6b3dfd2) : IRP_MJ_INTERNAL_DEVICE_CONTROL [369 ms] UsbSnoop - FdoHookDispatchInternalIoctl(a6b3e1ea) : fdo=8837b020, Irp=882c0368, IRQL=0 [369 ms] >>> URB 6 going down >>>
-- URB_FUNCTION_CLASS_INTERFACE:
TransferFlags = 00000001 (USBD_TRANSFER_DIRECTION_IN, ~USBD_SHORT_TRANSFER_OK)
TransferBufferLength = 00000001
TransferBuffer = 884f7e60
TransferBufferMDL = 00000000
UrbLink = 00000000
RequestTypeReservedBits = 00000000
Request = 000000fe
Value = 00000000
Index = 00000000
[372 ms] UsbSnoop - MyInternalIOCTLCompletion(a6b3e126) : fido=00000000, Irp=882c0368, Context=885ea8d0, IRQL=2
[372 ms] <<< URB 6 coming back <<< -- URB_FUNCTION_CONTROL_TRANSFER: PipeHandle = 8851a600 TransferFlags = 0000000b (USBD_TRANSFER_DIRECTION_IN, USBD_SHORT_TRANSFER_OK) TransferBufferLength = 00000001 TransferBuffer = 884f7e60 TransferBufferMDL = 88369240 00000000: 00 UrbLink = 00000000 SetupPacket = 00000000: a1 fe 00 00 00 00 01 00 [373 ms] UsbSnoop - FilterDispatchAny(a6b3dfd2) : IRP_MJ_INTERNAL_DEVICE_CONTROL [373 ms] UsbSnoop - FdoHookDispatchInternalIoctl(a6b3e1ea) : fdo=8837b020, Irp=882c0368, IRQL=2 [373 ms] >>> URB 7 going down >>>
-- URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER:
PipeHandle = 8852c5f4 [endpoint 0x00000008]
TransferFlags = 00000000 (USBD_TRANSFER_DIRECTION_OUT, ~USBD_SHORT_TRANSFER_OK)
TransferBufferLength = 0000001f
TransferBuffer = 882567a0
TransferBufferMDL = 00000000
00000000: 55 53 42 43 68 03 2c 88 24 00 00 00 80 00 06 12
00000010: 00 00 00 24 00 00 00 00 00 00 00 00 00 00 00
UrbLink = 00000000
[374 ms] UsbSnoop - MyInternalIOCTLCompletion(a6b3e126) : fido=8836abf8, Irp=882c0368, Context=885ea8d0, IRQL=2
[374 ms] <<< URB 7 coming back <<< -- URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER: PipeHandle = 8852c5f4 [endpoint 0x00000008] TransferFlags = 00000000 (USBD_TRANSFER_DIRECTION_OUT, ~USBD_SHORT_TRANSFER_OK) TransferBufferLength = 0000001f TransferBuffer = 882567a0 TransferBufferMDL = 89854dd0 UrbLink = 00000000 [374 ms] UsbSnoop - FilterDispatchAny(a6b3dfd2) : IRP_MJ_INTERNAL_DEVICE_CONTROL [374 ms] UsbSnoop - FdoHookDispatchInternalIoctl(a6b3e1ea) : fdo=8837b020, Irp=882c0368, IRQL=2 [375 ms] >>> URB 8 going down >>>
-- URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER:
PipeHandle = 8852c5d4 [endpoint 0x00000087]
TransferFlags = 00000002 (USBD_TRANSFER_DIRECTION_OUT, USBD_SHORT_TRANSFER_OK)
TransferBufferLength = 00000024
TransferBuffer = 00000000
TransferBufferMDL = 88369240
00000000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00000020: 00 00 00 00
UrbLink = 00000000
[376 ms] UsbSnoop - MyInternalIOCTLCompletion(a6b3e126) : fido=8836abf8, Irp=882c0368, Context=885ea8d0, IRQL=2
[376 ms] <<< URB 8 coming back <<< -- URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER: PipeHandle = 8852c5d4 [endpoint 0x00000087] TransferFlags = 00000003 (USBD_TRANSFER_DIRECTION_IN, USBD_SHORT_TRANSFER_OK) TransferBufferLength = 00000024 TransferBuffer = 00000000 TransferBufferMDL = 88369240 00000000: 05 80 02 00 33 00 00 00 42 4d 43 20 43 6f 72 70 00000010: 55 53 42 20 53 74 6f 72 61 67 65 20 20 20 20 20 00000020: 32 2e 33 31 UrbLink = 00000000 [376 ms] UsbSnoop - FilterDispatchAny(a6b3dfd2) : IRP_MJ_INTERNAL_DEVICE_CONTROL [376 ms] UsbSnoop - FdoHookDispatchInternalIoctl(a6b3e1ea) : fdo=8837b020, Irp=882c0368, IRQL=2 [377 ms] >>> URB 9 going down >>>
-- URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER:
PipeHandle = 8852c5d4 [endpoint 0x00000087]
TransferFlags = 00000000 (USBD_TRANSFER_DIRECTION_OUT, ~USBD_SHORT_TRANSFER_OK)
TransferBufferLength = 0000000d
TransferBuffer = 882567a0
TransferBufferMDL = 00000000
00000000: 55 53 42 43 68 03 2c 88 24 00 00 00 80
UrbLink = 00000000
[378 ms] UsbSnoop - MyInternalIOCTLCompletion(a6b3e126) : fido=8836abf8, Irp=882c0368, Context=885ea8d0, IRQL=2
[378 ms] <<< URB 9 coming back <<< -- URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER: PipeHandle = 8852c5d4 [endpoint 0x00000087] TransferFlags = 00000001 (USBD_TRANSFER_DIRECTION_IN, ~USBD_SHORT_TRANSFER_OK) TransferBufferLength = 0000000d TransferBuffer = 882567a0 TransferBufferMDL = 89854dd0 00000000: 55 53 42 53 68 03 2c 88 00 00 00 00 00 UrbLink = 00000000 [378 ms] UsbSnoop - FilterDispatchPnp(a6b4245c) : IRP_MJ_PNP (IRP_MN_QUERY_INTERFACE) [379 ms] UsbSnoop - FilterDispatchPnp: Query for Bus interface for USB Function Drivers. [379 ms] InterfaceType: USB_BUS_INTERFACE_USBDI_GUID [379 ms] UsbSnoop - FdoHookDispatchPnp(a6b4245c) : IRP_MJ_PNP (IRP_MN_QUERY_INTERFACE) [379 ms] UsbSnoop - FdoHookDispatchPnp: Query for Bus interface for USB Function Drivers. [379 ms] InterfaceType: USB_BUS_INTERFACE_USBDI_GUID [380 ms] UsbSnoop - FilterDispatchPnp(a6b4245c) : IRP_MJ_PNP (IRP_MN_QUERY_CAPABILITIES) [380 ms] UsbSnoop - FdoHookDispatchPnp(a6b4245c) : IRP_MJ_PNP (IRP_MN_QUERY_CAPABILITIES) [380 ms] UsbSnoop - FilterDispatchPnp(a6b4245c) : IRP_MJ_PNP (IRP_MN_QUERY_PNP_DEVICE_STATE) [380 ms] UsbSnoop - FdoHookDispatchPnp(a6b4245c) : IRP_MJ_PNP (IRP_MN_QUERY_PNP_DEVICE_STATE) [380 ms] UsbSnoop - FilterDispatchPnp(a6b4245c) : IRP_MJ_PNP (IRP_MN_QUERY_DEVICE_RELATIONS) [380 ms] UsbSnoop - FdoHookDispatchPnp(a6b4245c) : IRP_MJ_PNP (IRP_MN_QUERY_DEVICE_RELATIONS) [380 ms] UsbSnoop - FilterDispatchPnp(a6b4245c) : IRP_MJ_PNP (IRP_MN_QUERY_CAPABILITIES) [380 ms] UsbSnoop - FdoHookDispatchPnp(a6b4245c) : IRP_MJ_PNP (IRP_MN_QUERY_CAPABILITIES) [3820 ms] UsbSnoop - FilterDispatchPnp(a6b4245c) : IRP_MJ_PNP (IRP_MN_QUERY_CAPABILITIES) [3820 ms] UsbSnoop - FdoHookDispatchPnp(a6b4245c) : IRP_MJ_PNP (IRP_MN_QUERY_CAPABILITIES) [30999 ms] UsbSnoop - FilterDispatchPnp(a6b4245c) : IRP_MJ_PNP (IRP_MN_QUERY_DEVICE_RELATIONS) [30999 ms] UsbSnoop - FdoHookDispatchPnp(a6b4245c) : IRP_MJ_PNP (IRP_MN_QUERY_DEVICE_RELATIONS) [30999 ms] UsbSnoop - FilterDispatchPnp(a6b4245c) : IRP_MJ_PNP (IRP_MN_QUERY_DEVICE_RELATIONS) [30999 ms] UsbSnoop - FdoHookDispatchPnp(a6b4245c) : IRP_MJ_PNP (IRP_MN_QUERY_DEVICE_RELATIONS) [30999 ms] UsbSnoop - FilterDispatchPnp(a6b4245c) : IRP_MJ_PNP (IRP_MN_SURPRISE_REMOVAL) [30999 ms] UsbSnoop - FdoHookDispatchPnp(a6b4245c) : IRP_MJ_PNP (IRP_MN_SURPRISE_REMOVAL) [31030 ms] UsbSnoop - FilterDispatchPnp(a6b4245c) : IRP_MJ_PNP (IRP_MN_REMOVE_DEVICE)

The resulting device can be accessed via usbserial module.
just give it a hint: vendor=0x05c6 product=0x0015
If you have usbserial - you'll have to unload it first and supply it some arguments.
e.g. modprobe -r usbserial
modprobe usbserial vendor=0x05c6 product=0x0015

You'll get 3 new ttyUSB's now.
Now you can setup ppp and it will (hopefully) work.

Print Friendly

Leave a Reply