station_example_main.c: xEventGroupWaitBits missing?

LaWi14
Posts: 10
Joined: Wed Nov 20, 2019 6:05 pm

station_example_main.c: xEventGroupWaitBits missing?

Postby LaWi14 » Wed Nov 20, 2019 6:28 pm

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

ESP_Dazz
Posts: 308
Joined: Fri Jun 02, 2017 6:50 am

Re: station_example_main.c: xEventGroupWaitBits missing?

Postby ESP_Dazz » Thu Nov 21, 2019 3:33 pm

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.

Who is online

Users browsing this forum: No registered users and 350 guests