Implementing a Bluetooth gateway on the Raspberry Pi
In this section, we will study the Bluetooth gateway server (as described in ~/Desktop/BluetoothGateway/gateway
). We will study the RESTful services offered by the gateway and we will jump into the gateway code. The gateway server, as described in the previous section, is a web server that runs on Node.js and implements GAP, GATT, and RESTful web services. In order to get a recap of the Bluetooth GAP and GATT architecture, you can refer to Chapter 1, BLE and the Internet of Things.Â
Note
The code for the gateway can be found in the gateway
folder of the project source. The core API used by this project is developed by the Bluetooth SIG, and the detailed documentation, including whitepapers, can be found at https://www.bluetooth.com/develop-with-bluetooth/white-papers.
The architecture of a Bluetooth gateway consists of three main components:
- Bluetooth nodes (or smart devices)
- Bluetooth gateway/server (Raspberry Pi)
- Internet-enabled client (such...