2017-04-04 02:46 AM
Hi,
I'm currently using a bluenerg_ms module; i've managed to make it work in slave and master mode (separately), and i'm now trying to wrap my head around the master&slave simultaneous mode.
What i currently do is to create a connection to a slave using the create_connection function, with this parameters:
aci_gap_create_connection(0x0010, 0x0010, STATIC_RANDOM_ADDR, slaveAddr, STATIC_RANDOM_ADDR, 0x36, 0x36, 0x00, 0xC80, 0x000C, 0x000C)
This procedure seems to work fine, the connection is established and the slave stops advertising (i can't see the slave device anymore using my phone). I then try to start an advertising procedure using the master&slave module, with these parameters:
aci_gap_set_discoverable(ADV_IND, 0x20, 0x100, STATIC_RANDOM_ADDR,NO_WHITE_LIST_USE, strlen(BLE_name) + 1, local_name, 0, NULL, 0xFFFF, 0xFFFF)
This function returns 0 (which i think is 'OK'), but i can't see the master&slave device using my phone. If i do the same procedure in reverse (advertise then connect), the advertising works fine, but the master&slave can't connect to the slave device. Is there something i'm doing wrong here?
Thanks,
Matteo
#bluenrg-master&slave #bluenrg-ms2017-04-04 03:59 AM
Hi Matteo
The issue you are facing can be related to the values of ADV and SCAN intervals currently used.
Please, refer to the
function pack which is an helpful example of simultaneous deployment of Master and Slave roles.Regards
Andrea
2017-04-04 06:52 AM
Hi Andrea,
i used the same values as the function pack you linked me, but that had no effect (same result as before, function returns 0, but the device is not discoverable). The function pack uses PUBLIC_ADDR instead of STATIC_RANDOM_ADDR though: changing my code to PUBLIC_ADDR makes it work as intended, thank you! Do you have any idea why this happens? I'm pretty happy with the result as it is, but understanding why i coudn't use the STATIC_RANDOM_ADDR would help me avoid any future errors.
Thanks again.
Matteo
2017-04-04 08:50 AM
Hi Matteo
what is the version of the BlueNTG-MS FW you are using? Is it the latest one: 7.2c?