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

    NBIoT and FiPy

    Scheduled Pinned Locked Moved FiPy
    18 Posts 4 Posters 275 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.
    • P Offline
      patmolloy
      last edited by

      Hi, I am going to attempt to connect a fipy to Vodafone NBIoT with a SIM provided by Arkessa (who are a Virtual MNO who sit on top of Vodafone). Arkessa have their own APN with a username and password.

      I want to be sure that the device has all of the latest firmware, including the sequans modem.

      Can anyone point me at detailed (idiot proof!) instructions for this.

      On this APN point, is it possible to alter the APN and provide a username and password? Are there example scripts anywhere?

      Thanks

      Pat

      1 Reply Last reply Reply Quote 0
      • N Offline
        nftylitak
        last edited by

        Hello @patmolloy

        Do you know the authentication type Arkessa uses? It is either "PAP" or "CHAP".

        In any case, may be the following snippet could help you.
        I have not tested the username/password because i do not have a SIM card which requires authentication, though if you give it a try and post the results back, I could assist you.

        import time
        from network import LTE
        
        carrierAPN = "<the_apn>"
        username = "<the_username>"
        password = "<the_password>"
        
        lte = LTE()
        lte.init()
        
        # for PAP authentication
        lte.send_at_cmd('AT+CGAUTH=1,1,"' + username + '","' + password + '"')
        
        # for CHAP authentication
        #lte.send_at_cmd('AT+CGAUTH=1,2,"' + username + '","' + password + '"')
        
        lte.attach(apn=carrierAPN)
        
        while not lte.isattached():
            time.sleep(0.5)
            print('Attaching...')
        
        lte.connect(cid=1)
        while not lte.isconnected():
            time.sleep(0.5)
            print('Connecting...')
        
        print("LTE connected: " + str(lte.isconnected()))
        

        Regarding the firmware update, all I can suggest is to point you to the firmware update instructions. https://docs.pycom.io/gettingstarted/installation/firmwaretool/

        P 2 Replies Last reply Reply Quote 0
        • P Offline
          patmolloy
          last edited by

          This post is deleted!
          1 Reply Last reply Reply Quote 0
          • P Offline
            patmolloy @nftylitak
            last edited by

            @nftylitak Thanks a million. They use PAP. And thanks for the firmware link .. I remember having to update the sequans modem firmware last year at a Digital Catapult (where I now work) event and I remember it being painful!

            I'll report back here and may well take you up on the SIM thing If I get nowhere (very possible!)

            Pat

            1 Reply Last reply Reply Quote 0
            • P Offline
              patmolloy @nftylitak
              last edited by

              @nftylitak Just to follow up - it does not work. I have entered the correct values

              APN = arkessalp.com
              U: arkessa
              P: arkessa

              PAP

              It gets stuck at lte.isattached() and just loops for ever.

              Arkessa is a virtual MNO providing (in this case) SIMS for the VodaFone NBIoT service.

              I am convinced that I am in coverage of VodaFone NBIoT as I have a working Vodafone NB-IoT and LTE-M Internet of Things Starter Kit from SODAQ which shipped with a Dutch VodaFone SIM (and that SIM is working and I am getting data and a nice updated dashboard).

              So .. either the code does not work, the PyCom device is not working right (there is a thread about the sequans modem by default only supporting CAT M1) or the SIM is not working. Or any combination!

              I updated the FpPy firmware, but this is not the modem firmware ..

              Sigh, This is really way too hard :-O

              N 1 Reply Last reply Reply Quote 0
              • N Offline
                nftylitak @patmolloy
                last edited by

                @patmolloy since you mentioned it, indeed there is the following specific note in the pycom documentation:

                As shipped, Pycom modules only support CAT-M1, in order to use NB-IoT you need to flash a different firmware to the Sequans modem. Instructions for this can be found here.
                

                So you need to flash new modem firmware for NB-IoT.

                Also, since you know that the Vodafone SIM card is working with SODAQ board (Ublox SARA modem), then your should use that same card initialy witht the FiPy, at least till you make it work.

                A P robert-hhR 5 Replies Last reply Reply Quote 0
                • A Offline
                  agotsis @nftylitak
                  last edited by

                  @patmolloy You can check the installed sequans modem firmware version by running:

                  import sqnsupgrade
                  sqnsupgrade.info()
                  

                  As an example in my NB1 module I get:

                  <<< Welcome to the SQN3330 firmware updater [1.2.6] >>>
                  >>> GPy with firmware version 1.20.0.rc13
                  Your modem is in application mode. Here is the current version:
                  UE6.0.0.0
                  LR6.0.0.0-41019
                  

                  If I am not mistaken when you use in the LR a 6.x indication this means that the fw is NB-IoT.
                  But to be 100% sure you can update it quite easily.

                  1 Reply Last reply Reply Quote 0
                  • P Offline
                    patmolloy @nftylitak
                    last edited by

                    @nftylitak Thanks so much. I had not found any of those instructions or web pages, so you are a complete saviour. I am clearly running the wrong firmware .. so will have a shot at reflashing!!

                    Thanks a million.

                    Pat

                    1 Reply Last reply Reply Quote 0
                    • P Offline
                      patmolloy @nftylitak
                      last edited by

                      @nftylitak Yes, I'll try the known working SIM first :-)

                      P 1 Reply Last reply Reply Quote 0
                      • P Offline
                        patmolloy @nftylitak
                        last edited by

                        @nftylitak So, went in search of the latest firmware and ended up here https://software.pycom.io/downloads/sequans2.html but it wants username and password! I've pinged pycom support, but wondered if anyone here knows?

                        N 1 Reply Last reply Reply Quote 0
                        • N Offline
                          nftylitak @patmolloy
                          last edited by

                          @patmolloy indeed it requires login/password

                          user: pycom
                          password: FDhd>$57#hr;zDFE

                          https://forum.pycom.io/topic/4020/firmware-files-for-sequans-lte-modem-now-are-secured

                          1 Reply Last reply Reply Quote 1
                          • robert-hhR Offline
                            robert-hh @nftylitak
                            last edited by robert-hh

                            @patmolloy The password is here: https://forum.pycom.io/topic/4020/firmware-files-for-sequans-lte-modem-now-are-secured
                            Well buried in the forum.
                            If you need older versions: there is a collection here: http://stiny.webd.pl/PYCOM/

                            1 Reply Last reply Reply Quote 1
                            • P Offline
                              patmolloy @patmolloy
                              last edited by patmolloy

                              @nftylitak progress .. seems I have the right firmware now ..

                              >>> import sqnsupgrade
                              >>> sqnsupgrade.info()
                              <<< Welcome to the SQN3330 firmware updater [1.2.6] >>>
                              >>> FiPy with firmware version 1.20.2.rc7
                              Your modem is in application mode. Here is the current version:
                              UE6.0.0.0
                              LR6.0.0.0-41019
                              
                              IMEI: 354346095736764
                              >>>
                              

                              And with the known working VodaFone SIM (which of course I had to cut from micro to nano!) I can also get a connection .. have to modify the lte.attach command to ..

                              lte.attach(apn="nb.inetd.gdsp")
                              

                              This works most of the time. Once in a while when running this script the device disconnects from the PC and immediately reconnects (I get the windows chimes).

                              I thought I'd push it and add ..

                              import socket
                              import ssl
                              s = socket.socket() 
                              s = ssl.wrap_socket(s)
                              s.connect(socket.getaddrinfo('www.google.com', 443)[0][-1])
                              s.send(b"GET / HTTP/1.0\r\n\r\n")
                              print(s.recv(4096))
                              s.close()
                              

                              but this never works .. I always get the disconnect/reconnect thing ...

                              correction .. this time I got

                              [OSError: [Errno 113] ECONNABORTED]
                              

                              on the s.send line ...
                              So definite progress! Thanks for all the help!

                              A 1 Reply Last reply Reply Quote 0
                              • A Offline
                                agotsis @patmolloy
                                last edited by

                                @patmolloy said in NBIoT and FiPy:

                                . Once in a while when running this script the device disconnects from the PC and immediately reconnects (I get the windows chimes).

                                @patmolloy I am also seeing frequent interrupts in the communication with FiPy when using an Expansion Board. Did you connect the expansion board directly to a USB port of your laptop/desktop? From my experience, I've noticed that there seem to be some power issues, so I prefer to connect it to my host PC through an externally powered USB switch/hub. Ideally you could use a LiPo and get access through a USB-to-serial cable using Pycom's UART pins.

                                P 1 Reply Last reply Reply Quote 0
                                • P Offline
                                  patmolloy @agotsis
                                  last edited by

                                  @agotsis actually noticed this too - I am on a powered hub too, but the device is at the end of a long USB extension lead so I can hang it out of a window, as I seem unable to get a signal inside! I am using the expansion board. I see that RTS/CTS have to be disabled on the headers, which had not noticed before, but this makes no difference. I'll try the LiPo route today ..

                                  Bit perplexed why the socket code does not work.

                                  I am going to try the Arkessa SIM now .. that would be great if I can make it work.

                                  Cannot tell you how much I appreciate all of your help! Thanks :-)

                                  A 1 Reply Last reply Reply Quote 0
                                  • A Offline
                                    agotsis @patmolloy
                                    last edited by

                                    @patmolloy After attaching to the network and before issuing the socket code did you issue an lte.connect() command?

                                    P 1 Reply Last reply Reply Quote 0
                                    • P Offline
                                      patmolloy @agotsis
                                      last edited by

                                      @agotsis said in NBIoT and FiPy:

                                      @patmolloy After attaching to the network and before issuing the socket code did you issue an lte.connect() command?

                                      Yes, indeed!

                                      A 1 Reply Last reply Reply Quote 0
                                      • A Offline
                                        agotsis @patmolloy
                                        last edited by

                                        @patmolloy I can't reproduce right now the problem into my FiPy, because my MNO only supports IPv6, but you can do another check to see if you really have a data connection:
                                        If you have access to a Public Server and you can setup a UDP listener then you can try to send a UDP packet as follows, and see if reaches the destination:

                                        import socket
                                        s=socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
                                        s.sendto(b'hello', ('<IP address>', <UDP Port>))
                                        time.sleep(3)
                                        s.close()
                                        
                                        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