Search found 65 matches

by filipESP
Wed Feb 27, 2019 10:02 am
Forum: ESP-IDF
Topic: BLE gatt_client ( do while(0) )
Replies: 6
Views: 2787

Re: BLE gatt_client ( do while(0) )

OK, and what is the difference between use:

Code: Select all

void function() { blah; blah; { int idx; for (idx = 0; idx < PROFILE_NUM; idx++) { blah; } } }
and:

Code: Select all

void function() { int idx; blah; blah; { for (idx = 0; idx < PROFILE_NUM; idx++) { blah; } } }
?
by filipESP
Mon Feb 25, 2019 4:53 pm
Forum: ESP-IDF
Topic: BLE gatt_client ( do while(0) )
Replies: 6
Views: 2787

Re: BLE gatt_client ( do while(0) )

I mean about this code: do { int idx; for (idx = 0; idx < PROFILE_NUM; idx++) { if (gattc_if == ESP_GATT_IF_NONE || /* ESP_GATT_IF_NONE, not specify a certain gatt_if, need to call every profile cb function */ gattc_if == gl_profile_tab[idx].gattc_if) { if (gl_profile_tab[idx].gattc_cb) { gl_profile...
by filipESP
Thu Feb 21, 2019 12:28 pm
Forum: ESP-IDF
Topic: RSSI level from AP connected to the ESP station.
Replies: 3
Views: 1739

Re: RSSI level from AP connected to the ESP station.

It is already working. :)
by filipESP
Thu Feb 21, 2019 8:49 am
Forum: ESP-IDF
Topic: RSSI level from AP connected to the ESP station.
Replies: 3
Views: 1739

RSSI level from AP connected to the ESP station.

I try to get RSSI level using esp_wifi_sta_get_ap_info( wifi_ap_record_t *ap_info ) function. I read the RSSI level like this:
1. create wifi_ap_record_t ap_info variable
2.call esp_wifi_sta_get_ap_info()
3. read value, uint8_t tx_power = ap_info->rssi;
The tx_power variable is 0 all time.
by filipESP
Fri Feb 15, 2019 3:19 pm
Forum: ESP-IDF
Topic: BLE gatt_client ( do while(0) )
Replies: 6
Views: 2787

BLE gatt_client ( do while(0) )

Hi.
I wonder about the do{}while(0) loop but I don't know what is the adventage of using this code in the esp_gattc_cb() function.
Could anybody explain it?
by filipESP
Wed Jan 16, 2019 6:02 pm
Forum: ESP-IDF
Topic: Disconnect and reconnect ESP32 to hotspot.
Replies: 4
Views: 2138

Re: Disconnect and reconnect ESP32 to hotspot.

It's done. :)
by filipESP
Wed Jan 16, 2019 12:53 pm
Forum: ESP-IDF
Topic: Disconnect and reconnect ESP32 to hotspot.
Replies: 4
Views: 2138

Re: Disconnect and reconnect ESP32 to hotspot.

I resolved my issue by using esp_wifi_stop() and esp_wifi_start().
I also used the flag to notify the event_handler that it can call esp_wifi_connect ( in SYSTEM_EVENT_STA_DISCONNECTED case ) when I will want to connect to Hotspot.
by filipESP
Tue Jan 15, 2019 5:37 pm
Forum: ESP-IDF
Topic: Disconnect and reconnect ESP32 to hotspot.
Replies: 4
Views: 2138

Disconnect and reconnect ESP32 to hotspot.

Hi.
I want to disconnect wifi when it is idle for long time and reconnect when I set any GPIO to high level.
Reconnect work when I put esp_connect_wifi into event_handler in SYSTEM_EVENT_STA_DISCONNECTED case, but doesn't work when I call esp_connect_wifi in other function.
How to make it working?
by filipESP
Fri Dec 28, 2018 12:29 pm
Forum: ESP-IDF
Topic: Wifi signal power.
Replies: 7
Views: 2989

Re: Wifi signal power.

Done, Thx.
by filipESP
Fri Dec 21, 2018 6:50 pm
Forum: ESP-IDF
Topic: HTTP Server with option to edit content of page.
Replies: 9
Views: 5244

Re: HTTP Server with option to edit content of page.

I have next issue with WiFi.
I set ESP as AP and when I try to connect with it a get this log in terminal: "wifi: max connection, deauth!"
What is the reason of this statement?

Go to advanced search