WiFi stable at home network, unstable at work network



  • Hi

    I've recently experienced some problems with a unstable wifi connection, and managed to narrow down on the issue.

    When I run the code (connect to wifi, mqtt server and publish) on my home network I have no stability issues, however, when I am connected to the quest network at my workplace I experience instability.

    Wifi setup:

    from network import WLAN
    
    wlan = WLAN(mode=WLAN.STA)
    wlan.connect("my-wifi-name", auth=(WLAN.WPA2, "my-wifi-pw"), timeout=5000)
    

    Below is a graph showing ping response (pinged every x seconds), where the broken lines illustrate a time out.
    758be7eb-2393-4787-8cb3-c00255ab7303-image.png

    I'm clueless; anyone else experienced similar issues, do I have to setup the wifi connection different on a workspace network (which is usually more secure)?

    Thanks.



  • I have encountered similar problems with a Wipy connecting to MQTT broker. Connection was perfect at my home office in a rural setting, however, not so good when tested at a bay in an industrial area. The signal was good at -40 but neighbours were transmitting on same channel with hidden SSID. The noise floor exceeded my signal. A spectrum analyzer would be helpful or even an app on your mobile could help track the problem down. You may only need to change the channel on your router. In my case not a Wipy problem.



  • @jcaron if I remember correctly I get values between -30 and -60 depending if I use external or internal antenna.

    The office building is located in a small village, and my home network is like ~500 m away. We also have a pycom device (WiPy) inside a mountain (power plant), with limited 2.4 GHz traffic, experiencing the same problem (connected to the same guest network).

    I have not tested another device that uses only the 2.4 GHz band yet, but can test tommorow and see.



  • @Asb if you use WLAN.scan(), what kind of RSSI are you seeing for that network?

    Also, is the radio environment very busy (office building in the middle of a city with lots of people streaming all day over WiFi, for instance)? The 2.4 GHz band tends to be very very crowded in some areas, and the ESP32 only supports that band, which could explain bad performance and packet loss.

    What kind of performance are you seeing on other devices using only the 2.4 GHz band in the same place?


Log in to reply
 

Pycom on Twitter