Vodafone SIM in Spain not working [solved, wrong DNS sever]

  • Hi all,
    I am sorry to bother again, but I am stuck with LTE. I am trying to get going with the Vodafone SIM in my FiPy in Spain. I first activated the SIM in pybytes and then used the provisioning process hoping Pybytes would just start the connection. The process hangs during "attach". I then used the script as found at https://docs.pycom.io/tutorials/networks/lte/ which gives more details about the state and looking at the output of print(lte.send_at_cmd('AT!="fsm"')) I find that RRC_TOP_FSM goes from
    This happens again and again. The tutorial says "If the system returns multiple times from SYNCING to CAMPED, check the network availability, simcard placement and / or the firmware version". I checked simcard placement and firmware version is the latest (1.20.2.r1). So no network availability? The FAQ about the Vodafone SIM says "ok" for Spain.

    Any help greatly appreciated!

  • GREAT!! Thanks a lot, it is working!

  • Global Moderator

    Are you able to make a manual LTE connection using the LTE module like so:

    from network import LTE
    import time
    import socket
    lte = LTE()
    #some carriers have special requirements, check print(lte.send_at_cmd("AT+SQNCTM=?")) to see if your carrier is listed.
    #when using verizon, use 
    #when usint AT&T use, 
    #some carriers do not require an APN
    #also, check the band settings with your carrier
    lte.attach(band=20, apn="pycom.io") 
    while not lte.isattached()
        print(lte.send_at_cmd('AT!="fsm"'))         # get the System FSM
    print("connecting [##",end='')
    while not lte.isconnected():
    print("] connected!")
    print(socket.getaddrinfo('pycom.io', 80))  
    #now we can safely machine.deepsleep()

    Let me know!
    (btw, I think this topic could be related to the issue you are having: https://forum.pycom.io/topic/6350/error-while-connecting-pybytes-with-lte), we solved it in the end by using:

    >>> lte.connect()
    >>> import socket
    >>> socket.getaddrinfo('www.pycom.io', 80)
    [(2, 1, 0, '', ('', 80))]
    >>> socket.dnsserver()
    ('', '')

    Before enabling pybytes

    from _pybytes import Pybytes

  • OK, so I got a few steps further. The FiPy comes with a CAT-M1 LTE firmware and the Vodafone card needs the NB-IoT firmware (see https://docs.pycom.io/updatefirmware/ltemodem/). It would have been nice to include this in the docs for the Vodafone cards (https://docs.pycom.io/cellularservices/vodafone/) it has taken me quite some time to it find out. I now have provisioned pybytes with the new network settings, and LTE connects, but I don't seem to get a pybytes connection:

    Attempting to connect with network lte
    Initialized watchdog for WiFi and LTE connection with timeout 1260000 ms
    LTE init(carrier=None, cid=1)
    LTE attach(band=20, apn=pycom.io, type=IP)
    LTE connect()
    LTE is_connected()
    LTE connection established
    connect_lte with start_mqtt is now removed please call communication_protocol or start_mqtt directly
    MQTT Protocol
    Socket create error: [Errno 202] EAI_FAIL
    This is PybytesProtocol.start_MQTT
    Socket send error [Errno 128] ENOTCONN
    Socket create error: [Errno 202] EAI_FAIL
    Socket create error: [Errno 202] EAI_FAIL
    Socket create error: [Errno 202] EAI_FAIL
    Connected to MQTT mqtt.pybytes.pycom.io
    Pybytes connected successfully (using the built-in pybytes library)
    This is pack_info_message()
    __pack_message: b'310504a00581000000'
    MQTT Protocol
    Socket create error: [Errno 202] EAI_FAIL
    Socket create error: [Errno 202] EAI_FAIL
    Socket create error: [Errno 202] EAI_FAIL

    The last message repeats and repeats. My LTE config is

    'lte': {'apn': 'pycom.io', 'cid': 1, 'reset': False, 'carrier': 'standard', 'band': 20, 'type': 'IP'}

    Not sure where to go now....

Log in to reply

Pycom on Twitter