BLE: "OSError: -640" with gap_advertise
Hi,
I have an OSError: -640 that keep raising when I use gap_advertise on a ble peripheral with a Arduino Nano RP2040 Connect.
This happens randomly even with the simple examples provided in this repository like this one:
https://github.com/micropython/micropython/blob/master/examples/bluetooth/ble_simple_peripheral.py
Here is the stack trace with this example:
Unhandled exception in IRQ callback handler
Traceback (most recent call last):
File "<stdin>", line 62, in _irq
File "<stdin>", line 79, in _advertise
OSError: -640
firmware file name: ARDUINO_NANO_RP2040_CONNECT-20240105-v1.22.1.uf2
It doesn't seems to be the board that have an issue, as I can reproduce the issue on two different boards (both are Arduino Nano RP2040 Connect).
How can I debug this issue ?
Concurrent BLE advertising/scanning on STM32WB
Hi,
I encountered an unexpected behaviour while using BLE on my STM32WB (NUCLEO-WB55).
When trying to scan while advertising, an OSError is raised.
I tested the behaviour by running a little code snippet:
import bluetooth
ble = bluetooth.BLE()
ble.active(True)
def irq(event, data):
print("event: {} data: {}".format(event, data))
adv_data = b'\x05\x09\x54\x45\x53\x54'
ble.gap_advertise(50000, adv_data, connectable=False)
ble.gap_scan(1000)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OSError: [Errno 5] EIO
I originally expected the implementation to support concurrent advertising/scanning as the hardware does.
It would be nice if someone could explain if this behaviour is as it should be or if this is an error.
Thanks!
(Edit: Added syntax highlighting)