Skip to main content
Visitor II
June 4, 2024
Question

BlueNRG-2, Whitelist and Advertising

  • June 4, 2024
  • 0 replies
  • 783 views

Hej Folks,

I have an application with multiple BlueNRG-2s. There are 1 Master and up to 5 Slaves. I would like to connect the master to these 5 Slaves only, so no other device can connect to them and vice versa. I thought about using a whitelist. Currently, the Slaves simply make them self discoverable, and connect to anyone who sends a request:

 

 

aci_gap_set_discoverable(ADV_IND, 	/* (Connectable undirected advertising) */
							MS_Connection_Parameters.Advertising_Interval,
							MS_Connection_Parameters.Advertising_Interval,
							0x00,				/* Public Device Address */
							NO_WHITE_LIST_USE,	/* Change that ?*/
							sizeof(Local_Name),
							Local_Name,
							0x00,				/* Service_Uuid_length */
							NULL,				/* Service List */
							0x0000,				/* Slave_Conn_Interval_Min */
							0x0000);			/* Slave_Conn_Interval_Max */

 

 

The Master on the other hand starts scanning for the slaves:

 

 

aci_gap_start_general_discovery_proc(MS_Connection_Parameters.Scan_Interval,
 MS_Connection_Parameters.Scan_Window,
 0x00,
 0x00);

 

 

I hoped if I use a whitelist, I could simply add for the Slaves the known Master and for the Master the known Slaves (like having known MACs stored in flash). But firstly, I don't know if that is the correct approach, and secondly I can't get the 'be only connectable for known devices'-stuff to work, if I brute force/ try-error every possible function call combination of the bluenrg-API it takes a bunch of time and I don't really increase my Know-How at that topic.

So my question (finally) has anyone a good example for BlueNRG-2 Whitelist or some recommendations?