How does the lora module modify the frequency?
Date:2019/11/5 16:25:08   Browse:0

The frequency isthe most basic and core parameter in the lora module. All lora modules arebased on the frequency to complete the communication (only the frequency isconsistent to complete the communication). The frequency of the popular loramodules in the market is often: 433mhz, 470mhz, 868Mhz, 915mhz, etc. Eachfrequency band is actually a range of frequencies, such as 433mhz, itsfrequency range is 413 ~ 453mhz, and 433mhz is the center point of thisfrequency. In the project, if all the lora modules are placed in the samefrequency, the communication between the lora modules will definitely causeinterference, so we usually stagger their communication frequency bands toavoid interference. So the question is, how do we modify the frequency of the loramodule?

NiceRF's loramodules are mainly divided into two categories, one is the front-end loramodule without single-chip control, and the center frequency point needs to bemodified by code. The other is the digital transmission lora module with single-chipmicrocomputer, which can be independently developed by our company. The PCsoftware configures the parameters of the lora module or sends a commandcharacter through the serial port to complete the modification.

1.    Front-endlora module

The following is an example of howour lora1262 module can modify the frequency through the code (for referenceonly)

Function parameter: 32-bitunsigned positive number, which is the target frequency, for example, thefrequency is set to 433mhz. Then the parameter should be entered 433000000

Return value: none.

void SX1262SetFrequency(u32 freq)

{

u8CmdBuf[5];

CmdBuf[0]=SetRfFrequency;//Commandto set the frequencySetRfFrequency=0x86;

 freq=(u32)(((double)freq)/((double)FREQ_STEP));//Calculate the corresponding registervalue according to the specification of SX1262FREQ_STEP=FXTAL/2^25,

CmdBuf[1]= (unsigned char)( ( freq >>24 ) & 0xFF );//High byte

  CmdBuf[2]= (unsigned char)( ( freq >>16 ) & 0xFF );

  CmdBuf[3]= (unsigned char)( ( freq >> 8) & 0xFF );

  CmdBuf[4]= (unsigned char)( freq & 0xFF);

  SPIWriteCmd(5,CmdBuf);//Write

}

2.    Digitalpass lora module

2.1 PC software modification

All of NiceRF's digital  transmission modules can have corresponding PCsoftware. We can modify the center frequency of the lora module through the PCsoftware. We only need to connect the module and the PC end through the serialport to complete the modification. Simple and convenient.

Lora610promodule PC configuration software

2.2   SerialAssistant Modification

The serial port assistant ismodified by sending a command character to the lora module. Let's take thelora610pro module as an example

First, let's briefly introduce the parameter settingcommand format of the lora610pro module: parameter setting command, with[parameter] of 33 bytes, the sequence is as follows: Transceiver channel -working frequency band - air communication rate - transmitting power - serialport baud rate - serial port data Bit—Serial Port Stop Bit—Serial PortValidation Bit—NET ID—NODE ID-MESH—NODE—Key Type—16-byte key configurationcommand: AA FA 03 XX XX XX XX XX XX ...... XX XX XX XX XX XX XX XX XX returnsthe command: "OK\r\n" or "ERROR\r\n"

             (lora610promodule channel description

     

              (lora610promodule center band description)

Suppose we set theoperating frequency of the lora610pro module to 414.92mhz, then theconfiguration command is: AA FA 03 01 01 XX XX XX XX...XX XX XX XX XX XX XX XXXX. Other XX specific parameters can be considered as the wireless officialwebsite lora610pro module to view the specification.

Special Note

The operatingfrequency of different lora modules is fixed. For example, the lora1268 moduleof the SX1268 chip, its operating frequency is 433/470mhz, can it communicateif its operating frequency exceeds the 433/470mhz center band (for example, theoperating frequency band is set? At 868mhz)? The answer is: Of course you can.However, the peripheral matching circuit of each lora module's pcb board isbased on a specific frequency, and the antenna has the best working frequency,so when the center operating frequency range of the lora module is exceeded,the transmission distance will be greatly reduced, assuming that it can betransmitted. The distance of 100 meters, beyond the center frequency range, maynot even be 10 meters. Therefore, the user should set the center frequencyrange of each lora module to ensure the best performance of the wirelessmodule.

How to change thefrequency of the lora module today is over. If you have any other questions orsuggestions, please feel free to contact NiceRF.


prev: How does the lora module be properly wired to the adapter board?
next: The difference between the 885 series ASK wireless module and the 882 series ASK wireless module