aboutsummaryrefslogtreecommitdiff
path: root/tests/multi_bluetooth
AgeCommit message (Collapse)Author
2021-03-12tests/multi_bluetooth: Skip tests when BLE features are unsupported.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2021-02-19tests/multi_bluetooth: Add basic performance tests.Jim Mussared
1. Exchange GATT notifications. 2. Transmit a stream of data over L2CAP. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2020-12-02tests/multi_bluetooth: Add multitests for BLE pairing and bonding.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2020-11-24tests/multi_bluetooth: Add L2CAP channels multi-test.Jim Mussared
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2020-11-16tests/multi_bluetooth: Add a test for WB55 concurrent flash access.Jim Mussared
This test currently passes on Unix/PYBD, but fails on WB55 because it lacks synchronisation of the internal flash. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2020-11-16tests/multi_bluetooth: Change dict index-and-del to pop, to clear event.Jim Mussared
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2020-11-13tests/multi_bluetooth: Improve reliability of event waiting.Jim Mussared
Use the same `wait_for_event` in all tests that doesn't hold a reference to the event data tuple and handles repeat events. Also fix a few misc reliability issues around timeouts and sequencing. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2020-09-25extmod/modbluetooth: Change module-owned bytes objects to memoryview.Damien George
A read-only memoryview object is a better representation of the data, which is owned by the ubluetooth module and may change between calls to the user's irq callback function. Signed-off-by: Damien George <damien@micropython.org>
2020-09-18tests/multi_bluetooth/ble_mtu.py: Add multitest for BLE MTU.Jim Mussared
2020-09-18tests/multi_bluetooth: Update UUID format in .exp files.Jim Mussared
2020-09-08tests/multi_bluetooth: Make ble_gap_connect robust against event timing.Jim Mussared
2020-09-08tests/multi_bluetooth: Update to new config('mac') behaviour.Jim Mussared
2020-07-20extmod/modbluetooth: Add event for "indicate acknowledgement".Jim Mussared
This commit adds the IRQ_GATTS_INDICATE_DONE BLE event which will be raised with the status of gatts_indicate (unlike notify, indications require acknowledgement). An example of its use is added to ble_temperature.py, and to the multitests in ble_characteristic.py. Implemented for btstack and nimble bindings, tested in both directions between unix/btstack and pybd/nimble.
2020-07-18extmod/btstack: Schedule notify/indicate/write ops for bg completion.Jim Mussared
The goal of this commit is to allow using ble.gatts_notify() at any time, even if the stack is not ready to send the notification right now. It also addresses the same issue for ble.gatts_indicate() and ble.gattc_write() (without response). In addition this commit fixes the case where the buffer passed to write-with-response wasn't copied, meaning it could be modified by the caller, affecting the in-progress write. The changes are: - gatts_notify/indicate will now run in the background if the ACL buffer is currently full, meaning that notify/indicate can be called at any time. - gattc_write(mode=0) (no response) will now allow for one outstanding write. - gattc_write(mode=1) (with response) will now copy the buffer so that it can't be modified by the caller while the write is in progress. All four paths also now track the buffer while the operation is in progress, which prevents the GC free'ing the buffer while it's still needed.
2020-06-05tests/multi_bluetooth: Update to work with new BLE events.Jim Mussared
Updates the tests to use non-bitmask events, event renames, as well as some of the new completion events to improve reliability of the tests.
2020-05-11extmod/modbluetooth: Add support for changing the GAP device name.Damien George
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.
2020-05-08tests/multi_bluetooth: Fix typo printing wrong IRQ type.Damien George
2020-04-29tests/multi_bluetooth/ble_gap_advertise: Fix bytes/str compare warning.Jim Mussared
2020-04-07extmod/modbluetooth: Provide FLAG_WRITE_NO_RESPONSE for characteristics.Damien George
This flag is supported and needs to be set if characteristics are write- without-response.
2020-03-11extmod/modbluetooth: Change scan result's "connectable" to "adv_type".Damien George
This commit changes the BLE _IRQ_SCAN_RESULT data from: addr_type, addr, connectable, rssi, adv_data to: addr_type, addr, adv_type, rssi, adv_data This allows _IRQ_SCAN_RESULT to handle all scan result types (not just connectable and non-connectable passive scans), and to distinguish between them using adv_type which is an integer taking values 0x00-0x04 per the BT specification. This is a breaking change to the API, albeit a very minor one: the existing connectable value was a boolean and True now becomes 0x00, False becomes 0x02. Documentation is updated and a test added. Fixes #5738.
2020-03-10tests/multi_bluetooth: Add initial tests for bluetooth BLE.Damien George