This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Direct Advertising with Arduino IDE

Hello,

i would like to connect two Redbearlabs Nano v2 just with eachother. The central one connects just to the peripheral, but the peripheral is still open for every device. So i want to use direct advertising and give the peripheral the peer adress of the central. But how can i set the peer address in Arduino IDE and include it to the advertising? I tried to use something like this:

ble.setAdvertisingParams(GapAdvertisingParams::PEER_ADDR);

but the answer is, that peer_addr ist not included in AdvertisingParams. I tried different writings and searched a lot how to define it in the right way, but i'm still not succesfull. So maybe, someone can help me :)

Related