Skip to content
This repository was archived by the owner on Nov 2, 2022. It is now read-only.

Droplit.io Edge, Raspberry Pi Zero W and Hologram Nova...

Notifications You must be signed in to change notification settings

chriswoodle/droplit-ble-gateway

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BLE IoT Gateway

Build your BLE IoT Application with cloud control and cellular connectivity!

Overview

In this repo, an example ble plugin is provided which connects to Arduino 101 boards and allows you to turn on/off the LED through the Droplit.io Rest API. This plugin is intened to be a starting ponint for a BLE device plugin integration.

There are two test applications provides in the noble-test folder which allow you to confirm that node can interface with BLE devices.

Gateway design overview:

Other hardware devices that Noble and Droplit.io Edge supports are also acceptable, such as other Raspberry Pi devices with BLE radios.

Starting from scratch

Before you fire up your Raspberry Pi and Arduino's, get familiar with the Droplit.io Platform by looking through the documentation and create a free developer account on the droplit.io developer portal. In the portal, there a few guides/tutorials to get you started.

Setting up your downstream device (Arduino 101)

You can use any BLE device as a downstream device, including the Arduino 101.

Arduino provides a getting started guide here.

After installing the board support package through the Arduino IDE and selecting Arduino 101 as your board target.

101 select

Upload the LED example to the Arduino 101.

101 test

You can test the Arduino 101 by sending 0x00 and 0x01 data through the nRF Connect mobile app to turn on and off the Arduino 101's user accessible LED .

nrf connect

Setting up the hardware.

Before using a cellular connection, you may want to test the Raspberry Pi on a local network connection.

On the Raspberry Pi Zero W, you may encounter connectivity issues when using both WiFi and Bluetooth at the same time.

First make sure your Raspberry Pi has NodeJs installed. You can install node by following this guide here. You will need the arm-v6 release of node.

After installing node, make sure you configure the npm global install directory.

Testing BLE

There are two test applications provides in the noble-test folder.

To run the tests, from your gateway device run

cd noble-test
npm install
node test

This first test will simply scan for ble devices and log the output to the console.

The second test will connect the Raspberry Pi Zero to an Arduino 101 that is running the BLE example from above.

Running Droplit.io Edge Software

Once you have node installed, get the Droplit.io Edge by following its documentation in the repo's readme.

Installing the ble plugin

Once you have a running instance of the Droplit.io Edge. First teardown the project by running:

gulp teardown

Then replace the {droplit-edge}/projects.json and {droplit-edge}/projects/droplit-edge/localsettings.json with the files proviced in /droplit-ble-plugin.

You will need to enter your Droplit.io Ecosystem Id in localsettings.json.

Next copy the /droplit-ble-plugin/droplit-edge-sample-ble-plugin into {droplit-edge}/projects/. Then rebuild the project.

gulp setup
gulp build
gulp debug

In the droplit.io portal, when your Arudino 101 connects, you should be able to controll its led by setting the BinarySwitch.switch value or calling BinarySwitch.switchOn() / BinarySwitch.switchOff().

portal

See it in action here

About

Droplit.io Edge, Raspberry Pi Zero W and Hologram Nova...

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published