11 Replies Latest reply on Nov 26, 2015 1:25 PM by PabloM_Intel

    usb_modeswitch to recognize 3g dongle

    u2bpavankumar

      I am working on intel edison board. I am trying to connect 3G dongle (huawei) to the board and make it work. For that I need usb-modeswitch package which I can get by adding this as

       

      IMAGE_INSTALL_append += " usb-modeswitch"

       

      in edison-image.bb . I followed the guide lines as per edisonbsp_ug and compiled and flashed the image successfully.

       

      When I connected the USB 3g dongle, below is the output from dmesg

       

      [  382.926700] hub 2-0:1.0: USB hub found

      [  382.926745] hub 2-0:1.0: 1 port detected

      [  385.821614] usb 1-1: new full-speed USB device number 2 using dwc3-host

      [  385.845387] usb 1-1: New USB device found, idVendor=12d1, idProduct=1505

      [  385.845419] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=4

      [  385.845440] usb 1-1: Product: HUAWEI Mobile

      [  385.845459] usb 1-1: Manufacturer: HUA�ÿWEI TECHNOLOGIES

      [  385.845478] usb 1-1: SerialNumber: �ÿ�ÿ�ÿ�ÿ�ÿ�ÿ�ÿ�ÿ�ÿ�ÿ�ÿ�ÿ�ÿ�ÿ�ÿ�ÿ�ÿ�ÿ�ÿ

      [  385.847495] usb-storage 1-1:1.0: USB Mass Storage device detected

      [  385.849362] scsi2 : usb-storage 1-1:1.0

      [  386.528168] usb 1-1: USB disconnect, device number 2

      [  389.891006] usb 1-1: new full-speed USB device number 3 using dwc3-host

      [  389.916859] usb 1-1: New USB device found, idVendor=12d1, idProduct=1515

      [  389.916891] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=4

      [  389.916912] usb 1-1: Product: HUAWEI Mobile

      [  389.916931] usb 1-1: Manufacturer: HUA�ÿWEI TECHNOLOGIES

      [  389.916950] usb 1-1: SerialNumber: �ÿ�ÿ�ÿ�ÿ�ÿ�ÿ�ÿ�ÿ�ÿ�ÿ�ÿ�ÿ�ÿ�ÿ�ÿ�ÿ�ÿ�ÿ�ÿ

      [  389.930089] usb-storage 1-1:1.4: USB Mass Storage device detected

      [  389.930507] scsi3 : usb-storage 1-1:1.4

       

      I think it is switching from 1505 to 1515 (idProduct). But I could n't get the modem recognized. It should get recognized to some port like /dev/ttyXXX so that I can use that port for sending AT commands. Can some one guide me how do I ensure that 3g dongle gets recognized??

       

      Thanks in advance

       

      Regards,

      Pavan

        • 1. Re: usb_modeswitch to recognize 3g dongle
          PabloM_Intel

          Hi u2bpavankumar,

           

          Could you please tell me which BSP are you using? I don’t seem to find the command “IMAGE_INSTALL_append” in the BSP I’m using, and I’m trying to recreate your case so I can provide a better answer. Can you share the exact model of the dongle also?

           

          Regards,

          PabloM_Intel

          • 2. Re: usb_modeswitch to recognize 3g dongle
            u2bpavankumar

            Hi,

             

            I am using BSP  edison-src-ww25.5-15.tgz downloaded from https://software.intel.com/en-us/iot/hardware/edison/downloads

             

            As per edisonbsp_ug, for installing 3rd party packages to the image, I need to use something like "IMAGE_INSTALL +=" to the bitbake file "edison-image.bb"

             

            But according to yocto guide lines and as per discussion at Yocto - IMAGE_INSTALL not being read, instead of "IMAGE_INSTALL +=" we need to use "IMAGE_INSTALL_append" instead.

             

            Huawei EC159 is the model of 3G dongle I am using

             

            Please let me know what needs to be done here

             

            Regards,

            Pavan

            • 3. Re: usb_modeswitch to recognize 3g dongle
              u2bpavankumar

              Hi,

               

              One thing is clear, the usb_modeswitching is done as I can see that default product id (0x1505) is getting changed to target product id (0x1515). But it was not getting detected w.r.t to serial ports. On my host pc, when I insert the same 3G card, dmesg gives the following output:

               

              [ 2155.236050] usb 8-1: new full-speed USB device number 19 using uhci_hcd

              [ 2156.016015] usb 8-1: New USB device found, idVendor=12d1, idProduct=1505

              [ 2156.016020] usb 8-1: New USB device strings: Mfr=1, Product=2, SerialNumber=4

              [ 2156.016024] usb 8-1: Product: HUAWEI Mobile

              [ 2156.016026] usb 8-1: Manufacturer: HUA\xffffffc3\xffffffbf\xffffffbfWEI TECHNOLOGIES

              [ 2156.016029] usb 8-1: SerialNumber: \xffffffc3\xffffffbf\xffffffbf\xffffffc3\xffffffbf\xffffffbf\xffffffc3\xffffffbf\xffffffbf\xffffffc3\xffffffbf\xffffffbf\xffffffc3\xffffffbf\xffffffbf\xffffffc3\xffffffbf\xffffffbf\xffffffc3\xffffffbf\xffffffbf\xffffffc3\xffffffbf\xffffffbf\xffffffc3\xffffffbf\xffffffbf\xffffffc3\xffffffbf\xffffffbf\xffffffc3\xffffffbf\xffffffbf\xffffffc3\xffffffbf\xffffffbf\xffffffc3\xffffffbf\xffffffbf\xffffffc3\xffffffbf\xffffffbf\xffffffc3\xffffffbf\xffffffbf\xffffffc3\xffffffbf\xffffffbf\xffffffc3\xffffffbf\xffffffbf\xffffffc3\xffffffbf\xffffffbf\xffffffc3\xffffffbf\xffffffbf

              [ 2156.019052] usb-storage 8-1:1.0: USB Mass Storage device detected

              [ 2156.019147] scsi12 : usb-storage 8-1:1.0

              [ 2157.020051] scsi 12:0:0:0: CD-ROM            HUAWEI   Mass Storage     2.31 PQ: 0 ANSI: 0

              [ 2157.039032] sr1: scsi-1 drive

              [ 2157.039189] sr 12:0:0:0: Attached scsi CD-ROM sr1

              [ 2157.039276] sr 12:0:0:0: Attached scsi generic sg4 type 5

              [ 2159.008141] usb 8-1: USB disconnect, device number 19

              [ 2162.816062] usb 8-1: new full-speed USB device number 20 using uhci_hcd

              [ 2163.190022] usb 8-1: New USB device found, idVendor=12d1, idProduct=1515

              [ 2163.190027] usb 8-1: New USB device strings: Mfr=1, Product=2, SerialNumber=4

              [ 2163.190030] usb 8-1: Product: HUAWEI Mobile

              [ 2163.190033] usb 8-1: Manufacturer: HUA\xffffffc3\xffffffbf\xffffffbfWEI TECHNOLOGIES

              [ 2163.190035] usb 8-1: SerialNumber: \xffffffc3\xffffffbf\xffffffbf\xffffffc3\xffffffbf\xffffffbf\xffffffc3\xffffffbf\xffffffbf\xffffffc3\xffffffbf\xffffffbf\xffffffc3\xffffffbf\xffffffbf\xffffffc3\xffffffbf\xffffffbf\xffffffc3\xffffffbf\xffffffbf\xffffffc3\xffffffbf\xffffffbf\xffffffc3\xffffffbf\xffffffbf\xffffffc3\xffffffbf\xffffffbf\xffffffc3\xffffffbf\xffffffbf\xffffffc3\xffffffbf\xffffffbf\xffffffc3\xffffffbf\xffffffbf\xffffffc3\xffffffbf\xffffffbf\xffffffc3\xffffffbf\xffffffbf\xffffffc3\xffffffbf\xffffffbf\xffffffc3\xffffffbf\xffffffbf\xffffffc3\xffffffbf\xffffffbf\xffffffc3\xffffffbf\xffffffbf

              [ 2163.201128] usb-storage 8-1:1.4: USB Mass Storage device detected

              [ 2163.201236] scsi13 : usb-storage 8-1:1.4

              [ 2163.372990] usbcore: registered new interface driver option

              [ 2163.373006] usbserial: USB Serial support registered for GSM modem (1-port)

              [ 2163.373157] option 8-1:1.0: GSM modem (1-port) converter detected

              [ 2163.373867] usb 8-1: GSM modem (1-port) converter now attached to ttyUSB1

              [ 2163.373884] option 8-1:1.1: GSM modem (1-port) converter detected

              [ 2163.373987] usb 8-1: GSM modem (1-port) converter now attached to ttyUSB2

              [ 2163.374019] option 8-1:1.2: GSM modem (1-port) converter detected

              [ 2163.374114] usb 8-1: GSM modem (1-port) converter now attached to ttyUSB3

              [ 2163.374125] option 8-1:1.3: GSM modem (1-port) converter detected

              [ 2163.374231] usb 8-1: GSM modem (1-port) converter now attached to ttyUSB4

              [ 2164.204055] scsi 13:0:0:0: CD-ROM            HUAWEI   Mass Storage     2.31 PQ: 0 ANSI: 0

              [ 2164.207048] scsi 13:0:0:1: Direct-Access     HUAWEI   SD Storage       2.31 PQ: 0 ANSI: 2

              [ 2164.226043] sr1: scsi-1 drive

              [ 2164.226232] sr 13:0:0:0: Attached scsi CD-ROM sr1

              [ 2164.226335] sr 13:0:0:0: Attached scsi generic sg4 type 5

              [ 2164.227044] sd 13:0:0:1: Attached scsi generic sg5 type 0

              [ 2164.293031] sd 13:0:0:1: [sdd] Attached SCSI removable disk

               

              It was also changing the default id (0x1505) to target id (0x1515) and also GSM modem is getting detected as ttyUSB1/2/3/4 and this last step is not happening when i connect this 3G card on to intel edison board. There was something I am missing over here. Can some one point out what needs to be done

               

              Thanks in advance

               

              Regards,

              Pavan

              • 4. Re: usb_modeswitch to recognize 3g dongle
                u2bpavankumar

                Hi,

                 

                I need to install usb to serials driver for this issue. By doing so I was able to get it working.

                 

                Regards,

                Pavan

                • 5. Re: usb_modeswitch to recognize 3g dongle
                  Beber

                  Hello,

                   

                  I tried also to install usb_modeswitch but un have some error messages.

                  I have make this command:

                   

                  tar xvf edison-src-ww25.5-15.tgz

                  cd edison-src

                  ./meta-intel-edison/setup.sh --dl_dir=/home/bernard/edison-src/bitbake_download_dir --sstate_dir=/home/bernard/edison-src/bitbake_sstate_dir

                  nano meta-intel-edison/meta-intel-edison-distro/recipes-core/images/edison-image.bb

                   

                    add to the end of file:

                    IMAGE_INSTALL_append += " usb-modeswitch"

                   

                  cd meta-intel-edison/

                  git clone https://github.com/openembedded/meta-openembedded.git

                  cd meta-openembedded

                  git checkout daisy

                  nano ../../out/linux64/build/conf/bblayers.conf

                   

                          add to file:

                    /home/bernard/edison-src/meta-intel-edison/meta-openembedded/meta-oe \

                   

                  cd ../../out/linux64/

                  source poky/oe-init-build-env

                  bitbake edison-image

                   

                  I have directly 2 error messages:

                  ERROR: Please ensure recipe /home/bernard/edison-src/meta-intel-edison/meta-openembedded/meta-oe/recipes-core/packagegroups/packagegroup-boot.bb sets PACKAGE_ARCH before inherit packagegroup

                  ERROR: Please ensure recipe /home/bernard/edison-src/meta-intel-edison/meta-openembedded/meta-oe/recipes-core/packagegroups/packagegroup-basic.bb sets PACKAGE_ARCH before inherit packagegroup

                   

                  I don't understand exactly what's the error. can you help me?

                   

                  Thanks you

                  • 6. Re: usb_modeswitch to recognize 3g dongle
                    Aditya_Bansal

                    Hey Beber, I am also trying to generate Edison image today and got the exact same error as you. Not sure what's wrong there but the image generation keeps going after those two errors. I'll let you know in few hours if it worked.

                    • 7. Re: usb_modeswitch to recognize 3g dongle
                      Beber

                      I have find the erro this week-end.

                      I have change

                      git checkout daisy

                      By

                      git checkout daisy-next


                      Now i have finish the compile and un try to flash on the Edison board.

                      • 8. Re: usb_modeswitch to recognize 3g dongle
                        mohit.badhe23

                        Hi Pavan,

                         

                        Which driver did you install specifically? I have 'usbserial' in my edison image builtin and I installed another driver 'option'; but I can't get to attach the 3G dongle to serial port ttyUXBx.

                        Here's my 'dmesg | grep usb' log:

                         

                        [    0.206377] usbcore: registered new interface driver usbfs

                        [    0.206482] usbcore: registered new interface driver hub

                        [    0.206687] usbcore: registered new device driver usb

                        [    0.764798] usbcore: registered new interface driver asix

                        [    0.764879] usbcore: registered new interface driver cdc_subset

                        [    0.765010] usbcore: registered new interface driver cdc_ncm

                        [    0.767804] usbcore: registered new interface driver cdc_acm

                        [    0.767929] usbcore: registered new interface driver usb-storage

                        [    0.768117] usbcore: registered new interface driver usbserial

                        [    0.768201] usbcore: registered new interface driver usbserial_generic

                        [    0.768270] usbserial: USB Serial support registered for generic

                        [    0.768351] usbcore: registered new interface driver option

                        [    0.768419] usbserial: USB Serial support registered for GSM modem (1-port)

                        [    0.768489] usbcore: registered new interface driver pl2303

                        [    0.768555] usbserial: USB Serial support registered for pl2303

                        [    0.768623] usbcore: registered new interface driver zte_ev

                        [    0.768688] usbserial: USB Serial support registered for zte_ev

                        [    0.913698] usbcore: registered new interface driver uvcvideo

                        [    1.626887] usbcore: registered new interface driver usbhid

                        [    1.626907] usbhid: USB HID core driver

                        [    4.740152] usb0: MAC 02:00:86:d3:36:e8

                        [    4.740174] usb0: HOST MAC c6:54:4a:3b:63:97

                        [    5.785712] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002

                        [    5.785736] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1

                        [    5.785756] usb usb1: Product: xHCI Host Controller

                        [    5.785775] usb usb1: Manufacturer: Linux 3.10.17-poky-edison+ dwc-xhci

                        [    5.785794] usb usb1: SerialNumber: dwc3-host.2

                        [    5.815913] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003

                        [    5.815938] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1

                        [    5.815957] usb usb2: Product: xHCI Host Controller

                        [    5.815976] usb usb2: Manufacturer: Linux 3.10.17-poky-edison+ dwc-xhci

                        [    5.815994] usb usb2: SerialNumber: dwc3-host.2

                        [    9.834185] IPv6: ADDRCONF(NETDEV_UP): usb0: link is not ready

                        [ 2793.391718] usb 1-1: new high-speed USB device number 2 using dwc3-host

                        [ 2793.415249] usb 1-1: New USB device found, idVendor=05e3, idProduct=0608

                        [ 2793.415280] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0

                        [ 2793.415301] usb 1-1: Product: USB2.0 Hub

                        [ 2793.701963] usb 1-1.4: new full-speed USB device number 3 using dwc3-host

                        [ 2793.705134] usb 1-1.4: Device not responding to set address.

                        [ 2793.914089] usb 1-1.4: Device not responding to set address.

                        [ 2794.121591] usb 1-1.4: device not accepting address 3, error -71

                        [ 2794.202484] usb 1-1.4: new full-speed USB device number 4 using dwc3-host

                        [ 2794.225925] usb 1-1.4: New USB device found, idVendor=19d2, idProduct=fff5

                        [ 2794.225957] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3

                        [ 2794.225978] usb 1-1.4: Product: USB Storage

                        [ 2794.225997] usb 1-1.4: Manufacturer: ZTE, Incorporated

                        [ 2794.226015] usb 1-1.4: SerialNumber: 000000000002

                        [ 2794.229431] usb-storage 1-1.4:1.0: USB Mass Storage device detected

                        [ 2794.229813] scsi0 : usb-storage 1-1.4:1.0

                        [ 2817.308762] usb 1-1.2: new high-speed USB device number 5 using dwc3-host

                        [ 2817.584772] usb 1-1.2: New USB device found, idVendor=046d, idProduct=081d

                        [ 2817.584804] usb 1-1.2: New USB device strings: Mfr=0, Product=0, SerialNumber=1

                        [ 2817.584826] usb 1-1.2: SerialNumber: 3E6C43D0

                        [ 2817.860551] input: UVC Camera (046d:081d) as /devices/pci0000:00/0000:00:11.0/dwc3-host.2/usb1/1-1/1-1.2/1-1.2:1.2/input/input2

                        [ 3126.277706] usb 1-1.4: USB disconnect, device number 4

                        [ 3127.346773] usb 1-1.4: new full-speed USB device number 6 using dwc3-host

                        [ 3127.349268] usb 1-1.4: Device not responding to set address.

                        [ 3127.558221] usb 1-1.4: Device not responding to set address.

                        [ 3127.765638] usb 1-1.4: device not accepting address 6, error -71

                        [ 3127.846000] usb 1-1.4: new full-speed USB device number 7 using dwc3-host

                        [ 3127.869480] usb 1-1.4: New USB device found, idVendor=19d2, idProduct=ffe9

                        [ 3127.869511] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0

                        [ 3127.869532] usb 1-1.4: Product: ZTE CDMA Tech

                        [ 3127.869551] usb 1-1.4: Manufacturer: ZTE, Incorporated

                        [ 3127.885700] usb-storage 1-1.4:1.5: USB Mass Storage device detected

                        [ 3127.888675] scsi1 : usb-storage 1-1.4:1.5

                         

                        -Mohit

                        • 9. Re: usb_modeswitch to recognize 3g dongle
                          PabloM_Intel

                          Hi mohit.badhe23,

                           

                          What device are you using exactly? Do you know what's the driver needed for your device?

                           

                          Regards,

                          PabloM_Intel

                          • 10. Re: usb_modeswitch to recognize 3g dongle
                            mohit.badhe23

                            Hi PabloM_Intel,

                             

                            What device are you using exactly?

                            I am evaluating multiple USB dongles. Out of them, Huawei CDMA works, but ZTE and D-Link don't attach to ttyUSB*. I also tried self powered USB hub as I wanted to attach multiple USB devices. Bus powered hub causes device malfunction. Maybe there are current sourcing limitations out of USB Host port.

                             

                            Do you know what's the driver needed for your device?

                            On my Ubuntu Linux Laptop, the dongles need drivers like 'usbserial', 'option'. I have enabled the drivers in my Yocto custom Intel Edison image. The Huawei dongle even gets attached to the 'usbserial' driver. The kernel modules for USB serial gadgets also do not work.

                             

                            Thanks & Regards,

                            Mohit

                            • 11. Re: usb_modeswitch to recognize 3g dongle
                              PabloM_Intel

                              Hi mohit.badhe23,

                               

                              Did you already installed usb-modeswitch, as Pavan specified in his first post? What do you get after running lsusb with the dongle connected? Could you please share a picture of the log?

                               

                              Regards,

                              PabloM_Intel