Gpy cannot connect to NB-IOT



  • We are creating a GPS tracking device with Gpy and PyTrack. GPS is working but we cannot connect to the NB-IOT network anymore. A few weeks everything worked but after some time it does not attach anymore to the network. The sim card is active and can be used for this.

    DL SYNCHRO STATISTICS

    Synchro state                         : OFF
    PPU SIB1 ACQ watchdog                 : 1
    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) : 57.26
    RX PSD BO (dBFs) : -29.22
    RX PSD (dBm) : -117.95
    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) : 62
    Frequency offset BB (Hz) : 0
    PBCH
    MIB received quantity : 28
    MIB timeout quantity : 0

    OK

    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             |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                |
    +--------------------------+--------------------+
    

    The code that we are using for connecting looks like:

    def connectToLte(self):
            print("start connecting")
    
            timeCounter = 0
    
            self.lte = LTE()
    
            self.send_at_cmd_pretty('AT+CFUN=0')
            self.send_at_cmd_pretty('AT!="clearscanconfig"')
            self.send_at_cmd_pretty('AT!="addscanfreq band=20 dl-earfcn=1250"')
            self.send_at_cmd_pretty('AT+CGDCONT=1,"IP","nbiot.iot"')
            #self.send_at_cmd_pretty('AT+CEREG=2')
            self.send_at_cmd_pretty('AT+CFUN=1')
    
            self.lte.send_at_cmd('AT+CFUN=1')
            print("Attach NB-IOT")
            self.lte.attach( apn=config.apn) #,band=config.lteBand)
            while timeCounter < 300 and not self.lte.isattached():
                print("attaching...")
                self.send_at_cmd_pretty('AT!="showphy"')
                self.send_at_cmd_pretty('AT!="fsm"')
                self.send_at_cmd_pretty('AT+CEREG?')
                timeCounter += 0.25
                time.sleep(0.25)
            print("Connect to NB-IOT network")
            self.lte.connect()       # start a data session and obtain an IP address
            while not self.lte.isconnected():
                print("Connecting...")
                time.sleep(0.25)
    

Log in to reply
 

Pycom on Twitter