AnsweredAssumed Answered

Bluenrg_ms simultaneous master&slave

Question asked by Matteo Pezzoli on Apr 4, 2017
Latest reply on Apr 4, 2017 by Matteo Pezzoli


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?