Search found 214 matches

by f.h-f.s.
Thu Jul 27, 2017 3:15 pm
Forum: General Discussion
Topic: why call esp_ble_gatt_get_characteristic() in ESP_GATTC_GET_CHAR_EVENT?
Replies: 5
Views: 7399

Re: why call esp_ble_gatt_get_characteristic() in ESP_GATTC_GET_CHAR_EVENT?

case switch should always break;
if you are at the last characteristic, the next get will cause some other case or error.
by f.h-f.s.
Thu Jul 27, 2017 3:12 pm
Forum: General Discussion
Topic: Migration from Arduino IDE to ESP-IDF
Replies: 9
Views: 18910

Re: Migration from Arduino IDE to ESP-IDF

i think %0 is NULL
by f.h-f.s.
Thu Jul 27, 2017 2:09 pm
Forum: ESP32 Arduino
Topic: get uuid of esp32 ble on arduino
Replies: 3
Views: 9950

Re: get uuid of esp32 ble on arduino

Do you mean a unique identifier for the esp32 bluetooth? like Bluetooth Device Address?

Code: Select all

uint8_t mac[6];
esp_err_t err = esp_read_mac(&mac, ESP_MAC_BT);
Something like this?
by f.h-f.s.
Thu Jul 27, 2017 1:43 pm
Forum: General Discussion
Topic: why call esp_ble_gatt_get_characteristic() in ESP_GATTC_GET_CHAR_EVENT?
Replies: 5
Views: 7399

Re: why call esp_ble_gatt_get_characteristic() in ESP_GATTC_GET_CHAR_EVENT?

it finds the next one, if the last param != 0. See esp_gattc_api.c:172 :176 :180 This gets the first characteristic esp_ble_gattc_get_characteristic(gattc_if, conn_id, &alert_service_id, NULL); The result then contains a char_id, and will get the next characteristic esp_ble_gattc_get_characteristic(...
by f.h-f.s.
Thu Jul 27, 2017 1:19 pm
Forum: General Discussion
Topic: Not being able to turn on the bluetooth
Replies: 1
Views: 5989

Re: Not being able to turn on the bluetooth

Have a look at:

Code: Select all

esp_err_t esp_bt_controller_enable(esp_bt_mode_t mode)
Its return type is esp_err_t:

Code: Select all

#define ESP_OK          0
This would be correct:

Code: Select all

	
	if (esp_bt_controller_enable(ESP_BT_MODE_BTDM) != ESP_OK)
		ESP_LOGE(TAG,"Error");
by f.h-f.s.
Thu Jul 27, 2017 1:13 pm
Forum: ESP32 Arduino
Topic: How to use a "Standalone" html page for this example (ESP32 Arduino)
Replies: 5
Views: 14665

Re: How to use a "Standalone" html page for this example (ESP32 Arduino)

You can also try Mongoose OS or MicroPython which simplify this process.
by f.h-f.s.
Wed Jul 26, 2017 8:05 am
Forum: ESP32 Arduino
Topic: How to print the value of a number in a http server (Arduino ESP32)
Replies: 3
Views: 13008

Re: How to print the value of a number in a http server (Arduino ESP32)

uhh you might want to put the adc value you read into one of your GET if-statements or inside your http Response-body.
Your sensor value read is outside the whole http-server stuff. client.stop() was already called when you call client.print(sensorValue);.
by f.h-f.s.
Tue Jul 25, 2017 3:31 pm
Forum: ESP-IDF
Topic: GATT Authentication & encryption
Replies: 1
Views: 4621

GATT Authentication & encryption

Hi all, I've been dabbling a bit in GATTC, and I noticed the Gatt authentication request type for the reads and writes. I've tried the different levels but all seem to fail. What do I need to set-up to use these authentication types? Can anyone enlighten me? I (5469) Provision: Searched device Nexus...
by f.h-f.s.
Tue Jul 25, 2017 2:31 pm
Forum: ESP-IDF
Topic: gattc open issue
Replies: 10
Views: 20768

Re: gattc open issue

Before you reset do you properly close the connection?
I also sometimes get errors and a closed connection. usually when I try to access some characteristic that is not set by the server.
The nRF Connect app on android helped me debug things. I could close the connection(or pairing?) etc.