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
Bsc Hons Computer Science