Overview
The M320 is a low-power wide-area IoT wireless communication module based on the STM32WLE5CC chip. The module complies with the LoRaWAN Specification 1.0.3 Class A/B/C published by LoRa Alliance.
The M320 uses a serial interface to interact with user host for data and commands, which can quickly provide users with services such as LoRaWAN network access and wireless data communication. The module supports connecting to a variety of LoRaWAN server platforms, such as The Things Network (TTN), Chirpstack, and so on, and it also supports point-to-point (P2P) communication mode, helping you quickly implement your own customized remote network.
M320 is characterized by small size, low power consumption, long transmission distance, and strong anti-interference ability, which makes it suitable for various low-power wide-area IoT application scenarios.
Module Preview
The M320 pinout is shown in Figure 2-1.
Pin Function
The M320 pin function description is shown in Figure 2-1.
Table 2-1 Pin Function Description
Pin | Name | Type | Description |
1 | UART1_TX | OUTPUT | PB6, UART1-TX |
2 | UART1_RX | INPUT | PB7, UART1-RX |
3 | PA0 | I/O | GPIO |
4 | PA1 | I/O | GPIO |
5 | LPUART_TX | I/O | PA2, LPUART-TX, AT command interface |
6 | LPUART_RX | I/O | PA3, LPUART-RX, AT command interface |
7 | PA8 | I/O | GPIO |
8 | PA9 | I/O | GPIO |
9 | NRST | INPUT | MCU Reset (NRST) |
10 | GND | POWER | Ground connections |
11 | RF_TRX | – | RF Port |
12 | GND | POWER | Ground connections |
13 | SPI1_CS | I/O | PA4, GPIO and SPI (CS) |
14 | SPI1_CLK | I/O | PA5, GPIO and SPI (CLK) |
15 | SPI1_MISO | I/O | PA6, GPIO and SPI (MISO) |
16 | SPI1_MOSI | I/O | PA7, GPIO and SPI (MOSI) |
17 | GND | POWER | Ground connections |
18 | ADC4 | I/O | PB2, GPIO and ADC |
19 | ADC6 | I/O | PA10, GPIO and ADC |
20 | PB12 | I/O | GPIO |
21 | GND | POWER | Ground connections |
22 | I2C2_SDA | I/O | PA11, GPIO and I2C (SDA) |
23 | I2C2_SCL | I/O | PA12, GPIO and I2C (SCL) |
24 | GND | POWER | Ground connections |
25 | VDD | POWER | VDD – Voltage Supply, range: 2.0~3.6V |
26 | GND | POWER | Ground connections |
27 | SWDIO | – | PA13, SWDIO debug pin |
28 | SWCLK | – | PA14, SWCLK debug pin |
29 | ADC11 | I/O | PA15, GPIO and ADC |
30 | PB5 | I/O | GPIO |
31 | ADC3 | I/O | PB4, GPIO and ADC |
32 | ADC2 | I/O | PB3, GPIO and ADC |
LoRaWAN Usage Guidelines
M320 supports LoraWAN protocol and therefore supports data transfer over the LoraWAN network. The master communicates with M320 through the serial port. The default serial port configuration is 115200, 8 data bits and 1 stop bit.
Join Network By APB
End-device can join a pre-selected network through ABP(Activation By Personalization) active mode, Join Server is not involved in the ABP process. Before activation, the AppSKey, NwkSKey, and DADDR should be stored in the end device.
Setting The Network Mode
Set the network mode to LoRaWAN by AT+NWKM command.
Description | This command is used to set or get the work mode |
Syntax |
AT+NWKM=<VALUE>
VALUE: 0 – P2P radio mode, 1 – LoRaWAN network |
Set |
AT+NWKM=1
OK |
Get |
AT+NWKM=?
+NWKM:1 (LoRaWAN) OK |
Setting The Region Band
Set the region band by AT+BAND command.
Description | This command is used to set or get the area band |
Syntax |
AT+BAND=<VALUE>
VALUE: 0:AS923, 1:AU915, 2:CN470, 3:CN779, 4:EU433, 5:EU868, 6:KR920, 7:IN865, 8:US915, 9:RU864 |
Set |
AT+BAND=5
OK |
Get | AT+BAND=? |
+BAND:5 (EU868)
OK |
Setting The AppSKey
Set the AppSKey by AT+APPSKEY command.
Description | This command is used to set or get the AppSKey |
Syntax |
AT+APPSKEY=<VALUE>
VALUE: 16 bytes, hexadecimal format |
Set |
AT+APPSKEY=81:B7:F9:A1:C1:98:32:5F:CB:AF:23:BB:C1:B9:92:A5
OK |
Get |
AT+APPSKEY=?
+APPSKEY:81:B7:F9:A1:C1:98:32:5F:CB:AF:23:BB:C1:B9:92:A5 OK |
Setting The NwkSKey
Set the NwkSKey by AT+NWKSKEY command.
Description | This command is used to set or get the NwkSKey |
Syntax |
AT+NWKSKEY=<VALUE>
VALUE: 16 bytes, hexadecimal format |
Set |
AT+NWKSKEY=09:EB:6E:C5:5C:30:02:75:05:E4:A2:12:D8:FD:2B:12
OK |
Get |
AT+NWKSKEY=?
+NWKSKEY:09:EB:6E:C5:5C:30:02:75:05:E4:A2:12:D8:FD:2B:12
OK |
Setting The Device Network Address
Set the DADDR by AT+DADDR command.
Description | This command is used to set or get the device network address |
Syntax |
AT+DADDR=<VALUE>
VALUE: 4 bytes, hexadecimal format |
Set |
AT+DADDR=FE:AA:9A:3E
OK |
Get |
AT+DADDR=?
+DADDR:FE:AA:9A:3E
OK |
Start Join Network
Set the active mode and start join network by AT+JOIN command.
Description | This command is used to start join network |
Syntax |
AT+JOIN=<VALUE>
VALUE: 0-ABP active, 1-OTAA active |
Set |
AT+JOIN=0 OK
If the join is successful, the device reports the Join Success event: +EVT:JOINED |
Query Join Status
Check the join status by AT+JOINSTA command.
Description | This command is used to query the join status, 0 -Not Join, 1 – Joined |
Syntax | AT+JOINSTA=? |
Get |
AT+JOINSTA=?
+JOINSTA:1
OK |
Switch Class Mode
After join, end device can be switched to Class B or Class C by AT+CLASS command.
Description | This command is used to set or get the module class |
Syntax |
AT+CLASS=<VALUE> VALUE: A/B/C |
Set | AT+CLASS=B |
OK Returns the corresponding class switch event after a successful switch: +EVT:SWITCH_TO_CLASS_B *When switching to Class B, the module needs to synchronize the time with the gateway first, and this operation will be executed on the next send, in order to speed up the switching, it is better to send data to the gateway once immediately after sending this command. |
|
Get |
AT+CLASS=?
+CLASS:B<,STATE> OK *For Class B, if queried during a switch, an additional <,STATE> will be returned. |
Send Data Through LoRaWAN Network
After join, device can send data to network server by AT+SEND command.
Description | This command is used to send data over the LoRaWAN network |
Syntax |
AT+SEND=<PORT>:<CONFIRM>:<PAYLOAD>
PORT: Uplink port CONFIRM: 0-Unconfirmed message, 1-Confirmed message PAYLOAD: Data to be sent in hexadecimal format, no more than 255 bytes |
Set |
AT+SEND=10:0:303132333435363738
OK |
Join Network By OTAA
End device can also join network through OTAA(Over-The-Air-Activation) active mode, which perform a join procedure with the network, during which a dynamic device address is assigned and security keys are negotiated with the device. Before activation, the AppEUI, DevEUI, and AppKey should be stored in the end device.
Setting The Network Mode
Set the network mode to LoRaWAN by AT+NWKM command
Description | This command is used to set or get the work mode |
Syntax |
AT+NWKM=<VALUE>
VALUE: 0 – P2P radio mode, 1 – LoRaWAN network |
Set |
AT+NWKM=1
OK |
Get |
AT+NWKM=?
+NWKM:1 (LoRaWAN)
OK |
Setting The Region Band
Set the region band by AT+BAND command.
Description | This command is used to set or get the area band |
Syntax |
AT+BAND=<VALUE>
VALUE: 0:AS923, 1:AU915, 2:CN470, 3:CN779, 4:EU433, 5:EU868, 6:KR920, 7:IN865, 8:US915, 9:RU864 |
Set |
AT+BAND=5
OK |
Get |
AT+BAND=?
+BAND:5 (EU868)
OK |
Setting The AppEUI
Set the AppEUI by AT+APPEUI command.
Description | This command is used to set or get the AppEUI |
Syntax |
AT+APPEUI=<VALUE>
VALUE: 8 bytes, hexadecimal format |
Set |
AT+APPEUI=BD:71:EE:E8:D1:3F:74:09
OK |
Get | AT+APPEUI=? |
+APPEUI:BD:71:EE:E8:D1:3F:74:09
OK |
Setting The AppKey
Set the AppKey by AT+APPKEY command.
Description | This command is used to set or get the AppKey |
Syntax |
AT+APPKEY=<VALUE>
VALUE: 16 bytes, hexadecimal format |
Set | AT+APPKEY=5F:38:A1:3B:A3:C0:3B:5C:02:85:02:8E:9D:BE:B5:4E
OK |
Get |
AT+APPKEY=?
+APPKEY:5F:38:A1:3B:A3:C0:3B:5C:02:85:02:8E:9D:BE:B5:4E
OK |
Setting The DEUI
Set the DEUI by AT+DEUI command.
Description | This command is used to set or get the device EUI |
Syntax |
AT+DEUI=<VALUE>
VALUE: 8 bytes, hexadecimal format |
Set |
AT+DEUI=00:80:E1:15:00:0A:9A:3E
OK |
Get |
AT+DEUI=?
+DEUI:00:80:E1:15:00:0A:9A:3E
OK |
Start Join Network
Set the active mode and start join network by AT+JOIN command.
Description | This command is used to start join network |
Syntax |
AT+JOIN=<VALUE>
VALUE: 0-ABP active, 1-OTAA active |
Set |
AT+JOIN=1 OK
If the join is successful, the device reports the Join Success event: +EVT:JOINED |
Query Join Status
Check the join status by AT+JOINSTA command.
Description | This command is used to query the join status, 0 -Not Join, 1 – Joined |
Syntax | AT+JOINSTA=? |
Get |
AT+JOINSTA=?
+JOINSTA:1 OK |
Switch Class Mode
After join, end device can be switched to Class B or Class C by AT+CLASS command.
Description | This command is used to set or get the module class |
Syntax | AT+CLASS=<VALUE> VALUE: A/B/C |
Set |
AT+CLASS=B OK
Returns the corresponding class switch event after a successful switch: +EVT:SWITCH_TO_CLASS_B *When switching to Class B, the module needs to synchronize the time with the gateway first, and this operation will be executed on the next send, in order to speed up the switching, it is better to send data to the gateway once immediately after sending this command. |
Get |
AT+CLASS=?
+CLASS:B<,STATE>
OK |
*For Class B, if queried during a switch, an additional <,STATE> will be returned. |
Send Data Through LoRaWAN Network
After join, device can send data to network server by AT+SEND command.
Description | This command is used to send data over the LoRaWAN network |
Syntax |
AT+SEND=<PORT>:<CONFIRM>:<PAYLOAD>
PORT: Uplink port CONFIRM: 0-Unconfirmed message, 1-Confirmed message PAYLOAD: Data to be sent in hexadecimal format, no more than 255 bytes |
Set | AT+SEND=10:0:303132333435363738
OK |
Send Data Through LoRaWAN Network
After join, device can send data to network server by AT+SEND command.
Description | This command is used to send data over the LoRaWAN network |
Syntax |
AT+SEND=<PORT>:<CONFIRM>:<PAYLOAD>
PORT: Uplink port CONFIRM: 0-Unconfirmed message, 1-Confirmed message PAYLOAD: Data to be sent in hexadecimal format, no more than 255 bytes |
Set |
AT+SEND=10:0:303132333435363738
OK |
P2P Usage Guidelines
M320 supports P2P mode communication and can exchange data between two module directly. P2P mode supports FSK and Lora.
Setting The Network Mode
Set the network mode to LoRaWAN by AT+NWKM command.
Description | This command is used to set or get the work mode |
Syntax |
AT+NWKM=<VALUE>
VALUE: 0 – P2P radio mode, 1 – LoRaWAN network |
Set | AT+NWKM=0 |
OK | |
Get |
AT+NWKM=?
+NWKM:0 (Radio) OK |
Setting The P2P Mode
Set the P2P configuration by AT+RFCONF command. To ensure successful communication, both modules need to be configured with the same parameters.
Description | This command is used to set or get the P2P radio configuration |
Syntax |
FSK mode: AT+RFCONF=<MOD>:<FQ>:<PWR>:<BW>:<RATE>:<FDEV>:<PL>
LoRa mode: AT+RFCONF=<MOD>:<FQ>:<PWR>:<BW2>:<SF>:<CR>:<OPT>:<PL> MOD: 0-FSK mode, 1-LoRa mode FQ: Operating frequency in Hz PWR: Transmit power in dBm BW: FSK receive bandwidth in Hz RATE: FSK mode data rate in bps FDEV: FSK frequency deviation, in Hz PL: Payload length, 0-variable packet length mode, other values are the corresponding fixed packet length mode BW2: LoRa bandwidth, [0:7.8, 1:15.6, 2:31.2, 3:62.5, 4:125, 5:250, 6:500] KHz SF: Spreading factor, value 5-12 CR: Coding rate, [1:CR4/5, 2:CR4/6, 3:CR4/7, 4:CR4/8] OPT: LowDrOpt, 0-Off, 1-On, 2-Auto |
Set |
FSK:868.7MHz,14dBm,BW=75K,Datarate=10kbps,Fdev=25K AT+RFCONF=0:868700000:14:75000:10000:25000:32
OK LoRa:868.7MHz,14dBm,BW=125K,SF5,CR4/5,LowDrOpt=Auto AT+RFCONF=1:868700000:14:4:5:1:2:32 OK |
Get |
AT+RFCONF=?
+RFCONF:0:868700000:14:75000:10000:25000:32
OK |
Start P2P RX
After P2P setting done, start P2P data receive by AT+RFRECV command.
Description | This command is used to start the P2P radio reception |
Syntax |
AT+RFRECV=<VALUE>
VALUE: Receive timeout in ms, 0 is no timeout |
Set |
AT+RFRECV=500
OK Receive timeout will report a timeout event: +EVT:RX_TIMEOUT |
Start P2P TX
At the same time, start P2P data transmission by AT+RFSEND command on the other module.
Description | This command is used to start the P2P radio send |
Syntax |
AT+RFSEND=<VALUE>
VALUE: Data to be sent in hexadecimal, not more than 255 bytes |
Set |
AT+RFSEND=3031323334
OK |
Common commands
The following are some commonly used AT commands, for complete commands please refer to the AT Command Manual.
Reboot (ATZ)
Description | This command is used to trigger a reboot of the module |
Syntax | ATZ |
Run |
ATZ |
OK |
Restore Default Config (AT+RFS)
Description |
This command is used to restore the factory default configuration (automatic reboot after return) |
Syntax | AT+RFS |
Run |
AT+RFS
OK |
Log Level (AT+LOG)
Description | This command is used to get or set the print log level |
Syntax |
AT+LOG=<LEVEL>
LEVEL:0-None, 1-Err, 2-Warn, 3-Info, 4-Debug |
Set |
AT+LOG=3
OK |
Get |
AT+LOG=?
+LOG:3 (Info)
OK |
Uart Baud rate (AT+BAUD)
Description | This command is used to get or set the baud rate of the AT serial port |
Syntax | AT+BAUD=<VALUE> |
Set |
AT+BAUD=9600
OK |
Get |
AT+BAUD=?
+BAUD:9600
OK |
Set Auto Run Command (AT+AR)
Description | This command is used to get or set commands auto-run on power-up (configuration needs to be saved to take effect) |
Syntax |
AT+AR=<VALUE>
VALUE:AT command to be executed on power-up, set commands are executed in the order of addition *Special operation: WAIT <T>, delay T milliseconds |
Set |
AT+AR=AT+LOG=3
OK AT+AR=WAIT 1000
OK |
Get |
AT+AR=?
+AR:cmd list: 2 00: AT+LOG=3 01: WAIT 1000 OK |
Clear Auto Run Command (AT+ARDEL)
Description | This command is used to remove all auto-run commands on startup |
Syntax | AT+ARDEL |
Run |
AT+ARDEL
OK |
Save Auto Run Command (AT+ARSAVE)
Description | This command is used to save the auto-run command |
Syntax | AT+ARSAVE |
Run |
AT+ARSAVE
OK |
FCC Warning
This device complies with part 15 of the FCC rules. Operation is subject to the following two conditions:
- This device may not cause harmful interference, and
- This device must accept any interference received, including interference that may cause undesired operation.
NOTE: The manufacturer is not responsible for any radio or TV interference caused by unauthorized modifications or changes to this equipment. Such modifications or changes could void the user’s authority to operate the equipment.
Important Note: In the event that these conditions cannot be met (for example certain laptop configurations or co-location with another transmitter), then the Federal Communications Commission of the U.S. Government (FCC) and the Canadian Government authorizations are no longer considered valid and the FCC ID cannot be used on the final product. In these circumstances, the OEM integrator shall be responsible for re-evaluating the end-product (including the transmitter) and obtaining a separate FCC authorization in the U.S. and Canada. OEM Integrators – End Product Labeling Considerations: This transmitter module is authorized only for use in device where the antenna may be installed such that 20 cm may be maintained between the antenna and users. The final end product must be labeled in a visible area with the following: ” Contains, FCC ID: 2BM2KM320″. The grantee’s FCC ID can be used only when all FCC compliance requirements are met.
OEM Integrators – End Product Manual provided to the End User: The OEM integrator shall not provide information to the end user regarding how to install or remove this RF module in end product user manual. The end user manual must include all required regulatory information and warnings as outlined in this document.
List of applicable FCC rules
The device compliance with FCC Part 15.247
Summarize the specific operational use conditions
The OEM integrator is still responsible for testing their end-product for any additional compliance requirements required for the installed module
Limited module procedures
Device is single module approval
Trace antenna designs
PIFA antenna, antenna gain is 1.83dBi the antenna size as below
RF exposure considerations
Compliance with FCC Part 2.1091
This device is intended only for OEM integrators under the following conditions: 1.The antenna must be installed such that 20 cm is maintained between the antenna and users. 2. The transmitter module may not be co-located with any other transmitter or antenna. As long as the two conditions above are met, additional transmitter testing will not be required.
Antennas
PIFA antenna, antenna gain is 1.83dBi.
- Label and compliance information
The label compliance with FCC requirement and the end product must be labeled in a visible area with the following: ” Contains, FCC ID: 2BM2KM320″ - Information on test modes and additional testing requirements
The module under Continuous transmit ion and lager than 98% duty cycle - Additional testing, Part 15 Subpart B disclaimer
The test results compliance with FCC Part 15B requirement - Note EMI Considerations
The host manufacturer is recommended to use FCC KDB 996369 D04 Module Integration Guide recommending as “best practice” RF design engineering testing and evaluation in case non-linear interactions generate additional non-compliant limits due to module placement to host components or properties
How to make changes
This module is stand-alone modular. If the end product will involve the Multiple simultaneously transmitting condition or different operational conditions for a stand-alone modular transmitter in a host, host manufacturer have to consult with module manufacturer for the installation method in end system.
Shenzhen Navynav Technology Co., Ltd
502,Dazu Science and Technology Center,9988 Shennan Avenue, Nanshan District, Shenzhen, China
www.navynav.com
FAQ
- Q: Can the M320 connect to multiple LoRaWAN server platforms simultaneously?
A: No, the M320 can connect to one LoRaWAN server platform at a time. - Q: What is the range of the M320 for wireless communication?
A: The M320 has a long transmission distance suitable for various low-power wide-area IoT applications.
Documents / Resources
![]() |
navynav M320 LoRa Modules [pdf] User Guide 2BM2KM320, 2BM2KM320, m320, M320 LoRa Modules, M320, LoRa Modules, Modules |