Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
kathir51
@kathir51
@Links2004 thanks but I included all osapi.h and ets_sys.h in my project Still i cannot succedd
Markus
@Links2004
yes the prototypes are not created/missing. espressif has them only written in the SDK documentation but not in the SDK source code if you want to use them you need to create the prototypes based on the SDK documentation.
2C-ESP8266__SDK__Programming Guide__EN_v1.3.0.pdf
Markus
@Links2004
example:
extern void ets_delay_us(uint16_t us);
kathir51
@kathir51
@Links2004 thanks yes nice help . thanking you very much
kathir51
@kathir51
@Links2004 where i can find such declaration ? i searched in ets_sys.h
Markus
@Links2004
they not existing, that is you problem :)
  1. search in the SDK doc the function
  2. read the docu for it
  3. create the prototype for the function in ets_sys.h
  4. test/use the function
  5. make a pull request ;)
Þórhallur Sverrisson
@thorhs
Hi All, I'm trying to diagnose why my wifi disconnects after 5 minutes and am trying to log output in the ESP8266WiFiClass::_eventCallback function. I'm trying to use the ets_printf function to log the reason to my serial, but I'm not getting any output.
I'm wondering if there is some other better way to log to serial from the .cpp code, or if there are some tricks to getting ets_printf to work.
Or, maybe, the callback isn't called ;)
Markus
@Links2004
have you used Serial.setDebugOutput(true); ?
Þórhallur Sverrisson
@thorhs
Nope :) I'll try that now
Þórhallur Sverrisson
@thorhs
That did the trick, I see now that the reason for my 5 minute disconnects is REASON_ASSOC_EXPIRE
Markus
@Links2004
unfortunately espressif not release a documentation of the deeper meaning of all the "reasons".
may its linked to the key rotation of WPA/WPA2. can you configure the rotation time in your router?
Þórhallur Sverrisson
@thorhs
I am communicating with a softAP on another ESP, the only two devices on the network.
I tought it might be they key rotation, so I just tried to have no encryption, and get the same behaviour
state: 5 -> 2 (4a0) rm 0 pm close 7 0 0/301997886 wifi evt: 1
grrr….
state: 5 -> 2 (4a0)
rm 0
pm close 7 0 0/301997886
wifi evt: 1
This is sent on the serial with debug output enabled when I drop the connection, if that rings any bells
Markus
@Links2004
the state is changed from STATION_GOT_IP (5) to STATION_WRONG_PASSWORD (2)
Þórhallur Sverrisson
@thorhs
I think the state: part is located in libnet80211.a…. at least that is the only place I can grep ‘state:’ in
hmmm
interesting
seeing there is no password on the SSID
Screen Shot 2015-10-18 at 16.44.26.png
Markus
@Links2004
espressif sometime make strange thinks
Þórhallur Sverrisson
@thorhs
hehe, I guess I will just have to live with it having to reconnect every 5 minutes :(
I’m planing to use this for a ‘show’ controlling LEDs, so timeouts would be noticable
Markus
@Links2004
right now i not have a good idee how to fix it.
have you tried to change the modules?
Þórhallur Sverrisson
@thorhs
which modules?
ohh, you mean the station oand client?
Markus
@Links2004
yes
Þórhallur Sverrisson
@thorhs
Nope, I’ll try that, I have a few to choose from :)
Hmmm, perhaps I should enable the debug output on the softAP as well… that might give me some ideas
Markus
@Links2004
yes may helps.
a other workaround will be using a chip WiFi router ;)
Þórhallur Sverrisson
@thorhs
yeah, I swithced from my local WLAN to the softAP since my home WLAN was too jittery.. the softAP is working much better in that regards
Markus
@Links2004
I also setup a second Wifi for the IoT stuff to many broadcasts on the normal one.
Openwrt can setup Wifis in parallel.
Þórhallur Sverrisson
@thorhs
ohh, crap, I just realized I can’t use the softAP, it only handles 4 clients :(
hmmm… interesting, I only have airports at home… but one 4G WiFi router that I might hijack :)
I’ll try that
Markus
@Links2004
this can be extended but then you need to communicate by broadcasts/ multicast (socked limitation)
Þórhallur Sverrisson
@thorhs
I am using broadcasts today, so that would not be a problem
Þórhallur Sverrisson
@thorhs
Hmm, FYI, the debug output on the station just says station XXX leave, with rm 1, add 1, aid1, and the station join
I’m going to dig up the other wifi and give it a whirl
br