There are 2 ways to get data from an Atmotube PRO.
In this article, we will parse the data from Bluetooth broadcast packets.
Atmotube devices do not have a Wi-Fi module so you need an extra bridge to connect them to the cloud.
There are several options for connecting Atmotube devices to your own cloud:
In this article, we will describe the BLE<>Wi-Fi router option. The router supports HTTP or MQTT. We will use MQTT as the connection protocol and save data to a database.
There are a lot of BLE<>WiFi routers on the market. For example, MINEW G1. You can order it from Alibaba or another online marketplace.
You can use any managed MQTT broker (like https://www.cloudmqtt.com/) but the simplest way is to deploy your own instance of Mosquito - open-source MQTT broker. You will need one or several Linux cloud instances to deploy:
You will need to specify the following information (example is for a MINEW router):
The Atmotube BLE packet consists of two parts: Advertising packet and Scan Response packet. You will need both parts to parse the data. To catch Scan Response packets you will need to enable Active scanning.
To minimize the MQTT data, you can use regex filter for raw Atmotube data. For Advertising packets, you can use ^.*41544D4F54554245 (ATMOTUBE in hex). For Scan Response packet, you can use ^.*7405.. (fw version for Atmotube PRO).
^.*7405..\|^.*41544D4F54554245
0201060FFFFFFF02D85C23241A00018F7A400F090941544D4F54554245
1107B38A324AD96ED7AD18489A8E010045DB0CFFFFFF89CA015D0000730619
To check if your router sends data to the broker, you can use any MQTT client (like MQTTBox).
Subscribe to the MQTT topic you specified at Step 3.
At the last step, you have to combine Advertising packets and Scan Response packets and parse the data in order to save it to the database. We will use node.js to parse packets and save them to a MongoDB database.
NodeJS, socket.io and MongoDB are not part of this tutorial. You can find a complete example of the source code here: https://github.com/atmotube/atmotube-mqtt-nodejs
As a result, you can achieve complete and remote access to the data collected by Atmotube PROs.