AnsweredAssumed Answered

/lib/udev/rules.d for imx6 sabresd board for establishing network for usb modem

Question asked by Bandaru Lavanya on Mar 16, 2016
Latest reply on Mar 17, 2016 by Bandaru Lavanya

Hi All,

I am trying to use the usb modem to my board, i can able to do usb_mode switch to convert from CD-ROM to modem.

 

LOG for this

I connected modem to usb host :

usb 1-1: new high speed USB device number 2 using fsl-ehci

usb 1-1: New USB device found, idVendor=1bbb, idProduct=f000

usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3

usb 1-1: Product: MobileBroadBand

usb 1-1: Manufacturer: Alcatel

usb 1-1: SerialNumber: 0123456789ABCDEF

 

Convertion using usb_modeswicth:

usb_modeswitch -v 0x1bbb -p 0xf000 -V 0x1bbb -P 0x0017 -M "55534243123456788000000080000606f50402527000000000000000000000"

 

Looking for target devices ...

No devices in target mode or class found

Looking for default dusb 1-1: usbfs: process 2226 (usb_modeswitch) did not claim interface 0 before use

evices ...

Found devices in default mode, class or configuration (1)

Accessing device 002 on bus 001 ...

Getting the current device configuration ...

OK, got current device configuration (1)

Using endpoints 0x01 (out) and 0x81 (in)

Inquiring device details; driver will be detached ...

Looking for active driver ...

No driver found. Either detached before or never attached

 

SCSI inquiry data (for identification)

-------------------------

  Vendor String: ONETOUCH

   Model String: KINGFISHER    

Revision String: 2.31

-------------------------

 

USB description data (for identification)

-------------------------

Manufacturer: Alcatel

     Product: MobileBroadBand

  Serial No.: 0123456789ABCDEF

-------------------------

Setting up communication with interface 0

Using endpoint 0x01 for message sending ...

Trying to send message 1 to endpoint 0x01 ...

OK, message successfully sent

Resetting response endpoint 0x81

Resetting message endpoint 0x01

usb 1-1: USB disconnect, device number 2

Device is gone, skipping any further commands

-> Run lsusb to note any changes. Bye.

 

root@(none) ~$ usb 1-1: new high speed USB device number 3 using fsl-ehci

usb 1-1: New USB device found, idVendor=1bbb, idProduct=0195

usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3

usb 1-1: Product: MobileBroadBand

usb 1-1: Manufacturer: Alcatel

usb 1-1: SerialNumber: 0123456789ABCDE

 

Now i am inserting the modules :

insmod usbnet.ko

insmod usb-storage.ko

insmod cdc_ether.ko

insmod  rndis_host.ko

insmod usbserial.ko

 

Log is here:

                                  insmod usbnet.ko

root@(none) /home$ insmod usb-storage.ko

Initializing USB Mass Storage driver...

scsi0 : usb-storage 1-1:1.2

usbcore: registered new interface driver usb-storage

USB Mass Storage support registered.

root@(none) /home$ scsi 0:0:0:0: Direct-Access     ONETOUCH KINGFISHER       2.31 PQ: 0 ANSI: 2

scsi 0:0:0:0: Attached scsi generic sg0 type 0

insmod cdc_ether.ko

usbcore: registered new interface driver cdc_ether

root@(none) /home$ insmod rndis_host.ko

rndis_host 1-1:1.0: eth0: register 'rndis_host' at usb-fsl-ehci.0-1, RNDIS device, 08:2e:5f:29:0e:69

usbcore: registered new interface driver rndis_host

root@(none) /home$ insmod usbserial.ko

usbcore: registered new interface driver usbserial

USB Serial support registered for generic

usbcore: registered new interface driver usbserial_generic

usbserial: USB Serial Driver core

 

Now if i give ifconfig :

 

root@(none) /home$ ifconfig -a

eth0      Link encap:Ethernet  HWaddr 08:2E:5F:29:0E:69

          BROADCAST MULTICAST  MTU:1500  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

 

lo        Link encap:Local Loopback

          LOOPBACK  MTU:16436  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0

          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

 

How we can establish the connection?

In my PC(kernel version -3.2.0-91-generic-pae ) i tried it by disabling automatic usb_modeswitch in usb_modeswitch.conf file in /etc folder.

i did

sudo usb_modeswitch -v 0x1bbb -p 0xf000 -V 0x1bbb -P 0x0017 -M "55534243123456788000000080000606f50402527000000000000000000000"

after this immediately it is converting to modem and connection is establishing.

Looking for target devices ...

No devices in target mode or class found

Looking for default devices ...

   found matching product ID

   adding device

Found device in default mode, class or configuration (1)

Accessing device 008 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)

Inquiring device details; driver will be detached ...

Looking for active driver ...

OK, driver found ("usb-storage")

OK, driver "usb-storage" detached

 

SCSI inquiry data (for identification)

-------------------------

  Vendor String: ONETOUCH

   Model String: KINGFISHER    

Revision String: 2.31

-------------------------

 

USB description data (for identification)

-------------------------

Manufacturer: Alcatel

     Product: MobileBroadBand

  Serial No.: 0123456789ABCDEF

-------------------------

Setting up communication with interface 0

Using endpoint 0x01 for message sending ...

Trying to send message 1 to endpoint 0x01 ...

OK, message successfully sent

Resetting response endpoint 0x81

Resetting message endpoint 0x01

Device is gone, skipping any further commands

-> Run lsusb to note any changes. Bye.

 

Dmesg:

[10449.492021] usb 1-6: new high-speed USB device number 9 using ehci_hcd

[10449.661393] rndis_host 1-6:1.0: eth1: register 'rndis_host' at usb-0000:00:1d.7-6, RNDIS device, 08:2e:5f:29:0e:69

[10449.662012] scsi7 : usb-storage 1-6:1.2

[10450.680042] scsi 7:0:0:0: Direct-Access     ONETOUCH KINGFISHER       2.31 PQ: 0 ANSI: 2

[10450.680783] sd 7:0:0:0: Attached scsi generic sg1 type 0

[10450.708634] sd 7:0:0:0: [sdb] Attached SCSI removable disk

[10459.872009] eth1: no IPv6 routers present

 

and connection is establishing .

similar to this can we get in board also ?

can i get udev/rules.d  and supported files for imx6 sabresd board ?

 

Thanks & Regards,

Lavanya

Outcomes