Connect “ESP32 + LoRa” to LoRaWAN Server
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 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 applicationwhen 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 settingsoption 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.

Connect to 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.

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.
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;