Ra-08 series development board introductory tutorial, standard LoRaWAN docking private server
Ai-Thinker
Ai-Thinker focuses on IoT module, antenna, RF test, cloud and PCBA service, to provide customers with one-stop solution
Preface
Hello everyone! Today, I will share you the LoRaWAN technologies of some network access processes of LoRaWAN that many people asked recently. Of course, only for products to let you have a basic concept. This article also does not involve protocols or other code development, but requires a certain hands-on test capability. It is suitable for people in the same industry or with similar debugging experience. Although the process is simple, it is inevitable to encounter some problems, which require patient troubleshooting.
The protagonist is Ai-Thinker's new product Ra-08-Kit and Ra-08H-Kit. The former is the LoRaWAN node development board with CN470 frequency band, and the latter is the LoRaWAN node development board with EU868 or 915 frequency band. Let's get to the point without saying much.
1. Material preparation
Development board
Specification link: https://docs.ai-thinker.com/_media/lora/docs/ra-08_kit_v1.1.0_specification-2
Sample buying: https://www.alibaba.com/product-detail/Ai-Thinker-NEW-Ra-08H-Kit_1600510276575.html?spm=a2747.manage.0.0.9e1971d20J0Ja9
2. Process introduction
The above is the structure device that we need to configure. When configuring the device, we need to switch from the server to the Gateway and then to the node. After configuring these devices, we initiate network access and connection from the node.
3. Server deployment configuration
3.1 Server Building
We are using an encapsulated LoRaWAN NS server, which is built and tested in a local environment. You can also use an open-source NS server to configure the server. The following is a reference configuration of our server.
Note: This installation method is applicable to windows platform
1. Install runtime environment install erlang runtime environment according to the system version. Install opt_win32_20.2.exe in the installation software directory: 32-bit system; Install opt_win32_20.2.exe in 64-bit system; (install NEXT to NEXT)
2. Deploy the NS software 1) copy the folder under lorawan-server-0.4.13 installed software to the c: Disk 2) double-click to run: C:/lorawan-server-0.4.13/bin/lorawan-server.bat;(note that do not close the black pop-up box and minimize the running)
3.2 log on to the server and add a Gateway
After logging on to the LAN server, you need to find the corresponding gateway add interface. When adding a gateway, you usually need to use the Gateway’s special tag gateway MAC address (or the Gateway’s special encoding character) the supported frequency band of the Gateway (generally, you need to select the supported region frequency band, such as CN470 EU868 or AS915)\same frequency or different frequency \supported transmission power, therefore, the required parameters may be different, and you should pay attention to it when debugging and connecting.)
Log on to Lan 127, enter the server background, click the Gateway column, and add the gateway.
At this point, the gateway is successfully added. The Gateway credential uses its own MAC and internal tags. ?
3.3 Add devices under the server (OTAA)
Our LoRaWAN supports two methods: OTAA and ABP. Here we introduce OTAA.
Add a device and customize the network access credential (LoRaWAN network access credential has strict format requirements, will not taking too much here).
Saving the parameters of these three credentials: DevEUI AppEUI AppKey
After you click save, the device is added. The OTAA network access credential added here is in another column if it is ABP.
4. Gateway deployment
Here, I use a small Raspberry Pi Gateway, which is a Linux operating system. I use xShell or putty to log on to the Raspberry Pi through SSH. The process is as follows:
4.1 log on to the Gateway and enter the configuration path
1. Power on the Gateway. The Gateway uses an Ethernet port to connect to the same LAN (the same route) as the server, and records the IP address of the current device (Gateway).
2. Open Putty to log on
3. Enter the account name axk password aithinker to log on and enter the following path.
4.2 modify the configuration file to take effect and confirm that the gateway is online
1. Open this file to modify the server address, check the gateway ID, save and exit
2. Run $~/yuzeht/lora_gateway/reset_lgw.sh start $~/yuzeht/packet_forwarder/lora_pkt_fwd/lora_pkt_fwd
3. Now we return to the server dial interface, you can see that the Gateway has been online
5. Network access data transmission of nodes
5.1 AT instruction process
This test uses the Ra-08H-Kit, and uses the AT command to write the network access credential OTAA when we establish the node device. The parameters are variable, and the process is for reference only.
The node is online.
5.2 data uplink test
Data sending test, there are two types of sending, back to response or without response, after sending, you can see the data on the server page (refresh the page)
5.3 Data downlink test
For uplink and downlink tests, there is also a web page that can be accessed directly, and the sending and receiving tests can be performed in it: https://127.0.0.1:8080/admin/ws.html
6. End
The above is the process of this test, which is also the basic process of most LoRaWAN and access. Due to the changes in the interfaces of gateway vendors or cloud vendors, debugging takes some time, but communication is possible as long as the standard LoRaWAN is followed. This example is for Ra-08H-Kit, which belongs to 868 and 915 segments.
Hope the above content will be helpful for you to understand LoRaWAN. This is the end of this issue. The following information link can be obtained by yourself. Data Link: https://docs.ai-thinker.com/en/lorawan
This article refers to Ai-Thinker's CNDS website, thanks! Original source:https://blog.csdn.net/Boantong_/article/details/124500704?spm=1001.2014.3001.5501
Contact us
Business cooperation: [email protected]
Official website: https://en.ai-thinker.com
Development DOCS: https://docs.ai-thinker.com
Official Forum: https://bbs.ai-thinker.com
Sample purchase:https://ai-thinker.en.alibaba.com/