T-Mobile NB-IoT in the Netherlands? [SOLVED]



  • Has anyone gotten T-Mobile NB-IoT in the Netherlands working on FiPy or GPy?

    I have updated my GPy to version 1.18.1.r7 and the LTE modem to version NB1-40343.



  • @nadvorvo said in T-Mobile NB-IoT in the Netherlands? [SOLVED]:

    Could you comment, please [AT] 939910, [AT-OK] +9509 I do not know meaning.

    [AT] 939910 means an AT command was submitted at timestamp 939910
    [AT-OK] +9509 means an OK response was received after elapsed time 9509

    both values are in milliseconds



  • This is what I get for an IP that is not reachable: (with lte = LTE(debug=True)

    >>> print(lte.send_at_cmd('AT+PING="10.0.1.2",1,32'))
    [AT] 2481378 AT+PING="1.2.3.4",1,32
    [AT-OK] +9503 
    
    >>>
    

    And this is what I get for an IP that I can reach:

    >>> print(lte.send_at_cmd('AT+PING="8.8.8.8",1,32'))
    [AT] 2531560 AT+PING="8.8.8.8",1,32
    [AT-OK] +1568 
    +PING: 1,8.8.8.8,1540,117
    
    OK
    
    
    +PING: 1,8.8.8.8,1540,117
    
    OK
    >>>
    

    Meaning the first one did not get a response (was not reachable), and the second one is reachable, returning the round trip time etc.

    Gijs



  • Hi @Gijs,
    10.1.0.1 is the address of the NB-IoT backend server ... UDP communication is working there.

    I have tried 8.8.8.8 (result is same, My APN network is opened to internet by default, only to backend server)

    LTE ping test
    [AT] 80166 AT+PING="8.8.8.8",1,32
    [AT-OK] +9506
    Sent to modem: 'AT+PING="8.8.8.8",1,32', delay 5000 ms
    

    Thank you in advance for your assistance.
    Regards, Vojtech



  • Im not sure exactly what you are trying to achieve with the PING (and who you are trying to ping), but a ping to 8.8.8.8 for me gives a response acknowledgement. It seems 10.1.0.1 is in the personal IP range, which might not be directly accessible from the lte service.



  • Hi @Gijs,
    Thank you for your reply.

    I have updated my testing code as suggested (also it was necessary add 5 sec sleep (there were interfere with lte.connect() comand):

    # Initialize LTE object
    lte = LTE()
    lte = LTE(debug=True)
    
    print('LTE ping test')
    send_at_cmd_pretty('AT+PING="10.1.0.1",1,32', delay=5000)
    time.sleep(5)
    # Connect LTE
    print('LTE connect command:')
    lte.connect()
    

    I got this output:

    LTE ping test
    [AT] 939910 AT+PING="10.1.0.1",1,32
    [AT-OK] +9509
    Sent to modem: 'AT+PING="10.1.0.1",1,32', delay 5000 ms
    LTE connect command:
    

    Could you comment, please [AT] 939910, [AT-OK] +9509 I do not know meaning.
    Thank you in advance for your assistance.
    Regards, Vojtech



  • Hi,
    Sorry for the long delay, I have since looked at your code again, and the AT+PING does not return anything for you, try the following:lte = LTE(debug=True) which will give you more insight into the sent AT commands by the lte module.

    The error is with the lte.connect() which has a version check, that receives a non-applicable response from the modem.

    Next, I figured out that the AT+PING has no specified timeout. This will interfere with the next AT command called (ATI1) and cause the modem version not read error, as the AT+PING has still information in the UART buffer. You can resolve the issue by setting a timeout on the AT+PING command as such:

    send_at_cmd_pretty('AT+PING="172.27.131.100",1,32')
    

    With 1 = the amount of messages, and 32 as the timeout in ms (I believe)

    That should resolve the error
    Best,
    Gijs



  • @nadvorvo said in T-Mobile NB-IoT in the Netherlands? [SOLVED]:

    Thank you for your reply.

    So we are back here again If im correct. I tested the AT+PING again om my devices and that seems to work fine (still!). I have asked @xykon to take a look as well, so we can figure this out!

    Gijs



  • Hi @Gijs,
    Today I have sold problem with lte.attach(). It was necessary to add before (select network operator):

    lte.send_at_cmd('AT+COPS=1,2,"23003"')
    

    Ping not working even after FW downgrade to 1.20.2.r1.
    Thank you in advance for your assistance.
    Regards, Vojtech

    >>> exec(open('./lte_test.py').read())
    Sysname: GPy
    Release: 1.20.2.r1
    Version: v1.11-a5aa0b8 on 2020-09-09
    Machine: GPy with ESP32
    Query LTE modem imei... 35434**********
    Query SIM iccid... 89882***************
    Sent to modem: 'ATI1', delay 1000 ms
    UE6.0.0.0
    LR6.0.0.0-41019
    OK
    Sent to modem: 'AT!="showver"', delay 1000 ms
    SYSTEM VERSION
    ==============
      FIRMWARE VERSION
        Bootloader0  : 5.1.1.0 [41065]
        Bootloader1* : 6.0.0.0 [41019]
        Bootloader2  : 5.1.1.0 [41065]
        NV Info      : 1.1,0,0
        Software     : 6.0.0.0 [41019] by robot-soft at 2018-12-13 21:41:15
        UE           : 6.0.0.0
      COMPONENTS
        ZSP0         : 1.0.99-3171
        ZSP1         : 1.0.98-3170
    OK
    Sent to modem: 'AT!="RRC:setDbgPerm full"', delay 1000 ms
    OK
    Sent to modem: 'AT!="RRC:showcaps"', delay 1000 ms
    == CAPS config =============================
      .Lock UE on SRV band    : false
      .MFBI support           : true
      .TM8 TDD support        : false
    ============================================
    == CAPS ====================================
      . access stratum: R13
      . catM          : 1
      . nb-IoT        : 1
    -- EUTRA bands --
      . supported     : 66/28/26/25/20/19/18/17/14/13/12/8/5/4/3/2/1
      . board         : 1/2/3/4/5/8/12/13/14/17/18/19/20/25/26/28/66
      . admin         :
      . pending admin :
    -- EUTRA carriers --
      . admin         :
      . pending admin :
    ============================================
    OK
    Sent to modem: 'AT+SQNCTM?', delay 1000 ms
    +SQNCTM: standard
    OK
    LTE attaching...
    Attaching... 1
    Attaching... 2
    Attaching... 3
    Attaching... 4
    Attaching... 5
    LTE attach succeeded!
    Sent to modem: 'AT+CEREG?', delay 1000 ms
    +CEREG: 2,5,"B7B6","0003E421",9
    OK
    Sent to modem: 'AT+SQNMONI=9', delay 1000 ms
    +SQNMONI: Vodafone@ Cc:230 Nc:03 RSRP:-93.10 CINR:-0.90 RSRQ:-14.20 TAC:47030 Id:76 EARFCN:6447 PWR:-71.12 PAGING:256
    OK
    Sent to modem: 'AT+CSQ', delay 1000 ms
    +CSQ: 20,99
    OK
    Sent to modem: 'AT!="showphy"', delay 1000 ms
    DL SYNCHRO STATISTICS
    =====================
        Synchro state                         : CELL_ACQUIRED
        PPU SIB1 ACQ watchdog                 : 1
        Frequency Hypothesis RF  (Hz)         : 0
        RSRP (dBm)                            : -93.51
        RSRQ  (dB)                            : -14.33
        Channel estimation state (Cell-spec.) : LOW CINR
        Channel estimation state (UE-spec.)   : LOW CINR
        Channel estimation state (MBSFN)      : LOW CINR
        Channel estimation CINR               : 0.05
        Channel length                        : SHORT
      AGC
        AGC RX gain (dB)                      : 55.79
        RX PSD BO (dBFs)                      : -20.32
        RX PSD (dBm)                          : -93.14
        Noise level RS (dBm)                  : -92.36
        Digital gain (dB)                     : 1.44
        CINR RS (dB)                          : -1.15
      NARROWBANDS
        Last DL NB                            : Central
        Last UL NB                            : 0
      AFC
        Frequency offset RF  (Hz)             : -524
        Frequency offset BB  (Hz)             : 0
      PBCH
        MIB received quantity                 : 0
        MIB timeout quantity                  : 0
    OK
    Sent to modem: 'AT!="fsm"', delay 1000 ms
    SYSTEM FSM
    ==========
        +--------------------------+--------------------+
        |            FSM           |        STATE       |
        +--------------------------+--------------------+
        | RRC TOP FSM              |CONNECTED           |
        | RRC SEARCH FSM           |CAMPED              |
        | RRC ACTIVE FSM           |CONNECTED           |
        | PMM PLMN FSM             |NORM_CAMPED         |
        | EMM MAIN FSM             |REGISTERED          |
        | EMM AUTH FSM             |KASME_DEFINED       |
        | EMM CONN FSM             |AS_ESTABLISHED      |
        | EMM TAU FSM              |NULL                |
        | EMM TEST FSM             |NULL                |
        | ESM BEARER FSM           |BEARER_ACTIVE       |
        | SMS MT FSM               |IDLE                |
        | SMS MO FSM               |IDLE                |
        | LPP 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
    Sent to modem: 'AT+CGPADDR', delay 1000 ms
    +CGPADDR: 1,"10.0.1.197"
    OK
    Sent to modem: 'AT+PING="172.27.131.100"', delay 5000 ms
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "<string>", line 64, in <module>
    OSError: LTE modem version not read
    
    


  • @nadvorvo I'm just using lte.attach() here with a T-Mobile NB-IoT card. attaching usually takes 12 seconds, but sometimes much longer. The response to AT+CSQ is 25,99. I'm using MicroPython 1.20.2.rc11, and the latest modem firmware 41019, and the same bootloader.
    Ping to 172.27.131.100 fails in a proper manner with error, ping to e.g. 217.160.86.40 or 8.8.8.8 works.
    Maybe you have a problem with the antenna or reception. Can you move close to a window?



  • Hi @Gijs,
    finally I have to downgrade to 1.20.2.r1
    Then I have executed testing code. Still having problems with attaching (pls see my last post regarding rssi).

    Thank you in advance for your assistance.
    Regards, Vojtech

    >>> exec(open('./lte_test.py').read())
    Sysname: GPy
    Release: 1.20.2.r1
    Version: v1.11-a5aa0b8 on 2020-09-09
    Machine: GPy with ESP32
    Query LTE modem imei... 35434**********
    Query SIM iccid... 89882***************
    Sent to modem: 'ATI1', delay 1000 ms
    UE6.0.0.0
    LR6.0.0.0-41019
    OK
    Sent to modem: 'AT!="showver"', delay 1000 ms
    SYSTEM VERSION
    ==============
      FIRMWARE VERSION
        Bootloader0  : 5.1.1.0 [41065]
        Bootloader1* : 6.0.0.0 [41019]
        Bootloader2  : 5.1.1.0 [41065]
        NV Info      : 1.1,0,0
        Software     : 6.0.0.0 [41019] by robot-soft at 2018-12-13 21:41:15
        UE           : 6.0.0.0
      COMPONENTS
        ZSP0         : 1.0.99-3171
        ZSP1         : 1.0.98-3170
    OK
    Sent to modem: 'AT!="RRC:setDbgPerm full"', delay 1000 ms
    OK
    Sent to modem: 'AT!="RRC:showcaps"', delay 1000 ms
    == CAPS config =============================
      .Lock UE on SRV band    : false
      .MFBI support           : true
      .TM8 TDD support        : false
    ============================================
    == CAPS ====================================
      . access stratum: R13
      . catM          : 1
      . nb-IoT        : 1
    -- EUTRA bands --
      . supported     : 66/28/26/25/20/19/18/17/14/13/12/8/5/4/3/2/1
      . board         : 1/2/3/4/5/8/12/13/14/17/18/19/20/25/26/28/66
      . admin         :
      . pending admin :
    -- EUTRA carriers --
      . admin         :
      . pending admin :
    ============================================
    OK
    Sent to modem: 'AT+SQNCTM?', delay 1000 ms
    +SQNCTM: standard
    OK
    LTE attaching...
    Attaching... 1
    Attaching... 2
    Attaching... 3
    Attaching... 4
    Attaching... 5
    Attaching... 6
    Attaching... 7
    Attaching... 8
    Attaching... 9
    Attaching... 10
    Attaching... 11
    Attaching... 12
    Attaching... 13
    Attaching... 14
    Attaching... 15
    


  • Hi @Gijs,
    I really appreciate the support you’ve given me. Sorry for some delays (I was out of office several days).

    I am now trying to downgrade to 1.20.2.r1 ... as you know I have some troubles:
    https://forum.pycom.io/topic/1735/failed-to-connect-to-esp32-invalid-head-of-packet-x08/6

    Today I have made some test with NB-IoT.
    I have noticed weak signal:

    >>> lte.send_at_cmd('AT+CSQ')
    '\r+CSQ: 18,99\r\rOK\r'
    

    rssi=18 ... -77dBm
    Below -70 dBm: Signal is too weak, subject to external interference
    Today even I could not attach (usually it takes few seconds and I get lte.isattached() = true). Could it be hint why AT+PING command get error?

    >>> from network import LTE
    >>> lte = LTE()
    >>> lte.attach(band=20, apn="nb.zoocontrol")
    >>> lte.isattached()
    False
    

    Thank you in advance for your assistance.
    Regards, Vojtech



  • Hi,
    That is a really odd error to get after the AT+PING command. The

    OSError: LTE modem version not read
    

    Can only be caused by the lte.connect() command and has nothing to do with the lte.send_at_cmd(...)

    I tried what you are doing on my Fipy with NB1-41019 firmware, and it does not do this.. Can you perhaps get the firmware 1.20.2.r1 and try again? There might be some differences in 1.20.2.r3 that I do not know about..



  • Hi @Gijs ,
    Thank you for your reply.
    I am using GPy + modem with NB-IoT fw NB1-41019.
    Could you help, why AT+PING does not work, please?
    I really appreciate the support you’ve given me.
    Regards, Vojtech

    Sent to modem: 'AT+PING="172.27.131.100"', delay 5000 ms
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "<string>", line 64, in <module>
    OSError: LTE modem version not read```
    

    Complete test output:

    Sysname: GPy
    Release: 1.20.2.r3
    Version: v1.11-d945d33ee on 2020-03-08
    Machine: GPy with ESP32
    Query LTE modem imei... 35434**********
    Query SIM iccid... 89882***************
    Sent to modem: 'ATI1', delay 1000 ms
    UE6.0.0.0
    LR6.0.0.0-41019
    OK
    Sent to modem: 'AT!="showver"', delay 1000 ms
    SYSTEM VERSION
    ==============
      FIRMWARE VERSION
        Bootloader0  : 5.1.1.0 [41065]
        Bootloader1* : 6.0.0.0 [41019]
        Bootloader2  : 5.1.1.0 [41065]
        NV Info      : 1.1,0,0
        Software     : 6.0.0.0 [41019] by robot-soft at 2018-12-13 21:41:15
        UE           : 6.0.0.0
      COMPONENTS
        ZSP0         : 1.0.99-3171
        ZSP1         : 1.0.98-3170
    OK
    Sent to modem: 'AT!="RRC:setDbgPerm full"', delay 1000 ms
    OK
    Sent to modem: 'AT!="RRC:showcaps"', delay 1000 ms
    == CAPS config =============================
      .Lock UE on SRV band    : false
      .MFBI support           : true
      .TM8 TDD support        : false
    ============================================
    == CAPS ====================================
      . access stratum: R13
      . catM          : 1
      . nb-IoT        : 1
    -- EUTRA bands --
      . supported     : 66/28/26/25/20/19/18/17/14/13/12/8/5/4/3/2/1
      . board         : 1/2/3/4/5/8/12/13/14/17/18/19/20/25/26/28/66
      . admin         :
      . pending admin :
    -- EUTRA carriers --
      . admin         :
      . pending admin :
    ============================================
    OK
    Sent to modem: 'AT+SQNCTM?', delay 1000 ms
    +SQNCTM: standard
    OK
    LTE attaching...
    Attaching... 1
    Attaching... 2
    Attaching... 3
    Attaching... 4
    Attaching... 5
    LTE attach succeeded!
    Sent to modem: 'AT+CEREG?', delay 1000 ms
    +CEREG: 2,5,"B7B6","0003E421",9
    OK
    Sent to modem: 'AT+SQNMONI=9', delay 1000 ms
    +SQNMONI: Vodafone@ Cc:230 Nc:03 RSRP:-92.80 CINR:-0.40 RSRQ:-14.10 TAC:47030 Id:76 EARFCN:6447 PWR:-70.92 PAGING:256
    OK
    Sent to modem: 'AT+CSQ', delay 1000 ms
    +CSQ: 21,99
    OK
    Sent to modem: 'AT!="showphy"', delay 1000 ms
    DL SYNCHRO STATISTICS
    =====================
        Synchro state                         : CELL_ACQUIRED
        PPU SIB1 ACQ watchdog                 : 0
        Frequency Hypothesis RF  (Hz)         : 0
        RSRP (dBm)                            : -92.98
        RSRQ  (dB)                            : -14.28
        Channel estimation state (Cell-spec.) : LOW CINR
        Channel estimation state (UE-spec.)   : LOW CINR
        Channel estimation state (MBSFN)      : LOW CINR
        Channel estimation CINR               : -0.75
        Channel length                        : SHORT
      AGC
        AGC RX gain (dB)                      : 50.54
        RX PSD BO (dBFs)                      : -22.57
        RX PSD (dBm)                          : -93.56
        Noise level RS (dBm)                  : -92.07
        Digital gain (dB)                     : 4.86
        CINR RS (dB)                          : -0.91
      NARROWBANDS
        Last DL NB                            : Central
        Last UL NB                            : 0
      AFC
        Frequency offset RF  (Hz)             : -538
        Frequency offset BB  (Hz)             : 0
      PBCH
        MIB received quantity                 : 0
        MIB timeout quantity                  : 0
    OK
    Sent to modem: 'AT!="fsm"', delay 1000 ms
    SYSTEM FSM
    ==========
        +--------------------------+--------------------+
        |            FSM           |        STATE       |
        +--------------------------+--------------------+
        | RRC TOP FSM              |CONNECTED           |
        | RRC SEARCH FSM           |CAMPED              |
        | RRC ACTIVE FSM           |CONNECTED           |
        | PMM PLMN FSM             |NORM_CAMPED         |
        | EMM MAIN FSM             |REGISTERED          |
        | EMM AUTH FSM             |KASME_DEFINED       |
        | EMM CONN FSM             |AS_ESTABLISHED      |
        | EMM TAU FSM              |NULL                |
        | EMM TEST FSM             |NULL                |
        | ESM BEARER FSM           |BEARER_ACTIVE       |
        | SMS MT FSM               |IDLE                |
        | SMS MO FSM               |IDLE                |
        | LPP 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
    Sent to modem: 'AT+CGPADDR', delay 1000 ms
    +CGPADDR: 1,"10.0.1.197"
    OK
    Sent to modem: 'AT+PING="172.27.131.100"', delay 5000 ms
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "<string>", line 64, in <module>
    OSError: LTE modem version not read
    


  • Hi
    Usage is like this:
    lte.send_at_cmd('AT+PING="8.8.8.8"') where 8.8.8.8 can be any IP address. This works on any device with an LTE modem. Be aware that the quotes are not interchangable, the AT command interpreter expects the double ".



  • Hi @Gijs,
    Thank you for your reply.
    Could you suggest how to use AT+PING command on GPy?
    So far I understand @Joop-Susan using his testing code also with Sequans modem (FiPy)?

    Thank you in advance for your assistance.
    Regards, Vojtech



  • Hi,
    For

    1. AT commands are sort of universal. The manual you mention only describes AT commands specific to the Sequans modem. If you check this forum thread: https://forum.pycom.io/topic/6202/method-to-take-control-of-cell-modem/29 there are more 'undocumented' commands.
    2. There was a change in lte.send_at_cmd() not requiring the delay argument anymore in a recent firmware, as that was solved in a different way.

    Edit: The AT+PING command is described in the Sequans AT commands manual! (see link)

    Best,
    Gijs



  • Hi @Joop-Susan, thank you for your testing code.
    I have used it for my NB-IoT tests.

    1. In my system there is no existing AT command AT+PING.
      Also I did not find it modem manual:
      https://docs.pycom.io/gitbook/assets/Monarch-LR5110-ATCmdRefMan-rev6_noConfidential.pdf

    2. In my system lte.send_at_cmd function require only one parameter

    >>> lte.send_at_cmd('ATI1',1000)
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    TypeError: extra positional arguments given
    

    So finally I have changed function send_at_cmd_pretty like this:

    def send_at_cmd_pretty(cmd, delay=1000):
        response = lte.send_at_cmd(cmd).split('\r\n')
        print('Sent to modem: \'{}\', delay {} ms'.format(cmd, delay))
        for line in response:
            if line.strip() != '':
                print(line)
    

    Could somebody explain points 1), 2), please?
    Thank you in advance for your assistance.

    Regards, Vojtech

    Sysname: GPy
    Release: 1.20.2.r3
    Version: v1.11-d945d33ee on 2020-03-08
    Machine: GPy with ESP32
    Query LTE modem imei... 35434**********
    Query SIM iccid... 89882***************
    Sent to modem: 'ATI1', delay 1000 ms
    UE6.0.0.0
    LR6.0.0.0-41019
    OK
    Sent to modem: 'AT!="showver"', delay 1000 ms
    SYSTEM VERSION
    ==============
      FIRMWARE VERSION
        Bootloader0  : 5.1.1.0 [41065]
        Bootloader1* : 6.0.0.0 [41019]
        Bootloader2  : 5.1.1.0 [41065]
        NV Info      : 1.1,0,0
        Software     : 6.0.0.0 [41019] by robot-soft at 2018-12-13 21:41:15
        UE           : 6.0.0.0
      COMPONENTS
        ZSP0         : 1.0.99-3171
        ZSP1         : 1.0.98-3170
    OK
    Sent to modem: 'AT!="RRC:setDbgPerm full"', delay 1000 ms
    OK
    Sent to modem: 'AT!="RRC:showcaps"', delay 1000 ms
    == CAPS config =============================
      .Lock UE on SRV band    : false
      .MFBI support           : true
      .TM8 TDD support        : false
    ============================================
    == CAPS ====================================
      . access stratum: R13
      . catM          : 1
      . nb-IoT        : 1
    -- EUTRA bands --
      . supported     : 66/28/26/25/20/19/18/17/14/13/12/8/5/4/3/2/1
      . board         : 1/2/3/4/5/8/12/13/14/17/18/19/20/25/26/28/66
      . admin         :
      . pending admin :
    -- EUTRA carriers --
      . admin         :
      . pending admin :
    ============================================
    OK
    Sent to modem: 'AT+SQNCTM?', delay 1000 ms
    +SQNCTM: standard
    OK
    LTE attaching...
    Attaching... 1
    Attaching... 2
    Attaching... 3
    Attaching... 4
    Attaching... 5
    LTE attach succeeded!
    Sent to modem: 'AT+CEREG?', delay 1000 ms
    +CEREG: 2,5,"B7B6","0003E421",9
    OK
    Sent to modem: 'AT+SQNMONI=9', delay 1000 ms
    +SQNMONI: Vodafone@ Cc:230 Nc:03 RSRP:-92.80 CINR:-0.40 RSRQ:-14.10 TAC:47030 Id:76 EARFCN:6447 PWR:-70.92 PAGING:256
    OK
    Sent to modem: 'AT+CSQ', delay 1000 ms
    +CSQ: 21,99
    OK
    Sent to modem: 'AT!="showphy"', delay 1000 ms
    DL SYNCHRO STATISTICS
    =====================
        Synchro state                         : CELL_ACQUIRED
        PPU SIB1 ACQ watchdog                 : 0
        Frequency Hypothesis RF  (Hz)         : 0
        RSRP (dBm)                            : -92.98
        RSRQ  (dB)                            : -14.28
        Channel estimation state (Cell-spec.) : LOW CINR
        Channel estimation state (UE-spec.)   : LOW CINR
        Channel estimation state (MBSFN)      : LOW CINR
        Channel estimation CINR               : -0.75
        Channel length                        : SHORT
      AGC
        AGC RX gain (dB)                      : 50.54
        RX PSD BO (dBFs)                      : -22.57
        RX PSD (dBm)                          : -93.56
        Noise level RS (dBm)                  : -92.07
        Digital gain (dB)                     : 4.86
        CINR RS (dB)                          : -0.91
      NARROWBANDS
        Last DL NB                            : Central
        Last UL NB                            : 0
      AFC
        Frequency offset RF  (Hz)             : -538
        Frequency offset BB  (Hz)             : 0
      PBCH
        MIB received quantity                 : 0
        MIB timeout quantity                  : 0
    OK
    Sent to modem: 'AT!="fsm"', delay 1000 ms
    SYSTEM FSM
    ==========
        +--------------------------+--------------------+
        |            FSM           |        STATE       |
        +--------------------------+--------------------+
        | RRC TOP FSM              |CONNECTED           |
        | RRC SEARCH FSM           |CAMPED              |
        | RRC ACTIVE FSM           |CONNECTED           |
        | PMM PLMN FSM             |NORM_CAMPED         |
        | EMM MAIN FSM             |REGISTERED          |
        | EMM AUTH FSM             |KASME_DEFINED       |
        | EMM CONN FSM             |AS_ESTABLISHED      |
        | EMM TAU FSM              |NULL                |
        | EMM TEST FSM             |NULL                |
        | ESM BEARER FSM           |BEARER_ACTIVE       |
        | SMS MT FSM               |IDLE                |
        | SMS MO FSM               |IDLE                |
        | LPP 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
    Sent to modem: 'AT+CGPADDR', delay 1000 ms
    +CGPADDR: 1,"10.0.1.197"
    OK
    Sent to modem: 'AT+PING="172.27.131.100"', delay 5000 ms
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "<string>", line 64, in <module>
    OSError: LTE modem version not read```


  • OK. So my GPy's hardware was to blame. (Link)

    Since I also have a more recent FiPy I upgraded that one to NB1 40343.

    Success! I can read the 'Hello World!' message on the T-Mobile Netherlands dashboard.

    If this code does not attach for you, check that the CAPS show that your band is supported. My GPy was missing band 8 and I have requested an RMA...

    Testing code:

    import os
    from network import LTE
    import usocket
    import time
    
    
    def send_at_cmd_pretty(cmd, delay=1000):
        response = lte.send_at_cmd(cmd, delay=delay).split('\r\n')
        print('Sent to modem: \'{}\', delay {} ms'.format(cmd, delay))
        for line in response:
            if line.strip() != '':
                print(line)
    
    
    # Print module details
    un = os.uname()
    print('Sysname:', un.sysname)
    print('Release:', un.release)
    print('Version:', un.version)
    print('Machine:', un.machine)
    
    # Initialize LTE object
    lte = LTE()
    time.sleep(5)
    
    # Pre attaching debugging
    print('Query LTE modem imei...', lte.imei()[:5] + '*' * 10)
    print('Query SIM iccid...', lte.iccid()[:5] + '*' * 15)
    send_at_cmd_pretty('ATI1')
    send_at_cmd_pretty('AT!="showver"')
    send_at_cmd_pretty('AT!="RRC:setDbgPerm full"')
    send_at_cmd_pretty('AT!="RRC:showcaps"')
    time.sleep(5)
    send_at_cmd_pretty('AT+SQNCTM?')
    
    # Attach LTE
    print('LTE attaching...')
    lte.attach(band=8, apn="cdp.iot.t-mobile.nl")
    attempts = 0
    while not lte.isattached():
        time.sleep(5)
        attempts = attempts + 1
        print('Attaching...', attempts)
        if attempts % 15 == 0:
            send_at_cmd_pretty('AT+SQNMONI=9')
            send_at_cmd_pretty('AT+CEREG?')
            send_at_cmd_pretty('AT+CFUN?')
            send_at_cmd_pretty('AT+CSQ')
            send_at_cmd_pretty('AT!="showphy"')
            send_at_cmd_pretty('AT!="fsm"')
    print('LTE attach succeeded!')
    
    # Debug attached state
    send_at_cmd_pretty('AT+CEREG?')
    send_at_cmd_pretty('AT+SQNMONI=9')
    send_at_cmd_pretty('AT+CSQ')
    send_at_cmd_pretty('AT!="showphy"')
    send_at_cmd_pretty('AT!="fsm"')
    send_at_cmd_pretty('AT+CGPADDR')
    send_at_cmd_pretty('AT+PING="172.27.131.100"', delay=5000)
    
    # Connect LTE
    lte.connect()
    attempts = 0
    while not lte.isconnected():
        time.sleep(5)
        attempts = attempts + 1
        print('Connecting...', attempts)
    print('LTE connection succeeded!')
    
    # Test DNS
    try:
        usocket.dnsserver(0, '8.8.8.8')
        usocket.dnsserver(1, '1.1.1.1')
        usocket.dnsserver()
        print(usocket.getaddrinfo('www.google.com', 80)[0][-1])
    except Exception:
        print('DNS over NB-IoT failed...')
    
    # Send message to dashboard
    s = usocket.socket(usocket.AF_INET, usocket.SOCK_DGRAM)
    s.setsockopt(usocket.SOL_SOCKET, usocket.SO_REUSEADDR, 1)
    # s.settimeout(5)
    # s.setblocking(False)
    s.sendto(bytearray('Hello World!'), ('172.27.131.100', 15683))
    s.close()
    
    # Shutdown LTE
    print("Disonnecting LTE ... ")
    lte.disconnect()
    print("Detaching LTE ... ")
    lte.dettach()
    print("Shuttting down LTE...")
    lte.deinit()
    

    Output:

    Sysname: FiPy
    Release: 1.20.0.rc7
    Version: v1.9.4-2833cf5 on 2019-02-08
    Machine: FiPy with ESP32
    Query LTE modem imei... 35434**********
    Query SIM iccid... 89882***************
    Sent to modem: 'ATI1', delay 1000 ms
    UE6.0.0.0
    LR6.0.0.0-40343
    OK
    Sent to modem: 'AT!="showver"', delay 1000 ms
    SYSTEM VERSION
    ==============
      FIRMWARE VERSION
        Bootloader0  : 5.1.1.0 [39529]
        Bootloader1* : 6.0.0.0 [40343]
        Bootloader2  : NA
        NV Info      : 1.1,0,0
        Software     : 6.0.0.0 [40343] by robot-soft at 2018-11-07 13:57:00
        UE           : 6.0.0.0
      COMPONENTS
        ZSP0         : 1.0.99-3171
        ZSP1         : 1.0.98-3170
    OK
    Sent to modem: 'AT!="RRC:setDbgPerm full"', delay 1000 ms
    OK
    Sent to modem: 'AT!="RRC:showcaps"', delay 1000 ms
    == CAPS config =============================
      .Lock UE on SRV band    : false
      .MFBI support           : true
      .TM8 TDD support        : false
    ============================================
    == CAPS ====================================
      . access stratum: R13
      . catM          : 1
      . nb-IoT        : 1
    -- EUTRA bands --
      . supported     : 28/20/13/12/8/5/4/3
      . board         : 3/4/5/8/12/13/20/28
      . admin         : 
      . pending admin : 
    -- EUTRA carriers --
      . admin         : 
      . pending admin : 
    ============================================
    OK
    Sent to modem: 'AT+SQNCTM?', delay 1000 ms
    +SQNCTM: standard
    OK
    LTE attaching...
    Attaching... 1
    Attaching... 2
    LTE attach succeeded!
    Sent to modem: 'AT+CEREG?', delay 1000 ms
    +CEREG: 2,5,"04F5","00710C67",9
    OK
    Sent to modem: 'AT+SQNMONI=9', delay 1000 ms
    +SQNMONI: 20416 Cc:204 Nc:16 RSRP:-78.30 CINR:5.60 RSRQ:-12.00 TAC:1269 Id:287 EARFCN:3747 PWR:-58.52 PAGING:1024
    OK
    Sent to modem: 'AT+CSQ', delay 1000 ms
    +CSQ: 27,99
    OK
    Sent to modem: 'AT!="showphy"', delay 1000 ms
    DL SYNCHRO STATISTICS
    =====================
        Synchro state                         : CELL_ACQUIRED
        PPU SIB1 ACQ watchdog                 : 0
        Frequency Hypothesis RF  (Hz)         : 0
        RSRP (dBm)                            : -79.52
        RSRQ  (dB)                            : -12.22
        Channel estimation state (Cell-spec.) : LOW CINR
        Channel estimation state (UE-spec.)   : LOW CINR
        Channel estimation state (MBSFN)      : LOW CINR
        Channel estimation CINR               : 3.51
        Channel length                        : SHORT
      AGC
        AGC RX gain (dB)                      : 42.49
        RX PSD BO (dBFs)                      : -21.15
        RX PSD (dBm)                          : -81.08
        Noise level RS (dBm)                  : -83.83
        Digital gain (dB)                     : 1.85
        CINR RS (dB)                          : 4.31
      NARROWBANDS
        Last DL NB                            : Central
        Last UL NB                            : 0
      AFC
        Frequency offset RF  (Hz)             : -737
        Frequency offset BB  (Hz)             : 0
      PBCH
        MIB received quantity                 : 0
        MIB timeout quantity                  : 0
    OK
    Sent to modem: 'AT!="fsm"', delay 1000 ms
    SYSTEM FSM
    ==========
        +--------------------------+--------------------+
        |            FSM           |        STATE       |
        +--------------------------+--------------------+
        | RRC TOP FSM              |CONNECTED           |
        | RRC SEARCH FSM           |CAMPED              |
        | RRC ACTIVE FSM           |CONNECTED           |
        | PMM PLMN FSM             |NORM_CAMPED         |
        | EMM MAIN FSM             |REGISTERED          |
        | EMM AUTH FSM             |KASME_DEFINED       |
        | EMM CONN FSM             |EMM_CONNECTED       |
        | EMM TAU FSM              |NULL                |
        | EMM TEST FSM             |NULL                |
        | ESM BEARER FSM           |BEARER_ACTIVE       |
        | SMS MT FSM               |IDLE                |
        | SMS MO FSM               |IDLE                |
        | LPP 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
    Sent to modem: 'AT+CGPADDR', delay 1000 ms
    +CGPADDR: 1,"10.0.1.100"
    OK
    Sent to modem: 'AT+PING="172.27.131.100"', delay 5000 ms
    +PING: 1,172.27.131.100,360,253
    LTE connection succeeded!
    DNS over NB-IoT failed...
    Disonnecting LTE ... 
    Detaching LTE ... 
    Shuttting down LTE...
    
    Pycom MicroPython 1.20.0.rc7 [v1.9.4-2833cf5] on 2019-02-08; FiPy with ESP32
    Type "help()" for more information.
    


  • Still never attaching...

    Added suggested commands 'AT+SQNCTM?', 'AT+SQNMONI=9', 'AT+CEREG?', 'AT+CFUN?' by @Xykon in threads 'Modem's radio showphy, all zeros, is bad?' and 'FiPy LTE not connecting after Upgrade Firmware'.

    This is my latest test code:

    import os
    from network import LTE
    import time
    
    def send_at_cmd_pretty(cmd, delay=1000):
        response = lte.send_at_cmd(cmd, delay=delay).split('\r\n')
        print('Sent to modem: \'{}\', delay {} ms'.format(cmd, delay))
        for line in response:
            if line.strip() != '':
                print(line)
    
    un = os.uname()
    print('Sysname:', un.sysname);
    print('Release:', un.release);
    print('Version:', un.version);
    print('Machine:', un.machine);
    
    lte = LTE()
    time.sleep(5)
    print ('Query LTE modem imei...', lte.imei()[:5] + '*' * 10)
    print ('Query SIM iccid...', lte.iccid()[:5] + '*' * 15)
    send_at_cmd_pretty('ATI1')
    send_at_cmd_pretty('AT!="showver"')
    time.sleep(5)
    send_at_cmd_pretty('AT+SQNCTM?')
    print('LTE attaching...')
    lte.attach(band=8, apn="cdp.iot.t-mobile.nl")
    attempts = 0
    while not lte.isattached():
        time.sleep(5)
        attempts = attempts + 1
        print('Attaching...', attempts)
        if attempts % 5 == 0:
            send_at_cmd_pretty('AT+SQNMONI=9')
            send_at_cmd_pretty('AT+CEREG?')
            send_at_cmd_pretty('AT+CFUN?')
            send_at_cmd_pretty('AT+CSQ')
            send_at_cmd_pretty('AT!="showphy"')
            send_at_cmd_pretty('AT!="fsm"')
    print('LTE attach succeeded!')
    lte.connect()
    attempts = 0
    while not lte.isconnected():
        time.sleep(5)
        attempts = attempts + 1
        print('Connecting...', attempts)
    print('LTE connection succeeded!')
    
    time.sleep(30)
    
    print("Disonnecting LTE ... ")
    lte.disconnect()
    print("Detaching LTE ... ")
    lte.dettach()
    print("Shuttting down LTE...")
    lte.deinit()
    

    This is the output that it generates:

    Sysname: GPy
    Release: 1.20.0.rc4
    Version: v1.9.4-1444e48 on 2019-01-07
    Machine: GPy with ESP32
    
    Query LTE modem imei... 35434**********
    Query SIM iccid... 89882***************
    Sent to modem: 'ATI1', delay 1000 ms
    UE6.0.0.0
    LR6.0.0.0-40343
    OK
    Sent to modem: 'AT!="showver"', delay 1000 ms
    SYSTEM VERSION
    ==============
      FIRMWARE VERSION
        Bootloader0  : 5.1.1.0 [33080]
        Bootloader1  : 6.0.0.0 [40343]
        Bootloader2* : 5.1.1.0 [38638]
        NV Info      : 1.1,0,0
        Software     : 6.0.0.0 [40343] by robot-soft at 2018-11-07 13:57:00
        UE           : 6.0.0.0
      COMPONENTS
        ZSP0         : 1.0.99-3171
        ZSP1         : 1.0.98-3170
    OK
    Sent to modem: 'AT+SQNCTM?', delay 1000 ms
    +SQNCTM: standard
    OK
    LTE attaching...
    Attaching... 1
    Attaching... 2
    Attaching... 3
    Attaching... 4
    Attaching... 5
    Sent to modem: 'AT+SQNMONI=9', delay 1000 ms
    ERROR
    Sent to modem: 'AT+CEREG?', delay 1000 ms
    +CEREG: 2,0
    OK
    Sent to modem: 'AT+CFUN?', delay 1000 ms
    +CFUN: 1
    OK
    Sent to modem: 'AT+CSQ', delay 1000 ms
    +CSQ: 99,99
    OK
    Sent to modem: 'AT!="showphy"', delay 1000 ms
    DL SYNCHRO STATISTICS
    =====================
        Synchro state                         : OFF
        PPU SIB1 ACQ watchdog                 : 0
        Frequency Hypothesis RF  (Hz)         : 0
        RSRP (dBm)                            : -21474836.00
        RSRQ  (dB)                            : -15.21
        Channel estimation state (Cell-spec.) : LOW CINR
        Channel estimation state (UE-spec.)   : LOW CINR
        Channel estimation state (MBSFN)      : LOW CINR
        Channel estimation CINR               : 0.08
        Channel length                        : SHORT
      AGC
        AGC RX gain (dB)                      : 38.56
        RX PSD BO (dBFs)                      : -19.87
        RX PSD (dBm)                          : -77.16
        Noise level RS (dBm)                  : -76.63
        Digital gain (dB)                     : 3.14
        CINR RS (dB)                          : -3.17
      NARROWBANDS
        Last DL NB                            : Central
        Last UL NB                            : 0
      AFC
        Frequency offset RF  (Hz)             : 2061
        Frequency offset BB  (Hz)             : 0
      PBCH
        MIB received quantity                 : 0
        MIB timeout quantity                  : 0
    OK
    Sent to modem: 'AT!="fsm"', delay 1000 ms
    SYSTEM FSM
    ==========
        +--------------------------+--------------------+
        |            FSM           |        STATE       |
        +--------------------------+--------------------+
        | RRC TOP FSM              |INITIAL             |
        | RRC SEARCH FSM           |INITIAL             |
        | RRC ACTIVE FSM           |NULL                |
        | PMM PLMN FSM             |PARKING             |
        | EMM MAIN FSM             |NULL                |
        | EMM AUTH FSM             |NULL                |
        | 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                |
        | LPP 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
    Attaching... 6
    Attaching... 7
    Attaching... 8
    Attaching... 9
    Attaching... 10
    Sent to modem: 'AT+SQNMONI=9', delay 1000 ms
    +SQNMONI: Cc: Nc: RSRP:-1 CINR:-1 RSRQ:-1 TAC:11811 Id:226 EARFCN:6290 PWR:-1 PAGING:256
    OK
    Sent to modem: 'AT+CEREG?', delay 1000 ms
    +CEREG: 2,0
    OK
    Sent to modem: 'AT+CFUN?', delay 1000 ms
    +CFUN: 1
    OK
    Sent to modem: 'AT+CSQ', delay 1000 ms
    +CSQ: 27,99
    OK
    Sent to modem: 'AT!="showphy"', delay 1000 ms
    DL SYNCHRO STATISTICS
    =====================
        Synchro state                         : DRX_SLEEP
        PPU SIB1 ACQ watchdog                 : 0
        Frequency Hypothesis RF  (Hz)         : 0
        RSRP (dBm)                            : -76.21
        RSRQ  (dB)                            : -11.07
        Channel estimation state (Cell-spec.) : HIGH CINR
        Channel estimation state (UE-spec.)   : LOW CINR
        Channel estimation state (MBSFN)      : LOW CINR
        Channel estimation CINR               : 10.64
        Channel length                        : SHORT
      AGC
        AGC RX gain (dB)                      : 44.69
        RX PSD BO (dBFs)                      : -27.27
        RX PSD (dBm)                          : -82.46
        Noise level RS (dBm)                  : -88.05
        Digital gain (dB)                     : 1.18
        CINR RS (dB)                          : 11.84
      NARROWBANDS
        Last DL NB                            : Central
        Last UL NB                            : 0
      AFC
        Frequency offset RF  (Hz)             : -467
        Frequency offset BB  (Hz)             : 0
      PBCH
        MIB received quantity                 : 0
        MIB timeout quantity                  : 0
    OK
    Sent to modem: 'AT!="fsm"', delay 1000 ms
    SYSTEM FSM
    ==========
        +--------------------------+--------------------+
        |            FSM           |        STATE       |
        +--------------------------+--------------------+
        | RRC TOP FSM              |CAMPED              |
        | RRC SEARCH FSM           |CAMPED_ANY          |
        | RRC ACTIVE FSM           |IDLE                |
        | PMM PLMN FSM             |ANY_CAMPED          |
        | EMM MAIN FSM             |NULL                |
        | EMM AUTH FSM             |NULL                |
        | 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                |
        | LPP 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
    Attaching... 11
    Attaching... 12
    Attaching... 13
    Attaching... 14
    ...
    

    Does the new output make sense to anyone and does anyone have suggestions what to try next?



Pycom on Twitter