Invalid: Obscure wlan scan bug?



  • I'm facing obscure wlan bug. After deinit'ing the wlan, subsequently init'ing it and performing a scan, I rarely do find the wlan's I'd expect. This was not a problem when I did not deinit the wlan at all.

    This does cause the problem:

    form network import WLAN
    wlan = WLAN()
    wlan.deinit()
    wlan.init(mode=WLAN.STA)
    wlan.scan()
    

    There is an unresolved issue which might be related:
    https://github.com/espressif/arduino-esp32/issues/242

    Is anybody aware of similar issue? Is there a workaround?



  • @seb

    here you are:
    (sysname='LoPy', nodename='LoPy', release='1.15.0.b1', version='v1.8.6-849-baa8c33 on 2018-01-29', machine='LoPy with ESP32', lorawan='1.0.0')

    Forget about my code above. I thought this is the problem but it's not. Actually my board freezes when doing wlan operations. However I'm not able to reproduce with a minimum example...

    Just forget about it. I'll report back once I have a minimum example which shows the issue ...

    Sorry for bothering ...



  • @this-wiederkehr said in Obscure wlan scan bug?:

    wlan.init(mode=WLAN.STA)
    wlan.scan()

    Hi,

    What device and what firmware version are you running? You can check by running the following:

    import os
    print(os.uname())
    

    When I ran the following code on a LoPy with the latest firmware, this worked as expected:

    from network import WLAN
    wlan = WLAN(mode=WLAN.STA)
    print(wlan.scan())
    wlan.deinit()
    wlan.init(mode=WLAN.STA)
    print('===================')
    print(wlan.scan())
    

 

Hello World?

Pylife on Kickstarter - November 2018








Back Us On Kickstarter >

Pycom on Twitter