Ⅰ. Preparation
Here we take E77-400M22S as an example to demonstrate how to join the lorawan network and perform data transmission and reception communication
Hardware: 1. E77 module + USB to serial port tool (or E77 kit) 2. A lorawan gateway (here we use E870-L470LG12) 3. A Windows computer
Software: 1. Serial port assistant 2. Lorawan server (here we use the public network test server The Things Network)
Ⅱ. Configure the server
First, register an account on The Things Network. You can search for it yourself and I won’t go into details. Click
1. After logging in, click the user name in the upper right corner and select console
2. Select the region file, here select Australia 1

- Create an application. The application id name needs to be unique
4. Enter application creation, select End devices–>Register end device
Select manual registration method (enter end device specifics manually)
Select frequency band china 470 mhz,fsb1; select LoraWAN Specification 1.0.3 for lorawan version; select 1.0.3A for protocol parameter version
Enter JoinEUI at random, this is the APPEUI of the node, click confirm after entering
After confirming JoinEUI, DevEUI and AppKey options will appear. Click Generate, and finally click Register end device to register the node.
5. Add gateway configuration on the server, select Gateways and then Register gateway, enter the gateway EUI (this needs to be consistent with the gateway), and both EUI and id need to be unique.
Ⅲ. Configure the gateway
Connect the computer to our E870’s wifi, enter 192.168.10.1 in the browser to enter the gateway configuration page, the account password is root
Select CN470 for frequency region and 0 for frequency band.
Lorawan gateway configuration, the gateway ID is the gateway EUI on The things Stack, the server address is au1.cloud.thethings.network; the port number is 1700. After the settings are completed, click Save and Apply.
After applying, check The things Stack to see that the gateway is online.
Ⅳ. Configure the node
//To prevent over-configuration of other parameters, first restore the default parameters, which are not required for normal use
AT+RESTORE
//Set the mask to specify channels 0~7. By default, the first 8 channels do not need to be set. You need to set them when selecting other channels
AT+CFREQBANDMASK=00ff:0000:0000:0000:0000:0000
//Set APPEUI
AT+CAPPEUI=0000000000000000
//Set DEVEUI, the corresponding node DEVEUI is unique
AT+CDEVEUI=70B3D57ED0070B89
//Set APPKEY, corresponding node APPKEY
AT+CAPPKEY=480D05A91D39B8789DB4890E8950E43A
//OTAA access
AT+CJOIN=1:0
Ⅴ. Communication
1. After joining the network, it works in CLASS A mode by default. It can only receive data in the window after uplinking data. The downlink data of the server will be sent after receiving the uplink data of the node
//Send data, port number 3, retransmission number 1, ack response open, hex data 112233
AT+SEND=3:1:1:112233
On the server, the hex data 112233 was received
//The server sends data to port number 1, and the downstream data is 123456
When we upload data again, we will receive the downlink data.
2. In CLASS C mode, CLASS C will always be receiving, and the server’s downlink data node will receive it immediately. On the server, End devices–>devices (create your own node name)–>General settings–>Network layrer, check Suppoer class c.
Switch the node access mode to class c
AT+CCLASS=C
First report a packet of data to the high-speed server to indicate that the mode has been switched, and then the server just keeps sending it.