NBIoT and FiPy



  • 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



  • @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()
    


  • @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!



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



  • @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 :-)



  • @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.



  • @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!



  • @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/



  • @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



  • @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?



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



  • @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



  • @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.



  • @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.



  • @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



  • @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



  • This post is deleted!


  • 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/


Log in to reply
 

Pycom on Twitter