No ACL setup yet! Denying access to everyone.
en:edu:zmitac:s2:aih:lab:nrf52zephyrblebeacon
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| en:edu:zmitac:s2:aih:lab:nrf52zephyrblebeacon [2023/12/09 14:50] – ktokarz | en:edu:zmitac:s2:aih:lab:nrf52zephyrblebeacon [2023/12/09 18:42] (current) – ktokarz | ||
|---|---|---|---|
| Line 3: | Line 3: | ||
| This example advertises the device as the "Test beacon" | This example advertises the device as the "Test beacon" | ||
| - | After importing it to the Visual Studio Code we should make some configuration: | + | After importing it to the Visual Studio Code we should make some configuration: |
| + | < | ||
| + | CONFIG_BT=y | ||
| + | CONFIG_BT_DEBUG_LOG=y | ||
| + | CONFIG_BT_DEVICE_NAME=" | ||
| + | </ | ||
| This example starts the Bluetooth interface with the function bt_enable() that passes the pointer to the bt_ready() which is the callback function to notify that initialization has finished. | This example starts the Bluetooth interface with the function bt_enable() that passes the pointer to the bt_ready() which is the callback function to notify that initialization has finished. | ||
| < | < | ||
| Line 16: | Line 21: | ||
| The argument " | The argument " | ||
| - | The " | + | The " |
| < | < | ||
| static const struct bt_data ad[] = { | static const struct bt_data ad[] = { | ||
| Line 33: | Line 38: | ||
| It contains three elements of specific types. The complete list of types with their identifiers you can find in the official Bluetooth SiG website ((https:// | It contains three elements of specific types. The complete list of types with their identifiers you can find in the official Bluetooth SiG website ((https:// | ||
| <table bletypes> | <table bletypes> | ||
| - | <caption List of elements of the advertising frame> | + | <caption> List of elements of the advertising frame data</ |
| - | Type ID ^ Type name ^ Content | + | ^ Type ID ^ Type name (as in BLE specification) |
| - | 0x01 | Flags | specifies if BR/EDR is supported | + | | 0x01 | Flags | specifies if BR/EDR is supported |
| - | 0x03 | List of 16-bit | + | | 0x03 | Complete |
| - | 0x16 | service data with 16-bit UUID | UUID and content of Eddystone data | + | | 0x16 | Service Data - 16-bit UUID | UUID and content of Eddystone data | |
| + | </ | ||
| + | |||
| + | The " | ||
| + | <table blesdtypes> | ||
| + | < | ||
| + | ^ Type ID ^ Type name (as in BLE specification) ^ Content ^ | ||
| + | | 0x09 | Complete Local Name | name of the device | | ||
| </ | </ | ||
| You can observe the details in the nRF Connect application on your mobile phone. | You can observe the details in the nRF Connect application on your mobile phone. | ||
| - | The " | + | The beacon example is very simple because the beacon device is intended to advertise only, so there is no further functionality implemented. This example shows the so-called Eddystone format (([[https:// |
| - | + | ||
| - | The beacon example is very simple because the beacon device is intended to advertise only so, there is no further functionality implemented. This example shows the so-called Eddystone format (([[https:// | + | |
| For example, web prefixes can be encoded as in the table {{ref> | For example, web prefixes can be encoded as in the table {{ref> | ||
| <table eddyprefix> | <table eddyprefix> | ||
| Line 73: | Line 83: | ||
| | 13 | 0x0d | .gov | | | 13 | 0x0d | .gov | | ||
| </ | </ | ||
| + | ===== Tasks to do during the laboratory ===== | ||
| + | - Import the Zephyr BLE Beacon example, compile it, and run. | ||
| + | - Use the nRF Connect application (For Android mobile) and find the "Test beacon" | ||
| + | - Modify the software obtaining different prefixes and suffixes for the beacon. | ||
| + | - Modify the name of the device with "Polsl Beacon", | ||
| + | |||
en/edu/zmitac/s2/aih/lab/nrf52zephyrblebeacon.1702129833.txt.gz · Last modified: by ktokarz
