This is an example of BLE GATT Client, which receives broadcast data from BLE_Server_BME280 ( a GATT server) , then transfers values up to mbed Device Connector (cloud).
Please refer details about BLEClient_mbedDevConn below. https://github.com/soramame21/BLEClient_mbedDevConn
The location of required BLE GATT server, BLE_Server_BME280, is at here. https://developer.mbed.org/users/edamame22/code/BLE_Server_BME280/
docs/testing.md@2:b894b3508057, 2017-09-05 (annotated)
- Committer:
- Ren Boting
- Date:
- Tue Sep 05 11:56:13 2017 +0900
- Revision:
- 2:b894b3508057
- Parent:
- 0:29983394c6b6
Update all libraries and reform main.cpp
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
edamame22 | 0:29983394c6b6 | 1 | ## Testing the application ``BLEClient_mbedDevConn`` |
edamame22 | 0:29983394c6b6 | 2 | |
edamame22 | 0:29983394c6b6 | 3 | 1. Flash the application. |
edamame22 | 0:29983394c6b6 | 4 | 2. Verify that the registration succeeded. You should see `Registered object successfully!` printed to the serial port. |
edamame22 | 0:29983394c6b6 | 5 | 3. On mbed Device Connector, go to [My devices > Connected devices](https://connector.mbed.com/#endpoints). Your device should be listed here. |
edamame22 | 0:29983394c6b6 | 6 | 4. Go to [Device Connector > API Console](https://connector.mbed.com/#console). |
edamame22 | 0:29983394c6b6 | 7 | 5. Click the **Endpoint directory lookups** drop down menu. |
edamame22 | 0:29983394c6b6 | 8 | ![](/docs/img/ep_lookup.PNG) |
edamame22 | 0:29983394c6b6 | 9 | 6. In the menu, click **GET** next to **Endpoint's resource representation**. Select your _endpoint_ and _resource-path_. For example, the _endpoint_ is the identifier of your endpoint that can be found in the `security.h` file as `MBED_ENDPOINT_NAME`. Choose `/3303/0/5700`as a resource path and click **TEST API**. |
edamame22 | 0:29983394c6b6 | 10 | 7. The temperature value from BME280 is shown. |
edamame22 | 0:29983394c6b6 | 11 | |
edamame22 | 0:29983394c6b6 | 12 | <span class="tips">**Tip:** If you get an error, for example `Server Response: 410 (Gone)`, clear your browser's cache, log out, and log back in.</span> |
edamame22 | 0:29983394c6b6 | 13 | |
edamame22 | 0:29983394c6b6 | 14 | <span class="notes">**Note:** Only GET methods can be executed through [Device Connector > API Console](https://connector.mbed.com/#console). For other methods, check the [mbed Device Connector Quick Start](https://github.com/ARMmbed/mbed-connector-api-node-quickstart). |
edamame22 | 0:29983394c6b6 | 15 | |
edamame22 | 0:29983394c6b6 | 16 | ### Application resources |
edamame22 | 0:29983394c6b6 | 17 | |
edamame22 | 0:29983394c6b6 | 18 | The application exposes three [resources](https://docs.mbed.com/docs/mbed-device-connector-web-interfaces/en/latest/#the-mbed-device-connector-data-model): |
edamame22 | 0:29983394c6b6 | 19 | |
edamame22 | 0:29983394c6b6 | 20 | 1. `/3303/0/5700`- Temperature |
edamame22 | 0:29983394c6b6 | 21 | 1. `/3304/0/5700`- Humidity |
edamame22 | 0:29983394c6b6 | 22 | 1. `/3323/0/5700`- Pressure |
edamame22 | 0:29983394c6b6 | 23 | |
edamame22 | 0:29983394c6b6 | 24 | To learn how to get notifications when resource 1 changes, or how to use resources 2 and 3, read the [mbed Device Connector Quick Start](https://github.com/ARMmbed/mbed-connector-api-node-quickstart). |