M320 Quick Start Guide

Shenzhen Navynav Technology Co., Ltd.

www.navynav.com

Revision Notes

Date Version Description
2023-7-18 V1.0 Initial Version
2024-3-15 V1.2 Update pin descriptions

1. 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.

2. Module Preview

The M320 pinout is shown in Figure 2-1.

Figure 2-1 Pinout Diagram

[Diagram showing M320 module with pin labels: GND, ADC4, ADC6, GPIO, GND, I2C2 SDA, I2C2 SCL, GND, SPI1 MOSI, SPI1 MISO, SPI1 CLK, SPI1 CS, GND, RF TRX, GND, NRST, GPIO, GPIO, LPUART RX, LPUART TX, GPIO, GPIO, UART1 RX, UART1 TX, GND, VDD, ADC2, ADC3, GPIO, ADC11, SWCLK, SWDIO, GND]

2.1 Pin Function

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 - 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

3. 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.

3.1 Join Network By APB

End-device can join a pre-selected network through ABP (Activation By Personalization) active mode. The Join Server is not involved in the ABP process. Before activation, the AppSKey, NwkSKey, and DADDR should be stored in the end device.

3. 1. 1 Setting The Network Mode

Set the network mode to LoRaWAN by AT+NWKM command.

Description Syntax Set Get
This command is used to set or get the work mode AT+NWKM=<VALUE>
VALUE: 0 - P2P radio mode, 1 - LoRaWAN network
AT+NWKM=1
OK
AT+NWKM=?
+NWKM:1 (LoRaWAN)
OK

3. 1. 2 Setting The Region Band

Set the region band by AT+BAND command.

Description Syntax Set Get
This command is used to set or get the area band AT+BAND=<VALUE>
VALUE: 0:AS923, 1:AU915, 2:CN470, 3:CN779, 4:EU433, 5:EU868, 6:KR920, 7:IN865, 8:US915, 9:RU864
AT+BAND=5
OK
AT+BAND=?
+BAND:5 (EU868)
OK

3. 1. 3 Setting The AppSKey

Set the AppSKey by AT+APPSKEY command.

Description Syntax Set Get
This command is used to set or get the AppSKey AT+APPSKEY=<VALUE>
VALUE: 16 bytes, hexadecimal format
AT+APPSKEY=81:B7:F9:A1:C1:98:32:5F:CB:AF:23:BB:C1:B9:92:A5
OK
AT+APPSKEY=?
+APPSKEY:81:B7:F9:A1:C1:98:32:5F:CB:AF:23:BB:C1:B9:92:A5
OK

3. 1. 4 Setting The NwkSKey

Set the NwkSKey by AT+NWKSKEY command.

Description Syntax Set Get
This command is used to set or get the NwkSKey AT+NWKSKEY=<VALUE>
VALUE: 16 bytes, hexadecimal format
AT+NWKSKEY=09:EB:6E:C5:5C:30:02:75:05:E4:A2:12:D8:FD:2B:12
OK
AT+NWKSKEY=?
+NWKSKEY:09:EB:6E:C5:5C:30:02:75:05:E4:A2:12:D8:FD:2B:12
OK

3. 1. 5 Setting The Device Network Address

Set the DADDR by AT+DADDR command.

Description Syntax Set Get
This command is used to set or get the device network address AT+DADDR=<VALUE>
VALUE: 4 bytes, hexadecimal format
AT+DADDR=FE:AA:9A:3E
OK
AT+DADDR=?
+DADDR:FE:AA:9A:3E
OK

3. 1. 6 Start Join Network

Set the active mode and start join network by AT+JOIN command.

Description Syntax Set Get
This command is used to start join network AT+JOIN=<VALUE>
VALUE: 0-ABP active, 1-OTAA active
AT+JOIN=0
OK
If the join is successful, the device reports the Join Success event: +EVT:JOINED

3. 1. 7 Query Join Status

Check the join status by AT+JOINSTA command.

Description Syntax Get
This command is used to query the join status, 0 -Not Join, 1 - Joined AT+JOINSTA=? AT+JOINSTA=?
+JOINSTA:1
OK

3. 1.8 Switch Class Mode

After join, end device can be switched to Class B or Class C by AT+CLASS command.

