This adds a second vendor service testing if service changed indications
works with more than one change in a row and as a bonus it implements
echo attribute which notifies any data that is written to it:
> ACL Data TX: Handle 3585 flags 0x00 dlen 9
ATT: Write Command (0x52) len 4
Handle: 0x0013
Data: 0000
< ACL Data RX: Handle 3585 flags 0x02 dlen 9
ATT: Handle Value Notification (0x1b) len 4
Handle: 0x0013
Data: 0000
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
With introduction of bt_gatt_service_unregister it is now possible to
unregister service at runtime.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Fixed uninitialised auto variables, that had caused compile
errors under CONFIG_DEBUG=y.
Jira: Zep-2334
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Intention is to test flash driver along with BLE radio.
Added flash shell module with commands for erase, write-check, read and
co-operation with radio stress test.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
Rename bt_gatt_unregister_service to bt_gatt_service_unregister to be
consistent with other APIs such as bt_gatt_service_register.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
gatt-unregister-service can be used to remove the test service at
runtime causing service changed to be indicated:
00:1b:dc:07:31:88 (public)> gatt-unregister-service
[bt] [DBG] gatt_indicate: (0x0011e100) conn 0x0011d880 handle 0x0008
[bt] [DBG] bt_att_req_send: (0x0011e100) conn 0x0011d880 req 0x0011db00
[bt] [DBG] att_send_req: (0x0011e100) req 0x0011db00
Unregistering test vendor service
< ACL Data TX: Handle 3585 flags 0x00 dlen 11
ATT: Handle Value Indication (0x1d) len 6
Handle: 0x0008
Data: 0a001000
> ACL Data RX: Handle 3585 flags 0x02 dlen 5
ATT: Handle Value Confirmation (0x1e) len 0
Jira: ZEP-2225
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This adds bt_gatt_register_service using bt_gatt_service which contains
the attribute array that is then added to the database saving a pointer
in each and every attribute declared.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Fixed compile error due to the missing header file
dependency on bluetooth/hci.h, for bt_addr_le_t, in the
Link Layer header file.
Merge of PR #475 introduced the new dependency that broke
compilation after merge of #474.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Add Bluetooth Link Layer LE Advertising Extensions commands
for manual testing the feature during development. First one
being advx command to start non-connectable non-scannable
extended advertising.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Add a repeat param to gatt-write-without-response so that
it covers what gatt-write-without-response-repeated was
doing. gatt-write-without-response was removed in the
commit 26eae70da.
gatt-write-signed too will have repeat param with this
change.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Added shell module for the Bluetooth Controller's ticker
interfaces.
For now, info command enumerates active tickers' details.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
This makes gatt-write-signed to reuse cmd_gatt_write_without_rsp since
it is quite similar and that adds the ability to send multiple octecs
instead of just a single byte.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This removes gatt-write-without-response-repeated and makes
gatt-write-without-response similar to gatt-write which was the
intention of gatt-write-without-response-repeated.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
All the files under shell subdir shall only be build if
CONFIG_BLUETOOTH_SHELL is selected.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
In order to properly queue request there need to be a bt_att_req
storage but none of the calls to gatt_write_ccc were using the params
causing gatt_send to use bt_att_send and not bt_att_req_send.
To fix this now all the callers of gatt_write_ccc do set the params
properly but this means that bt_gatt_unsubscribe has to wait for it
to be completed before the application can reuse the
bt_gatt_subscribe_params.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Both scan on and scan passive performed passive scanning,
fixed scan on command to use active scanning.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
This replaces the use of shell_register_prompt_handler with
SHELL_REGISTER_WITH_PROMPT which doesn't overwrite other modules
prompt.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
If CONFIG_BLUETOOTH_GATT_CLIENT is not defined disable command that
would depend on it.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>