Skip to content

Commit 6c9e60c

Browse files
committed
cleanup
1 parent b13dd67 commit 6c9e60c

File tree

6 files changed

+6
-24
lines changed

6 files changed

+6
-24
lines changed

components/ble/ble.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ void initBLE(){
8181
void bleOnSync(void){
8282
int rc;
8383

84+
//rpa = resolvable private address; Address randomly generated from an identity address and an identity resolving key (IRK).
8485
ble_hs_pvcy_rpa_config(1);
8586

8687
/* Make sure we have proper identity address set (public preferred) */

components/ble/gap.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ int bleGAPEevent(struct ble_gap_event *event, void *arg) {
113113
print_addr(event->disconnect.conn.peer_id_addr.val);
114114
//531 = Remote User Terminated Connection
115115
//517 = Authentication Failure
116+
//573 = Connection Terminated due to MIC Failure
116117

117118
/* Connection terminated; resume advertising */
118119
bleAdvertise();

components/ble/include/ble.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ void bleHostTask(void *param);
2626
void print_addr(const void *addr);
2727

2828
/* Define template prototype for store*/
29+
//located in nimble/host/store/config/src/ble_store_config.c
30+
//never definded in a .h file
2931
void ble_store_config_init(void);
3032

3133
#endif

docs/infos

Lines changed: 0 additions & 7 deletions
This file was deleted.

docs/todo

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,3 @@
1-
- Einrichten, dass esp nach einen neustart die gleiche adresse erhält
2-
--> NRPA benötigte ich nicht, da diese nicht von anderen für erkennung verwendet werden kann --> RPA benötigt (ble_hs_resolv_gen_priv_addr)
3-
--> ble_hs_gen_own_private_rnd besser
4-
--> ble_hs_util_ensure_addr rückgabewert schauen ob BLE_HS_ENOADDR zurückgegeben wird wäre schlecht
5-
https://github.com/h2zero/NimBLE-Arduino/blob/1cddddb8b82c35d60c81a3bb6732b074c3e64b63/src/nimble/nimble/host/include/host/ble_hs_pvcy.h
6-
https://stackoverflow.com/questions/70583605/does-ble-device-generates-new-ltk-csrk-and-irk-every-time-it-bonds-with-new-de
7-
https://github.com/h2zero/NimBLE-Arduino/blob/1cddddb8b82c35d60c81a3bb6732b074c3e64b63/src/nimble/nimble/host/src/ble_hs_pvcy.c#L255
8-
https://github.com/h2zero/NimBLE-Arduino/blob/1cddddb8b82c35d60c81a3bb6732b074c3e64b63/src/nimble/nimble/include/nimble/ble.h#L268
9-
https://github.com/h2zero/NimBLE-Arduino/blob/1cddddb8b82c35d60c81a3bb6732b074c3e64b63/src/nimble/nimble/host/src/ble_hs_hci_evt.c#L351
10-
https://github.com/h2zero/NimBLE-Arduino/blob/1cddddb8b82c35d60c81a3bb6732b074c3e64b63/src/nimble/nimble/host/include/host/ble_hs_id.h#L38
11-
https://github.com/h2zero/NimBLE-Arduino/blob/1cddddb8b82c35d60c81a3bb6732b074c3e64b63/src/nimble/nimble/host/src/ble_hs_id.c#L102
12-
131
- Report deskriptor austauschen mit neuen --> report id noch hinzufügen
142
- struct verschicken mittels bluetooth --> nur wenn sich was verändert hat an den Daten
153
- hr functionen löschen
@@ -22,9 +10,6 @@
2210
- Bei einem erneuten verbindungsaufbau wird das gestoppte updaten der daten nicht wieder gestartet
2311

2412

25-
- ESP muss seine persistent private Adresse irgendwie zwischenspeichern für neustarts
26-
27-
2813
Kann ich nicht ändern --> wie https://github.com/h2zero/NimBLE-Arduino/blob/release/1.4/src/NimBLEDevice.cpp alles gemacht:
2914
- IOS kann den bond nicht wiederherstellen, wenn ESP neugestartet wird (muss neu hinzugefügt werden)
3015
- Android kann schon beim enkoppeln und erneuten koppeln nicht mehr bonden ohne nachfrage

sdkconfig.defaults

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ CONFIG_BT_NIMBLE_MEM_ALLOC_MODE_INTERNAL=y
6767
CONFIG_BT_NIMBLE_LOG_LEVEL_DEBUG=y
6868
CONFIG_BT_NIMBLE_LOG_LEVEL=0
6969
CONFIG_BT_NIMBLE_MAX_CONNECTIONS=3
70-
CONFIG_BT_NIMBLE_MAX_BONDS=3
70+
CONFIG_BT_NIMBLE_MAX_BONDS=5
7171
CONFIG_BT_NIMBLE_MAX_CCCDS=256
7272
CONFIG_BT_NIMBLE_L2CAP_COC_MAX_NUM=0
7373
CONFIG_BT_NIMBLE_PINNED_TO_CORE_0=y
@@ -140,7 +140,7 @@ CONFIG_NIMBLE_ENABLED=y
140140
CONFIG_NIMBLE_MEM_ALLOC_MODE_INTERNAL=y
141141
# CONFIG_NIMBLE_MEM_ALLOC_MODE_DEFAULT is not set
142142
CONFIG_NIMBLE_MAX_CONNECTIONS=3
143-
CONFIG_NIMBLE_MAX_BONDS=3
143+
CONFIG_NIMBLE_MAX_BONDS=5
144144
CONFIG_NIMBLE_MAX_CCCDS=256
145145
CONFIG_NIMBLE_L2CAP_COC_MAX_NUM=0
146146
CONFIG_NIMBLE_PINNED_TO_CORE_0=y

0 commit comments

Comments
 (0)