Central and Peripheral
Role Central or Peripheral applies to the BLE connection itself. The device in the central role scans, looking for advertisement, and the device in the peripheral role makes the advertisement.
To understand the distinction, imagine that you have an Android phone and an activity tracker that is a BLE device. The phone supports the central role; the activity tracker supports the peripheral role (to establish a BLE connection you need one of each—two things that only support peripheral couldn't talk to each other, nor could two things that only support central).
Role Master and Slave
After a connection is established, the central device performs as a master and periodically polls the peripheral, which executes in slave role.
Before the Test
The BCM20732 does not support Master/Slave scenario. The BCM20736/BCM20737 will support the Master/Slave environment and is supported in the new SDK 2.x.
Read one of the following sessions to understand what are needed to test BLE. iOS device is used in my test. But Android device and Windows 8 PC can do the job as well.
The topology is as follows. EVB1 acts as Slave connected with iPhone. It acts as Master connected to EVB2 at the same time.
- Plug the EVB1(20736 or 20737, 20736 in this example) into your computer
- Build and download the application hello_client to EVB1 as showed in Figure 1
- Pair EVB1 with a client(iPhone4s or above with LightBlue)
- On iPhone(LightBlue) register for notifications
- Push a button on EVB1 to send notifications to the iPhone(LightBlue) as showed in Figure 2
- Build and download the application hello_sensor to EVB2 as showed in Figure 3. Make sure that your one slave device EVB2 (20732, 20736 or 20737 with hello_sensor) is up and advertising
- Push a button on EVB1 for 6 seconds. That will start connection process with EVB2.
- Push a button on the EVB2 with hello_sensor to deliver notification through hello_client device(EVB1) up to iPhone(LightBlue) as .
The topology is as follows. EVB1 acts as Slave connected with iPhone. It acts as Master connected to EVBx(x>=2) at the same time.
Repeat steps from 6 to 8 with another EVBx(x>=2) as showed in Figure 5, you can add more EVB with hello_sensor to the net and report notification.