Pixl.js Bluetooth to Ethernet MQTT Bridge

This is just a very simple example of using Puck.js to send received Bluetooth LE advertising packets over MQTT to an server.
ORIGINAL POST
By espruino
details

Pixl.js_BLE_Ethernet_Bridge.jpg

This is just a very simple example of using Puck.js to send received Bluetooth LE advertising packets over MQTT to a server.

Just wire up an Arduino WIZnet adaptor as shown on this page then upload the following code with the MQTTSERVER variable set to the IP address of a server running a (non-HTTPS) MQTT server.

To view the received packets, you can run a command such as this if you have the Mosquitto tools installed on your PC:

mosquitto_sub -h 192.168.1.70 -v -t "/advertise"

NOTE: This is a simple example and isn’t designed to deal with a large volume of advertising packets. To make this more robust you might want to consider adding a whitelist of BLE addresses that will be forwarded.

Pixl.js_BLE_Ethernet_Bridge.jpg

This is just a very simple example of using Puck.js to send received Bluetooth LE advertising packets over MQTT to a server.

Just wire up an Arduino WIZnet adaptor as shown on this page then upload the following code with the MQTTSERVER variable set to the IP address of a server running a (non-HTTPS) MQTT server.

To view the received packets, you can run a command such as this if you have the Mosquitto tools installed on your PC:

mosquitto_sub -h 192.168.1.70 -v -t "/advertise"

NOTE: This is a simple example and isn’t designed to deal with a large volume of advertising packets. To make this more robust you might want to consider adding a whitelist of BLE addresses that will be forwarded.

COMMENTS

Please Login to comment
  Subscribe  
Notify of
POSTED BY
TAGS