NimBLE-Arduino
NimBLE-Arduino copied to clipboard
Can you set the BLE channel used?
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:

But I cannot find a way to set the channel in NimBle...?
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
@I-Connect Did this work for you?