BlueNRG advertise while having a connection
I'm trying to create a peripheral device that allows one Bluetooth central to connect to it, this part is working. Now I want the device to re-start advertisements when a central has made a connection. The advertisements should be non-connectable one's in this case, so I'm not trying to create a device that allows multiple concurrent connections.
I was assuming this would be as simple as just restarting the advertisements with:
ret = aci_gap_set_discoverable(ADV_NONCONN_IND, 160, 160, PUBLIC_ADDR,NO_WHITE_LIST_USE, 0, NULL, 0, NULL, 0, 0); after the connection has been made, so after a call to hci_le_connection_complete_event, but the function returns 0x0C -> BLE_ERROR_COMMAND_DISALLOWED. What am I doing wrong? Why is the command not allowed?
