services: add ble_bms#280
Conversation
e20c85f to
4d718f8
Compare
|
You can find the documentation preview for this PR here. |
4d718f8 to
92c4e79
Compare
92c4e79 to
9076412
Compare
9076412 to
8869608
Compare
0dd951c to
8a689af
Compare
8a689af to
96bc75e
Compare
96bc75e to
b201c25
Compare
| Events from the service are forwarded through the event handler specified during initialization. | ||
| For a full list of events see the :c:enum:`ble_bms_evt_type` enum. | ||
|
|
||
|
|
| | Header file: :file:`include/bluetooth/services/ble_bms.h` | ||
| | Source files: :file:`subsys/bluetooth/services/ble_bms/` | ||
|
|
||
| :ref:`Battery Service API reference <api_ble_bms>` |
There was a problem hiding this comment.
| :ref:`Battery Service API reference <api_ble_bms>` | |
| :ref:`Bond Management Service API reference <api_ble_bms>` |
| default 512 | ||
|
|
||
| config BLE_BMS_PEERS_TO_DELETE_ON_DISCONNECT_MAX | ||
| int "Maximum nmber of peers to delete pending peer disconnect" |
There was a problem hiding this comment.
| int "Maximum nmber of peers to delete pending peer disconnect" | |
| int "Maximum number of peers to delete pending peer disconnect" |
| } | ||
| } | ||
|
|
||
|
|
There was a problem hiding this comment.
Thanks, comments addressed.
b201c25 to
552f994
Compare
|
|
||
| /** @brief BMS event types. */ | ||
| enum ble_bms_evt_type { | ||
|
|
| * authorization code is not valid. | ||
| */ | ||
| uint16_t ble_bms_on_qwr_evt(struct ble_bms *bms, struct ble_qwr *qwr, | ||
| const struct ble_qwr_evt *evt); |
| cmake_minimum_required(VERSION 3.20.0) | ||
|
|
||
| find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) | ||
| project(ble_lbs) |
| default 10 | ||
|
|
||
| module=BLE_BMS_SAMPLE | ||
| module-dep=LOG |
There was a problem hiding this comment.
| module-dep=LOG |
let's not keep re-adding this thing that has never done anything
| LOG_ERR("Failed to delete peer, nrf_error %#x", err); | ||
| } | ||
| } | ||
|
|
| goto idle; | ||
| } | ||
|
|
||
| const bool erase_bonds = bm_buttons_is_pressed(BOARD_PIN_BTN_1); |
There was a problem hiding this comment.
declare variables at top of scope
| default "ABCD" | ||
|
|
||
| module=BLE_BMS | ||
| module-dep=LOG |
There was a problem hiding this comment.
| module-dep=LOG |
|
|
||
| menu "BLE BMS sample" | ||
|
|
||
| config QWR_MEM_BUFF_SIZE |
There was a problem hiding this comment.
prefix application/sample Kconfigs with APP_ so that they won't possibly conflict with future Kconfigs added to subsystems
| default 512 | ||
|
|
||
| config BLE_BMS_PEERS_TO_DELETE_ON_DISCONNECT_MAX | ||
| int "Maximum number of peers to delete pending peer disconnect" |
There was a problem hiding this comment.
not clear to me what this does
There was a problem hiding this comment.
| int "Maximum number of peers to delete pending peer disconnect" | |
| int "Maximum number of peers to delete upon a peer disconnect" |
There was a problem hiding this comment.
Rewritten as suggested by @MirkoCovizzi.
552f994 to
7d86a9e
Compare
| break; | ||
|
|
||
| case BLE_GAP_EVT_DISCONNECTED: | ||
| LOG_INF("Peer disconnected, reason %d", |
There was a problem hiding this comment.
As far as I can see, these values (BLE_HCI_STATUS_CODES) are defined as hex.
| LOG_INF("Peer disconnected, reason %d", | |
| LOG_INF("Peer disconnected, reason %#x", |
peknis
left a comment
There was a problem hiding this comment.
Just wondering about the capitalization. Server or server?
| Deleting the bonds | ||
| ================== | ||
|
|
||
| The Server deletes bonding information on client's request right away when there is no active Bluetooth® Low Energy connection associated with a bond. |
There was a problem hiding this comment.
I don't think it should be capitalized. In fact, the counterpart client is not, in the same sentence.
There was a problem hiding this comment.
This was capitalized in nRF5 documentation, though I agree it is not needed.
52d0aac to
78af194
Compare
| int "Softdevice event observer priority" | ||
| default 0 | ||
|
|
||
| config USE_AUTHORIZATION_CODE |
There was a problem hiding this comment.
add prefix to these, "use authorization code" has no context, e.g. BLE_BMS_USE_AUTHORIZATION_CODE, fix in whole PR
There was a problem hiding this comment.
Thanks, updated.
78af194 to
ec67795
Compare
| bool "Use authorization code" | ||
| default y | ||
|
|
||
| config AUTHORIZATION_CODE |
There was a problem hiding this comment.
It seems so, updated now...
ec67795 to
61448a9
Compare
MechanicV1
left a comment
There was a problem hiding this comment.
Approving for tests !
446c21a to
e693175
Compare
Add bond management service. Signed-off-by: Eivind Jølsgard <eivind.jolsgard@nordicsemi.no>
e693175 to
f184255
Compare
|
doc-postponed: missing changelog entries. |
|
Release notes changelog added in #557. |

Add bond management service.