Description Syntax Set Get
This command is used to set or get the module class AT+CLASS=<VALUE>
VALUE: A/B/C
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.
AT+CLASS=?
+CLASS:B<,STATE>
OK
*For Class B, if queried during a switch, an additional <,STATE> will be returned.

3. 1. 9 Send Data Through LoRaWAN Network

After join, device can send data to network server by AT+SEND command.

Description Syntax Set
This command is used to send data over the LoRaWAN network 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
AT+SEND=10:0:303132333435363738
OK

3.2 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.

3. 2. 1 Setting The Network Mode

Set the network mode to LoRaWAN by AT+NWKM command.

Description Syntax Set Get
This command is used to set or get the work mode AT+NWKM=<VALUE>
VALUE: 0 - P2P radio mode, 1 - LoRaWAN network
AT+NWKM=1
OK
AT+NWKM=?
+NWKM:1 (LoRaWAN)
OK

3. 2. 2 Setting The Region Band

Set the region band by AT+BAND command.

Description Syntax Set Get
This command is used to set or get the area band AT+BAND=<VALUE>
VALUE: 0:AS923, 1:AU915, 2:CN470, 3:CN779, 4:EU433, 5:EU868, 6:KR920, 7:IN865, 8:US915, 9:RU864
AT+BAND=5
OK
AT+BAND=?
+BAND:5 (EU868)
OK

3. 2. 3 Setting The AppEUI

Set the AppEUI by AT+APPEUI command.

Description Syntax Set Get
This command is used to set or get the AppEUI AT+APPEUI=<VALUE>
VALUE: 8 bytes, hexadecimal format
AT+APPEUI=BD:71:EE:E8:D1:3F:74:09
OK
AT+APPEUI=?
+APPEUI:BD:71:EE:E8:D1:3F:74:09
OK

3. 2. 4 Setting The AppKey

Set the AppKey by AT+APPKEY command.

Description Syntax Set Get
This command is used to set or get the AppKey AT+APPKEY=<VALUE>
VALUE: 16 bytes, hexadecimal format
AT+APPKEY=5F:38:A1:3B:A3:C0:3B:5C:02:85:02:8E:9D:BE:B5:4E
OK
AT+APPKEY=?
+APPKEY:5F:38:A1:3B:A3:C0:3B:5C:02:85:02:8E:9D:BE:B5:4E
OK

3. 2. 5 Setting The DEUI

Set the DEUI by AT+DEUI command.

Description Syntax Set Get
This command is used to set or get the device EUI AT+DEUI=<VALUE>
VALUE: 8 bytes, hexadecimal format
AT+DEUI=00:80:E1:15:00:0A:9A:3E
OK
AT+DEUI=?
+DEUI:00:80:E1:15:00:0A:9A:3E
OK

3. 2. 6 Start Join Network

Set the active mode and start join network by AT+JOIN command.

Description Syntax Set
This command is used to start join network AT+JOIN=<VALUE>
VALUE: 0-ABP active, 1-OTAA active
AT+JOIN=1
OK
If the join is successful, the device reports the Join Success event: +EVT:JOINED

3. 2. 7 Query Join Status

Check the join status by AT+JOINSTA command.

Description Syntax Get
This command is used to query the join status, 0 -Not Join, 1 - Joined AT+JOINSTA=? AT+JOINSTA=?
+JOINSTA:1
OK

3.2.8 Switch Class Mode

After join, end device can be switched to Class B or Class C by AT+CLASS command.

Description Syntax Set Get
This command is used to set or get the module class AT+CLASS=<VALUE>
VALUE: A/B/C
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.
AT+CLASS=?
+CLASS:B<,STATE>
OK
*For Class B, if queried during a switch, an additional <,STATE> will be returned.

3. 2. 9 Send Data Through LoRaWAN Network

After join, device can send data to network server by AT+SEND command.

Description Syntax Set
This command is used to send data over the LoRaWAN network 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
AT+SEND=10:0:303132333435363738
OK

3.3 P2P Usage Guidelines

M320 supports P2P mode communication and can exchange data between two modules directly. P2P mode supports FSK and LoRa.

3. 3. 1 Setting The Network Mode

Set the network mode to LoRaWAN by AT+NWKM command.

Description Syntax Set Get
This command is used to set or get the work mode AT+NWKM=<VALUE>
VALUE: 0 - P2P radio mode, 1 - LoRaWAN network
AT+NWKM=0
OK
AT+NWKM=?
+NWKM:0 (Radio)
OK

