I am using BeagleBoneBlack(BBB) with Linux kernel (3.8.11) & debian File system. When i connect USB datacards(iball Airway 21.6Mpbs) it is showing me as storage device, I wanted it to switch into Modem mode so that i can use as ethX for my SoftWare Application. I came across usb_modeswitch, which has the capabilites to switch USB modes dynamically. But usb_modeswitch exits with error. How do i switch my datacard to operate in Modem Mode? Any points will be highly helpfull. Thanks In Advance. I have attached the logs.. below are the logs: queries:1. Why is my cdc_ether driver getting detached?
2. Am i commiting any mistakes while identifying proper endpoints?
Note: I m not aware how to fetch MessageContent, follwed few links to get MessageContent. Any pointers on this will be helpfull too.
2020:4020
>> cat 2020\:4020
this is a test USB Modem
TargetVendor=0x2020
TargetProduct=0x4020
MessageEndpoint=0x01
ResponseEndpoint=0x81
#MessageContent="555342431234567800000000000003f0010100000000000000000000000000"
MessageContent="55534243801BFA061200000080000C03000000120000000000000000000000"
>>lsusb
Bus 001 Device 003: ID 2020:4020
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
>>lsusb -v -d 2020:4020
Bus 001 Device 003: ID 2020:4020
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 2 Communications
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x2020
idProduct 0x4020
bcdDevice 0.01
iManufacturer 1 Network Connection
iProduct 2 R360B
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 111
bNumInterfaces 3
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xc0
Self Powered
MaxPower 500mA
Interface Association:
bLength 8
bDescriptorType 11
bFirstInterface 0
bInterfaceCount 2
bFunctionClass 2 Communications
bFunctionSubClass 6 Ethernet Networking
bFunctionProtocol 0
iFunction 5 CDC
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 2 Communications
bInterfaceSubClass 6 Ethernet Networking
bInterfaceProtocol 0
iInterface 3 CDC Ethernet Control Model (ECM)
CDC Header:
bcdCDC 1.10
CDC Union:
bMasterInterface 0
bSlaveInterface 1
CDC Ethernet:
iMacAddress 6 001EA6993A0E
bmEthernetStatistics 0x00000000
wMaxSegmentSize 1514
wNumberMCFilters 0x0000
bNumberPowerFilters 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0010 1x 16 bytes
bInterval 9
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 0
bInterfaceClass 10 CDC Data
bInterfaceSubClass 0 Unused
bInterfaceProtocol 0
iInterface 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 1
bNumEndpoints 2
bInterfaceClass 10 CDC Data
bInterfaceSubClass 0 Unused
bInterfaceProtocol 0
iInterface 4 CDC Ethernet Data
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 2
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 8 Mass Storage
bInterfaceSubClass 6 SCSI
bInterfaceProtocol 80 Bulk-Only
iInterface 7 Mass Storage
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 1
Device Qualifier (for other device speed):
bLength 10
bDescriptorType 6
bcdUSB 2.00
bDeviceClass 2 Communications
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
bNumConfigurations 1
Device Status: 0x0001
Self Powered
>>lsusb_modeswitch -v 2020 -d 4020 -c /etc/usb_modeswitch.d/2020:4020
Looking for target devices ...
found matching product ID
adding device
Found devices in target mode or class (1)
Looking for default devices ...
found matching product ID
adding device
Found device in default mode, class or configuration (1)
Accessing device 003 on bus 001 ...
Getting the current device configuration ...
OK, got current device configuration (1)
Using first interface: 0x00
Using endpoints 0x01 (out) and 0x81 (in)
Not a storage device, skipping SCSI inquiry
USB description data (for identification)
-------------------------
Manufacturer: Network Connection
Product: R360B
Serial No.: not provided
-------------------------
Looking for active driver ...
OK, driver found ("cdc_ether")
OK, driver "cdc_ether" detached
Setting up communication with interface 0
Using endpoint 0x01 for message sending ...
Trying to send message 1 to endpoint 0x01 ...
Sending the message returned error -2. Trying to continue
Resetting response endpoint 0x81
Could not reset endpoint (probably harmless): -32
Resetting message endpoint 0x01
-> Run lsusb to note any changes. Bye.
THanks, Vivek T
User contributions licensed under CC BY-SA 3.0