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/

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?

UserRevisionLine numberNew contents of line
edamame22 0:29983394c6b6 1 ## PAL porting guide
edamame22 0:29983394c6b6 2
edamame22 0:29983394c6b6 3 This document describes the process of PAL porting to different operating systems. During the process, you need to work
edamame22 0:29983394c6b6 4 with the [**Port**](https://github.com/ARMmbed/mbed-client-pal/tree/master/Source/Port) folder that contains two sub-folders: *[Platform-API](https://github.com/ARMmbed/pal/tree/master/Source/Port/Platform-API)* and *[Reference-Impl](https://github.com/ARMmbed/pal/tree/master/Source/Port/Reference-Impl)*.
edamame22 0:29983394c6b6 5
edamame22 0:29983394c6b6 6 ### Platform-API
edamame22 0:29983394c6b6 7
edamame22 0:29983394c6b6 8 The *[Platform-API](https://github.com/ARMmbed/pal/tree/master/Source/Port/Platform-API)* folder contains the header files declaring the interfaces that MUST be implemented by the platform. The APIs are documented in the header files and the Doxygen documentation with the same content is also available.
edamame22 0:29983394c6b6 9 The documentation declares the input/output parameters, return values and the eventual special return values.
edamame22 0:29983394c6b6 10 The header file names are related to the PAL modules they are declaring. For example:
edamame22 0:29983394c6b6 11
edamame22 0:29983394c6b6 12 ```
edamame22 0:29983394c6b6 13 pal_plat_rtos.h --> presents the RealTime OS APIs required by the
edamame22 0:29983394c6b6 14 services and Must be implemented by platform.
edamame22 0:29983394c6b6 15 ```
edamame22 0:29983394c6b6 16
edamame22 0:29983394c6b6 17 <span class="notes">The APIs are called directly from the *Service* implementation layer. Therefore, you MUST NOT change them.</span>
edamame22 0:29983394c6b6 18
edamame22 0:29983394c6b6 19 ### Reference-Impl
edamame22 0:29983394c6b6 20
edamame22 0:29983394c6b6 21 The *[Reference-Impl](https://github.com/ARMmbed/pal/tree/master/Source/Port/Reference-Impl)* folder contains the reference platform implementations in their respective folders.
edamame22 0:29983394c6b6 22 Each OS folder contains a list of folders of the required PAL modules to be implemented by the platform, for example:
edamame22 0:29983394c6b6 23
edamame22 0:29983394c6b6 24 ```
edamame22 0:29983394c6b6 25 Networking --> contains networking related files.
edamame22 0:29983394c6b6 26 ```
edamame22 0:29983394c6b6 27
edamame22 0:29983394c6b6 28 ### Porting to a new platform
edamame22 0:29983394c6b6 29
edamame22 0:29983394c6b6 30 1. Add a new platform folder to the *[Reference-Impl](https://github.com/ARMmbed/pal/tree/master/Source/Port/Reference-Impl)* folder.
edamame22 0:29983394c6b6 31 2. Add the module folders into the new platform folder.
edamame22 0:29983394c6b6 32 3. Read the relevent API/Module documentation.
edamame22 0:29983394c6b6 33 4. Start coding.
edamame22 0:29983394c6b6 34
edamame22 0:29983394c6b6 35 #### Essential header files
edamame22 0:29983394c6b6 36
edamame22 0:29983394c6b6 37 Here is a list of tips that can help in porting:
edamame22 0:29983394c6b6 38
edamame22 0:29983394c6b6 39 * Include the **[pal.h](https://github.com/ARMmbed/pal/blob/master/Source/PAL-Impl/Services-API/pal.h)** file; it includes all the required headers from PAL, such as `pal_errors.h` and `pal_macros.h`.
edamame22 0:29983394c6b6 40 * Read the **[pal_errors.h](https://github.com/ARMmbed/pal/blob/master/Source/PAL-Impl/Services-API/pal_errors.h)** file to find out how to map the platform errors to the PAL errors.
edamame22 0:29983394c6b6 41 * Read the **[pal_macros.h](https://github.com/ARMmbed/pal/blob/master/Source/PAL-Impl/Services-API/pal_macros.h)** to find helpful PAL macros.
edamame22 0:29983394c6b6 42 * Include the **pal_(MODULE).h** file to get the relevant data structures.