No ACL setup yet! Denying access to everyone.
en:edu:zmitac:s2:aih:lab:nrf52zephyrblecentral
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:nrf52zephyrblecentral [2023/12/19 22:31] – [BLE Health Temperature peripheral] ktokarz | en:edu:zmitac:s2:aih:lab:nrf52zephyrblecentral [2023/12/19 23:19] (current) – [Tasks to do during the laboratory] ktokarz | ||
|---|---|---|---|
| Line 3: | Line 3: | ||
| BLE client must be configured to connect to the peripheral which exposes some specific service and characteristic. To do the lab exercise there is a need to create the peripheral device first. | BLE client must be configured to connect to the peripheral which exposes some specific service and characteristic. To do the lab exercise there is a need to create the peripheral device first. | ||
| ===== BLE Health Temperature peripheral ===== | ===== BLE Health Temperature peripheral ===== | ||
| - | The default Health Temperature example is sufficient to make the laboratory. How to import the project, flash, and execute is shown in {{ref>en: | + | The default Health Temperature example is sufficient to make the laboratory. How to import the project, flash, and execute is shown in {{https:// |
| ===== BLE central ==== | ===== BLE central ==== | ||
| Among the examples provided with Zephyr OS, there is also one complementary to the Health Temperature peripheral. It is named central_ht ((..\.platformio\packages\framework-zephyr\samples\bluetooth\central_ht)). The program is quite complex, here we will explain the most important elements and the process of establishing the connection.\\ | Among the examples provided with Zephyr OS, there is also one complementary to the Health Temperature peripheral. It is named central_ht ((..\.platformio\packages\framework-zephyr\samples\bluetooth\central_ht)). The program is quite complex, here we will explain the most important elements and the process of establishing the connection.\\ | ||
| Line 45: | Line 45: | ||
| Notice that after every successful discovery the function " | Notice that after every successful discovery the function " | ||
| While the peripheral device updates the thermometer sensor reading, our central device receives this data and calls the " | While the peripheral device updates the thermometer sensor reading, our central device receives this data and calls the " | ||
| + | ===== Tasks to do during the laboratory ===== | ||
| + | - Create the Health Thermometer peripheral device and test if it operates properly | ||
| + | - Import central device program " | ||
| + | - Compile and execute it observing its behaviour with and without peripheral running | ||
| + | - Modify the peripheral code and central code to enable LED control on the central board with a button press on the peripheral board | ||
| + | < | ||
| + | If you find problems with undefined BT_ATT_FIRST_ATTRIBUTE_HANDLE and BT_ATT_LAST_ATTRIBUTE_HANDLE define them as in the following code. | ||
| + | </ | ||
| + | < | ||
| + | #define BT_ATT_FIRST_ATTRIBUTE_HANDLE 0x0001 | ||
| + | #define BT_ATT_LAST_ATTRIBUTE_HANDLE 0xFFFF | ||
| + | </ | ||
| + | < | ||
| + | To send simple binary data you can use a binary sensor service (UUID = 0x183B) with a binary sensor response characteristic (UUID = 0x2B2C). | ||
| + | </ | ||
en/edu/zmitac/s2/aih/lab/nrf52zephyrblecentral.1703021503.txt.gz · Last modified: by ktokarz
