summaryrefslogtreecommitdiffstatshomepage
path: root/tests/multi_bluetooth/ble_gap_device_name.py.exp
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2020-05-08 13:54:10 +1000
committerDamien George <damien.p.george@gmail.com>2020-05-11 21:30:41 +1000
commit3b6c9119eb3593d9a3af8474d7186541f08d849e (patch)
treeec6fe93a8d9657398d80eca6ff5ac1e257477847 /tests/multi_bluetooth/ble_gap_device_name.py.exp
parentf385b7bfa86aa4657d4a28971a63b8681e1403e2 (diff)
downloadmicropython-3b6c9119eb3593d9a3af8474d7186541f08d849e.tar.gz
micropython-3b6c9119eb3593d9a3af8474d7186541f08d849e.zip
extmod/modbluetooth: Add support for changing the GAP device name.
This commit allows the user to set/get the GAP device name used by service 0x1800, characteristic 0x2a00. The usage is: BLE.config(gap_name="myname") print(BLE.config("gap_name")) As part of this change the compile-time setting MICROPY_PY_BLUETOOTH_DEFAULT_NAME is renamed to MICROPY_PY_BLUETOOTH_DEFAULT_GAP_NAME to emphasise its link to GAP and this new "gap_name" config value. And the default value of this for the NimBLE bindings is changed from "PYBD" to "MPY NIMBLE" to be more generic.
Diffstat (limited to 'tests/multi_bluetooth/ble_gap_device_name.py.exp')
-rw-r--r--tests/multi_bluetooth/ble_gap_device_name.py.exp24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/multi_bluetooth/ble_gap_device_name.py.exp b/tests/multi_bluetooth/ble_gap_device_name.py.exp
new file mode 100644
index 0000000000..377df90dee
--- /dev/null
+++ b/tests/multi_bluetooth/ble_gap_device_name.py.exp
@@ -0,0 +1,24 @@
+--- instance0 ---
+b'GAP_NAME'
+gap_advertise
+b'GAP_NAME0'
+_IRQ_CENTRAL_CONNECT
+_IRQ_CENTRAL_DISCONNECT
+b'GAP_NAME1'
+_IRQ_CENTRAL_CONNECT
+_IRQ_CENTRAL_DISCONNECT
+--- instance1 ---
+gap_connect
+_IRQ_PERIPHERAL_CONNECT
+gattc_discover_characteristics
+_IRQ_GATTC_CHARACTERISTIC_RESULT UUID16(0x2a00)
+gattc_read
+_IRQ_GATTC_READ_RESULT b'GAP_NAME0'
+gap_disconnect: True
+_IRQ_PERIPHERAL_DISCONNECT
+gap_connect
+_IRQ_PERIPHERAL_CONNECT
+gattc_read
+_IRQ_GATTC_READ_RESULT b'GAP_NAME1'
+gap_disconnect: True
+_IRQ_PERIPHERAL_DISCONNECT