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 ofprint(lte.send_at_cmd('AT!="fsm"'))
I find that RRC_TOP_FSM goes from
CAMPED ->SCANNING(WAIT_RSSI)->SCANNING(WAIT_CELL_ID)->SYNCING(WAIT_SYNC)->SYNCING(WAIT_SCAN_DELAY)->SYNCING(WAIT_SYNC)->CAMPED
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!
-
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() lte.init() #some carriers have special requirements, check print(lte.send_at_cmd("AT+SQNCTM=?")) to see if your carrier is listed. #when using verizon, use #lte.init(carrier=verizon) #when usint AT&T use, #lte.init(carrier=at&t) #some carriers do not require an APN #also, check the band settings with your carrier lte.attach(band=20, apn="pycom.io") print("attaching..",end='') while not lte.isattached() time.delay(0.25) print('.',end='') print(lte.send_at_cmd('AT!="fsm"')) # get the System FSM print("attached!") lte.connect() print("connecting [##",end='') while not lte.isconnected(): time.sleep(0.25) print('#',end='') #print(lte.send_at_cmd('AT!="showphy"')) print(lte.send_at_cmd('AT!="fsm"')) print("] connected!") print(socket.getaddrinfo('pycom.io', 80)) lte.deinit() #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, '', ('18.195.176.111', 80))] >>> socket.dnsserver() ('172.31.16.100', '172.31.32.100') >>>
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....