BLE-WiFi with BIOSensors

Dependencies:   AS7000 BNO055 NNN50_WIFI_API

DELTA NNN50 (Bluetooth LE 4.X & 802.11 b/g/n) with Bio Sensor (HRM, 9DoF motion Sensor) reference design.

Env. Setup step by step.

  1. Download or build a TCP Server on you host computer
    1. Please find out the TCP server code or install TCP server application in your host computer.
  2. Import this sample application and setup these information about AP & TCP Server
    1. *char* AP_SSID = "SOG";
    2. *char* AP_PWD = "1122334455667788";
    3. *char* TCP_SERVER_ADDRESS = "10.0.1.13";
    4. *int TCP_SERVER_PORT = 1030;
  3. Compiler your code and download to your mBed device.
  4. Control your mBed device
    1. Please use NORDSemi nRF Tool and setup and watch these information: GATT CMD: 0x00 (connect to AP, TCP Server, and create TCP socket), 0x02 disconnection TCP server, close socket, and WiFi sleep), 0xA1 (send sensor data to tcp server from out_buffer[]) and Status will be update by Bluetooth LE adv through manufacturing information
0x000x020xA1
WiFi,AP&TCP Server connectWiFi,AP, & TCP Server disconnectSend sensor data to TCP Server
Committer:
sog_yang
Date:
Thu Jun 01 08:15:15 2017 +0000
Revision:
15:d22f450bb909
Parent:
5:ffe1a4c4881e
Update for DEBUG mode values.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
sog_yang 5:ffe1a4c4881e 1 /* mbed Microcontroller Library
sog_yang 5:ffe1a4c4881e 2 * Copyright (c) 2006-2013 ARM Limited
sog_yang 5:ffe1a4c4881e 3 *
sog_yang 5:ffe1a4c4881e 4 * Licensed under the Apache License, Version 2.0 (the "License");
sog_yang 5:ffe1a4c4881e 5 * you may not use this file except in compliance with the License.
sog_yang 5:ffe1a4c4881e 6 * You may obtain a copy of the License at
sog_yang 5:ffe1a4c4881e 7 *
sog_yang 5:ffe1a4c4881e 8 * http://www.apache.org/licenses/LICENSE-2.0
sog_yang 5:ffe1a4c4881e 9 *
sog_yang 5:ffe1a4c4881e 10 * Unless required by applicable law or agreed to in writing, software
sog_yang 5:ffe1a4c4881e 11 * distributed under the License is distributed on an "AS IS" BASIS,
sog_yang 5:ffe1a4c4881e 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
sog_yang 5:ffe1a4c4881e 13 * See the License for the specific language governing permissions and
sog_yang 5:ffe1a4c4881e 14 * limitations under the License.
sog_yang 5:ffe1a4c4881e 15 */
sog_yang 5:ffe1a4c4881e 16
sog_yang 5:ffe1a4c4881e 17 #ifndef __BLE_DOOR_SERVICE_H__
sog_yang 5:ffe1a4c4881e 18 #define __BLE_DOOR_SERVICE_H__
sog_yang 5:ffe1a4c4881e 19
sog_yang 5:ffe1a4c4881e 20 class DOORService {
sog_yang 5:ffe1a4c4881e 21 public:
sog_yang 5:ffe1a4c4881e 22 const static uint16_t DOOR_SERVICE_UUID = 0xA000;
sog_yang 5:ffe1a4c4881e 23 const static uint16_t DOOR_STATE_CHARACTERISTIC_UUID = 0xA001 ;
sog_yang 5:ffe1a4c4881e 24
sog_yang 5:ffe1a4c4881e 25 DOORService(BLEDevice &_ble, uint8_t initialValueForDOORCharacteristic):
sog_yang 5:ffe1a4c4881e 26 ble(_ble), doorState(DOOR_STATE_CHARACTERISTIC_UUID, &initialValueForDOORCharacteristic)
sog_yang 5:ffe1a4c4881e 27 {
sog_yang 5:ffe1a4c4881e 28 GattCharacteristic *charTable[] = {&doorState};
sog_yang 5:ffe1a4c4881e 29 GattService doorCTL_Service(DOOR_SERVICE_UUID, charTable, sizeof(charTable) / sizeof(GattCharacteristic *));
sog_yang 5:ffe1a4c4881e 30 ble.addService(doorCTL_Service);
sog_yang 5:ffe1a4c4881e 31 }
sog_yang 5:ffe1a4c4881e 32
sog_yang 5:ffe1a4c4881e 33 GattAttribute::Handle_t getValueHandle() const {
sog_yang 5:ffe1a4c4881e 34 return doorState.getValueHandle();
sog_yang 5:ffe1a4c4881e 35 }
sog_yang 5:ffe1a4c4881e 36
sog_yang 5:ffe1a4c4881e 37 private:
sog_yang 5:ffe1a4c4881e 38 BLEDevice &ble;
sog_yang 5:ffe1a4c4881e 39 ReadWriteGattCharacteristic<uint8_t> doorState;
sog_yang 5:ffe1a4c4881e 40 };
sog_yang 5:ffe1a4c4881e 41
sog_yang 5:ffe1a4c4881e 42 #endif /* #ifndef __BLE_LED_SERVICE_H__ */