These are chat archives for esp8266/Arduino

27th
Oct 2017
Steve Nelson
@zenmanenergy
Oct 27 2017 17:03
Has anyone had the problem with WiFi.softap() where it partially connects? It is firing the WiFi.onSoftAPModeStationConnected() event, but doesn't seem to give my laptop a local ip address.
Develo
@devyte
Oct 27 2017 18:32
@zenmanenergy which wifi mode? Which core version?
Steve Nelson
@zenmanenergy
Oct 27 2017 18:48
2.4 rc2 WiFi.mode(WIFI_AP_STA);
Develo
@devyte
Oct 27 2017 19:55
In that case the sta side will be attempting to connect to some your router on the router's channel. Meanwhile, the ap side may be serving on a different channel. While the sta is trying to connect, the ap gets dragged along, because there is only a single radio shared between the two. Your client connected to the ap will see the ap drop out because of the channel swapping. In that case, if the ap dhcp server is sending the reply during the channel swapping, the client may never receive itm
Figure out the router's channel, set the ap to the same channel, check if the dhcp works then
Also, implement a timeout for the sta's attempts to connect
I.e.: after 10 failed attempts, disconnect and stop trying
Steve Nelson
@zenmanenergy
Oct 27 2017 20:24
@devyte do you think just switching it to either ap mode or sta mode by itself will resolve it?
I guess i don't really need it to be both. I was just doing that to enter the settings.
mikekgr
@mikekgr
Oct 27 2017 21:29
hello there!
Is there any good how to, in order to get direct port bit access/manipulation in the ESP8266, in the sense that Atmega does?
Develo
@devyte
Oct 27 2017 22:05
@zenmanenergy I suggest testing ap-only, and see if the dhcp works correctly. The wifimanager does one or the other: it tries sta, if that fails it stops trying and brings up the ap. Me, I'm doing stationap mode with the ap on the same channel as the router that the sta tries to connect to.
Martin Ayotte
@martinayotte
Oct 27 2017 22:06
@mikekgr Check the file ~/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/cores/esp8266/core_esp8266_wiring_digital.c