New LTE Firmware releases v1.18.1.r4 (stable) & 1.19.0.b5 (development) & NB-IoT firmware 40343
-
Hi @iwahdan. Thank you for excelent analysis. I will perform recommended modifications and also long-term tests.
I believe that this issue is not related to issues you are describing in this post?
https://forum.pycom.io/topic/3985/new-lte-firmware-releases-v1-18-1-r4-stable-1-19-0-b5-development-nb-iot-firmware-40343/39 -
@danielm Thanks, No the problem I mentioned in that post is because the ssl handshake does not timeout, which I think is not what happens in your case.
-
@iwahdan
Is it possible to fix the ssl handshake not timing out?
What about socket.connect() timeout workaround implementation?Due to nature of network communication any socket operation may fail but it should never hang if timeout is set. Otherwise it will not be possible to develop reliable applications.
-
Hi @danielm, I am investigating the handshake problem, and for a the
socket.connecttimeout I think it is possible to have a workaround in the Micropython, but it would need proper design to ensure a robust implementation .I've already created an internal ticket for it.
-
@iwahdan
Great, please let me know if you need help with testing. -
@tlanier
The bug I was experiencing was caused by my inexperience using Python. I was allocating a new WLAN object every time I ran the code without destroying the old object.Here is a listing of my new wifi.py module that fixes my problem. I'm sorry if I've caused anyone to lose confidence in the GPy or spend time looking for bugs that did not exist.
from network import WLAN from util import log import utime wlan = None def connect(): global wlan if (wlan != None): if wlan.isconnected(): print('Already connected') return wlan = WLAN(mode=WLAN.STA) while True: # scan for WIFI access points nets = wlan.scan() print(nets) for net in nets: if (net.ssid == 'NURSEX'): print('NURSEX WIFI found') # wlan.connect(net.ssid, auth=(net.sec, 'password'), timeout=5000) wlan.connect(net.ssid, auth=(net.sec, 'password')) while not wlan.isconnected(): utime.sleep_ms(1000) print('WLAN connection succeeded!') return utime.sleep_ms(1000) def disconnect(): global wlan if (wlan != None): wlan.disconnect() wlan = None``` -
@tlanier No problem!, thanks for letting us know
-
@iwahdan
Are there any news regarding solution for known socket issues? -
@danielm what socket issues are you referring too?
-
@wghirakawa
The issue is that socket.connect() and SSL handshake will not timeout also in case the socket timeout is set and hang the application forever.
https://forum.pycom.io/topic/3985/new-lte-firmware-releases-v1-18-1-r4-stable-1-19-0-b5-development-nb-iot-firmware-40343/45
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login