Simpler1 wrote: ↑Fri Jan 15, 2021 9:51 pm
The run-tests file doesn't seem to even try to run the bluetooth tests.
The multitests are run by `run-multitests.py` instead, which will spin up the required number of MicroPython sessions (either using the Unix port or using a real device over a UART).
Here's an example that will test a connected ESP32 on ttyUSB0 and PYBD on ttyACM0
./run-multitests.py -i pyb:/dev/ttyACM0 -i pyb:/dev/ttyUSB0 multi_bluetooth/ble_characteristic.py
I use this a lot with the BLE support in the Unix port... e.g. with a USB UART connected to a HCI controller. This is an example of running that against a connected PYBD. Note the second instance "-i" flag is implicit (it will use the Unix port).
env MICROPY_MICROPYTHON=../ports/unix/micropython-nimble-h4 ./run-multitests.py -i pyb:/dev/ttyACM0 multi_bluetooth/ble_characteristic.py
Generally you want to run the tests in both directions (so both devices have a chance to be both central and peripheral). Add the "-p2" flag to do that.
Note that not all the BLE multitests will pass on ESP32 right now as not all features are implemented (pairing/bonding/l2cap).