3. 3. 2 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 Syntax Set Get
This command is used to set or get the P2P radio configuration 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, 21:15.6, 12:31.2, 3:62.5, 14:25, 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
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
AT+RFCONF=?
+RFCONF:0:868700000:14:75000:10000:25000:32
OK

3. 3. 3 Start P2P RX

After P2P setting done, start P2P data receive by AT+RFRECV command.

Description Syntax Set
This command is used to start the P2P radio reception AT+RFRECV=<VALUE>
VALUE: Receive timeout in ms, 0 is no timeout
AT+RFRECV=500
OK
Receive timeout will report a timeout event: +EVT:RX_TIMEOUT

3. 3. 4 Start P2P TX

At the same time, start P2P data transmission by AT+RFSEND command on the other module.

Description Syntax Set
This command is used to start the P2P radio send AT+RFSEND=<VALUE>
VALUE: Data to be sent in hexadecimal, not more than 255 bytes
AT+RFSEND=3031323334
OK

4. Common commands

The following are some commonly used AT commands, for complete commands please refer to the AT Command Manual.

4.1 Reboot (ATZ)

Description Syntax Run
This command is used to trigger a reboot of the module ATZ ATZ
OK

4.2 Restore Default Config (AT+RFS)

Description Syntax Run
This command is used to restore the factory default configuration (automatic reboot after return) AT+RFS AT+RFS
OK

4.3 Log Level (AT+LOG)

Description Syntax Set Get
This command is used to get or set the print log level AT+LOG=<LEVEL>
LEVEL:0-None, 1-Err, 2-Warn, 3-Info, 4-Debug
AT+LOG=3
OK
AT+LOG=?
+LOG:3 (Info)
OK

4.4 Uart Baudrate (AT+BAUD)

Description Syntax Set Get
This command is used to get or set the baud rate of the AT serial port AT+BAUD=<VALUE> AT+BAUD=9600
OK
AT+BAUD=?
+BAUD:9600
OK

4.5 Set Auto Run Command (AT+AR)

Description Syntax Set Get
This command is used to get or set commands auto-run on power-up (configuration needs to be saved to take effect) 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
AT+AR=AT+LOG=3
OK
AT+AR=WAIT 1000
OK
AT+AR=?
+AR:cmd list: 2
00: AT+LOG=3
01: WAIT 1000
OK

4.6 Clear Auto Run Command (AT+ARDEL)

Description Syntax Run
This command is used to remove all auto-run commands on startup AT+ARDEL AT+ARDEL
OK

4.7 Save Auto Run Command (AT+ARSAVE)

Description Syntax Run
This command is used to save the auto-run command AT+ARSAVE AT+ARSAVE
OK

FCC Warning

This device complies with part 15 of the FCC rules. Operation is subject to the following two conditions:

  1. This device may not cause harmful interference, and
  2. 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.

2.2 List of applicable FCC rules

The device compliance with FCC Part 15.247

2.3 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

2.4 Limited module procedures

Device is single module approval

2.5 Trace antenna designs

PIFA antenna, antenna gain is 1.83dBi the antenna size as below

Antenna Dimensions

[Diagram showing antenna dimensions: 13.0, 4, 3, 2, *195±3.0, 165±2.0]

2.6 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.

2.7 Antennas

PIFA antenna, antenna gain is 1.83dBi.

2.8 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"

2.9 Information on test modes and additional testing requirements

The module under Continuous transmit ion and lager than 98% duty cycle

2.10 Additional testing, Part 15 Subpart B disclaimer

The test results compliance with FCC Part 15B requirement

2.11 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

2.12 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.

Models: 2BM2KM320, 2BM2KM320, m320, M320 LoRa Modules, M320, LoRa Modules, Modules

File Info : application/pdf, 20 Pages, 438.68KB

PDF preview unavailable. Download the PDF instead.

GetApplicationAttachment.html?id=8409186

References

Microsoft Word 2010 Microsoft Word 2010

Related Documents

Preview M4 P User Manual - Shenzhen Navynav Technology Co., Ltd.
User manual for the M4 P, a built-in transceiver LORA radio station from Shenzhen Navynav Technology Co., Ltd., designed for lawnmower and IoT applications. Details technical parameters, pin definitions, connection lines, mechanical characteristics, and compliance information.