How to get FiPy working on KPN LTE-M network?

  • Could someone please post a working example of how to get a FiPy operational on the KPN LTE-M network in the Netherlands? There are some scattered messages in these forums and in the KPN forums, some people seem to have it working but a complete, always working, example is nowhere to be found. Too bad as FiPy is around for quite some time now (as is the KPN LTE-M network). Information over what should be an entirely trivial operation appears to be non-existent.
    For that matter, please use the latest firmware and modem firmware (41065 at time of writing).

    Thanks in advance!

  • @avbalen
    It works when you update your sqn3330 to version CATM1 41056.

  • Hi avbalen,

    I am also struggling with connecting my FiPy to the kpn network but I make some progress.
    The firmware i use is 1.20.rc13 with the pycom firmware updater version 1.16.1.
    The version of the Pymakr plugin is 1.5.6.

    import socket
    import pycom
    import ssl
    import time
    from network import LTE
    # Colors
    off = 0x000000
    red = 0xff0000
    green = 0x00ff00
    blue = 0x0000ff
    yellow = 0xffff00
    # Turn off hearbeat LED
    lte = LTE()
    #set the apn
    lte.send_at_cmd('AT+CFUN=0') # disable modem
    lte.send_at_cmd('AT!="clearscanconfig"') # clear scanned frequencies
    lte.send_at_cmd('AT!="addscanfreq band=20 dl-earfcn=6400"') # set scanned frequency
    lte.send_at_cmd('AT+CFUN=1') # enable modem
    # wait for the attach flag to set and use the connect call
    # the modem will auto connect from the previous call regardless but still need to call this otherwise the unit does not know it's connected
    while not lte.isattached():
        print("not attached")
    while not lte.isconnected():
        print("not connected")
    s = socket.socket()
    s = ssl.wrap_socket(s)
    s.connect(socket.getaddrinfo('', 443)[0][-1])
    s.send(b"GET / HTTP/1.0\r\n\r\n")

    With the above printed code the FiPy attached to the KPN Nenetwork. I can see that in the Jasper Wireless portal.
    The green dot shows that the sim is in use.

    But by the part that the FiPy should connect to the network I got stuck
    The rgb led flash one time red and the serial terminal keeps printing "not connected".

    Maybe you know a trick to get further with the code so it will work well.

Log in to reply

Pycom on Twitter