8 Replies Latest reply on Apr 15, 2015 1:15 PM by adamantbob

    ZTE MF823 4G Dongle connected to Intel Edison

    conradg

      I am trying to use a ZTE MF823 4G USB Dongle to allow Edison to connect to 4G network. ZTE Australia > Products > MF823

       

      I have an Edison connected to a Sparkfun Edison Base Block: SparkFun Block for Intel® Edison - Base - DEV-13045 - SparkFun Electronics

      The Base Block has an OTG Port and I am using a USB OTG Cable. I have successfully connected a USB GPS to the OTG port and I can read the output of the GPS through "cat /dev/ttyUSB0", so I believe the OTG is working correctly.

       

      I have successfully used this dongle on a Raspberry PI and it set itself up automatically with no intervention. I have also used it on a Windows machine. From what I have seen on the Pi, the MF823 ends being a network interface and not a modem. It also does not need usb-modeswitch as it automatically changes itself from a storage device to a cdc ether device. I think this is so that on a Windows machine, it can download drivers initially to the machine and then change to Ethernet mode.

       

      lsusb immediately after plugging in 4G dongle:

       

      Bus 001 Device 019: ID 19d2:1225 ZTE WCDMA Technologies MSM  

      Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

      Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub

       

      lsusb a few seconds later:

       

      Bus 001 Device 013: ID 19d2:1405 ZTE WCDMA Technologies MSM

      Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

      Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub

       

      Here is dmesg from after plugging the 4G in:

       

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

      [   79.472713] usb 1-1: New USB device found, idVendor=19d2, idProduct=1225                                                                                                                     

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

      [   79.472766] usb 1-1: Product: ZTE WCDMA Technologies MSM                                                                                                                                     

      [   79.472785] usb 1-1: Manufacturer: ZTE,Incorporated                                                                                                                                          

      [   79.472803] usb 1-1: SerialNumber: MF8230ZTED010000                                                                                                                                          

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

      [   79.491896] scsi0 : usb-storage 1-1:1.0                                                                                                                                                      

      [   80.494604] scsi 0:0:0:0: CD-ROM            CWID     USB SCSI CD-ROM  2.31 PQ: 0 AN0:1: Attached scsi generic sg1 type 0                                                                     

      [   80.721303] sd 0:0:0:1: [sda] Attached SCSI removable disk                                                                                                                                   

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

      [   85.954140] usb 1-1: new high-speed USB device number 3 using dwc3-host                                                                                                                      

      [   86.002211] usb 1-1: New USB device found, idVendor=19d2, idProduct=1405                                                                                                                     

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

      [   86.002263] usb 1-1: Product: ZTE WCDMA Technologies MSM                                                                                                                                     

      [   86.002282] usb 1-1: Manufacturer: ZTE,Incorporated                                                                                                                                          

      [   86.002300] usb 1-1: SerialNumber: MF8230ZTED010000

      [   86.036964] usb-storage 1-1:1.2: USB Mass Storage device detected                                                                                                                            

      [   86.037394] scsi1 : usb-storage 1-1:1.2                                                                                                                                                      

      [   87.035262] scsi 1:0:0:0: CD-ROM            CWID     USB SCSI CD-ROM  2.31 PQ: 0 ANSI: 2                                                                                                     

      [   87.039059] sr0: scsi-1 drive                                                                                                                                                                

      [   87.042232] sr 1:0:0:0: Attached scsi CD-ROM sr0                                                                                                                                             

      [   87.043022] sr 1:0:0:0: Attached scsi generic sg0 type 5                                                                                                                                     

      [   87.051778] scsi 1:0:0:1: Direct-Access     ZTE      MMC Storage      2.31 PQ: 0 ANSI: 2                                                                                                     

      [   87.060635] sd 1:0:0:1: Attached scsi generic sg1 type 0                                                                                                                                     

      [   87.064215] sd 1:0:0:1: [sda] Attached SCSI removable disk 

       

      From what I can see, it looks like the udev thinks the Product id 1405 is a usb-storage device.

       

      I cannot figure out how to get the Edison to see it as an Ethernet Device.

       

      Any help would be much appreciated.

        • 1. Re: ZTE MF823 4G Dongle connected to Intel Edison
          JPMontero_Intel

          Hi conradg,

           

          Have you tried with the suggestions mentioned in this site. Let me know if that helps.

           

          Regards,
          JPMontero_Intel

          • 2. Re: ZTE MF823 4G Dongle connected to Intel Edison
            conradg

            Hi JP,

             

            Thank you, I tried the suggestions on that website and got the following result:

             

            root@Recorder1:~# curl --header "Referer: http://192.168.0.1/index.html" http://192.168.0.1/goform/goform_set_cmd_process?goformId=CONNECT_NETWORK

            curl: (7) Couldn't connect to server                                                                                                                                                             

             

            Previously I did get the above command (and other FM823 commands using 19.168.0.1) to work using a browser when the dongle was connected to a Windows machine.

             

            I think the key statement on that website for the suggestions to work is the following: "This modem is recognized as Ethernet interface. That means you don't need special programs to work with it.". I don't believe the modem is being recognised as a network Interface by the Edison. From using on the Raspberry PI, it always appears as a Ethernet Interface (ifconfig) and the above CONNECT_NETWORK command just gets it to connect to the 4G network.

             

            My understanding is that the MF823 acts as a gateway between a local Ethernet Interface, on the local computer side with IP Address 192.168.0.1, and the 4G network on the other side. Regardless of whether it is connected to the 4G network or not, it should still appear as a local network interface.

             

            Cheers.

            • 3. Re: ZTE MF823 4G Dongle connected to Intel Edison
              conradg

              In comparing the Raspberry PI and Intel Edison udevadm monitor outputs, I can see that the following on the Pi:

               

              KERNEL[577.092157] add      /devices/platform/bcm2708_usb/usb1/1-1/1-1.2/1-1.2:1.0 (usb)

              KERNEL[577.094941] add      /devices/platform/bcm2708_usb/usb1/1-1/1-1.2/1-1.2:1.0/net/usb0 (net)

              KERNEL[577.096756] add      /devices/platform/bcm2708_usb/usb1/1-1/1-1.2/1-1.2:1.0/net/usb0/queues/tx-0 (queues)

               

              The Edison does not send anything in relation to a "net" device, it only sends USB MASS Storage messages which are the same as what I saw on the Pi. Mass Storage messages not shown above.

               

              Does this mean that the Edison kernel is not recognising the FM823 as a network device?

               

              Could this be a result of the included drivers on the Edison (Yocto image) not recognising it?

              • 4. Re: ZTE MF823 4G Dongle connected to Intel Edison
                ca508

                Looking at the usb_modeswitch configs, there is one for 19d2:1225 -> 19d2:1405

                 

                file 19d2/1225 from usb_modeswitch.d in usb-modeswitch-data-20150115.tar.bz2

                 

                # ZTE MF668 (Variant), MF70

                TargetVendor=0x19d2

                TargetProduct=0x1405

                StandardEject=1

                 

                So maybe try calling 'eject' on the CD ROM device.

                • 5. Re: ZTE MF823 4G Dongle connected to Intel Edison
                  conradg

                  Thanks for that. The thing I don't understand is why do I need to use usb_modeswitch as I get the following after a few seconds with no usb_modeswitch enabled:

                   

                  Bus 001 Device 003: ID 19d2:1405 ZTE WCDMA Technologies MSM

                  Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

                  Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub

                   

                  My understanding is the 1405 is the correct id for Ethernet.

                  • 6. Re: ZTE MF823 4G Dongle connected to Intel Edison
                    ca508

                    Sorry my bad! I missed the dmesg lines that showed the modeswitch happening and I thought you were referring to what you saw on the Pi with the usb ids.

                    as you suspect, kernel config I'm guessing

                     

                    the Huawei ECM modems that I use (enumerate as ethernet devices) utilise the cdc_ether driver which on looking at the defconfig shipped with the edison source doesn't seem to be compiled by default.

                     

                    # CONFIG_USB_NET_CDCETHER is not set

                    • 7. Re: ZTE MF823 4G Dongle connected to Intel Edison
                      conradg

                      Thank you ca508, I really appreciate your help. You gave me just the right pointers to work out a solution.

                       

                      I figured out from the Edison Board Support Package document, and a lot of searching, how to rebuild the image for the Edison with CDC Ethernet included.

                       

                      The MF823 now gets recognised as a USB Ethernet device. I had to manually do this to get it to become an active interface:

                       

                      ifconfig enp0s17u1 up

                      udhcpc -i enp0s17u1

                       

                      Any ideas on the best way to get this to happen automatically at startup? I saw some suggestions about using system. Is this the right way to go?

                      • 8. Re: ZTE MF823 4G Dongle connected to Intel Edison
                        adamantbob

                        Hey conradg - you should be able to adapt these instructions pretty easily:

                        Automatic Scripting at Boot-Up | Musings from Stephanie

                         

                        Normally this would be handled with the interfaces file in /etc/network but that doesn't exist in yocto and I have yet to find it's equivalent...