Hi @Everyone
I recently started using ESP32.
I'm using Arduino IDE (2.1.1) with ESP32 (2.0.11) installed.
I would like you to help me.
I'm using ESP32 on the client.
When connecting to a BLE device, the BLE error "E (33524) BT_APPL: earlier enc was not done for same device" occurs.
I would like to know about the following.
the cause of the error
How to solve the erro
"BT_APPL: earlier enc was not done for same device" Cause and solution
-
- Posts: 6
- Joined: Thu Aug 31, 2023 1:19 am
"BT_APPL: earlier enc was not done for same device" Cause and solution
- Attachments
-
- Err.PNG (2.29 KiB) Viewed 2780 times
-
- Posts: 6
- Joined: Thu Aug 31, 2023 1:19 am
Re: "BT_APPL: earlier enc was not done for same device" Cause and solution
Hi @Everyone
I found where the "E (33524) BT_APPL: No previous enc was run for the same device" occurs.
The issue occurs when connecting to the BLE device in client mode ("pClient = BLEDevice::createClient()") after running "pServer = BLEDevice::createServer()" for ESP32.
Running "pServer->disconnect(pServer->getConnId())" enables client mode, and server and client are not used at the same time.
I need to use BLE server and client on one ESP32.
I would like to know about:
1) Error meaning
2) How to resolve the error
I found where the "E (33524) BT_APPL: No previous enc was run for the same device" occurs.
The issue occurs when connecting to the BLE device in client mode ("pClient = BLEDevice::createClient()") after running "pServer = BLEDevice::createServer()" for ESP32.
Running "pServer->disconnect(pServer->getConnId())" enables client mode, and server and client are not used at the same time.
I need to use BLE server and client on one ESP32.
I would like to know about:
1) Error meaning
2) How to resolve the error
-
- Posts: 6
- Joined: Thu Aug 31, 2023 1:19 am
Re: "BT_APPL: earlier enc was not done for same device" Cause and solution
Hi @Everyone
Help me.
I found where the "E (33524) BT_APPL: No previous enc was run for the same device" occurs.
This issue occurs when running [1],[2] simultaneously on ESP32 and connecting to a BLE device in client mode ('pClient = BLEDevice::createClient()').
[1]pServer = BLEDevice::createServer()
[2]BLEDevice::setEncryptionLevel(ESP_BLE_SEC_ENCRYPT);
You need to use BLE server and client on one ESP32.
I would like to know if "E (33524) BT_APPL: No previous enc has been executed for the same device" is an error or a warning.
Help me.
I found where the "E (33524) BT_APPL: No previous enc was run for the same device" occurs.
This issue occurs when running [1],[2] simultaneously on ESP32 and connecting to a BLE device in client mode ('pClient = BLEDevice::createClient()').
[1]pServer = BLEDevice::createServer()
[2]BLEDevice::setEncryptionLevel(ESP_BLE_SEC_ENCRYPT);
You need to use BLE server and client on one ESP32.
I would like to know if "E (33524) BT_APPL: No previous enc has been executed for the same device" is an error or a warning.
-
- Posts: 6
- Joined: Thu Aug 31, 2023 1:19 am
Re: "BT_APPL: earlier enc was not done for same device" Cause and solution
Hi @Everyone
I will report it.
The solution for "E (33524) BT_APPL: No previous enc was run for the same device" was the following steps:
[Step 1] pServer = BLEDevice::createServer()
[Step 2] Initialize BLE with BLEDevice::init() after BLEDevice::deinit(false)
[Step 3] pClient = BLEDevice::createClient();
E (33524) BT_APPL: No previous enc run for the same device no longer occurs.
I think the reason is that you don't create the server and client at the same time.
I will report it.
The solution for "E (33524) BT_APPL: No previous enc was run for the same device" was the following steps:
[Step 1] pServer = BLEDevice::createServer()
[Step 2] Initialize BLE with BLEDevice::init() after BLEDevice::deinit(false)
[Step 3] pClient = BLEDevice::createClient();
E (33524) BT_APPL: No previous enc run for the same device no longer occurs.
I think the reason is that you don't create the server and client at the same time.
Who is online
Users browsing this forum: No registered users and 128 guests