FiPy LTE-M Connection Problems



  • I'm using a Pycom FiPy to attempt connection to the Verizon LTE-M network (band 13) using a Hologram SIM card. My code worked and connected for a few days, but about 12 days ago it stopped connecting. Since then I've spent many hours trying to get it to work again without any luck. The code loops forever waiting for attachment with CEREG? returning 2,0 (or sometimes 2,4) forever. CSQ returns 20,99 through about 27,99 while waiting for attachment.

    The basics are:

    • Using a makr backplane with RTS/CTS jumpers removed.
    • Hologram SIM (apn="hologram") trying to connect to Verizon service LTE-M in the United States (Tulsa, OK; I can see the cell tower out my window)
    • Tried a new Hologram SIM (which is active on their dashboard but has yet to see a tower connection)
    • Tried a second Pycom antenna
    • Tried many modem and pycom firmware combinations without success.
      Sequans modem firmware version 41065 (the latest version as of this writing) resets with +SYSSTART when issued the AT+CFUN=1 command which blows up the previous config settings and resets CFUN to 0 making it unusable. Why? Is this a current thing? Due to this I've stuck with version 33080 which came with one of my boards; it seems to behave correctly.
    • I've run through all of the troubleshooting guides I can find, including clearing the FPLMN list as discussed here.
    • I've tried using attach() with and without its several arguments.
    • I've tried cid=3 (verizon) and cid=1

    Stripped down, the core of my code is:

    lte = LTE(carrier="verizon") # verizon LTE-M (through Hologram with Hologram SIM card)
    lte.reset()
    at("AT+CEREG=2") # set modem to roaming mode
    at("AT+CFUN=1") # set modem to full functionality
    lte.attach()
    while lte.isattached() == False:
       at('AT+CEREG?') # check mode and tac connection status
       at('AT+CSQ') # have a look at the signal values
       print("Not attached...")
       time.sleep(2)
    lte.connect(cid=3) # cid=3 should not be unnecessary
    

    The full test program is here:

    from network import LTE
    import pycom
    import time
    
    # send AT command to Sequans modem and return response list
    def at(cmd):
        print("Modem command: {}".format(cmd))
        r = lte.send_at_cmd(cmd).split('\r\n')
        r = list(filter(None, r))
        print("Response: {}".format(r))
        return r
    
    print("Pycom FiPy LTE-M Test Code - 11/18/19")
    pycom.heartbeat(False)  # turn off the built-in LED heartbeat blinking
    print("Instantiating LTE-M Client")
    # LTE(carrier=verizon) populates PDP context values in cid 1 and 3
    # both verify with at+cgdcont? at "IP" and "hologram"
    lte = LTE(carrier="verizon") # verizon LTE-M (through Hologram with Hologram SIM card)
    
    print("Initializing Modem")
    try:
        lte.reset()
    except:
        print("Exception during reset")
    
    at("AT+CEREG=2") # set modem to roaming mode
    time.sleep(1)
    at("AT+CFUN=1") # set modem to full functionality
    time.sleep(1)
    
    # lte.attach(band=13,apn="hologram",cid=3,type="LTE.IP") # attempt attach
    lte.attach() # As seen above, I've tried a myriad of settings in attach() without success.
    
    while lte.isattached() == False:
        r = at('AT+CEREG?')
        try:
            r0 = r[0]; r0x = r0.split(','); tac = int(r0x[1]) # isolate modem's tac
            print("Modem tac: {}".format(tac))
        except IndexError:
            tac = 0
            print("Index exception getting tac value")
        # get signal strength
        r = at('AT+CSQ')
        print("Not attached...")
        time.sleep(2)
    
    lte.connect(cid=3) # cid=3 should not be unnecessary
    
    i = 0
    while not lte.isconnected():
        i = i + 1
        print("not connected: {}".format(i))
        time.sleep(1.0)
    
    print("Connected!")
    
    # it worked, now shut it down
    lte.disconnect()
    lte.dettach()
    
    print("END")
    

    If anyone has advice, please share. Even better would be a snippit of code that works on your verizon system...

    Jason



  • I've discovered that lte.attach() sets CFUN=1 and that subsequent AT+CFUN=1 commands cause the SYSSTART to occur.
    Allowing the lte.attach() function to set CFUN to 1 seems to have cleared up the "spurious" restart issue.

    I still cannot get the modem to attach, however. Any help is appreciated.

    Jason



  • I contacted Hologram with this issue and received the following reply:

    Due to the nature of our network users should not lock carriers to a specific network as there is no guarantee that that network will be available at all times. Locking a device to a carrier may lead to downstream issues.

    The way connectivity on the Hologram Network works is that the Hologram SIM provides your modem with a list of different carriers it can connect to based on the modem's radio access technology (2G,3G,4G) and the network's availability in the deployment location and on our network of networks. After that its entirely up to the modem to decide which network to connect to. As changes occur to the network due to things like weather, tower maintenance, micro and macro loads your modem will connect to different networks.

    I see that your device has blacklisted a carrier, likely due to the fact that you are attempting to lock onto Verizon. Here is a guide on how to clear that. How do I clear the FPLMN list?

    Devices on the Hologram network should be set to automatic carrier selection.

    I've tried letting Hologram automatically select the carrier, attach and connect but it doesn't seem to work this way either.

    Issuing "AT+CFUN=1" in the most recent firmware continues to reset the modem, dump the config and return SYSSTART.

    No joy.


Log in to reply
 

Pycom on Twitter