NimBLE-Arduino icon indicating copy to clipboard operation
NimBLE-Arduino copied to clipboard

Can you set the BLE channel used?

Open I-Connect opened this issue 2 years ago • 2 comments
trafficstars

I am having some (intermittent) issues connecting to a BLE device. My suspicion is that there is interference with wifi, ZigBee or other BLE devices that I have running here

If a connection fails I retry it 5 times. I am not sure if this is the way to go or that it even works this way but I was thinking if I could change the channel on which I am connecting for the different connection retries maybe this way I could manage it better...

The option to set the channel is listed in the esp idf documentation: image

But I cannot find a way to set the channel in NimBle...?

I-Connect avatar May 03 '23 07:05 I-Connect

This function may work for you https://github.com/h2zero/NimBLE-Arduino/blob/ebfe4bcbe5165198447a8d8dfe5de5eb15ae998b/src/nimble/nimble/host/include/host/ble_hs_hci.h#L88

h2zero avatar May 14 '23 19:05 h2zero

@I-Connect Did this work for you?

h2zero avatar Jun 04 '24 23:06 h2zero