This is an example to broadcast measured value of BME280 through BLE GATT service.

Dependencies:   BME280

please refer detail information at GitHub. https://github.com/soramame21/BLE_Server_BME280

Committer:
Ren Boting
Date:
Fri Aug 25 15:47:39 2017 +0900
Revision:
4:a937975ebe7e
Parent:
0:f22fa5cc4d56
Move print lines into a Debug option.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
edamame22 0:f22fa5cc4d56 1 ## Discoverying BME280 from `nRF Connect`
edamame22 0:f22fa5cc4d56 2 `nRF Connect` is a free Nordic App can be downloaeded and installed on smartphone.
edamame22 0:f22fa5cc4d56 3
edamame22 0:f22fa5cc4d56 4 **Note:** Screens captures depicted below show what is expected from this example if the scanner used is nRF Master Control Panel version 4.9.0. If you encounter any difficulties consider trying another scanner or another version of nRF Master Control Panel. Alternative scanners may require reference to their manuals.
edamame22 0:f22fa5cc4d56 5
edamame22 0:f22fa5cc4d56 6 1. Build and install this application on your board (=mbed device) as explained above.
edamame22 0:f22fa5cc4d56 7 1. Open the BLE scanner on your phone.
edamame22 0:f22fa5cc4d56 8 1. Start a scan, then find the device which should be named `BME280`
edamame22 0:f22fa5cc4d56 9
edamame22 0:f22fa5cc4d56 10 ![](./Screenshot_BME280.png)
edamame22 0:f22fa5cc4d56 11
edamame22 0:f22fa5cc4d56 12 **figure 1** Scaning result nRF Master Control Panel 4.9.0
edamame22 0:f22fa5cc4d56 13
edamame22 0:f22fa5cc4d56 14 1. Establish a connection with your device.
edamame22 0:f22fa5cc4d56 15
edamame22 0:f22fa5cc4d56 16 ![](./Screenshot_BME280-connect.png)
edamame22 0:f22fa5cc4d56 17
edamame22 0:f22fa5cc4d56 18 **figure 2** How to establish a connection using nRF Master Control Panel 4.9.0
edamame22 0:f22fa5cc4d56 19
edamame22 0:f22fa5cc4d56 20 1. Discover the service which has the UUID 0x181A
edamame22 0:f22fa5cc4d56 21
edamame22 0:f22fa5cc4d56 22 ![](./Screenshot_services.png)
edamame22 0:f22fa5cc4d56 23
edamame22 0:f22fa5cc4d56 24 **figure 3** Representation of Environmental Sensing service
edamame22 0:f22fa5cc4d56 25
edamame22 0:f22fa5cc4d56 26 1. Discover 3 characteristics of the service.
edamame22 0:f22fa5cc4d56 27
edamame22 0:f22fa5cc4d56 28 Humidity with UUID: 0x2A6F
edamame22 0:f22fa5cc4d56 29
edamame22 0:f22fa5cc4d56 30 Pressure with UUID: 0x2A6D
edamame22 0:f22fa5cc4d56 31
edamame22 0:f22fa5cc4d56 32 Temperature with UUID: 0x2A6E
edamame22 0:f22fa5cc4d56 33
edamame22 0:f22fa5cc4d56 34 ![](./Screenshot_characteristics.png)
edamame22 0:f22fa5cc4d56 35
edamame22 0:f22fa5cc4d56 36 **figure 4** Representation of 3 characteristics
edamame22 0:f22fa5cc4d56 37
edamame22 0:f22fa5cc4d56 38 1. Read sensor value
edamame22 0:f22fa5cc4d56 39
edamame22 0:f22fa5cc4d56 40 ![](./Screenshot_readvalue.png)
edamame22 0:f22fa5cc4d56 41
edamame22 0:f22fa5cc4d56 42 **figure 5** How to read a value
edamame22 0:f22fa5cc4d56 43
edamame22 0:f22fa5cc4d56 44 present temperature value
edamame22 0:f22fa5cc4d56 45
edamame22 0:f22fa5cc4d56 46 ![](./Screenshot_temperature.png)
edamame22 0:f22fa5cc4d56 47
edamame22 0:f22fa5cc4d56 48 **figure 6** presentation of temperature value