CN113099431B - Communication method and device based on LoRa channel and LoRa host - Google Patents

Communication method and device based on LoRa channel and LoRa host Download PDF

Info

Publication number
CN113099431B
CN113099431B CN202110317229.8A CN202110317229A CN113099431B CN 113099431 B CN113099431 B CN 113099431B CN 202110317229 A CN202110317229 A CN 202110317229A CN 113099431 B CN113099431 B CN 113099431B
Authority
CN
China
Prior art keywords
lora
configuration information
channel
slave
address
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110317229.8A
Other languages
Chinese (zh)
Other versions
CN113099431A (en
Inventor
张金龙
王铭泽
何渝君
张展
舒忠玲
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hanyun Technology Co Ltd
Original Assignee
Hanyun Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hanyun Technology Co Ltd filed Critical Hanyun Technology Co Ltd
Priority to CN202110317229.8A priority Critical patent/CN113099431B/en
Publication of CN113099431A publication Critical patent/CN113099431A/en
Application granted granted Critical
Publication of CN113099431B publication Critical patent/CN113099431B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/009Security arrangements; Authentication; Protecting privacy or anonymity specially adapted for networks, e.g. wireless sensor networks, ad-hoc networks, RFID networks or cloud networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/02Arrangements for optimising operational condition

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The application provides a communication method, a device and a LoRa host computer based on a LoRa channel, the method comprises the following steps: acquiring current configuration information of an LoRa slave machine, wherein the current configuration information comprises a first channel where the LoRa slave machine is located; switching to a first channel where the LoRa slave is located and sending configuration information to the LoRa slave, wherein the configuration information includes address information to be configured and channel information to be configured, and an address corresponding to the address information to be configured is different from an address of the LoRa master; and switching to a channel corresponding to the channel information to be configured and communicating with the LoRa slave machine based on the configuration information, thereby effectively improving the communication safety of the LoRa networking system.

Description

Communication method and device based on LoRa channel and LoRa host
Technical Field
The present invention relates to the field of communications, and in particular, to a communication method and apparatus based on an LoRa channel, and an LoRa host.
Background
Long Range Radio (LoRa) is a low power consumption lan wireless standard, and has the characteristics of low power consumption, low cost, Long transmission distance, and the like. In existing LoRa networking, all LoRa devices of an LoRa network are generally located in the same channel. Because the communication protocol of the existing LoRa device is fixed, the encryption mode is simple, and all the LoRa devices are in the same channel, so that a network attacker can obtain the data of the LoRa device after determining the address and the channel of one LoRa device, and then each LoRa device in the channel is maliciously controlled by analyzing the communication protocol of the LoRa device, thereby causing a serious network security problem.
Disclosure of Invention
An object of the embodiments of the present application is to provide a communication method and apparatus based on an LoRa channel, and an LoRa host, so as to solve the problem of low security in an existing LoRa network.
In a first aspect, the present invention provides a communication method based on an LoRa channel, applied to an LoRa host, including: acquiring current configuration information of an LoRa slave machine, wherein the current configuration information comprises a first channel where the LoRa slave machine is located; switching to a first channel where the LoRa slave is located and sending configuration information to the LoRa slave, wherein the configuration information includes address information to be configured and channel information to be configured, and an address corresponding to the address information to be configured is different from an address of the LoRa master; and switching to a channel corresponding to the channel information to be configured and communicating with the LoRa slave machine based on the configuration information.
In the embodiment of the application, before the LoRa master communicates with the LoRa slave, the LoRa master is switched to the channel where the LoRa slave is located, configuration information is sent to enable the LoRa slave to change the configuration information of the LoRa slave, the LoRa slave is updated to the channel and the address in the configuration information from the original channel and address, then the LoRa master is switched to the updated channel of the LoRa slave, and the LoRa master communicates with the LoRa slave according to the configuration information sent before. By the method, even if a network attacker determines the address and the channel of one LoRa slave machine in the communication process of the LoRa master machine and the LoRa slave machine, the address and the channel of the LoRa slave machine can be reconfigured before the LoRa master machine and the LoRa slave machine carry out next communication, so that the network attacker cannot steal information of the communication of the LoRa slave machine according to the address and the channel obtained in the previous communication, and the communication safety between the LoRa master machine and the LoRa slave machine is effectively improved.
In an optional embodiment, after the sending the configuration information to the LoRa slave, the method further includes: and receiving configuration information confirmation information sent by the LoRa slave machine.
In the embodiment of the application, the configuration information sent by the LoRa slave is received, so that the LoRa slave can be ensured to receive the configuration information sent by the LoRa master.
In an optional embodiment, the LoRa master has a configuration information list stored therein, where the configuration information list includes a number of the LoRa slave and current configuration information corresponding to the LoRa slave, and before sending the configuration information to the LoRa slave, the method further includes: and generating the configuration information according to the configuration information list so as to ensure that the generated configuration information is different from the configuration information in the configuration information list.
In the embodiment of the application, the configuration information is generated according to the configuration information list, so that the generated configuration information is different from the configuration information in the configuration information list, the configuration information among all the LoRa devices is further guaranteed not to conflict, and communication failure caused by the fact that the configuration information is the same is avoided.
In an optional embodiment, before the communicating with the LoRa slave based on the configuration information, the method further includes: sending a verification communication frame to the LoRa slave machine; if the verification communication response frame sent by the LoRa slave machine is not received within the preset time, switching to a first channel where the LoRa slave machine is located and sending the configuration information to the LoRa slave machine.
In an optional embodiment, after said sending a verification communication frame to said LoRa slave, said method further comprises: and if a verification communication response frame sent by the LoRa slave machine is received within a preset time, updating a configuration information list based on the configuration information and the number information of the LoRa slave machine, wherein the configuration information list comprises the corresponding relation between the number of the LoRa slave machine and the configuration information of the LoRa slave machine.
In the embodiment of the application, a verification communication frame is sent to the LoRa slave machine, whether the LoRa slave machine updates the channel and the address according to the configuration information can be determined according to whether the LoRa slave machine replies a verification communication response frame, and if the verification communication response frame is received, the LoRa slave machine is indicated to finish updating the channel and the address and can perform communication; if the verification communication response frame is not received, the configuration information is sent to the LoRa slave again when the LoRa slave does not complete updating the channel and the address, and the situation that the LoRa master cannot communicate with the LoRa slave due to the fact that the LoRa slave does not complete updating the channel and the address is avoided.
In a second aspect, the present invention provides a communication apparatus based on an LoRa channel, applied to an LoRa host, the apparatus including: the device comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring current configuration information of an LoRa slave machine, and the current configuration information comprises a first channel where the LoRa slave machine is located; the communication module is used for switching to a first channel where the LoRa slave machine is located and sending configuration information to the LoRa slave machine, wherein the configuration information comprises address information to be configured and channel information to be configured, and an address corresponding to the address information to be configured is different from an address of the LoRa master machine; and switching to a channel corresponding to the channel information to be configured and communicating with the LoRa slave machine based on the configuration information.
In an optional implementation manner, the apparatus further includes a receiving module, configured to receive configuration information confirmation information sent by the LoRa slave.
In an optional embodiment, the LoRa master has a configuration information list stored therein, where the configuration information list includes a number of the LoRa slave and current configuration information corresponding to the LoRa slave, and the apparatus further includes: and the generating module is used for generating the configuration information according to the configuration information list so as to ensure that the generated configuration information is different from the configuration information in the configuration information list.
In an optional embodiment, the communication module is further configured to send a verification communication frame to the LoRa slave; if the verification communication response frame sent by the LoRa slave machine is not received within the preset time, switching to a first channel where the LoRa slave machine is located and sending the configuration information to the LoRa slave machine.
In an optional embodiment, the communication module is further configured to update the configuration information list based on the configuration information and the serial number information of the LoRa slave machine if a verification communication response frame sent by the LoRa slave machine is received within a preset time.
In a third aspect, the present invention provides a LoRa host, including: a processor, a memory, and a bus;
the processor and the memory are communicated with each other through the bus;
the memory stores program instructions executable by the processor, the processor invoking the program instructions to perform the steps of the method of any of the preceding embodiments.
In a fourth aspect, the present invention provides a storage medium having stored thereon computer program instructions which, when read and executed by a computer, perform the steps of the method according to any of the preceding embodiments.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and that those skilled in the art can also obtain other related drawings based on the drawings without inventive efforts.
Fig. 1 is a flowchart of a communication method based on an LoRa channel according to an embodiment of the present disclosure;
fig. 2 is a schematic structural diagram of an LoRa master and an LoRa slave according to an embodiment of the present disclosure;
fig. 3 is a block diagram of a communication apparatus based on an LoRa channel according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of an LoRa host according to an embodiment of the present application.
Icon: 300-a communication device based on the LoRa channel; 301-an obtaining module; 302-a communication module; 303-a receiving module; 304-a generation module; 400-LoRa host computer; 401-a processor; 402-a communication interface; 403-a memory; 404-bus.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application.
Long Range Radio (LoRa) is a low power local area network wireless standard created by Semtech corporation. loRa possesses characteristics such as low-power consumption, low cost, transmission distance are far away, the network deployment is easy, and the wide application is in internet of things fields such as wisdom community, intelligent house, smart meter, wisdom agriculture, intelligent commodity circulation.
In the existing LoRa networking system, multiple channels, some 8 channels, some 32 channels, may be supported in one LoRa networking system, and the LoRa devices located in different channels cannot communicate with each other, and generally, the channels of all the LoRa devices of one LoRa network are the same.
The communication protocol of the existing loRa equipment is fixed, the encryption mode is simple, all the loRa equipment are in the same channel, and therefore a network attacker can obtain data of the loRa equipment after determining the address and the channel of the loRa equipment, and further malicious control is carried out on each loRa equipment in the channel through analyzing the communication protocol of the loRa equipment, and serious network security problems are caused.
Based on this, the applicant proposes a communication method and device based on the LoRa channel, and an LoRa host, which are used for solving the above problems.
Referring to fig. 1, fig. 1 is a flowchart of a communication method based on an LoRa channel according to an embodiment of the present disclosure, where the communication method based on the LoRa channel is applied to an LoRa host, and includes the following steps:
step S101: and acquiring the current configuration information of the LoRa slave machine.
Step S102: and switching to a first channel where the LoRa slave is located and sending configuration information to the LoRa slave.
Step S103: and switching to a channel corresponding to the channel information to be configured and communicating with the LoRa slave machine based on the configuration information.
The above-described flow will be described in detail below.
Step S101: and acquiring the current configuration information of the LoRa slave machine.
In the embodiment of the present application, when the LoRa master needs to communicate with the LoRa slave, first, current configuration information of the LoRa slave is acquired. The current configuration information may include the address information of the first channel where the LoRa slave is located and the LoRa slave. In a LoRa networking system, communication can be performed between a LoRa master and a LoRa slave in the same channel. Therefore, when the LoRa master needs to communicate with the LoRa slave, the LoRa master needs to acquire channel information of the LoRa slave.
Step S102: and switching to a first channel where the LoRa slave is located and sending configuration information to the LoRa slave.
In the embodiment of the application, after the configuration information of the LoRa slave is obtained, the LoRa master is switched to the first channel where the LoRa slave is located, and the configuration information is sent to the LoRa slave, wherein the configuration information includes address information to be configured and channel information to be configured, and an address corresponding to the address information to be configured is different from an address of the LoRa master.
And after receiving the configuration information, the LoRa slave machine carries out configuration change according to the configuration information. Specifically, the LoRa slave switches itself from the first channel to the channel corresponding to the channel information to be configured and switches itself from the previous address to the address corresponding to the address information to be configured according to the channel information to be configured and the address information to be configured in the configuration information.
Step S103: and switching to a channel corresponding to the channel information to be configured and communicating with the LoRa slave machine based on the configuration information.
In the embodiment of the application, after the LoRa master sends the configuration information to the LoRa slave, the LoRa master switches from the first channel to the channel corresponding to the channel information to be configured in the configuration information, and communicates with the LoRa slave based on the configuration information.
It should be noted that, when the LoRa master needs to communicate with the LoRa slave, the steps S101 to S103 are executed. In other words, before communicating with the LoRa slave, the LoRa master switches to the channel where the LoRa slave is located, sends the configuration information to enable the LoRa slave to change the configuration information of the LoRa slave, enables the LoRa slave to update the original channel and address into the channel and address in the configuration information, then switches to the updated channel of the LoRa slave, and communicates with the LoRa slave according to the configuration information sent before. By the method, even if a network attacker determines the address and the channel of one LoRa slave machine in the communication process of the LoRa master machine and the LoRa slave machine, the address and the channel of the LoRa slave machine can be reconfigured before the LoRa master machine and the LoRa slave machine carry out next communication, so that the network attacker cannot steal information of the communication of the LoRa slave machine according to the address and the channel obtained in the previous communication, and the communication safety between the LoRa master machine and the LoRa slave machine is effectively improved.
In the prior art, the number of LoRa slaves that can be accommodated by one channel is 255. Since the LoRa master and the LoRa slave are both located in the same channel, the number of LoRa slaves that can be covered by one LoRa master is 255. According to the communication method based on the LoRa channels provided by the embodiment of the application, if the LoRa master can support 32 channels, since the LoRa master can be switched to different channels to communicate with the LoRa slave in each channel, one LoRa master can cover 255 × 32 LoRa slaves.
Therefore, the number of the LoRa slaves capable of being accommodated in one channel is limited, and the channels of the LoRa slaves are configured, so that each LoRa slave in the LoRa networking system can be located in different channels, the number of the LoRa slaves covered by the LoRa master is increased, a network attacker is prevented from maliciously controlling other LoRa slaves in the channel by analyzing the communication protocol of the LoRa slaves, and the safety of the LoRa networking system is improved.
Specifically, the steps S101 to S103 are described below with reference to a specific example.
As shown in fig. 2, it is assumed that an LoRa networking system includes an LoRa master, four LoRa slaves: LoRa slave 1, LoRa slave 2, LoRa slave 3, and LoRa slave 4.
The initial configuration information of the LoRa host is channel 1, address 1, that is, the location of the LoRa host in the LoRa networking system is channel 1, address 1. The configuration information of each LoRa slave is shown in table 1 below:
lora slave serial number Lora slave address Lora channel
1 2 2
2 3 3
3 4 4
4 5 5
TABLE 1
As can be seen from table 1, the initial configuration information of the LoRa slave 1 is channel 2, address 2; the initial configuration information of the LoRa slave machine 2 is channel 3 and address 3; the initial configuration information of the LoRa slave 3 is channel 4 and address 4; the initial configuration information of the LoRa slave 4 is channel 5, address 5.
When the LoRa master needs to communicate with the LoRa slave 1, configuration information of the LoRa slave 1 is first obtained, that is, the LoRa slave 1 is in channel 2 and address 2 (that is, channel 2 is the first channel). The LoRa master then switches from channel 1, address 1 to channel 2, address 1, and sends configuration information to LoRa slave 1. The configuration information may be channel 6 and address 6 (that is, channel 6 is a channel corresponding to the information of the channel to be configured, and address 6 is an address corresponding to the information of the address to be configured). The LoRa slave 1 switches itself from channel 2, address 2 to channel 6, address 6 according to the configuration information. The LoRa master then switches from channel 2 to channel 6 and communicates with LoRa slave 1 based on the configuration information. It should be noted that, in one channel, the addresses of the LoRa master and the LoRa slave cannot be repeated, and therefore, the address corresponding to the address information to be configured needs to be different from the address of the LoRa master, so as to ensure that no error occurs in the communication process.
In addition, if the LoRa master needs to communicate with the LoRa slave 2, the LoRa slave 3, or the LoRa slave 4, the communication method is the same as that of the LoRa master and the LoRa slave 1, and the same or similar parts may be referred to each other for brevity of description, and therefore, the details are not repeated.
As an optional implementation manner, after step S102, the method may further include: and receiving configuration information confirmation information sent by the LoRa slave machine.
In this embodiment of the application, the LoRa master may be a point-to-point half-duplex LoRa master, and the LoRa slave may be a point-to-point half-duplex LoRa slave, that is, the LoRa master may actively send data to the LoRa slave, and the LoRa slave may not actively send data to the LoRa master, and when the LoRa slave receives the data sent by the LoRa master, the LoRa slave may reply a response frame to the LoRa master.
If the LoRa slave can normally communicate with the LoRa master, after receiving the configuration information sent by the LoRa master, the LoRa slave sends configuration information confirmation information to the LoRa master as a response frame to indicate that the LoRa slave has normally received the configuration information sent by the LoRa master. After receiving the configuration information confirmation information, the LoRa master assumes that the LoRa slave has normally received the configuration information and updates the channel and the address according to the configuration information. Then, the LoRa master further performs step S103 to switch to a channel corresponding to the channel information to be configured and communicate with the LoRa slave based on the configuration information.
If communication abnormality occurs between the LoRa slave and the LoRa master, that is, the LoRa slave does not receive the configuration information sent by the LoRa master or the LoRa slave cannot send configuration information confirmation information to the LoRa master after receiving the configuration information sent by the LoRa master. At this time, if the LoRa master does not receive the configuration information confirmation information sent by the LoRa slave within the preset time, it indicates that the sending of the configuration information is failed, and the LoRa master may execute step S102 again to send the configuration information to the LoRa slave.
By receiving the configuration information confirmation information sent by the LoRa slave, it can be ensured that the LoRa slave has received the configuration information sent by the LoRa master.
As an alternative embodiment, the LoRa master may store therein a configuration information list, where the configuration information list includes the number of the LoRa slave and the corresponding current configuration information of the LoRa slave. Specifically, the configuration information list may be the same as table 1 described above. When the LoRa master needs to communicate with a certain LoRa slave, the LoRa master may obtain current configuration information of the LoRa slave from the configuration information list.
As an alternative, the LoRa host may store the configuration information list in the chip of the LoRa host, that is, write the configuration information list in the flash of the LoRa host chip.
In addition, the LoRa host can upload the configuration information list to the cloud and store the configuration information list in a remote database. When the inquiry is needed, the configuration information list stored in the remote database is inquired in a remote access mode.
Before step S102, in order to ensure that the configuration information sent by the LoRa master to the LoRa slave does not conflict with the configuration information of other LoRa slaves, the method further includes:
and generating the configuration information according to the configuration information list so as to ensure that the generated configuration information is different from the configuration information in the configuration information list.
In this embodiment of the present application, a plurality of LoRa devices may exist in one LoRa networking system, and in order to ensure that configuration information among the LoRa devices does not conflict, when the configuration information is sent to the LoRa slave, it is necessary to generate the configuration information according to the current configuration information list and ensure that the generated configuration information is different from the configuration information of each LoRa device in the current LoRa networking system, thereby avoiding communication failure caused by the same configuration information.
As an optional implementation manner, in an LoRa networking system, addresses of LoRa devices in one channel cannot be the same, and addresses of LoRa devices in different channels may be the same or different. Therefore, it is first determined whether the address to be configured in the generated configuration information is the same as the address in the configuration information list. And if the address to be configured in the address information to be configured is different from the addresses of all the current LoRa equipment, the generated configuration information does not conflict with the configuration information of other LoRa equipment. If the address of a certain LoRa device is the same as the address to be configured in the information of the address to be configured, further judging whether a channel of the LoRa device is the same as the channel to be configured in the generated information to be configured, if not, the generated configuration information does not conflict with the configuration information of other LoRa devices; if the configuration information is the same as the configuration information in the configuration information list, a new configuration information needs to be generated again to ensure that the generated configuration information is different from the configuration information in the configuration information list.
As an optional implementation manner, before step S103, the method further includes:
sending a verification communication frame to the LoRa slave machine; if the verification communication response frame sent by the LoRa slave machine is not received within the preset time, switching to a first channel where the LoRa slave machine is located and sending configuration information to the LoRa slave machine; and if the verification communication response frame sent by the LoRa slave machine is received within the preset time, updating the configuration information list based on the configuration information and the number information of the LoRa slave machine.
In the embodiment of the application, after the LoRa master switches to the channel corresponding to the channel information to be configured, in order to ensure that the LoRa slave updates the channel and the address according to the configuration information sent by the LoRa master before, the LoRa master sends a verification communication frame to the LoRa slave.
If the verification communication response frame sent by the LoRa slave is not received within the preset time, the LoRa slave is considered not to update the channel and the address according to the configuration information, and the channel of the LoRa slave is still in the first channel at this time. Therefore, the LoRa master switches to the first channel and sends the configuration information to the LoRa slave again, i.e., step S102 is repeated.
And if an authentication communication response frame sent by the LoRa slave machine is received within the preset time, the LoRa slave machine is considered to update the channel and the address according to the configuration information. Therefore, the configuration information list is updated based on the configuration information and the number information of the LoRa slave, so that the current configuration information of the LoRa slave can be obtained based on the updated configuration information list when the LoRa slave is communicated next time.
When the LoRa host updates the configuration information list, the update method is different for different configuration information list storage methods. If the configuration information list is stored in the chip of the LoRa host, writing the updated configuration information list into the flash of the chip of the LoRa host; and if the configuration information list is stored in the remote database, changing the configuration information list in the remote database by the updated configuration information list in a remote access mode.
In the embodiment of the application, a verification communication frame is sent to the LoRa slave machine, whether the LoRa slave machine updates the channel and the address according to the configuration information can be determined according to whether the LoRa slave machine replies a verification communication response frame, and if the verification communication response frame is received, the LoRa slave machine is indicated to finish updating the channel and the address and can perform communication; if the verification communication response frame is not received, the configuration information is sent to the LoRa slave again when the LoRa slave does not complete updating the channel and the address, and the situation that the LoRa master cannot communicate with the LoRa slave due to the fact that the LoRa slave does not complete updating the channel and the address is avoided.
As an optional implementation manner, when the LoRa master sends the configuration information to the LoRa slave, the LoRa master performs public key encryption on the configuration information and sends the encrypted configuration information to the LoRa slave. And the LoRa slave machine receives the encrypted configuration information, and decrypts the public key of the encrypted configuration information to obtain the configuration information. By carrying out public key encryption on the configuration information, the security in the transmission process of the configuration information can be improved.
The embodiment of the application provides a communication method based on an LoRa channel, wherein before each time of communication with an LoRa slave, an LoRa master is switched to a channel where the LoRa slave is located, configuration information is sent to enable the LoRa slave to change configuration information of the LoRa slave, the LoRa slave is updated to a channel and an address in the configuration information from an original channel and address, then the LoRa master is switched to an updated channel of the LoRa slave, and communication with the LoRa slave is performed according to the configuration information sent before. By the method, even if a network attacker determines the address and the channel of one LoRa slave machine in the communication process of the LoRa master machine and the LoRa slave machine, the LoRa master machine can reconfigure the address and the channel of the LoRa slave machine before the LoRa slave machine carries out the next communication, so that the network attacker cannot steal information of the communication of the LoRa slave machine according to the address and the channel obtained in the previous communication, and the communication safety between the LoRa master machine and the LoRa slave machine is effectively improved.
Based on the same inventive concept, the embodiment of the present application further provides a communication device based on the LoRa channel. Referring to fig. 3, fig. 3 is a block diagram of a communication device based on an LoRa channel according to an embodiment of the present application, where the communication device 300 based on the LoRa channel includes:
an obtaining module 301, configured to obtain current configuration information of an LoRa slave, where the current configuration information includes a first channel where the LoRa slave is located;
a communication module 302, configured to switch to a first channel where the LoRa slave is located and send configuration information to the LoRa slave, where the configuration information includes to-be-configured address information and to-be-configured channel information, and an address corresponding to the to-be-configured address information is different from an address of the LoRa master; and switching to a channel corresponding to the channel information to be configured and communicating with the LoRa slave machine based on the configuration information.
In an optional implementation manner, the apparatus further includes a receiving module 303, configured to receive configuration information confirmation information sent by the LoRa slave.
In an optional embodiment, the LoRa master has a configuration information list stored therein, where the configuration information list includes a number of the LoRa slave and current configuration information corresponding to the LoRa slave, and the apparatus further includes:
a generating module 304, configured to generate the configuration information according to the configuration information list, so as to ensure that the generated configuration information is different from the configuration information in the configuration information list.
In an optional embodiment, the communication module 302 is further configured to send a verification communication frame to the LoRa slave; if the verification communication response frame sent by the LoRa slave machine is not received within the preset time, switching to a first channel where the LoRa slave machine is located and sending the configuration information to the LoRa slave machine.
In an optional embodiment, the communication module 302 is further configured to update the configuration information list based on the configuration information and the serial number information of the LoRa slave if a verification communication response frame sent by the LoRa slave is received within a preset time.
Referring to fig. 4, fig. 4 is a schematic structural diagram of an LoRa host 400 according to an embodiment of the present disclosure, where the LoRa host 400 includes: at least one processor 401, at least one communication interface 402, at least one memory 403 and at least one bus 404. Wherein the bus 404 is used for implementing direct connection communication of these components, the communication interface 402 is used for communicating signaling or data with other node devices, and the memory 403 stores machine-readable instructions executable by the processor 401. When the LoRa host 400 operates, the processor 401 communicates with the memory 403 through the bus 404, and the machine-readable instructions, when called by the processor 401, execute the LoRa channel-based communication method described above.
The processor 401 may be an integrated circuit chip having signal processing capabilities. The Processor 401 may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable Gate arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components. Which may implement or perform the various methods, steps, and logic blocks disclosed in the embodiments of the present application. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The Memory 403 may include, but is not limited to, Random Access Memory (RAM), Read Only Memory (ROM), Programmable Read Only Memory (PROM), Erasable Read Only Memory (EPROM), electrically Erasable Read Only Memory (EEPROM), and the like.
It is understood that the configuration shown in fig. 4 is merely illustrative, and that LoRa host 400 may also include more or fewer components than shown in fig. 4, or have a different configuration than shown in fig. 4. The components shown in fig. 4 may be implemented in hardware, software, or a combination thereof.
In addition, an embodiment of the present application further provides a computer storage medium, where a computer program is stored on the computer storage medium, and when the computer program is executed by a computer, the steps of the communication method based on the LoRa channel in the above embodiment are performed.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
In addition, units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
Furthermore, the functional modules in the embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
It should be noted that the functions, if implemented in the form of software functional modules and sold or used as independent products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
In this document, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions.
The above description is only an example of the present application and is not intended to limit the scope of the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (10)

1. A communication method based on an LoRa channel is applied to a LoRa host, and comprises the following steps:
acquiring current configuration information of an LoRa slave machine, wherein the current configuration information comprises a first channel where the LoRa slave machine is located;
switching to a first channel where the LoRa slave is located and sending configuration information to the LoRa slave, wherein the configuration information includes address information to be configured and channel information to be configured, and an address corresponding to the address information to be configured is different from an address of the LoRa master;
and switching to a channel corresponding to the channel information to be configured and communicating with the LoRa slave machine based on the configuration information.
2. The method of claim 1, wherein after said sending configuration information to the LoRa slave, the method further comprises:
and receiving configuration information confirmation information sent by the LoRa slave machine.
3. The method of claim 1, wherein a configuration information list is stored in the LoRa master, the configuration information list including a number of the LoRa slave and corresponding current configuration information of the LoRa slave, and before the sending of the configuration information to the LoRa slave, the method further comprises:
and generating the configuration information according to the configuration information list so as to ensure that the generated configuration information is different from the configuration information in the configuration information list.
4. The method of claim 3, wherein prior to said communicating with the LoRa slave based on the configuration information, the method further comprises:
sending a verification communication frame to the LoRa slave machine;
if the verification communication response frame sent by the LoRa slave machine is not received within the preset time, switching to a first channel where the LoRa slave machine is located and sending the configuration information to the LoRa slave machine.
5. The method of claim 4, wherein after said sending a verification communication frame to said LoRa slave, said method further comprises:
and if a verification communication response frame sent by the LoRa slave machine is received within a preset time, updating the configuration information list based on the configuration information and the serial number information of the LoRa slave machine.
6. A communication apparatus based on an LoRa channel, applied to an LoRa host, the apparatus comprising:
the device comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring current configuration information of an LoRa slave machine, and the current configuration information comprises a first channel of the LoRa slave machine;
the communication module is used for switching to a first channel where the LoRa slave machine is located and sending configuration information to the LoRa slave machine, wherein the configuration information comprises address information to be configured and channel information to be configured, and an address corresponding to the address information to be configured is different from an address of the LoRa master machine; and switching to a channel corresponding to the channel information to be configured and communicating with the LoRa slave machine based on the configuration information.
7. The apparatus of claim 6, further comprising a receiving module, configured to receive configuration information confirmation information sent by the LoRa slave.
8. The apparatus of claim 7, wherein the LoRa master has a configuration information list stored therein, the configuration information list including a number of the LoRa slave and corresponding current configuration information of the LoRa slave, the apparatus further comprising:
and the generating module is used for generating the configuration information according to the configuration information list so as to ensure that the generated configuration information is different from the configuration information in the configuration information list.
9. A LoRa host computer, comprising: a processor, a memory, and a bus;
the processor and the memory are communicated with each other through the bus;
the memory stores program instructions executable by the processor, the processor invoking the program instructions to perform the method of any one of claims 1-5.
10. A storage medium having stored thereon computer program instructions which, when read and executed by a computer, perform the steps of the method according to any one of claims 1-5.
CN202110317229.8A 2021-03-24 2021-03-24 Communication method and device based on LoRa channel and LoRa host Active CN113099431B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110317229.8A CN113099431B (en) 2021-03-24 2021-03-24 Communication method and device based on LoRa channel and LoRa host

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110317229.8A CN113099431B (en) 2021-03-24 2021-03-24 Communication method and device based on LoRa channel and LoRa host

Publications (2)

Publication Number Publication Date
CN113099431A CN113099431A (en) 2021-07-09
CN113099431B true CN113099431B (en) 2022-05-06

Family

ID=76669895

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110317229.8A Active CN113099431B (en) 2021-03-24 2021-03-24 Communication method and device based on LoRa channel and LoRa host

Country Status (1)

Country Link
CN (1) CN113099431B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114097588B (en) * 2021-10-29 2023-10-31 瀚云科技有限公司 Networking method and device of irrigation device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9231926B2 (en) * 2011-09-08 2016-01-05 Lexmark International, Inc. System and method for secured host-slave communication
CN107396445B (en) * 2017-06-15 2019-11-29 深圳市泰和安科技有限公司 A kind of information reporting dispatching method, system, host equipment and slave devices
CN109618292B (en) * 2018-11-05 2022-02-18 珠海派诺科技股份有限公司 LORA wireless communication method, system, relay method and equipment
CN111246490B (en) * 2020-01-19 2020-12-11 内蒙古显鸿科技股份有限公司 Networking method and communication system

Also Published As

Publication number Publication date
CN113099431A (en) 2021-07-09

Similar Documents

Publication Publication Date Title
US20200320222A1 (en) Information management method, apparatus, and information management system
US11568092B2 (en) Method of dynamically configuring FPGA and network security device
US11646939B2 (en) Network function NF management method and NF management device
CN110830581B (en) Method for improving block chain response speed, block chain application system and related equipment
CN111510326B (en) Master-slave device configuration information synchronization method, system, terminal device and storage medium
CN103414589A (en) Method and device for managing resource information
CN111654399B (en) Networking method, device, equipment and storage medium based on SD-WAN
CN110597918A (en) Account management method and device and computer readable storage medium
CN113099431B (en) Communication method and device based on LoRa channel and LoRa host
CN105554730A (en) Communication method, server and terminal
CN109802850B (en) Communication method and communication device
CN112804099A (en) Parameter batch configuration method and device, computer equipment and readable storage medium
CN109413677B (en) Cell parameter configuration method and device, base station and parameter management system
CN110621051B (en) Routing method and device
CN110366164B (en) Method for remotely controlling terminal, server, terminal and computing equipment
CN111182536A (en) SIM card state detection method, device, network equipment and storage medium
CN113207097B (en) Intelligent equipment networking method and device, electronic equipment and storage medium
CN112243003B (en) Access control method, electronic device, and storage medium
JP2014155095A (en) Communication control device, program and communication control method
CN116114219A (en) Access token processing method and equipment
CN113966594A (en) Method for configuring Internet of things equipment and Internet of things equipment
CN104080099A (en) Wireless controller communication method and wireless controller
CN111009074B (en) Management server, vending machine, and device identification information providing method
CN109525940B (en) Positioning method and device based on antenna and electronic equipment
CN106534300A (en) Data updating method and system, user equipment and server

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant