Firstly, this is NOT the same as the LG HDM-2100 (EVDO Rev.A USB modem) which has the same device ID - the commands required are totally different.
Secondly, this device doesn't enumerate properly with linux standard usb drivers, even as a mass storage device. The symptoms are it enumerates but then after exactly 0.5 seconds it disconnects again, and the phone switches to "charge mode", as if it was plugged into a dumb wall charger. The solution to this is to plug the usb cable in and then reboot the phone - then it seems to enumerate properly (although watch out, it first enumerates as an Infinion bootloader, then disconnects, and then again as an LG usb device)
When enumerated, it has id 1004:607f, works correctly with usb-storage as a CD drive with windows drivers, as normal. The modeswitch part VERY NEARLY works in wine - it calls the win32 deviceIoControl, and I've managed to get all the parameters to the API call if it's useful. (the actual "switch" library they use is only ~100 lines of code, so is easy to understand)
Here is it's lsusb:
Code: Select all
Bus 003 Device 005: ID 1004:607f LG Electronics, Inc.
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x1004 LG Electronics, Inc.
idProduct 0x607f
bcdDevice 1.00
iManufacturer 1 LG
iProduct 2 LGE USB Device
iSerial 3 359068021834936
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 32
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 4 LGE USB Device
bmAttributes 0x80
(Bus Powered)
MaxPower 100mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 8 Mass Storage
bInterfaceSubClass 6 SCSI
bInterfaceProtocol 80 Bulk (Zip)
iInterface 5 ms ifac 1 (SCSI::BULK_ONLY)
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x89 EP 9 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x0a EP 10 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 0
Device Status: 0x0000
(Bus Powered)
http://pastebin.com/Bs9HGUMP
I wrote a config file like this:
Code: Select all
########################################################
# LG KP500 Cookie Phone modem
DefaultVendor= 0x1004
DefaultProduct=0x607f
TargetVendor= 0x1004
TargetProduct= 0x6000
CheckSuccess=20
MessageContent="555342435886b5ff03000000800006f1010100000000000000000000000000"
Code: Select all
Bus 003 Device 004: ID 1004:6000 LG Electronics, Inc. VX4400/VX6000 Cellphone
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 2 Communications
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x1004 LG Electronics, Inc.
idProduct 0x6000 VX4400/VX6000 Cellphone
bcdDevice 1.00
iManufacturer 1 LG
iProduct 2 LGE USB Device
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 90
bNumInterfaces 3
bConfigurationValue 2
iConfiguration 3 cfg1: ACM w/ BULK and Dbg/Trc
bmAttributes 0x80
(Bus Powered)
MaxPower 100mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 2 Communications
bInterfaceSubClass 2 Abstract (modem)
bInterfaceProtocol 1 AT-commands (v.25ter)
iInterface 4 control ifac (ACM AT)
CDC Header:
bcdCDC 1.10
CDC Union:
bMasterInterface 0
bSlaveInterface 1
CDC Call Management:
bmCapabilities 0x00
bDataInterface 1
CDC ACM:
bmCapabilities 0x07
sends break
line coding and serial state
get/set/clear comm features
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 255
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 10 CDC Data
bInterfaceSubClass 0 Unused
bInterfaceProtocol 0
iInterface 5 CDC Data Interface
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 1
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 1
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 2
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 10 CDC Data
bInterfaceSubClass 0 Unused
bInterfaceProtocol 0
iInterface 6 CDC Data Interface
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x85 EP 5 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 1
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x04 EP 4 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 1
Device Status: 0x0000
(Bus Powered)
Can anyone with more knowledge of windows' deviceIoControl api and the usb mass storage spec look through the logs and tell me if there would be a better way to send these messages?