Ai-Thinker is an expert in IoT wireless design, focusing on solutions that are simple, flexible, easy to manufacture and deploy. Ai-Thinker develops and designs wireless system-level module products with integrated SoC, stable performance, and low power consumption in the IoT industry, and various modules with Wi-Fi, LoRaWAN, Bluetooth, and UWB functions. The modules have excellent RF performance.
Ra-08(H) module is a LoRaWAN module jointly developed by Ai-Thinker Technology and Shanghai ASR Microelectronics Co., Ltd.(ASR) in depth. This repository is a guide for getting started with the secondary development of the LoRaWAN module SoC. The corresponding chip model is ASR6601CB, Flash 128 KB, SRAM 16 KB, 32-bit 48 MHz ARM Cortex-M4 kernel.
The Ra-08(H) module has a built-in AT firmware program default, and it can be used directly to connect to the LoRaWAN gateway. If you need to connect to Ali LinkWAN, you need to program this repository code.
Based on the linux environment, this article introduces the specific process of secondary development of point-to-point communication of An-Thinker’s Ra-08(H) module for your reference.
- • Linux environment
The necessary environment for compiling & programming & running operations, this article takes (Ubuntu18.04) as an example.
(Windows users can install a virtual machine and then install linux in the virtual machine.)
-
Equipment
Get samples from Ai-Thinker’s Alibaba store to get 2 pcs module and the antenna as well. -
USB cable
Connect PC and Ra-08 development board to burn/download programs, view logs, etc.
On sale module | Whether to support |
---|---|
Ra-08 | support |
Ra-08H | support |
sudo apt-get install gcc-arm-none-eabi git vim python python-pip
pip install pyserial configparser
git clone --recursive https://github.com/Ai-Thinker-Open/Ai-Thinker-LoRaWAN-Ra-08.git
source build/envsetup.sh
cd projects/ASR6601CB-EVAL/examples/lora/pingpong/
make
Example of compiling peer-to-peer communication
"arm-none-eabi-size" out/pingpong.elf
text data bss dec hex filename
21312 1092 4656 27060 69b4 out/pingpong.elf
Please run 'make flash' or the following command to download the app
python /mnt/d/GitHub/ASR6601_AT_LoRaWAN/build/scripts/tremo_loader.py -p /dev/ttyUSB0 -b 921600 flash 0x08000000 out/pingpong.bin
Find the burning serial port, and then start burning, for example, my access serial port here is /dev/ttyUSB2 :
python /mnt/d/GitHub/ASR6601_AT_LoRaWAN/build/scripts/tremo_loader.py -p /dev/ttyUSB2 -b 921600 flash 0x08000000 out/pingpong.bin
Connect the USB cable to the device and PC, make sure the programming port is correct, and follow the steps below to put the module into the download mode
First modify the default port number and baud rate to connect to the hardware, and modify it in the file \build\make\common.mk
:
# flash settings
TREMO_LOADER := $(SCRIPTS_PATH)/tremo_loader.py
SERIAL_PORT ?= /dev/ttyUSB0
SERIAL_BAUDRATE ?= 921600
make clean
Note: It is not necessary to erase every time, if you modify the configuration file and recompile, you need to perform this operation.
make flash
Press the RST button on two Ra-08-Kit development boards, and you can see the following log:
Received: PING
Sent: PONG
Received: PING
Sent: PONG
Received: PING
Sent: PONG
Received: PING
Sent: PONG
Received: PING
Sent: PONG
Received: PING
Sent: PONG