You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
//optional wird ausgeführt wenn ein gatt resource (characteristic, descriptor, sevice) hinzugefügt wird. Also nicht benötigt
39
+
ble_hs_cfg.gatts_register_cb=gattSvrRegisterCb;
40
+
41
+
/*Security Manager local input output capabilities*/
42
+
//io types zum aufbau einer sicheren verbindung
43
+
//BLE_SM_IO_CAP_DISP_ONLY = Display only
44
+
//BLE_SM_IO_CAP_DISP_YES_NO = Display & yes & no buttons
45
+
//BLE_SM_IO_CAP_KEYBOARD_ONLY = Keyboard only
46
+
//BLE_SM_IO_CAP_NO_IO = just work
47
+
//BLE_SM_IO_CAP_KEYBOARD_DISP = Keyboard and display
48
+
ble_hs_cfg.sm_io_cap=BLE_SM_IO_CAP_NO_IO;
49
+
/*Security Manager secure connections flag
50
+
if set proper flag in pairing request/response will be set. this results in using LE Secure Connections for pairing if also supported by remote device. Fallback to legacy pairing if not supported by remote.*/
51
+
ble_hs_cfg.sm_sc=1;
52
+
/*security Manager bond flag
53
+
if set proper flag in Pairing request/response will be set. This results in storing keys distributed during bonding.*/
54
+
ble_hs_cfg.sm_bonding=1;
55
+
/*security manager mitm flag
56
+
if set proper flag in pairing request/response will be set. This results in requiring man-in-the-middle protection when pairing.*/
//The callback to associate with this advertising procedure. If advertising ends, the event is reported through this callback. If advertising results in a connection, the connection inherits this callback as its event-reporting mechanism.
//itvl: These determine how often the devices will "ping-pong" each other and also when they will send any data required. So if you set the value to something like 20, that would mean packets are sent every 25ms, which will obviously consume more power than say a value of 80 (100ms). The reason for the min max values is so the devices can negotiate a compromise for the best possible communication, you can set these to the same value if you prefer.
86
+
.itvl_min= (int)(11.25/1.25), //1.25ms units; laut apple 11.25 minimum fuer hid
87
+
.itvl_max= (int)(20/1.25), //minimum ist laut apple eigentlich 15ms deswegen etwas höher setzen
88
+
//latency: This is how many "ping-pong" (connection interval) events the slave(server) device is allowed to skip without the client device considering the connection terminated. So if you had a 25ms connection interval and you wanted to sleep for 1 second you could set this value to 40 and the client would consider the connection active for up to 40 skipped intervals.
89
+
.latency=30, //up to 30 connection intervals
90
+
//timeout: This is the absolute (disconnection) timeout, if no packets are received by either device within this time the connection is considered terminated.
91
+
.supervision_timeout=1860/10//10ms units, laut apple größer als itvl_max * (latency + 1) * 3
0 commit comments