pybytes wifi connection issue
-
Hello,
I'm trying to get the pybytes firmware running with either our company test wifi or my LTE routers wifi. But I have problems with mqtt packets send by the pybytes module. Atleast on some networks. For example: If I open an hotspot from my smartphone, my lopy connects to pybytes platform no problem. But none of my other networks seem to work. On both internet and DNS seem to work fine.
I'm running pybytes Firmware version 1.18.2.r6.
When I build a wlan connection like that:
from network import WLAN wlan = WLAN() wlan.init(mode=WLAN.S) wlan.init(mode=WLAN.STA) wlan.ifconfig(config='dhcp') wlan.connect('fitlet-subu', auth=(WLAN.WPA2, '...')) print(wlan.ifconfig()) # output ('10.42.0.135', '255.255.255.0', '10.42.0.1', '10.42.0.1')It works like expected. But when I try to connect the pybytes firmware (either with pybytes_autostart set on True or manully by calling pybytes.connect_wlan() ) I only get this Error (pybytes_debug set to 6):
Unknown error while connecting to MQTT server [Errno 113] EHOSTUNREACH{'wifi': {'ssid': 'fitlet-subu', 'password': ''}, 'pybytes_autostart': False, 'username': '[...]', 'server': 'mqtt.pybytes.pycom.io', 'cfg_msg': 'Pybytes configuration read from /flash/pybytes_config.json', 'ssl': False, 'device_id': '[...]', 'network_preferences': ['wifi'], 'dump_ca': False, 'wlan_antenna': 0, 'ota_server': {'port': 443, 'domain': 'software.pycom.io'}}[censored some values with [...] ]
I have full controll over the network in my LTE router, is there some wifi config needed, that I might have forgotten?
Also I couldn't find a documentation for the pybytes module. Is there something that explains the methodes and there arguments (like pybytes.send_custom_message() ).
Thanks in advance.
Robert
-
Ok sorry, It's been dealt with. I found the problem already. Our firewall was blocking requests going out and I connected the LTE router to our network to save bandwidth.
After opening the outgoing firewall ports it works. Whoops.
-
@robi90 said in pybytes wifi connection issue:
Also I couldn't find a documentation for the pybytes module. Is there something that explains the methodes and there arguments (like pybytes.send_custom_message() ).
Thanks in advance.
Robert
Although I'm still wondering, if there is a documentation for pybytes functions.
-
Hi @robi90
that's good that you resolved your problems. At this time we recommend just to use
pybytes.send_signalmethod for sending data to Pybytes.Currently, we haven't documented pybytes-library yet. But it's opensource, so you can take a look at the other functions: https://github.com/pycom/pycom-micropython-sigfox/blob/pybytes-master/esp32/frozen/Base/_pybytes.py
The whole library is in the Base folder:
https://github.com/pycom/pycom-micropython-sigfox/tree/pybytes-master/esp32/frozen/Base -
@jirkakrepl Thanks for the info.
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