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 “” service). For the software of Data Collector, we combines Nordic’s ble_app_hrs_c_s120 examples and W5500 io libraries.



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




Download nRF51 SDK by clicking below link

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


(3)Upload Application



Data Collector

(1) Development Enviroment

Import Existing Project

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


(3) Upload Application


  • 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

  • publish_data_handler’ is performed every 300ms to establish TCP connection with 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 (

In the free version service of, 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 ‘’. Just add the name of THING that defined above code at the end of ‘”


In regard to use of, you can learn it from the site ‘

0 117 0

Leave a Reply