PfSense & ZTE 821MF



  • Hi, i recently aquired a ZTE MF821 4g USB Dongle that i would love to setup on the pfSense as a failover, so if my vdsl line breaks it automatically changes over to the 4g dongle…

    I have managed to get the 4g dongle to show up on the pFsense (Fairly easy, just plugged it in) and setup a ppp interface...

    The thing is, when looking at the logs it says:

    Feb 8 17:56:59	ppp: [opt3_link0] MODEM: chat script failed
    Feb 8 17:56:59	ppp: [opt3_link0] CHAT: The modem is not responding to "AT" at ModemCmd: label.
    Feb 8 17:56:46	ppp: [opt3_link0] LCP: LayerStart
    Feb 8 17:56:46	ppp: [opt3_link0] LCP: state change Initial --> Starting
    Feb 8 17:56:46	ppp: [opt3_link0] LCP: Open event
    Feb 8 17:56:46	ppp: [opt3_link0] Link: OPEN event
    Feb 8 17:56:46	ppp: [opt3] Bundle: Interface ng1 created
    Feb 8 17:56:46	ppp: web: web is not running
    Feb 8 17:56:46	ppp: process 50027 started, version 5.7 (root@pfsense-22-i386-builder 13:22 18-Nov-2014)
    Feb 8 17:56:46	ppp:
    Feb 8 17:56:46	ppp: Multi-link PPP daemon for FreeBSD
    

    Looks like he is getting killed @:

    Feb 8 17:56:59	ppp: [opt3_link0] CHAT: The modem is not responding to "AT" at ModemCmd: label.
    

    Anyone that can tell me what could be the issue and how it could be fixed perhaps ?

    Best regards !



  • Silly me… i was setting the ppp up as one of the com ports on the computer... have not managed to get up the com ports of the usb dongle... every help that i could get on that would be thankfully accepted :)


  • Netgate Administrator

    Look at the system log with the modem unplugged. Then plug the modem in. Now looks at the log again, what new stuff has been logged?

    Steve



  • This is what i get up when i punch in dmesg

    ugen4.2: <zte,incorporated> at usbus4
    umass0: <zte,incorporated 0="" 2="" zte="" lte="" technologies="" msm,="" class="" 0,="" rev="" 2.00="" 0.00,="" addr=""> on usbus4</zte,incorporated></zte,incorporated>
    

    and this comes up when i run usbconfig -u 4 -a 2 dump_device_desc

    ugen4.2: <zte lte="" technologies="" msm="" zte,incorporated="">at usbus4, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA)
    
      bLength = 0x0012 
      bDescriptorType = 0x0001 
      bcdUSB = 0x0200 
      bDeviceClass = 0x0000 
      bDeviceSubClass = 0x0000 
      bDeviceProtocol = 0x0000 
      bMaxPacketSize0 = 0x0040 
      idVendor = 0x19d2 
      idProduct = 0x0166 
      bcdDevice = 0x0000 
      iManufacturer = 0x0003  <zte,incorporated>iProduct = 0x0002  <zte lte="" technologies="" msm="">iSerialNumber = 0x0004  <mf821dtlns020000>bNumConfigurations = 0x0001</mf821dtlns020000></zte></zte,incorporated></zte> 
    

    … i know that there are 4x com ports in this device but i am having trouble getting them up on pfsense :/



  • ugen4.2: <zte,incorporated> at usbus4
    umass0: <zte,incorporated 0="" 2="" zte="" lte="" technologies="" msm,="" class="" 0,="" rev="" 2.00="" 0.00,="" addr=""> on usbus4
    (probe0:umass-sim0:0:0:0): INQUIRY. CDB: 12 00 00 00 24 00 
    (probe0:umass-sim0:0:0:0): CAM status: CCB request completed with an error
    (probe0:umass-sim0:0:0:0): Retrying command
    cd0 at umass-sim0 bus 0 scbus2 target 0 lun 0
    cd0: <l_t_e usb="" scsi="" cd-rom=""> Removable CD-ROM SCSI-0 device 
    cd0: 40.000MB/s transfers
    cd0: cd present [25335 x 2048 byte records]
    cd0: quirks=0x10<10_BYTE_ONLY>
    da0 at umass-sim0 bus 0 scbus2 target 0 lun 1
    da0: <zte mmc="" storage="" 2.31=""> Removable Direct Access SCSI-0 device 
    da0: 40.000MB/s transfers
    da0: Attempt to query device size failed: NOT READY, Medium not present
    da0: quirks=0x2</zte></l_t_e></zte,incorporated></zte,incorporated>
    

    This is all i get up from dmesg…

    Looks like it is showing up the "CD Drive" thats included plus the Micro SD card reader that is in the device...
    I would really love to get some help on if i could install this on the pfSense or not ?...


  • Netgate Administrator

    Ok so it's in virtual CD mode. You need to switch it modem mode to use it. Usually that is handled by u3g but only for modems it knows about which this isn't.
    So you need to switch it yourself which for this modem means using usb-mode-switch which not a trivial process. It might be easier to just get a supported modem:
    https://doc.pfsense.org/index.php/Known_Working_3G-4G_Modems

    Your product ID is different to either listed in the reference file:
    http://www.draisberghof.de/usb_modeswitch/device_reference.txt
    Though both use the same switching string.

    Steve



  • can i usb_modeswitch it on a ubuntu machine and then plug it into the pfsense or do i need to usb_modeswitch it on the pfsense machine ?
    Find it easier to work on ubuntu as i have better knowledge on it…



  • i used an app on windows thats called DC-unlocker and started the Configuration Port on the device which than gave me another result from the usbconfig command and the cd drive is not loading… yet i am not getting the device up as a serial port...

    usbconfig -u 4 -a 2 dump_device_desc
    ugen4.2: <zte lte="" technologies="" msm="" zte,incorporated="">at usbus4, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA)
    
      bLength = 0x0012 
      bDescriptorType = 0x0001 
      bcdUSB = 0x0200 
      bDeviceClass = 0x0000 
      bDeviceSubClass = 0x0000 
      bDeviceProtocol = 0x0000 
      bMaxPacketSize0 = 0x0040 
      idVendor = 0x19d2 
      idProduct = 0x1333 
      bcdDevice = 0x0000 
      iManufacturer = 0x0003  <zte,incorporated>iProduct = 0x0002  <zte lte="" technologies="" msm="">iSerialNumber = 0x0000  <no string="">bNumConfigurations = 0x0001</no></zte></zte,incorporated></zte> 
    

  • Netgate Administrator

    I don't think that has helped. The best thing to do is probably ask about this modem on the usb-modeswitch forum. However even if you do find the correct incantation you still have to install usb-modeswitch on pfSense, hope that it's serial port is a product ID that is recognised and even them hope that you can actually create a ppp session over it.
    I advise you to get a known supported modem instead.

    Have read through this thread: https://forum.pfsense.org/index.php?topic=46329.0
    That's the only time I have seen it used successfully.

    Steve



  • picked up a used ZTE MF60 3g router today for $6 and it pops up as a NIC on the pfsense when plugged in via usb, think that will do the trick !



  • That was probably a good call. The script Steven quoted above (sakis.tel4u) is what worked in older Ubuntu. The networkmanager now handles it if card is supported. I would have to say there are not alot of instructions out there and every module has its quirks. Even in the Ubuntu forum no more good info.
    Mode switching has become a catch all phrase meaning different things for different modules. Far from simply switching from Mass Storage mode…How about that string you have to discover and then pass to command prompt. Ugh..



  • But i was wondering… the thing that bugs me is that when i plug in the ZTE MF60 i get it up as a network interface and it gets an ip from DHCP of the MF60 router... meaning that it gives pfsense an internal ip on the nic instead of external ip like it would do with a serial com... do you guys know if there is any way to get pfsense to get an external ip or do i have to use ppp and serial com to get that on the pfsense... if so what usb 4g (i would prefer 4g, only got the 3g because it was cheap) would you recommend to use with pfsense ? i want to be able to access everything when/if my vdsl line drops out...


  • Netgate Administrator

    @antonkristensen:

    picked up a used ZTE MF60 3g router today for $6

    Hard to argue with that!  :)

    You may be able to configure it to pass the external IP to you. Your ISP may be using Carrier Grade NAT so that might be your external IP. It's relatively common in mobile broadband.

    Steve