nRF51 SDK - S110 SoftDevice
|
The Beacon Transmitter Sample Application is a firmware example that implements a transmitter beacon using the Nordic nRF51822 evaluation board.
The source code and project file can be found in the <InstallFolder>\Nordic\nrf51822\Board\pca10001\s110\ble_app_beacon
folder.
The Beacon broadcasts information to all compatible devices in its range as Manufacturer Specific Data in the advertisement packets.
This information includes:
LED assignments:
This example implements an optional feature which allows the change of Major and Minor values used in the advertisement packets without the need to recompile the application each time. To use this feature, the compiler define USE_UICR_FOR_MAJ_MIN_VALUES should be defined during compilation. If this is done, the application uses the value of the UICR (User Information Configuration Register) located at address 0x10001080 and to populate the major and minor values. Whenever the values need to be updated, the user would have to set the UICR to a desired value using the nrfjprog tool and restart the application to bring the changes into effect. The byte ordering used when decoding the UICR value is shown in the image below.
See Testing for more on how to use this feature.
The Beacon Transmitter Sample Application can be tested using the Master Control Panel as follows:
Observe that the Advertising Type is 'Non-connectable' and the Manufacturer Specific Data field of the Advertising Data is as follows:
4C-00-02-15-01-12-23-34-45-56-67-78-89-9A-AB-BC-CD-DE-EF-F0-01-02-03-04-C3
Reset the board and observe the bytes in bold below are seen in the Manufacturer Specific Data field of the Advertising Data. This indicates that the Major and Minor values have been picked up from the UICR register written in the above step.
xx-xx-xx-xx-xx-xx-xx-xx-xx-xx-xx-xx-xx-xx-xx-xx-xx-xx-xx-xx-AB-CD-01-02-xx