FiPy and NB-IoT with new Pycom/Vodafone SIM

  • I have one of the new Sims. I have updated both the main firmware and the sequans firmware to the latest versions (sequans NB-IoT code). I have registered the sim in PyBytes and I think it all looks alive and good. The following code appears to suggest that the basic connectivity is there, but I get the following error .. can anyone help? It does look like that attach and connect are working!

    >>> Running selected lines
    Apparently attached
    Apparently connected
    Traceback (most recent call last):
      File "<stdin>", line 18, in <module>
    OSError: [Errno 113] ECONNABORTED

    The code is ..

    import socket
    import ssl
    import time
    from network import LTE
    lte = LTE()         # instantiate the LTE object
    lte.attach(band=20, apn="")        # attach the cellular modem to a base station
    while not lte.isattached():
    print ("Apparently attached")    
    lte.connect()       # start a data session and obtain an IP address
    while not lte.isconnected():
    print("Apparently connected")
    s = socket.socket()
    # s = ssl.wrap_socket(s)
    s.connect(socket.getaddrinfo('', 80)[0][-1])
    s.send(b"GET / HTTP/1.0\r\n\r\n")

    The OSError is on line 18 which is the

    s.send(b"GET / HTTP/1.0\r\n\r\n")

Log in to reply

Pycom on Twitter