Bluetooth of Things

Tags: Android, Bluetooth, Network

This project creates a mesh network of Bluetooth devices wherein each device acts as both server and client to be able to relay commands to other devices in the network out of their initial Bluetooth range.

The network contains a master device which is able to send commands to the other devices to execute whilst the slave devices act as bridges to relay the command to their destination device ultimately extending the Bluetooth range, making it more viable for use in IoT.

The Project

The network currently consists of a starting device (the master), a bridge device (a slave) and an end device (another slave) with the first and latter positioned out of Bluetooth range of one another.

Although the bridge device is used to relay commands to the end device, it is also possible that the starting device sends a command for the bridge device.

In the network, when a connection has been successfully established between two devices, the message is sent to the connected device which then checks the destination address in the message. If the destination address matches the current devices address, it will then execute the command and reset the connection as the message reached its destination. If the addresses don’t match however, it will reset its existing connection and attempt to connect to the next device in its list of paired devices which is not the device the message originated from. It will then go connect to each of the devices in turn, relaying the message until the list is empty.

Due this system, Bluetooth devices are able to reach devices outside of their initial Bluetooth range; the network would be able to cover a whole house for as long there are devices within their initial Bluetooth limit from each other so that there are no blind areas left where devices are not able to relay messages in.

 For the purpose of this project, I use Android devices for the nodes in the network. The master node has a button in the UI to sync with all the other devices in the network. On button click, a request is sent out to each node in the network for their respective JSON data. The master node UI is then updated to display each device in a list of buttons. Each button will open the devices respective page and commands can be sent to them. currently, only one command is present to send to the other devices.

Network Example Image

Network example where all the Bluetooth devices are connected to a smartphone or other similar device.
Details

Technologies used

Environment

Android SDK

Hardware

Nexus 4

Language

Java

About me

Name

Sandra Hayward

Course 

Bsc Hons Computer Science

Email 

S.Hayward1@uni.brighton.ac.uk