No SoftAP in STATIONAP_MODE on missing AP?

Started by meinereiner, December 28, 2016, 03:26:57 PM

Previous topic - Next topic

meinereiner

Hi,

I have a behaviour where I was wondering if someone of you already found a solution for:

I'm using the default images of https://github.com/OLIMEX/olimex-iot-firmware-esp8266 and set up to use STATIONAP_MODE (so both modes).

  • When I'm setting up the params to my router AP properly everything is OK, I can access it still via the direct Wifi connection (SoftAP)
  • When I'm setting up the params to my router with a wrong password, still OK like described before
    [REMARK: there seen to bug in the JavaScript acpplication at http://iot.olimex.com/direct/; it seems to cut off the password of the Station settings after 16 digits; a direct POST to the device is working]
  • When I'm setting up the params to an AP which does not exist, the SoftAP it is down and I cannot access it directly anymore

In the last case I end up in an endless loop:
scandone
no NonExistingAp found, reconnect after 1s
WiFi Scan: Auto Detect...
reconnect


Is there any workaround that can be implemented?
Once the device is an area that doesn't see the AP anymore it cannot even get reconfigured. Then it must be newly flashed via serial connection. Then it can be configured again...

PeteW

If you are using ESP8266-EVB or ESP8266-EVB-BAT press and hold the button (this sets GPIO0 to GND) for more than 5 seconds to reset to default settings.

I will investigate the password trim and SoftAP issues.

PeteW

The bug in http://iot.olimex.com/direct/ with long-digits-only password is confirmed and now fixed. You may need (if not automatically updated) to clear your browser's cache and application cache so the fix can take effect.

However I did not manage to reproduce NonExistingAP issue. I did the tests on ESP8266-EVB and ESP8266-EVB-BAT boards with two different images


The loop...

scandone
no NonExistingAp found, reconnect after 1s
WiFi Scan: Auto Detect...
reconnect

...is normal and did not affect direct connection to SoftAP in my tests.

For direct connection tests I'm using laptop with Windows 10. When the station is configured to connect to NonExistingAP it takes a bit longer to establish direct SoftAP connection but I have no issues you describe.

What board and exact which image from GitHub are you using?

meinereiner

I think the issue is related to my Ubuntu (1604 LTS).
I think it is timing out faster that it can reconnect to the module ...

PeteW

Try to configure connection to SoftAP with manual IP address. From my observations it looks like getting lease from SoftAP is the step is that slows down connection establishment.

Default SoftAP address is 192.168.4.1 and DHCP is configured to lease addresses from 192.168.4.2 to 192.168.4.200 so set your address to 192.168.4.201.

meinereiner

That's a good trick! I also recognized with my Ubuntu (compared to Win10) that a normal reconnect till I have a successfull request is much slower.
So I assume it's more an OS issue ...

Thanks again fr your help!

BTW related to the other issue: Is the content of iot.olimex.com/direct/ anywhere hosted on Github to see what changes have been made?

PeteW