Search found 15 matches

by hyunwoo
Fri Sep 10, 2021 4:02 am
Forum: ESP-IDF
Topic: What is better way to store some data after deep sleep?
Replies: 7
Views: 6464

Re: What is better way to store some data after deep sleep?

I think my device won't be reset that often in normal scenario, because of using battery.
Even considering this, is it still a prematurely optimization?
by hyunwoo
Wed Sep 08, 2021 10:43 am
Forum: ESP-IDF
Topic: What is better way to store some data after deep sleep?
Replies: 7
Views: 6464

Re: What is better way to store some data after deep sleep?

Thank you for kindly response. I decide to use both of them. And here is flow of my source code. Please advice to me. 1. Check the device is reset. (check some value that restored in slow RTC memory is 0) a. If device is reset, load value to slow RTC memory from NVS. b. If device is just waken up, d...
by hyunwoo
Wed Sep 08, 2021 10:26 am
Forum: ESP-IDF
Topic: BLE_GAP_EVT_SCAN_REQ_REPORT
Replies: 2
Views: 2952

Re: BLE_GAP_EVT_SCAN_REQ_REPORT

I also have the same question. My BLE device receives SCAN_REQ packets from other devices. I would like to detect these requests, please. I tried using BLEDevice::setCustomGapHandler() but it does not return received SCAN_REQ reports, or transmitted SCAN_RES reports. I think the processing of scan ...
by hyunwoo
Wed Sep 08, 2021 10:08 am
Forum: ESP-IDF
Topic: ESP32 BLE (Beacon) Scan Request/Response
Replies: 2
Views: 3777

Re: ESP32 BLE (Beacon) Scan Request/Response

How to send sesor data using ble beacon example. can you share code ? I didn't make code yet, but I think it isn't that hard. In my scenario, my ESP will repeat sleeping and waking up. Every waking up sequence, ESP read the sensor data and create advertising data based on sensor data. I'll transfer...
by hyunwoo
Fri Aug 20, 2021 6:41 am
Forum: ESP-IDF
Topic: BLE connection with IOS is disconnected when call esp_ota_begin()
Replies: 7
Views: 5659

Re: BLE connection with IOS is disconnected when call esp_ota_begin()

@chegewara
Thank you for reply.
Can you tell me more about "timeout"?
by hyunwoo
Fri Aug 20, 2021 4:15 am
Forum: ESP-IDF
Topic: BLE connection with IOS is disconnected when call esp_ota_begin()
Replies: 7
Views: 5659

Re: BLE connection with IOS is disconnected when call esp_ota_begin()

I found erasing partition is cause of disconnection.

And the question is changed.
Does erasing partition need for OTA update?
Just overwriting partition make some errors?

Partition header(metadata?) contains information of size, so it isn't that critical.
by hyunwoo
Thu Aug 19, 2021 9:07 am
Forum: ESP-IDF
Topic: BLE connection with IOS is disconnected when call esp_ota_begin()
Replies: 7
Views: 5659

Re: BLE connection with IOS is disconnected when call esp_ota_begin()

Thank you for reply. As you told, it was so fast in application, so ESP32 skips some OTA data. Then we using in write(with response) in our app now. That was my misunderstanding. Back to main topic, when I called `esp_ota_begin()`, the connection with IPhone is broken. (IPhone only) How can I solve ...
by hyunwoo
Thu Aug 19, 2021 7:54 am
Forum: ESP-IDF
Topic: BLE connection with IOS is disconnected when call esp_ota_begin()
Replies: 7
Views: 5659

BLE connection with IOS is disconnected when call esp_ota_begin()

Hi. I wrote source code for OAT update via BLE. We use react-native for Update application. In GAP, ESP32 - peripheral, Phone(Application) - central In GATT, ESP32- GATTS, Phone - GATTC Here is sequence of OAT Update. 1. Connect Bluetooth on GAP. 2. Enable notify on ESP32. (Write 0x0001) <- Here 3. ...
by hyunwoo
Mon Aug 02, 2021 6:17 am
Forum: ESP-IDF
Topic: What is better way to store some data after deep sleep?
Replies: 7
Views: 6464

Re: What is better way to store some data after deep sleep?

Hmm... I just want to know what is better way!

Using NVS or RTC memory.