BLE to Ethernet Thin Gateway

/BLE to Ethernet Thin Gateway
BLE to Ethernet Thin Gateway2018-08-01T13:40:35+00:00

Project Description

BLE to Ethernet Thin Gateway is the data collecor to transmit the BLE(Bluetooth Low Eneregy) data to a cloud server through Ethernet.

System Configuration

The whole system is composed of Data Sender, Data Collector and Cloud Server. Data Sender measures the heart rate and transmits to Data Collector. For software of Data Sender, we use the ble_app_hrs_s110 example code provided by Nordic. We will use virtual data for heart rate and battery level.

Data Collector collects the data transmitted by Data Sender, and tranmits the collected data to the cloud service. (In this posting, we will use the “dweet.io” service). For the software of Data Collector, we combines Nordic’s ble_app_hrs_c_s120 examples and W5500 io libraries.

ble_gateway-1

Hardware

In order to check the debugging log and Ethernet function, connect the UART to USB module and WIZ550io as below.

ble_gateway-2

ble_gateway-3

Software

Download nRF51 SDK by clicking below link

https://developer.nordicsemi.com/nRF5_SDK/nRF51_SDK_v10.x.x/

You can get the Eclipse Project and source code from Github Repository. After downloading the fiels from Github, save them in the below path.

Data Sender

(1) Development Enviroment

Import Existing Project

  • [import]-[Existing Projects into Workspace]
  • Select root directory
 

(2)Upload SoftDevice

ble_gateway-4

(3)Upload Application

ble_gateway-5

 

Data Collector

(1) Development Enviroment

Import Existing Project

  • [import]-[Existing Projects into Workspace]
  • Select root directory
(2) Upload Software

ble_gateway-6

(3) Upload Application

ble_gateway_7

  • 1~2 : Set Timer Interval (300ms) to publish to cloud service & Initialize
  • 16 : Initialize the SPI Interface to control WIZ550io
  • 17 : Initialize the Ethernet (IP address and network configuration)
  • 19 ~ 20 : Initialize the mail box (If the HR event and BAS event occurs, the values are saved into a mailbox)
  • 22 ~ 24 : Initialize BLE Central Stack.
  • 26 ~ 27 : Initialize HR(Heart Rate) and BAS(Battery) collector
  • 32 : BLE Peripheral Scan and Connection Scan
  • 34 ~ 37 : Create Publish Timer and Start

  • 1 ~ 2 : Set Mailbox QUEUE SIZE
  • 4 ~ 14 : Initialize Hear rate and Batter level data format
  • 16 ~ 17 : Initialize Mailbox
  • 19 ~ 24 : Information to send the Data to dweet.io

  • publish_data_handler’ is performed every 300ms to establish TCP connection with dweet.io and transmits the batter data and heart rate data.
  • When ‘publish_data_hander’ is performed, mailbox data is transmited via Ethernet

  • 20 ~ 26 : When the heart rate notification event occurs, data is saved in the mailbox
  • 59 ~ 65 : When the battery notification event occurs, data is saved in the mailbox
  • The data in the mailbox is transmited viz Ethernet when ‘publish_data_handler’ is performed

 

To Check the Data at the Cloud Service (dweet.io)

In the free version service of dweet.io, the data is not saved in the database. Therfore, you can check the data on the web browser without specific configuration or key. Just input the URL as like ‘https://dweet.io/follow/Ble2Eth’. Just add the name of THING that defined above code at the end of ‘https://dweet.io/follow/”

ble_gateway-8

In regard to use of dweet.io, you can learn it from the site ‘https://dweet.io/

0 22 0

Leave a Reply