Skip to content

Commit 7414fad

Browse files
Abbas Bracken Ziadpaul-szczepanek-arm
authored andcommitted
Corrections 28/12
- Add lib in requires - Change name of demo class - Add captions to remaining figures - Correct current time images
1 parent 95b2fd8 commit 7414fad

File tree

7 files changed

+14
-6
lines changed

7 files changed

+14
-6
lines changed

BLE_GattServer_ExperimentalServices/README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Table 1 shows the byte stream required to set the device's current time to Wed,
2020

2121
| B0 | B1 | B2 | B3 | B4 | B5 | B6 | B7 | B8 | B9 |
2222
|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|
23-
| 0xD9 | 0x07 | 0x0A | 0x13 | 0x0B | 0x23 | 0x25 | 0x03 | 0x00 | 0x00 |
23+
| 0xD9 | 0x07 | 0x0A | 0x1C | 0x0B | 0x23 | 0x25 | 0x03 | 0x00 | 0x00 |
2424

2525
**Table 1. Byte stream required to set the device's current time to Wed, 28 Oct 2009 11:35:37**
2626

@@ -79,16 +79,24 @@ The illustrations will be different for other clients.
7979

8080
![](img/select_cts.png)
8181

82+
**Fig. 6. Selecting the Current Time Service**
83+
8284
* Press the upward pointing arrow to interact with the current time characteristic (Fig. 7)
8385

8486
![](img/interact_current_time.png)
8587

88+
**Fig. 7. Interacting with the current time characteristic**
89+
8690
* Create a new write value for the byte stream in Table 1, save and load it, and press send (Fig. 8)
8791

8892
![](img/write_current_time.png)
8993

94+
**Fig. 8. Writing the current time characteristic**
95+
9096
* Confirm that the value parameter was updated with the correct date/time after the write (Fig. 9)
9197

9298
![](img/read_current_time.png)
9399

100+
**Fig. 9. Reading the current time characteristic**
101+
94102
* The current time in seconds should appear at your terminal, i.e. "1256729737"
Loading
Loading
Loading
Loading

BLE_GattServer_ExperimentalServices/mbed_app.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"target_overrides": {
33
"*": {
44
"platform.stdio-baud-rate": 115200,
5-
"target.requires": ["ble-service-link-loss"]
5+
"target.requires": ["ble-service-link-loss","ble-current-time-service"]
66
},
77
"K64F": {
88
"target.components_add": ["BlueNRG_MS"],

BLE_GattServer_ExperimentalServices/source/main.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ const static char DEVICE_NAME[] = "ExperimentalServices";
2828
static events::EventQueue event_queue(/* event count */ 10 * EVENTS_EVENT_SIZE);
2929
static ChainableGapEventHandler chainable_gap_event_handler;
3030

31-
class LinkLossDemo : ble::Gap::EventHandler, LinkLossService::EventHandler, CurrentTimeService::EventHandler {
31+
class ExperimentalServicesDemo : ble::Gap::EventHandler, LinkLossService::EventHandler, CurrentTimeService::EventHandler {
3232
public:
33-
LinkLossDemo(BLE &ble, events::EventQueue &event_queue, ChainableGapEventHandler &chainable_gap_event_handler) :
33+
ExperimentalServicesDemo(BLE &ble, events::EventQueue &event_queue, ChainableGapEventHandler &chainable_gap_event_handler) :
3434
_ble(ble),
3535
_event_queue(event_queue),
3636
_chainable_gap_event_handler(chainable_gap_event_handler),
@@ -42,7 +42,7 @@ class LinkLossDemo : ble::Gap::EventHandler, LinkLossService::EventHandler, Curr
4242

4343
void start()
4444
{
45-
_ble.init(this, &LinkLossDemo::on_init_complete);
45+
_ble.init(this, &ExperimentalServicesDemo::on_init_complete);
4646

4747
_event_queue.dispatch_forever();
4848
}
@@ -177,7 +177,7 @@ int main()
177177

178178
set_time(1256729737); // Set RTC time to Wed, 28 Oct 2009 11:35:37
179179

180-
LinkLossDemo demo(ble, event_queue, chainable_gap_event_handler);
180+
ExperimentalServicesDemo demo(ble, event_queue, chainable_gap_event_handler);
181181
demo.start();
182182

183183
return 0;

0 commit comments

Comments
 (0)