Welcome to the Pycom forum Forum
    • \[\[global:header.categories\]\]
    • \[\[global:header.recent\]\]
    • \[\[global:header.tags\]\]
    • \[\[global:header.popular\]\]
    • Login

    Explore Pybytes | Official Documentation | Report a Firmware Bug/Issue | GitHub

    Need Help to connect NB-IOT 1nce / Germany

    Scheduled Pinned Locked Moved FiPy
    5 Posts 4 Posters 523 Views 4 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S Offline
      svonbentzel
      last edited by

      Hello togehther, I need help.

      I have multiple FiPy Boards with and without expansion board try´d.

      I have used two 1nce SIM-Cards. The cards working good. and its a NB-IOT Contract.
      FiPy Rev. 1.2 RMA from Pycom
      Modem Firmware is already updated to DUP NB1-41019
      LTE-Antenna is connected
      SIM-Card is correctly plugged in.

      i have try multiple NB-IOT connection Scripts. no ones run.
      i have running the script multiple hours inside and outside of the House.

      any Ideas and Hints?

      Sysname: FiPy
      Release: 1.18.2.r3
      Version: v1.8.6-849-a1641ca on 2019-02-28
      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-41019
      OK
      Sent to modem: 'AT!="showver"', delay 1000 ms
      SYSTEM VERSION
      ==============
        FIRMWARE VERSION
          Bootloader0  : 5.1.1.0 [39529]
          Bootloader1* : 6.0.0.0 [41019]
          Bootloader2  : NA
          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```
      E 1 Reply Last reply Reply Quote 0
      • E Offline
        Elizar @svonbentzel
        last edited by

        @svonbentzel Did you setup the AP?
        Something like 'AT+CGDCONT=1,"IP","internet.nbiot.telekom.de"' ?

        S 1 Reply Last reply Reply Quote 0
        • S Offline
          svonbentzel @Elizar
          last edited by

          @Elizar Hello, Yes I think ;)

          from network import LTE
          import time
          
          lte = LTE()
          lte.attach(band=8, apn="iot.1nce.net")
          while not lte.isattached():
              time.sleep(0.5)
              print(".", end="")
          
          print("\nAttached!")
          
          print(lte.send_at_cmd("AT+CSQ"))
          
          lte.connect()       # start a data session and obtain an IP address
          while not lte.isconnected():
              time.sleep(0.5)
              print("-", end="")
          
          print("Connected!")
          
          

          Second Script:

          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="iot.1nce.net")
          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="8.8.8.8"', 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...')
          
          
          
          # Shutdown LTE
          print("Disonnecting LTE ... ")
          lte.disconnect()
          print("Detaching LTE ... ")
          lte.dettach()
          print("Shuttting down LTE...")
          lte.deinit()
          
          robert-hhR V 2 Replies Last reply Reply Quote 0
          • robert-hhR Offline
            robert-hh @svonbentzel
            last edited by robert-hh

            @svonbentzel The first script is the one I uss too for testing and it works. Only I have a different firmware version:
            Pycom MicroPython 1.20.0.rc10 [3911a85-dirty] on 2019-04-17; FiPy with ESP32
            Edit: updated to:
            Pycom MicroPython 1.20.0.rc11 [55accd1-dirty] on 2019-05-24; FiPy with ESP32, same good state.

            1 Reply Last reply Reply Quote 0
            • V Offline
              v2h @svonbentzel
              last edited by v2h

              This post is deleted!
              1 Reply Last reply Reply Quote 0

              Hello! It looks like you're interested in this conversation, but you don't have an account yet.

              Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

              With your input, this post could be even better 💗

              Register Login
              • 1 / 1
              • First post
                Last post

              Pycom on Twitter

              Pycom