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/
pal/README.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 | # PAL |
edamame22 | 0:29983394c6b6 | 2 | This is the main repository for the Platform Abstraction Layer (PAL) project. |
edamame22 | 0:29983394c6b6 | 3 | |
edamame22 | 0:29983394c6b6 | 4 | # Releases |
edamame22 | 0:29983394c6b6 | 5 | |
edamame22 | 0:29983394c6b6 | 6 | In order to get the latest stable and tested code, plesae goto [releases](https://github.com/ARMmbed/mbed-client-pal/releases) |
edamame22 | 0:29983394c6b6 | 7 | and download the required release version - each release has a comment regarding which official mbedOS version was used for |
edamame22 | 0:29983394c6b6 | 8 | development and testing. |
edamame22 | 0:29983394c6b6 | 9 | |
edamame22 | 0:29983394c6b6 | 10 | |
edamame22 | 0:29983394c6b6 | 11 | # General Use Notes |
edamame22 | 0:29983394c6b6 | 12 | |
edamame22 | 0:29983394c6b6 | 13 | * `pal_init()` API MUST be called before using any other PAL API, calling PAL APIs without |
edamame22 | 0:29983394c6b6 | 14 | initialization PAL can return with initialization error. |
edamame22 | 0:29983394c6b6 | 15 | * `pal_destroy()` API MUST ba called to free any allocated resources by PAL Modules. |
edamame22 | 0:29983394c6b6 | 16 | |
edamame22 | 0:29983394c6b6 | 17 | |
edamame22 | 0:29983394c6b6 | 18 | # How To Build PAL Tests |
edamame22 | 0:29983394c6b6 | 19 | ## MbedOS |
edamame22 | 0:29983394c6b6 | 20 | |
edamame22 | 0:29983394c6b6 | 21 | 1. Define the environment variable: `MBEDOS_ROOT` to be the father folder of "mbed-os". |
edamame22 | 0:29983394c6b6 | 22 | 2. `cd $(PAL_FOLDER)/Test/` |
edamame22 | 0:29983394c6b6 | 23 | 3. make mbedOS_all - This will build the tests for mbedOS5.2 (mbed-os-5.2)over Freescale-K64F board. |
edamame22 | 0:29983394c6b6 | 24 | 4. In order to build and run the tests over the platform please run: |
edamame22 | 0:29983394c6b6 | 25 | |
edamame22 | 0:29983394c6b6 | 26 | $ make mbedOS_check |
edamame22 | 0:29983394c6b6 | 27 | |
edamame22 | 0:29983394c6b6 | 28 | 5. In order to see debug prints please send the following flag `DEBUG=1` in compilation command: |
edamame22 | 0:29983394c6b6 | 29 | |
edamame22 | 0:29983394c6b6 | 30 | $ make mbedOS_check DEBUG=1 |
edamame22 | 0:29983394c6b6 | 31 | |
edamame22 | 0:29983394c6b6 | 32 | 6. In order to build single module tests please edit `$(PAL_FOLDER)/Test/makefile` |
edamame22 | 0:29983394c6b6 | 33 | under mbedOS5.1 platform, please change the value of the `TARGET_CONFIGURATION_DEFINES` to the |
edamame22 | 0:29983394c6b6 | 34 | desired module: (default value is for all exist modules) |
edamame22 | 0:29983394c6b6 | 35 | |
edamame22 | 0:29983394c6b6 | 36 | HAS_RTOS --> RTOS module APIs |
edamame22 | 0:29983394c6b6 | 37 | HAS_SOCKET --> Networking module APIs |
edamame22 | 0:29983394c6b6 | 38 | |
edamame22 | 0:29983394c6b6 | 39 | |
edamame22 | 0:29983394c6b6 | 40 | |
edamame22 | 0:29983394c6b6 | 41 | # PAL Repository Directory structure |
edamame22 | 0:29983394c6b6 | 42 | ``` |
edamame22 | 0:29983394c6b6 | 43 | │ |
edamame22 | 0:29983394c6b6 | 44 | ├── Build //Auto generated during build folder |
edamame22 | 0:29983394c6b6 | 45 | │ └── mbedOS //inncludes .a files |
edamame22 | 0:29983394c6b6 | 46 | │ └── obj //includes obj files |
edamame22 | 0:29983394c6b6 | 47 | │ |
edamame22 | 0:29983394c6b6 | 48 | ├── Docs |
edamame22 | 0:29983394c6b6 | 49 | │ |
edamame22 | 0:29983394c6b6 | 50 | ├── Examples |
edamame22 | 0:29983394c6b6 | 51 | │ |
edamame22 | 0:29983394c6b6 | 52 | ├── Source |
edamame22 | 0:29983394c6b6 | 53 | │ ├── PAL-Impl |
edamame22 | 0:29983394c6b6 | 54 | │ │ ├── Modules |
edamame22 | 0:29983394c6b6 | 55 | │ │ │ ├── Networking |
edamame22 | 0:29983394c6b6 | 56 | │ │ │ ├── RTOS |
edamame22 | 0:29983394c6b6 | 57 | │ │ │ └── Update |
edamame22 | 0:29983394c6b6 | 58 | │ │ ├── Services-API //High level Services API for mbed-client to call |
edamame22 | 0:29983394c6b6 | 59 | │ │ └── pal_init.c //this file contains the global PAL initialization function |
edamame22 | 0:29983394c6b6 | 60 | │ │ |
edamame22 | 0:29983394c6b6 | 61 | │ └── Port |
edamame22 | 0:29983394c6b6 | 62 | │ | ├── Platform-API //Low level platform oriented API for cutomer to implement |
edamame22 | 0:29983394c6b6 | 63 | │ | └── Reference-Impl |
edamame22 | 0:29983394c6b6 | 64 | │ | | └── mbedOS |
edamame22 | 0:29983394c6b6 | 65 | │ | | | ├── Networking |
edamame22 | 0:29983394c6b6 | 66 | │ | | | ├── RTOS |
edamame22 | 0:29983394c6b6 | 67 | │ | | | └── Update |
edamame22 | 0:29983394c6b6 | 68 | │ |
edamame22 | 0:29983394c6b6 | 69 | ├── Test |
edamame22 | 0:29983394c6b6 | 70 | │ ├── Common //contains common headers for tests |
edamame22 | 0:29983394c6b6 | 71 | │ ├── Scripts |
edamame22 | 0:29983394c6b6 | 72 | │ ├── Unitest //contains the Unitests source code for each module (RTOS, Update, etc) |
edamame22 | 0:29983394c6b6 | 73 | │ └── Unity //contains the Unity framework source code |
edamame22 | 0:29983394c6b6 | 74 | │ |
edamame22 | 0:29983394c6b6 | 75 | ├── Utils |
edamame22 | 0:29983394c6b6 | 76 | │ └── Scripts |
edamame22 | 0:29983394c6b6 | 77 | │ |
edamame22 | 0:29983394c6b6 | 78 | ├── PAL MakeFile |
edamame22 | 0:29983394c6b6 | 79 | ├── Project editor proj file |
edamame22 | 0:29983394c6b6 | 80 | ├── PAL Master Build Script |
edamame22 | 0:29983394c6b6 | 81 | └── Main index Readme file |
edamame22 | 0:29983394c6b6 | 82 | |
edamame22 | 0:29983394c6b6 | 83 | ``` |
edamame22 | 0:29983394c6b6 | 84 |