Assemble the 433 Module, ENV-II Unit and core mainframe, where two of them are used as LoRaWan terminals and one of them is used as LoRaWan gateway.
Note: Module LoRa (433MHz) module requires DIO1 to GPIO34 connection.
Open the M5burner application to burn the gateway firmware
The first time you burn, you will be prompted to enter the M5BurnerNVS setup, at this point we click button B to enter the BurnerNVS setup program.
Open M5Burner and enter the BurnerNVS setup screen to make settingsparameters that must be set 1. WIFI_SSID: WIFI SSID 2. WIFI_PASS: WIFI password
Other parameters can be kept as default (Note: the default frequency is 471.9MHz/SF7, the default server is nam1.cloud.thethings.network, and the default time zone is +8)
After completing the setup, we click on the B button of the host computer to reboot the host computer, and then the configuration of the gateway firmware is completed.
First, open the official website of TTN and register an account (Note: For the graphic, you can check our tutorial TTN (The Things Network) )
The default server of the gateway is nam1.cloud.thethings.network. The default server is nam1.cloud.thethings.network
Parameters that must be set up
GW EUI
entry on the host screen, generated based on the MAC address, guarantees global uniqueness.We can add the downlink message to the downlink queue on TTN's website, so that the node receives a Downlink message after the next Uplink upload, and the data displayed on the node is the same as the one set up
Start Page.
From top to bottom are:
Title bar: LoRaWan470 GW
Status light: blinking green for normal operation, yellow for initialization.
GW EUI: ID unique to each gateway, generated by the MAC address.
Freq: Listening frequency and topology factor
Uplink: the number of LoRa packets uploaded by the gateway
Downlink: The number of LoRa packets downlinked by a gateway
Recently Node: address and RSSI of the most recently communicated node
Press the key:
Key: 1. info: You can enter the info page.
From top to bottom are:
Title bar: LoRaWan470 GW
Status light: blinking green for normal operation, yellow for initialization state
WiFi SSID: WiFi ID
LoRaWAN Server: LoRaWAN server address
Port: LoRaWAN server port
NTP Server: NTP server address
Timezone: Time zone
keys:
back: Returns to the start page.
burner setup: enter BurnerNVS setup program
WIFI_SSID: WIFI SSID
WIFI_PASS: WIFI password
Frequency: Listening frequency of the gateway, need to comply with the LoRaWAN protocol, LoRaWAN 470 spectrum range is 470MHz to 510MHz, the specific settings need to check the LoRaWAN protocol, the gateway and the node must be the same frequency.
SF: Frequency Expansion Factor, the range is 5-0, corresponding to SF7 to SF12, the gateway and node must have the same frequency expansion factor.
TTN_SERVER: Address of the LoRaWAN server. 6.
TTN_PORT: Port number of the LoRaWAN server.
NTP_SERVER: Address of NTP server
TIMEZONE: Time zone
From top to bottom are:
Title bar: LoRaWan470 Node
Status light: blinking green for normal operation, yellow for initialization.
CH Nums: The channel and its corresponding frequency.
TX Interval: Uplink's transmit interval.
ENV-II Unit: The status of ENV-II Unit, green is the normal working status, otherwise it is red, the right side will also show the temperature and humidity.
key:
beep disable means the speaker is off, press this button to switch to beep enable, then if you receive a Downlink message, the speaker will beep once to alert you. 2. info: you can enter the info page, it will show you the time interval of the message.
info: You can enter the info page. 3. uplink enable
uplink enable indicates that Uplink is enabled and the node will upload messages to TTN at 20s interval, press this key to switch to uplink disable.
From top to bottom are:
Title bar: LoRaWan470 Node
Status Light: Blinking green for normal operation, yellow for initialization.
Spec Version: This is the LoRaWAN protocol version. 4.
Mode: Mode of entry, now it is OTAA. 5.
DEVADDR: Device address
keys:
APPEUI & DEVEUI & APPKEY: OTAA entry parameters, generated by TTN
TX_INTERVAL: time interval of uplink
CHANNEL0 ~ CHANNEL8: frequency of each channel, need to comply with the LoRaWAN protocol, LoRaWAN 470 spectrum range is 470MHz to 510MHz, specific settings need to check the LoRaWAN protocol, the frequency of the gateway and the node must be the same.
SF: Frequency Expansion Factor, the range is 5-0, corresponding to SF7 to SF12, the gateway and node must have the same frequency expansion factor.
POWER: Transmit power, the range is 0-20, the higher the value the higher the power, the default is 20.
ABP_ENABLE: ABP Access Mode Enable, 1 is enable, 0 is disable. 1 is on, 0 is off. 0 means OTAA access mode, the setting related to ABP is invalid. If it is 1, it is ABP access mode, and the settings related to OTAA are invalid.
NWKSKEY & APPSKEY & DEVADDR: Parameters for ABP access, can be generated by TTN. 8. ADR_ENABLE: The parameters for ABP access.
ADR_ENABLE: ADR enable, 1 is on, 0 is off. 9.
APP_PORT: Sets the application port, range is 1-255.
CONFIRM_MSG: Confirmation message enable, 1 is on, 0 is off. 1 is on, 0 is off. If it is on, you will receive an ACK after each uplink.
Click info
-> burner setup
You will then be taken to the following page, indicating that you have entered the Burner NVS setup program
At this point we can open the Burner application to set up BurnerNVS
When we need to connect to other gateways, we only need to modify the frequency of CHANNEL0 - CHANNEL8
If we need to use ABP mode for network access, we just need to turn on ABP_ENABLE to enable it.
Resets frame counters
option under General settings
-> Network layer
-> Advanced MAC settings
in the TTN ABP node management page.