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 /*
edamame22 0:29983394c6b6 2 * Copyright (c) 2016 ARM Limited. All rights reserved.
edamame22 0:29983394c6b6 3 * SPDX-License-Identifier: Apache-2.0
edamame22 0:29983394c6b6 4 * Licensed under the Apache License, Version 2.0 (the License); you may
edamame22 0:29983394c6b6 5 * not use this file except in compliance with the License.
edamame22 0:29983394c6b6 6 * You may obtain a copy of the License at
edamame22 0:29983394c6b6 7 *
edamame22 0:29983394c6b6 8 * http://www.apache.org/licenses/LICENSE-2.0
edamame22 0:29983394c6b6 9 *
edamame22 0:29983394c6b6 10 * Unless required by applicable law or agreed to in writing, software
edamame22 0:29983394c6b6 11 * distributed under the License is distributed on an AS IS BASIS, WITHOUT
edamame22 0:29983394c6b6 12 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
edamame22 0:29983394c6b6 13 * See the License for the specific language governing permissions and
edamame22 0:29983394c6b6 14 * limitations under the License.
edamame22 0:29983394c6b6 15 */
edamame22 0:29983394c6b6 16
edamame22 0:29983394c6b6 17
edamame22 0:29983394c6b6 18 #ifndef _PAL_H
edamame22 0:29983394c6b6 19 #define _PAL_H
edamame22 0:29983394c6b6 20
edamame22 0:29983394c6b6 21 #ifdef __cplusplus
edamame22 0:29983394c6b6 22 extern "C" {
edamame22 0:29983394c6b6 23 #endif
edamame22 0:29983394c6b6 24
edamame22 0:29983394c6b6 25
edamame22 0:29983394c6b6 26 //includes for common headers in PAL
edamame22 0:29983394c6b6 27 #include "pal_macros.h"
edamame22 0:29983394c6b6 28 #include "pal_configuration.h"
edamame22 0:29983394c6b6 29 #include "pal_errors.h"
edamame22 0:29983394c6b6 30 #include "pal_types.h"
edamame22 0:29983394c6b6 31
edamame22 0:29983394c6b6 32 //includes for modules headers.
edamame22 0:29983394c6b6 33 #include "pal_rtos.h"
edamame22 0:29983394c6b6 34 //#include "pal_socket.h"
edamame22 0:29983394c6b6 35
edamame22 0:29983394c6b6 36
edamame22 0:29983394c6b6 37
edamame22 0:29983394c6b6 38 //declarations for global init and destroy of PAL
edamame22 0:29983394c6b6 39
edamame22 0:29983394c6b6 40 /*! PAL initialization
edamame22 0:29983394c6b6 41 * This function will call each module's initialization function (if exist)
edamame22 0:29983394c6b6 42 * to allocate required resources and initiate them.
edamame22 0:29983394c6b6 43 * \return the function returns the status in the form of palStatus_t which will be PAL_SUCCESS(0) in case of success
edamame22 0:29983394c6b6 44 * and another negative value indicating a specific error code in case of failure
edamame22 0:29983394c6b6 45 */
edamame22 0:29983394c6b6 46 palStatus_t pal_init();
edamame22 0:29983394c6b6 47
edamame22 0:29983394c6b6 48 /*! PAL destruction
edamame22 0:29983394c6b6 49 * This function will call each module's destroy function (if exist)
edamame22 0:29983394c6b6 50 * to free resources.
edamame22 0:29983394c6b6 51 */
edamame22 0:29983394c6b6 52 void pal_destroy();
edamame22 0:29983394c6b6 53
edamame22 0:29983394c6b6 54
edamame22 0:29983394c6b6 55 #ifdef __cplusplus
edamame22 0:29983394c6b6 56 }
edamame22 0:29983394c6b6 57 #endif
edamame22 0:29983394c6b6 58 #endif //_PAL_H