- nRF52840 Series Quick Start
- LoRaWAN
- Meshtastic
nRF52840 Series Quick Start
This topic describes how to install the development environments and libraries for the Mesh Node family and how to use the sample code.
Install Framework
there are three methods to install the framework, choose one of them.`
Via Arduino board manager
This section describes "How to install the Heltec-nRF52 development framework directly from the Arduino board manager".
- Install Arduino IDE, you can refer to this link: https://www.arduino.cc/en/software.
- Open Arduino IDE, and click
File
->Peferences
->Settings
- Input following json url to board manager URLs:
https://github.com/HelTecAutomation/Heltec_nRF52/releases/download/1.7.0/package_heltec_nrf_index.json
- Click
OK
to return to the main Arduino interface. - Click
Boards Manager...
, searchHeltec-nRF52
in the new pop-up dialog, select the latestreleases
and clickinstall
.
- The installation was successful when a prompt appears.
If you disconnect before the installation is complete, don't panic. Click Install to continue the download.
- Click
tools
to confirm whether the development environment is installed successfully.
Via Git
"Github" describes how to install this framework via git. Just follow the steps in the relevant link:
Please follow the suggested path as much as possible to avoid unnecessary trouble.
Via Local File
-
Download the development environment.
-
Open Arduino IDE, and click
File
->Peferences
.
- Go to the folder in the red box.
- Create a new "hardware" folder in the Arduino folder. If there is already a "hardware" folder, you don't need to create a new one.
- Go to the "hardware" folder and extract "heltec" into this folder.
This folder name is custom. If you have installed other heltec framework, you can use this folder directly.
- Go to the "heltec" folder, refer to the figure below to confirm whether the path in the red box is correct. Unzip the compressed package you downloaded to this path.
- Restart the Arduino IDE to confirm whether the development environment is installed successfully.
Running an Example
Connect your Mesh Node series board to computer via a high quality Micro USB cable (This is the most common reason we had encountered can't program software).
- Open the
tools
option and select the corresponding device and port.
- Select an example
- Compile and upload
New a sketch
-
In Arduino IDE, click
File --> new
. -
Copy the following code:
// the setup routine runs once when starts up
void setup(){
// Initialize the Heltec ASR650x object
// the loop routine runs over and over again forever
void loop() {
}
LoRaWAN Getting Start
This article is intended to describe how to use the Heltec ESP32 LoRaWAN library.
This library is make LoRaWAN 1.0.2 protocol running with ESP32 Arduino. Only support the ESP32 + LoRa series products made by HelTec Automation(TM), and a LoRa gateway is must needed.
Heltec ESP32 LoRaWAN library need a license to active, it's relative to ESP32's Chip ID. Query your board's license here: http://resource.heltec.cn/search.
- LoRaWAN Configuration Parameter
- Connect to LoRaWAN server
Config LoRa Parameters
Preparation
- Install Arduino IDE. How to install please click here.
- Install Heltec nRF32 series Arduino development framework. Installation manual please refer to here.
- An Mesh Node.
- High quality USB cable.
Configure Parameters
-
Connect the development board to the computer through USB data cable.
-
Open the Arduino and in the
Tools
option, select the appropriateBoard
,Port
.
- Follow the path shown below to open the LoraWAN demo code.
- Fill in DevEu AppEui AppKey in the following figure in the red box in the example format, which will be used in the website registration.
- DevEui -- Mote device IEEE EUI (big endian), 8 bytes;
- AppEui -- Application IEEE EUI (big endian), 8 bytes;
- AppKey -- AES encryption/decryption cipher application key, 16 bytes;
This example uses the OTAA pattern as an example, and for the differences in the ABP pattern, please refer to this link: ABP mode
-
Set LoRaWAN parameter:
-
① Channel: It takes effect when you select CN470 or US915. The default is 0-7. Please refer to [Channel's calculation method](LoRaWAN example Sub-Band usage (AU915) — main latest documentation (heltec.org).
-
② LoRaMacRegion: LoRaWAN Frequency Plans LoRaWAN Frequency Plans — main latest documentation (heltec.org).
-
③ DeviceClass: LoRaWAN Operation Mode, you can type Class_A or Class_C.
-
④ DutyCycle: LoRaWAN uplink transmission interval.
-
⑤ OTAA/ABP: LoRaWAN access mode, ‘1’ means OTAA, '0' means ABP.
-
⑥ ADR/DR: ‘true’ means ADR, 'false' means DR, how to set DR please refer to "Set DR".
-
⑦ TxConfirmed: 'ture' means confirmed, 'false' means unconfirmed.
-
⑧ AppPort: LoRaWAN downlink port.
-
-
Effective load is here.
Print too much messages may cause the system unstable.
- Click
Upload
to upload the code.
Preparation
- A ESP32 + LoRa node that's configured and uploaded code, as described in the previous topic:: “ESP32 + LoRa” Node Preparation & Config Parameters
- A LoRa server, We recommend the following three:
- A Gateway that matches the LoRaWAN region of the node, and already is connected to the lora server. If you are using Heltec Gateway, you can find out how to connect to the server in the Heltec Gateway documentation
Important to know
Regardless of which LoRaWAN NS, the parameters that need to be configured are similar. Ensuring that the relevant configurations of NS and Node are consistent is the key to ensuring successful LoRaWAN communication.
Device Type
Generally, you will be asked to select a LoRa Gateway or LoRa Node.
LoRaWAN Class
OTAA
or ABP
, choose one of the while working, keep LoRa Node and NS select the same LoRaWAN Class.
For development devices with source code, you may see something like this:
Region
LoRaWAN protocol agreement RF communication parameters. For technical details, please refer to LoRaWAN™ 1.0.2 Regional Parameters, also the LoRaWAN Frequency Plans and LoRaWAN Frequency Plans and Regulations by Country/Region can make sense to you.
The region setting of LoRa Node
, LoRa Gateway
, LoRaWAN NS
should be strictly the same.
For development devices with source code, you may see something like this:
OTAA Parameter
For OTAA LoRaWAN Class, mainly includeDevEUI
, AppEUI
(Also called JoinEUI
), AppKey
, the LoRa Node and NS should strictly keep the same.
If you select ABP, you do not need to set OTAA parameters.
ABP Parameter
For ABP LoRaWAN Class, mainly include NetworkSecuritykey
, ApplicationSecuritykey
, DeviceAddress
, the LoRa Node and NS should strictly keep the same.
For development devices with source code, you may see something like this:
If you select ABP, you do not need to set OTAA parameters.
Connect to LoRaWAN Server
Before that, make sure there is a LoRa Gateway active in your server.
- Connect to SnapEmu
- Connect to TTN/TTS
- Connect to ChirpStack
Manual registration on SnapEmu
Log-in to SnapEmu by using their Heltec website account. Access into the devices page to register new device.
Click +
and file in relevant device information.
In the Add device
step, file in the LoRa Node parameters and double check to make sure the content are the same with each other. If everything goes well, LoRa Node is successfully registered after Submit
.
TTN/TTS is not Heltec's business, we cannot provide technical support for this platform, please refer to the official documentation of TTN/TTS.
- Log in to the TTS server web page, register a new “Applications” .
- Create application
- You can freely fill in the Application information in the red box, and click
Creat application
when you're done.
- Register an end device.
- Choose
Enter end device specifics manually
, Select the frequency band corresponding to the node,
- The LoRaWAN version is chosen to be 1.0.2 B
The Show advanced activation, LoRaWAN class and cluster settings
option has some other LoRaWAN parameter Settings such as OTAA/ABP.CLASS A/C, these parameters default to OTAA and CLASS A, in general need to be consistent with the node Settings.
- Fill in JoinEUI and click confirm.
In code or some application products, JoinEUI is represented as AppEUI.
- Fill in DevEUI and AppKey.
The End device ID is automatically generated when you fill in DevEUI.
- Click to register.
After registration is complete, if all is well, you will see the device active.
ChirpStack is not Heltec's business, we cannot provide technical support for this platform, please refer to the official documentation of ChirpStack.
Register a new device in ChirpStack’s “Applications” page. Enter the device name, description, DevEUI. Select Device-profile.
Enter the Application key of the device.
After registration is complete, if all is well, you will see the device active.
Important Hints
Please double check the following two things:
- The LoRaWAN parameters is the same as server!
- The listening frequency of your LoRa Gateway is the same as ESP32 LoRa node's sending frequency. We strictly follow LoRaWAN™ 1.0.2 Regional Parameters rB;
Meshtastic® is a project that enables you to use inexpensive LoRa radios as a long range off-grid communication platform in areas without existing or reliable communications infrastructure. This project is 100% community driven and open source! For a more detailed description of Meshtastic please refer to their website and forum: https://meshtastic.org/.
This topic describes how to get started with Meshtastic.
Currently, Heltec recommends the following devices for Meshtastic:
Product | Description |
---|---|
WiFi LoRa 32 V3 | it is known as Heltec V3 |
Wireless Tracker | it comes with a GPS module. |
Wireless Stick Lite | no screen |
Wireless Paper | It comes with E-Ink screen |
Wireless Bridge | It has a strong aluminum alloy shell |
Capsule Sensor V3 | Stylish LoRaWAN toys that can integrate GPS modules |
Wireless Mini Shell(HT-CT62) | Cost-effective LoRa+ESP32-C3 module |
Vision Master E213 | 2.13 inch E-Ink Display |
Vision Master E290 | 2.90 inch E-Ink Display |
Vision Master T190 | 1.90 inch TFT Display |
Mesh Node T114 | 1.14 inch TFT Display, nRF52 MCU, Strong low power |
This topic uses WiFi LoRa 32 V3 as an example.
Install ESP32 USB to Serial Drivers
Use a USB cable to connect your computer to your device. Open your Device Manager
, Port
, if your computer doesn't recognize the device, You may need to install a driver from Silicon Labs for the CP210X USB to UART bridge: CP210X USB to UART bridge - Download
After installing the driver, make sure to reboot your computer to finish the installation process.
Flash Firmware
The Web-Based Installer requires either Chrome or Edge browsers but is an excellent choice for quickly flashing devices. This method is highly recommended for firmware flashing, especially for new users of the project, as it is easy to use.
-
Plug in your device.
-
Visit flasher.meshtastic.org requires Chrome or Edge browser. Follow the instructions, select the model of the corresponding board.
- Select the appropriate firmware version; the latest stable version is generally recommended.
- Click button to flash.
Network issues can cause Flash buttons to fail to click. Of course, sometimes it appears gray, but it can still be manipulated.
- Continue.
- Click the
Full Erase and Install
, thenErase flash and install
.
Network problems cause Flash pages to stay in "Conneting......".
- Wait for the firmware to flash, and your device screen will display Meshtastic.
Install the Meshtastic App
Let's take Android as an example to show you how to use the APP at an entry-level. We will continue to update IOS Web operations in the future.
Set Regional Settings
In order to start communicating over the mesh, you must set your region. This setting controls which frequency range your device uses and should be set according to your regional location.
- Open the app, find your device via Bluetooth as shown below. Click to connect the device.
If a window asks for a CAPTCHA appears, you need to look at your device's screen. The default CAPTCHA for devices without a screen is usually 123456. If not, contact the firmware issuer.
- Once paired, Click "UNSET" next to the device name. Select the region from the list according to your regional location. Of course, your hardware must support this frequency band.
You can refer to this link for the relationship between LoRaWAN bands and regions:LoRaWAN_frequency_plans_by_country
EU_433 and EU_868 have to adhere to an hourly duty cycle limitation of 10%. Your device will stop transmitting if you reach it, until it is allowed again
- Click the option below to select the channel you want to join。
Get started with Meshtastic
- The map option will be able to view the location information of the companion, which can be provided by the GPS module on the device, or by the phone to which the device is connected.
- The options below show some information about the companion device, such as latitude and longitude, signal strength, battery level, and so on.
- This is where you'll see the messages you want to send and receive, and they'll be displayed on the device screen.
More Settings and usage
Click the top right button to see more configurable options.
Meshtatic devices
Test Sample | Peak Temperature on Backside |
---|---|
Without Heat Sink | 63.6°C |
With dual Heat Sinks | 53.5°C (🔻10°C) |