Added support for obtaining BLE device name by parsing advertising data.

Fork of BLE_BlueNRG by Mridupawan Das

Committer:
mridup
Date:
Fri Jul 25 09:09:13 2014 +0000
Revision:
6:08cfc94b5f49
Parent:
1:7f6acb118c2d
Removing code references. Renaming some functions/variables, comments.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mridup 1:7f6acb118c2d 1 /* mbed Microcontroller Library
mridup 1:7f6acb118c2d 2 * Copyright (c) 2006-2013 ARM Limited
mridup 1:7f6acb118c2d 3 *
mridup 1:7f6acb118c2d 4 * Licensed under the Apache License, Version 2.0 (the "License");
mridup 1:7f6acb118c2d 5 * you may not use this file except in compliance with the License.
mridup 1:7f6acb118c2d 6 * You may obtain a copy of the License at
mridup 1:7f6acb118c2d 7 *
mridup 1:7f6acb118c2d 8 * http://www.apache.org/licenses/LICENSE-2.0
mridup 1:7f6acb118c2d 9 *
mridup 1:7f6acb118c2d 10 * Unless required by applicable law or agreed to in writing, software
mridup 1:7f6acb118c2d 11 * distributed under the License is distributed on an "AS IS" BASIS,
mridup 1:7f6acb118c2d 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
mridup 1:7f6acb118c2d 13 * See the License for the specific language governing permissions and
mridup 1:7f6acb118c2d 14 * limitations under the License.
mridup 1:7f6acb118c2d 15 */
mridup 1:7f6acb118c2d 16 /*
mridup 1:7f6acb118c2d 17 #ifdef __cplusplus
mridup 1:7f6acb118c2d 18 extern "C" {
mridup 1:7f6acb118c2d 19 #endif*/
mridup 1:7f6acb118c2d 20 #if 0
mridup 1:7f6acb118c2d 21 #include "btle.h"
mridup 1:7f6acb118c2d 22
mridup 1:7f6acb118c2d 23 #include "hw/Gap.h"
mridup 1:7f6acb118c2d 24 #include "hw/GattServer.h"
mridup 1:7f6acb118c2d 25 #include "hw/BLEDevice.h"
mridup 1:7f6acb118c2d 26
mridup 1:7f6acb118c2d 27 /*
mridup 1:7f6acb118c2d 28 #ifdef __cplusplus
mridup 1:7f6acb118c2d 29 }
mridup 1:7f6acb118c2d 30 #endif*/
mridup 1:7f6acb118c2d 31 #include "mbed.h"
mridup 1:7f6acb118c2d 32 #include "blecommon.h"
mridup 1:7f6acb118c2d 33
mridup 1:7f6acb118c2d 34 #include "blueNRGGap.h"
mridup 1:7f6acb118c2d 35 #include "blueNRGGattServer.h"
mridup 1:7f6acb118c2d 36
mridup 1:7f6acb118c2d 37
mridup 1:7f6acb118c2d 38 /*************************************************************************
mridup 1:7f6acb118c2d 39 !
mridup 1:7f6acb118c2d 40 \brief
mridup 1:7f6acb118c2d 41
mridup 1:7f6acb118c2d 42
mridup 1:7f6acb118c2d 43 *************************************************************************/
mridup 1:7f6acb118c2d 44 void test_function(void);
mridup 1:7f6acb118c2d 45
mridup 1:7f6acb118c2d 46 void test_function(void)
mridup 1:7f6acb118c2d 47 {
mridup 1:7f6acb118c2d 48 //btle_init();
mridup 1:7f6acb118c2d 49
mridup 1:7f6acb118c2d 50 }
mridup 1:7f6acb118c2d 51
mridup 1:7f6acb118c2d 52 class BTLE_Test //: public BLEDeviceInstanceBase
mridup 1:7f6acb118c2d 53 {
mridup 1:7f6acb118c2d 54 public:
mridup 1:7f6acb118c2d 55 BTLE_Test(void);
mridup 1:7f6acb118c2d 56 virtual ~BTLE_Test(void);
mridup 1:7f6acb118c2d 57 void Init(void);
mridup 1:7f6acb118c2d 58
mridup 1:7f6acb118c2d 59 /*virtual Gap& getGap() { return blueNRGGap::getInstance(); };
mridup 1:7f6acb118c2d 60 virtual GattServer& getGattServer() { return blueNRGGattServer::getInstance(); };
mridup 1:7f6acb118c2d 61 virtual ble_error_t init(void);
mridup 1:7f6acb118c2d 62 virtual ble_error_t reset(void);
mridup 1:7f6acb118c2d 63 virtual void waitForEvent(void); */
mridup 1:7f6acb118c2d 64 };
mridup 1:7f6acb118c2d 65
mridup 1:7f6acb118c2d 66 void BTLE_Test::Init(void) {
mridup 1:7f6acb118c2d 67 //btle_init();
mridup 1:7f6acb118c2d 68 }
mridup 1:7f6acb118c2d 69
mridup 1:7f6acb118c2d 70 #endif