Skip to main content
All CollectionsConnect your Devices
Connect the STM Discovery Kit with machineQ and Ubidots
Connect the STM Discovery Kit with machineQ and Ubidots

Learn how to connect the B-L072Z-LRWAN1 Kit with Ubidots using the machineQ LoRaWAN Network Server

Sergio M avatar
Written by Sergio M
Updated over 2 months ago

The B-L072Z-LRWAN1 is a Discovery Kit powered by STMicroelectronics and designed as a development tool to learn and develop solutions using LoRa, Sigfox, and FSK/OOK connection technologies. In addition to long range connectivity options, the Discovery kit includes a ST-LINK/V2-1 embedded debug tool interface, LEDs, push-buttons, antenna, Arduino Uno V3 connectors, and a USB OTG connector in Micro-B format and can be very simply connected to the internet with machineQ, powered by Comcast.

For additional technical insights about the B-L072Z-LRWAN1 LoRa®/Sigfox™ Discovery kit, please reference to STMicroelectronics official documentation

When working with the Discovery kit it pays dividends to be able to immediately establish connection with the appropriate sensors and software to monitor a system and solve solve problems. In this quick start guide we will take you through a step-by-step instructions to push data coming from the B-L072Z-LRWAN1 over LoRa with machineQ, powered by Comcast, to Ubidots cloud for App enablement including: visualization, analysis, and engagement.

Requirements

Step-by-step

  1. Ubidots Setup

  2. MachineQ Setup

  3. STM Discovery Kit Setup

  4. Verifying data in Ubidots

1. Ubidots Setup 

Follow the step "Ubidots Setup" provided in the article below:

2. MachineQ Setup 

Follow the step "machineQ Setup" provided in the article below:

3. STM Discovery Kit Setup

In this STM Discovery Kit setup we will initialize the board using AT commands manually from a computer's terminal. In the official documentation of the B-L072Z-LRWAN1 you can find multiple examples to get started with the board using your preferred tool chain to build and compile a project onto the board.

For a detailed explanation of the understood AT commands, please reference to the official documentation.

Setting up the STM Discovery Kit

1. Using a microUSB cable connect the board you computer. 

2. In the Development Tools/Software Development Tools section of the official documentation of the board you will find the drivers and firmware updates needed based on your OS. Install these drivers and update your device as needed. Be sure to follow the documentation provided to fit your OS. 

3. Based on your OS, open a graphical serial terminal. This guide will work using Cutecom with Linux.

  • Windows: Putty / Teraterm

  • Linux & MacOS: Cutecom / Minicom

IMPORTANT NOTE: your chosen graphical serial terminal software should be configured with the following parameters:

  • Baud rate: 9600

  • Data: 8 bit

  • Parity: none

  • Stop: 1 bit

  • Flow control: none 

5. To establish the communication with the board, select the COM PORT assigned to the board and opening it. The PORT should appear in the list located at the right of the "Open" button under the listing Device: /dev/ttyACM as shown in the above image.

6. Once communication is properly established, enter the first AT command in order to verify you are able to send commands to the board. 

  1. AT COMMAND –> AT

  2. RESPONSE –> OK

6.1. Next, insert the respective APPEUI & APPKEY based on the configurations of your gateway:

  1. AT COMMAND –> AT+APPEUI=xx:xx:xx:xx:xx:xx:xx:xx

  2. RESPONSE –> OK

  3. AT COMMAND –> AT+APPKEY=xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx

  4. RESPONSE –> OK

[OPTIONAL] To verify if the parameters were included properly, insert the following commands:

  1. AT COMMAND –> AT+APPEUI=?

  2. RESPONSE –> OK xx:xx:xx:xx:xx:xx:xx:xx

  3. AT COMMAND –> AT+APPKEY=?

  4. RESPONSE –> OK xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx

6.2. The DEUI is assigned by default in the module, to check it simply insert the command below:

  1. AT COMMAND –> AT+DEUI=?

  2. RESPONSE –> OK xx:xx:xx:xx:xx:xx:xx:xx

6.3. With the keys properly inserted, join to the network using the following command:

  1. AT COMMAND –> AT+JOIN

  2. RESPONSE –> OK

6.4. After a few seconds, check if the device has joined the network properly using the following command:

  1. AT COMMAND –> AT+NJS=?

  2. RESPONSE –> 1 OK

IMPORTANT NOTE: If the response received is “0 OK”, this means the device did not successfully join the network. At this point, please verify if the APPEUI & APPKEY inserted are correctly associated with your gateway’s APPKEY and APPEUI. 

6.5. With the device properly connected to the network, it is time to send the data desired, using the following command:

  1. AT COMMAND –> AT+SENDB=12:1B37

  2. RESPONSE –> OK

This command will allow you to send text data in binary format on a dedicated port.

To better understand the data which is being sent, let’s assume the first byte is related to a temperature value and the second to a humidity value. To verify the byte HEX value to decimal value, just click the link provided. 

Data sent: 12:1B37

(For more information reference AT command guide)

4. Verifying data in Ubidots

At this point, once a sensor's data has been communicated through machineQ to Ubidots, it will be decoded by the UbiFunctions tool and posted in your Ubidots account. To verify your data is received, follow the steps below:

1. Open the Logs of your individual machineQ parser by pressing the "log" icon to verify that data is received.

Expected response:

2. Verify that data is received as variable in the Device section from the Device Management tab. Here you will find you new device with the DevEUI assigned to your device:

3. [OPTIONAL] If you desire to change the device name to a friendly one reference this guide. Further, the device icon modification will also give you a quick identifier. To learn more reference this quick start icon icon guide.

Now it's time to develop your BI application with:

 

Did this answer your question?