Hi,
I've developed a relay application based off of the ble_app_hrs_rscs_relay_pca10040_s132 example in SES using a Laird BL652 module (nRF52832 underlying device). Presently the program works to connect to a predefined target peripheral name/address (relay to sensor devices) and to have the relay device connected to one central as a peripheral (relay to phone connection). I have two questions:
First - How can I redefine the target peripheral I want to connect to from a Phone (in this case a Central to the Peripheral side of the relay)? What I'm intending is for the Phone to capture the advertisements of the sensor peripheral devices, confirm that a connection is wanted and pass the name and address on to the Relay (nRF52832 Laird BL652 device) which would redefine the target peripheral name/address which would set a filter matched event and start a connection. Is this possible? If so how would it be approached?
Second - I've been able to connect two of the same named target peripherals and receive data from both, but I would like to connect two different peripherals to the Relay device. For example "SENSOR1" and "SENSOR2". How would I define this to be able to connect to two different ones as well as be able to disconnect, redefine and reconnect to a any new combination of SENSOR devices?
/**@brief Names which the central applications will scan for, and which will be advertised by the peripherals.
* if these are set to empty strings, the UUIDs defined below will be used
*/
static char const m_target_periph_name[] = "SENSOR1"; /**< If you want to connect to a peripheral using a given advertising name, type its name here. */
Thanks!