← index #13644Issue #6498
Related · high · value 2.027
QUERY · ISSUE

BLE: "OSError: -640" with gap_advertise

openby greenwolffropened 2024-02-12updated 2025-03-03
bugport-rp2

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 ?

CANDIDATE · ISSUE

Concurrent BLE advertising/scanning on STM32WB

openby Hendrik-Kopened 2020-09-30updated 2025-03-04
port-stm32

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)

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied