Using Pybytes with FiPy, NB-IoT and Vodafone Sim from GoInvent London event

  • There was mention that the sim included with the FiPy was of limited connectivity due to the way the apn has been setup and that it was possible to use it with Pybytes with some fiddling somehow. The details for this were not shared, presumably because we ran out of time and the NB-IoT service wan't 100% available at the time and in that particular location.

    I now have the FiPy NB-IoT working a lot better from where I am now and would like to be able to access data that is being sent otherwise it's not going to be useful at all. I know there are others interested in achieving this.



  • @hayesey I am looking for a SIM card NB-IoT enabled in the UK. Could you let me know how you get your SIM card, or where I can find one please?

  • This post is deleted!

  • I have got it working this evening, the code I used is here, it's basically the pybytes getting started example with a couple of lines added to tell it to use LTE. Add to pybytes as a "wifi" device and update to the latest pybytes firmware using the pycom firmware uploader. Firmware version I'm using is: 1.18.2.r6.

    # Import what is necessary to create a thread
    import _thread
    from time import sleep
    # Increment index used to scan each point from vector sensors_data
    def inc(index, vector):
        if index < len(vector)-1:
            return index+1
            return 0
    # Define your thread's behaviour, here it's a loop sending sensors data every 5 seconds
    def send_env_data():
        idx = 0
        sensors_data = [0, -0.2, -0.5, -0.7, -0.8, -0.9, -0.9, -0.9, -0.8, -0.6, -0.4, -0.2, 0, 0.3, 0.5, 0.7, 0.8, 0.9, 0.9, 0.9, 0.8, 0.6, 0.4, 0.1]
        while True:
            # send one element from array `sensors_data` as signal 1
            pybytes.send_signal(1, sensors_data[idx])
            idx = inc(idx, sensors_data)
    pybytes.set_config('lte', { "band": 20, "apn": "ep.inetd.gdsp", "reset": True})
    pybytes.set_config('network_preferences', ["lte"])
    import pycom
    pycom.nvs_set('pybytes_debug', 1)
    # Start your thread
    _thread.start_new_thread(send_env_data, ())

    There's a couple of extra lines of debug which can probably be removed.

    Once uploaded, I saw the connection in the pymakr window:

    Screenshot 2019-07-21 at 21.54.11.png

    and in pybytes:


Pycom on Twitter