Closed sureshjoshi closed 1 year ago
Even easier, just set the ScanConfig timeout on the connection:
/// Timeout in units of 10ms. If set to 0, scan forever.
pub timeout: u16,
Closing this issue, as I think it might be better to have a non-zero timeout for the ScanConfig, which would capture more cases then just returning the Error above.
While trying to connect to a device as a client based on the advertised mac address, my connection appears to be "hanging".
It appears to be caused by this (discovered by adding logging on
let ret = raw::sd_ble_evt_get(evt.as_mut_ptr() as *mut u8, &mut len as _);
innrf-softdevice/src/events.rs
:I'm getting a
RawError::NotFound
(for some reason, that I need to debug), but that error isn't propagated back to the connection task.A workaround would be to start a connection timeout, and cancel it - but it feels like that
NotFound
is incorrectly suppressed.The problem can be replicated easily by connecting to a fake Mac address.