General LTE-M (Cat M1) connection problems thread



  • So specific issues don't get mixed up or lost in one thousands other threads I'm starting this thread to collect all general issues with Cat M1 connections.

    Please post your connection reports here if you have problems connecting to a public Cat M1 network.

    Please include at a minimum operator, country, SIM card used
    It would help if you know the APN and frequency bands used

    If you have a more specific issue, e.g. using an LTE simulator please post a new thread.

    Thank you



  • @jmarcelino
    I am trying to use LTE M1 connectivity in Switzerland with Swisscom SIM, but the attach() function returns False always (for hours). Swisscom confirmed that the network is live (band 20) in the area.

    >>> lte.send_at_cmd('AT+COPS=?')
    '\r\n+COPS: (1,"22801","22801","22801",7),,(0,1,2,3,4),(0,1,2)\r\n\r\nOK\r\n\r\n+CEREG: 4\r\n'
    

    '22801' is the PLMN code for Swisscom. So from the above result, doesn't that mean the Pycom module is able to find the operator?

    Has anyone had success with just lte.attach() with Swisscom SIM?
    If anyone is using Swisscom SIM for LTE M1, could you tell how you are connecting it?



  • @slimbg99
    Any luck with this? I seem to be having a similar issue. Perhaps it's necessary to get in touch with Bell to get details to clarify what band/freq to scan.



  • @reclusio My post, down a bit, with code. I'd love a peek at your code :)



  • @fred I don't follow what you're saying. There's no problem, everything works, but here have a solution anyway??

    Can someone provide some information on what went wrong here so we can learn from it and prepare for any future problems?



  • Hello,

    Please check the message posted here: https://forum.pycom.io/topic/3390/potential-device-lockdown-network-providers/17

    Regards,
    Daniel



  • @fred Great to hear that. Looking forward to getting back on LTE! Sounds like we might have been using a configuration that's no longer supported.


  • administrators

    Dear all,

    I can confirm the modules work on the Telstra network. We have been supporting a government agency with an extensive project. I am however surprised you guys are having issues.

    Expect to see a response from Daniel shortly on this topic (and resolution).

    Thanks Fred



  • @Xykon
    The absense of any commentary from PyCOM on this issue is worrying. I am glad I didn't order a dozen more GPY to deploy. This solution was looking to be a really good for our application of device monitoring both in terms of functionality and price point. Total silence on LTE in Australia suddenly not working means I need to start again and look at other platforms.

    This is a shame.



  • Hi all - same, In Melbourne Australia was no probs with Aldi sim (aka Telstra) & some semi reliable code. Sim & app was working no probs in mobile or GPY.

    #(sysname='GPy', nodename='GPy', release='1.17.3.b1', version='v1.8.6-849-83e2f7f on 2018-03-19', machine='GPy with ESP32')..

    Locks up on --> +CEREG: 2,4 forever / :( - had 2 on the go.. shame

    Telstra or Modem ??

    ------------------------------ Some info below -------------------------------------------------

    DL SYNCHRO STATISTICS

    Synchro state                         : MIB DETECT
    PPU SIB1 ACQ watchdog                 : 5
    Frequency Hypothesis RF  (Hz)         : -1000
    RSRP (dBm)                            : -21474836.00
    RSRQ  (dB)                            : 0.00
    Channel estimation state (Cell-spec.) : LOW CINR
    Channel estimation state (UE-spec.)   : LOW CINR
    Channel estimation state (MBSFN)      : LOW CINR
    Channel estimation CINR               : 0.00
    Channel length                        : SHORT
    

    AGC
    AGC RX gain (dB) : 54.72
    RX PSD BO (dBFs) : -36.49
    RX PSD (dBm) : -124.80
    Noise level RS (dBm) : -128.24
    Digital gain (dB) : 18.00
    CINR RS (dB) : 0.00
    NARROWBANDS
    Last DL NB : Central
    Last UL NB : 0
    AFC
    Frequency offset RF (Hz) : -73
    Frequency offset BB (Hz) : 0
    PBCH
    MIB received quantity : 1049
    MIB timeout quantity : 0

    OK

    007

    SYSTEM FSM

    +--------------------------+--------------------+
    |            FSM           |        STATE       |
    +--------------------------+--------------------+
    | RRC TOP FSM              |SCANNING            |
    | RRC SEARCH FSM           |WAIT_CELL_ID        |
    | RRC ACTIVE FSM           |NULL                |
    | PMM PLMN FSM             |NORM_WAITCELL       |
    | EMM MAIN FSM             |NULL                |
    | EMM AUTH FSM             |KASME_DEFINED       |
    | EMM CONN FSM             |NULL                |
    | EMM TAU FSM              |NULL                |
    | EMM TEST FSM             |NULL                |
    | ESM BEARER FSM           |BEARER_NULL         |
    | SMS MT FSM               |IDLE                |
    | SMS MO FSM               |IDLE                |
    | HP MAIN FSM              |IDLE                |
    | HP USIM FSM              |READY               |
    | HP SMS MO FSM            |IDLE                |
    | HP SMS MT FSM            |IDLE                |
    | HP CAT FSM               |IDLE                |
    +--------------------------+--------------------+
    

    OK

    008

    +CEREG: 2,4

    OK

    009

    DL SYNCHRO STATISTICS

    Synchro state                         : IDLE
    PPU SIB1 ACQ watchdog                 : 5
    Frequency Hypothesis RF  (Hz)         : 6000
    RSRP (dBm)                            : -21474836.00
    RSRQ  (dB)                            : 0.00
    Channel estimation state (Cell-spec.) : LOW CINR
    Channel estimation state (UE-spec.)   : LOW CINR
    Channel estimation state (MBSFN)      : LOW CINR
    Channel estimation CINR               : 0.00
    Channel length                        : SHORT
    

    AGC
    AGC RX gain (dB) : 56.97
    RX PSD BO (dBFs) : -26.54
    RX PSD (dBm) : -117.07
    Noise level RS (dBm) : -128.24
    Digital gain (dB) : 8.03
    CINR RS (dB) : 0.00
    NARROWBANDS
    Last DL NB : Central
    Last UL NB : 0
    AFC
    Frequency offset RF (Hz) : 0
    Frequency offset BB (Hz) : 0
    PBCH
    MIB received quantity : 1070
    MIB timeout quantity : 0

    OK

    007

    SYSTEM FSM

    +--------------------------+--------------------+
    |            FSM           |        STATE       |
    +--------------------------+--------------------+
    | RRC TOP FSM              |SCANNING            |
    | RRC SEARCH FSM           |WAIT_RSSI           |
    | RRC ACTIVE FSM           |NULL                |
    | PMM PLMN FSM             |NORM_WAITCELL       |
    | EMM MAIN FSM             |NULL                |
    | EMM AUTH FSM             |KASME_DEFINED       |
    | EMM CONN FSM             |NULL                |
    | EMM TAU FSM              |NULL                |
    | EMM TEST FSM             |NULL                |
    | ESM BEARER FSM           |BEARER_NULL         |
    | SMS MT FSM               |IDLE                |
    | SMS MO FSM               |IDLE                |
    | HP MAIN FSM              |IDLE                |
    | HP USIM FSM              |READY               |
    | HP SMS MO FSM            |IDLE                |
    | HP SMS MT FSM            |IDLE                |
    | HP CAT FSM               |IDLE                |
    +--------------------------+--------------------+
    

    OK

    008



  • @tealbrains Have now tested on a brand new FiPy using previously working SIM (still works in my iPhone 6). Expansion Board 3 upgraded to 0.0.9. FiPy (ESP32) firmware at 1.18.0. Sequans LTE modem updated using FIPY_GPY_CATM1_33988.dup and reports UE5.0.0.0c, LR5.1.1.0-33988. As per my previous post, lte.attach() never succeeds.



  • @administrators @admin
    Could Pycom comment on this issue or contact Telstra, or give us a reason why things no longer work here in Australia?

    Gpy and Fipy boards are no longer working here. Other thread:
    https://forum.pycom.io/topic/3390/potential-device-lockdown-network-providers



  • @prawnhead Everything is pointing towards an issue with Telstra. If several boards were left working for >4 weeks 24/7, then I can't see how there could be an issue with the the firmware indeed.

    SIM cards are working if put on smartphones so...not a "credit" or account issue.

    In any case I also tried to rollback to 1.17 and it still did not work, reflashed the modem again. Nothing!

    Quectel BG96 and Telit ME910 can find the network and connect, B28.

    So it is a PYCOM + TELSTRA issue. Certification / lock-down kicking in? Out of the blue. This is a killer.

    We have contacted M2Mone as well, they are trying to figure out if Telstra has made any changes.



  • @tealbrains I've borked my FiPy during a firmware upgrade so only have a GPy to test with at the moment. Guess what? lte.attach() fails every time (0/5 succeeded). The code I'm using is the same as I last used and worked flawlessly on GPy and FiPy. Same SIM card, same device and same antenna. I realised the firmware was one step back (1.17) so updated to 1.18 and had exactly the same result. Oh, and my GPy is running Cat-M1 firmware (FIPY_GPY_CATM1_33988.dup)

    So are we guessing Telstra has made a change?

    Hardware:

    >>>
    >>> import os
    >>> os.uname()
    (sysname='GPy', nodename='GPy', release='1.17.5.b5', version='v1.8.6-849-177b724c on 2018-05-12', machine='GPy with ESP32')
    >>>
    

    Code

    import time
    from machine import RTC
    from network import LTE
    
    NTP_SERVER = "au.pool.ntp.org"
    
    # Need to use global variables.
    # If in each function you delare a new reference, functionality is broken
    lte = LTE()
    rtc = RTC()
    
    # Returns a network.LTE object with an active Internet connection.
    def getLTE():
    
        # If already used, the lte device will have an active connection.
        # If not, need to set up a new connection.
        if lte.isconnected():
            return lte
    
        # Modem does not connect successfully without first being reset.
        print("Resetting LTE modem ... ", end='')
        lte.send_at_cmd('AT^RESET')
        print("OK")
        time.sleep(1)
    
        # While the configuration of the CGDCONT register survives resets,
        # the other configurations don't. So just set them all up every time.
        print("Configuring LTE ", end='')
        lte.send_at_cmd('AT+CGDCONT=1,"IP","telstra.internet"')
        print(".", end='')
        lte.send_at_cmd('AT!="RRC::addscanfreq band=28 dl-earfcn=9410"')
        print(".", end='')
        lte.send_at_cmd('AT+CFUN=1')
        print(" OK")
    
        # If correctly configured for carrier network, attach() should succeed.
        if not lte.isattached():
            print("Attaching to LTE network ", end='')
            lte.attach()
            while(True):
                if lte.isattached():
                    print(" OK")
                    break
                print('.', end='')
                time.sleep(1)
    
        # Once attached, connect() should succeed.
        if not lte.isconnected():
            print("Connecting on LTE network ", end='')
            lte.connect()
            while(True):
                if lte.isconnected():
                    print(" OK")
                    break
                print('.', end='')
                time.sleep(1)
    
        # Once connect() succeeds, any call requiring Internet access will
        # use the active LTE connection.
        return lte
    
    # Clean disconnection of the LTE network is required for future
    # successful connections without a complete power cycle between.
    def endLTE():
    
        print("Disonnecting LTE ... ", end='')
        lte.disconnect()
        print("OK")
        time.sleep(1)
        print("Detaching LTE ... ", end='')
        lte.dettach()
        print("OK")
    
    # Sets the internal real-time clock.
    # Needs LTE for Internet access.
    def setRTC():
    
        # Ensures LTE session is connected before attempting NTP sync.
        lte = getLTE()
    
        print("Updating RTC from {} ".format(NTP_SERVER), end='')
        rtc.ntp_sync(NTP_SERVER)
        while not rtc.synced():
            print('.', end='')
            time.sleep(1)
        print(' OK')
    
    # Only returns an RTC object that has already been synchronised with an NTP server.
    def getRTC():
    
        if not rtc.synced():
            setRTC()
    
        return rtc
    
    # Program starts here.
    try:
        print("Initially, the RTC is {}".format("set" if rtc.synced() else "unset"))
        rtc = getRTC()
        while(True):
            print("RTC is {}".format(rtc.now() if rtc.synced() else "unset"))
            time.sleep(5)
    except Exception:
        pass # do nothing on error
    
    finally:
        endLTE()
    

    REPL Output:

    >>> Running Z:\Content\Content2\Chris\Pycom\Pycom GPy\Code from Forum 3139\lte.py
    
    >>>
    >>>
    Initially, the RTC is unset
    Resetting LTE modem ... OK
    Configuring LTE .. OK
    Attaching to LTE network ................................................Disonnecting LTE ... OK
    Detaching LTE ... OK
    Traceback (most recent call last):
      File "<stdin>", line 108, in <module>
      File "<stdin>", line 105, in <module>
      File "<stdin>", line 100, in <module>
      File "<stdin>", line 93, in getRTC
      File "<stdin>", line 80, in setRTC
      File "<stdin>", line 46, in getLTE
    KeyboardInterrupt:
    >
    MicroPython v1.8.6-849-177b724c on 2018-05-12; GPy with ESP32
    Type "help()" for more information.
    >>>
    

    Firmware Updated

    >>> import os
    >>> os.uname()
    (sysname='GPy', nodename='GPy', release='1.18.0', version='v1.8.6-849-046b350 on 2018-06-01', machine='GPy with ESP32')
    >>>
    

    Same result: 0/5 attempts succeeded at lte.attach().



  • @tealbrains until 4 days I had 7 x GPY online. They aren't now due to power isolation. They are on mechanical (diesel) pumps and they aren't being used at the moment.

    been working on other stuff, so haven't been checking LTE connections

    My Test FiPY won't attach I have been using APN "telstra.internet" and that has been working fine (up to 4 days ago when I last checked).

    This is a concern. Makes me think something is going on in Telstra. I am going to log a fault call with them.



  • @prawnhead Thanks, I really appreciate it.



  • @tealbrains I'm away from my devices at present. Will check it out when I can.



  • @slimbg99 To connect to Telstra is was necessary to have and use the following information

    Band 28, Earfcn 9410

    Which is then used with this AT command.

    lte.send_at_cmd("AT!=\"RRC::addscanfreq band=28 dl-earfcn=9410\"")

    May be you need this equivalent for Bell Canada ?



  • @Prawnhead @timh

    Are you still able to connect to the Telstra network? The gpy boards I have no longer work. I thought it was a network outage issue but it appears to be something else.

    I have been running the exact same program so it can't be firmware as it was working, posting data, etc.

    I have tested it with :

    • Aldi APN: mdata.com.au
    • Telstra Prepaid : APN: telstra.internet
    • M2Mone APN: telstra.m2m

    Band 28, Earfcn 9410 for all three.

    I thought maybe the modem on the Gpy may have been damaged (no reason why though) so I tested another 2 Gpys I had (which also used to work). Same problem. It just gets stuck at lte.attach(), where it was working before (most of the time anyway...).

    1. I am able to send SMS and have data connectivity from a smartphone -> SIM cards OK.
    2. I also have an IoT device that uses a Quectel BG96 and uses an M2Mone sim card. It was able to send data -> Network is OK.
    3. No changes made to firmware or hardware

    I have exhausted all my options. Any ideas?



  • I cannot get my Gpy to attach. here are the details:

    • Country: Canada
    • Operator: Bell
    • Sim Card: nano LTE
    • APN: mnet.bell.ca.ioe

    can you help me figure out what is wrong with my code. I cannot get the attach() to work. here is the code I am using:

    print("reset modem")
    try:
        #at('AT^RESET')
        lte.reset()
    except:
        print("Exception during reset")
    
    def status():
        print("************")
        print("Status")
        print(lte.send_at_cmd("ATI"))
        print(lte.send_at_cmd('AT!="showphy"'))
        print(lte.send_at_cmd('AT!="fsm"'))
        print("************")
    
    # enable network registration and location information, unsolicited result code
    at('AT+CEREG=2')
    at('AT+CFUN=1')
    time.sleep(1.0)
    at('AT+CGDCONT=1,"IP","mnet.bell.ca.ioe"')
    at('AT+CGDCONT?')
    print("attempt to attach cell modem to base station...")
    at("ATI")
    time.sleep(2.0)
    
    i = 0
    while lte.isattached() == False:
        r = at('AT+CEREG?')
        r = at('AT+CSQ')
        i = i + 5
        print("not attached: {} secs".format(i))
        #status()
        time.sleep(2)
    print('LTE ATTACHED OK!')
    at('AT+CEREG?')
    at('AT+CGCONTRDP=?')
    print("connect: start a data session and obtain an IP address")
    try:
        print('CONNECTING ...')
        lte.connect(cid=1)
    except:
        print('CONNECTING ERROR')
        pass
    i = 0
    while not lte.isconnected():
        print("not connected after : {}".format(i))
        blink(GREEN, 2)
        time.sleep(1.0)
        i = i + 1
    delta = time.time() - t0
    print("connected after %s secs"%delta)```

 

Hello World?

Pylife on Kickstarter - November 2018








Back Us On Kickstarter >

Pycom on Twitter