Instruction for LA66 Peer to Peer firmware

Last modified by Bei Jinggeng on 2022/12/19 11:05

Table of Contents:

1.  Overview

This instruction is for how to use Peer to Peer firmware in LA66.

2.  Firmware Location

Click here to download the firmware and update it to LA66 according to the instruction for different boards.

3.  How to use?

3.1  AT command

1). Lora parameter configuration:

AT+FRE:    Get or Set TX and RX frequency

AT+BW:    Get or Set TX and RX BandWidth

AT+SF:      Get or Set TX and RX Spreading Factor

AT+POWER:    Get or Set Tx Power Range

AT+CRC:         Get or Set TX and RX CRC Type

AT+HEADER:   Get or Set TX and RX Header Type

AT+CR:            Get or Set TX and RX Header Type

AT+IQ:             Get or Set TX and RX InvertIQ

AT+PREAMBLE:      Get or Set TX and RX Preamble Length

AT+SYNCWORD:    Get or Set sync word

2). General configuration:

ATZ:        Trig a reset of the MCU

AT+FDR:  Reset Parameters to Factory Default

AT+CFG:  Print all configurations

AT+FCU:  Get or Set the Frame Counter Uplink

AT+FCD:  Get or Set the Frame Counter Downlink

AT+GROUPMOD:   Get or Set TX and RX group

AT+RXMOD:          Get or Set Rx Timeout and Reply mode

AT+SEND:     Send text data or hex along with the application port and confirm status

AT+RECV:      Print last receive message, RSSI and SNR

3.2  Serial port information

1). Information initialized at reset:

image-20220926112125-1.png

2). In retransmission, the Uplinkcounter does not accumulate. The following figure shows that the third count packet is retransmitted twice when the ACK packet is not received.

image-20220926112125-2.png

3). In the figure below, the receiver sends an ACK to the sender after receiving the packet, and the sender stops retransmission after receiving the ACK.

Receiver: (configured as AT+RXMOD=65535,2)

image-20220926112125-3.png

Sender:

image-20220926112125-4.png

3.3  Data Format

1 byte of TXGROUPMOD +n payload 

Payload(S12, SF11, SF10 maximum length is 59, SF9 maximum length is 123, SF8, SF7 maximum length is 230):

Size (bytes)          1payloadsize
ValueTXGroupmodSend data

4.  AT Command Set

4.1  Set TX and RX Bandwidth

Set TX and RX BandWidth (0 ~ 9), AT Command :  AT+BW

0:  125 kHz

1:  250 kHz

2:  500 kHz

3:  62.5 kHz

4:  41.67 kHz

5:  31.25 kHz

6:  20.83 kHz

7:  15.63 kHz

8:  10.42 kHz

9:  7.81 kHz

Default Value: AT+BW=0,0     //  BandWidth: 125kHz ,125kHz

Range: (0 ~ 9)

4.2  Set TX and RX frequency

Set TX and RX frequency (MHz), AT Command :  AT+FRE

Default Value: AT+FRE=868.100,868.100     //  Frequency: 868.100MHz, 868.100MHz

4.3  Set TX and RX Spreading Factor

Set TX and RX Spreading Factor ( 5 ~ 12), AT Command : AT+SF

Default Value: AT+SF=12,12     //  Spreading Factor : 12,12

Range: (5 ~ 12)

4.4  Set Tx Power Range

Set Tx Power Range( 0 ~ 22 dBm), AT Command : AT+POWER

Default Value: AT+POWER=20     //  Output Power: 20dBm

Range: (0 ~ 22)

4.5  Set TX and RX Coding Rate

Set TX and RX Coding Rate ( 1 ~ 4 ), AT Command :AT+CR

1: 4/5

2: 4/6

3: 4/7

4: 4/8

Default Value: AT+CR=1,1     //  Coding Rate: 4/5, 4/5

Range: (1 ~ 4)

4.6  Set  TX and RX Header Type

Set  TX and RX Header Type ( 0,1 ), AT Command : AT+HEADER

0: Variable length packet (explicit header)

1: Fixed length packet (implicit header)

Default Value: AT+HEADER=1,1     //  Header Type: explicit, explicit

Range: (0 ~ 1)

4.7  Set TX and RX CRC Type

Set TX and RX CRC Type ( 0,1) ,AT Command:AT+CRC

0: CRC OFF

1: CRC ON

Default Value: AT+CRC=0,0     //  CRC: OFF, OFF

Range: (0 ~ 1)

4.8  Set TX and RX InvertIQ

Set TX and RX InvertIQ ( 0,1) , AT Command:AT+IQ

0: Standard IQ setup

1: Inverted IQ setup

Default Value: AT+IQ=0,0     //  Invert IQ: 0,0

Range: (0 ~ 1)

4.9  Set TX and RX Preamble Length

Set TX and RX Preamble Length ( 0 ~ 65535 ) , AT Command: AT+PREAMBLE

Default Value: AT+PREAMBLE=8,8     //  Preamble: 8,8

Range: ( 0 ~ 65535 )

4.10  Set Syncword

Set Syncword(0: private,1: public), AT Command : AT+SYNCWORD

Default Value: AT+SYNCWORD=0     //  0x3444 for Public Network

Range: ( 0 ~ 1 )

4.11  Set TX and RX group

Set TX and RX group. (0 ~ 255),AT Command:AT+GROUPMOD

Group > 0:   Device only accept same group transmision 

Group = 0:   Accept Any group

Default Value: AT+GROUPMOD=0,0     //  Group: 0,0

Range: ( 0 ~ 255 )

4.12  Set Rx Timeout and Reply mode

Set Rx Timeout and Reply mode, Parameter 1, Parameter2, AT Command:AT+RXMOD

Parameter 1: 

   0:  Always no RX

   1 ~ 65534:  Open RX window and last for specify seconds. 

   65535:  RX window always open.

 Parameter 2: 

   0:   No ACK

   1:   Send an ACK once got a  message from another device. ACK Content is same as receive message 

   2:   Send an ACK once got a  message from another device. ACK Content is 0x00 FF

Default Value: AT+RXMOD=65535,2     //  RX Mode: 65535, 2

4.13  Send Message

Send Message, AT Command:AT+SEND

Parameter 1: send hex or text 

   0: Send hex

   1: Send text

Parameter 2: Content

Parameter 3 : ACK Type

   0:  No ACK

   1:  Wait for ACK (Same as what we sent)

   2:  Wait for ACK ( 0x00 FF)

Parameter 4 : Retransmission ( 0 ~ 8 )

   0:  No re-transmission

   1 ~ 8: total sends 1~8 transmission, interval 5 seconds

Example:  AT+SEND=1,hello world,0,3

Notice: RX reply (Defined by AT+RXMOD) won't ask for TX ACK

4.14  Print last receive message with RSSI and SNR

Print last receive message with RSSI and SNR,AT+Command:AT+RECV

 0: Print in Hex

 1: Print in text

 Example: AT+RECV=0   

The recevied message will be clear after this command. 

 

Tags:
    
Copyright ©2010-2022 Dragino Technology Co., LTD. All rights reserved
Dragino Wiki v2.0