In the same way that you can configure a wireless router, YuboxNow allows you to embed a configuration interface on your ESP32 electronic board. YuboxNow is under free license and a very interesting feature is that it supports chipsets with LoRaWAN, which is very fashionable in the world of Internet of Things or IoT.
ESP32 boards supported?
Theoretically any ESP32 card. The ones that I can confirm personally are:
- Heltec WiFi LoRa
- HiLetgo ESP-WROOM-32 (without LoRaWAN)
- Yubox Node (obviously, the project was born to support this card)
Here I will do a short tutorial on how to install YuboxNow on the Heltec WiFi LoRa card, because it is very easy to get it. I leave link to Amazon.
More information about the Heltec WiFi LoRa board on its official website https://heltec.org/project/wifi-lora-32/
- The Heltec WiFi LoRa 32 (V2) board
- Arduino IDE, at least version 1.8.13
- ESP32 support for Arduino IDE, version 1.0.6 or higher
- YUBOX Now Libraries and Dependencies Updated
Step 1) Download YuboxNow
This file contains a folder called yubox-now-master. We place this folder inside the directory "librariesWhere all the other Arduino libraries are installed.
|Operating system||Arduino libraries path|
|Mac OS X||/ Users /USERNAME/ Documents / Arduino / libraries|
|Windows||C: \ Users \USERNAME\ Documents \ Arduino \ libraries|
|Linux||/home/USERNAME/ arduino / sketchbook / libraries|
If we have problems with the route, we can go to the Preferences menu, inside the Arduino IDE and there is the exact route.
Step 2) Install dependencies
The YUBOXNow sketch can be compiled from the Arduino IDE, as it is done with other projects. You must choose the board "Heltec WiFi LoRa 32 (V2)" from the card manager. We must also bear in mind that we will need to have the following extensions previously installed.
- ESP32 Sketch Data Upload: generates and loads the initial SPIFFS file system from YUBOXNow to the board. It can be installed from the library manager (libraries) of Arduino.
LoRaWAN Arduino support
We can use YuboxNow without the LoRaWAN menu, but here we will show how to add this menu, since many times it is somewhat cumbersome to configure LoRaWAN from code. With YuboxNow it is much easier. To add LoRaWAN support, the following additional libraries need to be installed in the Arduino IDE:
- Beelan LoRaWAN, the base library that implements LoRaWAN support for the SX127x chipset. This library can be installed in an ordinary way using the Arduino IDE library manager, and searching for it with the indicated name.
- yubox-LoRaWAN, the adapter that allows you to configure the AppEUI and AppKey for LoRaWAN OTAA support. The version using the Beelan-LoRaWAN library is in the SX127x-Beelan-LoRaWAN branch, which can be downloaded as a ZIP file from this link and install as a ZIP library.
Step 3) Run sample program
The yubox-LoRaWAN library contains the yubox-lorawan-helloworld sample that shows the integration as part of a complete program.
Make sure you have selected the “Heltec WiFi LoRa 32 (V2)” board as the target from the Arduino IDE, otherwise the LoRa pin definitions will not be available and the compilation will fail.
After compiling and transferring the code we should see a new network in the WiFi network menu of our computer. The name of the network begins with the word YUBOX. We connect to that network and visit the web interface at IP 192.168.4.1. Almost everything is ready!
Step 4) LoRaWAN Configuration
Now, we go to a browser, we visit the aforementioned IP and we find the YuboxNow interface. The default user is admin and the key is yubox. The first thing we must do when entering is to change the password.
We will access a responsive and slim interface from where configuring WiFi access, updating the firmware or configuring LoRaWAN will be quite simple ... yes!
I leave my LoRaWAN configuration screen. The most important data is the EUI of the device and the application key. The application EUI can be 16 zeros as seen in the figure, unless our LoRaWAN network needs something different.
Extra) Compilation from command line, for expert users
Some expert users prefer to compile without using the Arduino IDE. That is why YuboxNow brings the ability to compile from the command line. To compile we execute the make command with the following options.
make ARDUINO_INSTALL = ~ / arduino-1.8.15 YF = ~ / Arduino / libraries / yubox-now-master ESP32_BOARD = heltec_wifi_lora_32_V2
The ARDUINO_INSTALL option should point to the directory where Arduino is installed in our system.
To transfer our sketch we execute the make command again, but with the fullupload option
This command assumes that our device is connected to the USB port called / dev / ttyUSB0, but the path can be changed if we add the SERIALPORT = path parameter