Page 1 of 1

station_example_main.c: xEventGroupWaitBits missing?

Posted: Wed Nov 20, 2019 6:28 pm
by LaWi14
On checking the above example code (esp-idf/examples/wifi/getting_started/station/main/station_example_main.c) for the current IDF 4.0 I wondered if a call to xEventGroupWaitBits is missing. The event group is created, connected bit is set in the handler, but where is the code waiting for the bits set / WiFi connection established?

I tried to extend this example a bit an promptly got an connection error because the WiFi connection was not established yet when a task tried to transfer data.

The similar code in esp-idf/examples/common_components/protocol_examples_common/connect.c has the xEventGroupWaitBits code BTW.

Or do I overlook something here?

Thomas

Re: station_example_main.c: xEventGroupWaitBits missing?

Posted: Thu Nov 21, 2019 3:33 pm
by ESP_Dazz
Seems like you're correct. There should be an xEventGroupWaitBits() call at the end of app_main(). I'll open a ticket to fix this issue.