[go: up one dir, main page]

CN111309659B - A LoRa multi-channel communication expansion method based on pluggable modules - Google Patents

A LoRa multi-channel communication expansion method based on pluggable modules Download PDF

Info

Publication number
CN111309659B
CN111309659B CN202010068922.1A CN202010068922A CN111309659B CN 111309659 B CN111309659 B CN 111309659B CN 202010068922 A CN202010068922 A CN 202010068922A CN 111309659 B CN111309659 B CN 111309659B
Authority
CN
China
Prior art keywords
lora
expansion card
expansion
card
configuration
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
CN202010068922.1A
Other languages
Chinese (zh)
Other versions
CN111309659A (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.)
Beijing University of Technology
Original Assignee
Beijing University of Technology
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 Beijing University of Technology filed Critical Beijing University of Technology
Priority to CN202010068922.1A priority Critical patent/CN111309659B/en
Publication of CN111309659A publication Critical patent/CN111309659A/en
Application granted granted Critical
Publication of CN111309659B publication Critical patent/CN111309659B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/40Bus structure
    • G06F13/4004Coupling between buses
    • G06F13/4022Coupling between buses using switching circuits, e.g. switching matrix, connection or expansion network
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3055Monitoring arrangements for monitoring the status of the computing system or of the computing system component, e.g. monitoring if the computing system is on, off, available, not available
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/40Bus structure
    • G06F13/4063Device-to-bus coupling
    • G06F13/4068Electrical coupling
    • G06F13/4081Live connection to bus, e.g. hot-plugging
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0806Configuration setting for initial configuration or provisioning, e.g. plug-and-play
    • H04L41/0809Plug-and-play configuration
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/2866Architectures; Arrangements
    • H04L67/30Profiles

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mathematical Physics (AREA)
  • Computing Systems (AREA)
  • Quality & Reliability (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Small-Scale Networks (AREA)

Abstract

本发明公开了一种基于可插拔模块的LoRa多通道通信扩展方法,可插拔模块硬件采用带有金手指的PCB扩展卡形式,包含嵌入式MCU、LoRa通信芯片及电源管理模块,由主板供电并采用UART与主板进行通信,具备CD(Card Detect卡存在检测)管脚、控制IO和状态IO,扩展卡通过硬件设计实现该接口的热插拔功能。本发明采用智能多通道感知及接入协议,主板CPU可以扫描CD管脚状态感知到LoRa扩展卡插入后获取LoRa扩展卡信息,之后配置及修改各扩展卡的通信参数和网络拓扑,并在主板上分配相应的硬件资源,实现LoRa扩展卡的即插即用。在主板带电全天候工作的情况下可以随时从总线上可靠地扩展、管理和卸载LoRa扩展卡,实现多通道的动态配置和动态扩展。

Figure 202010068922

The invention discloses a LoRa multi-channel communication expansion method based on a pluggable module. The hardware of the pluggable module adopts the form of a PCB expansion card with golden fingers, and includes an embedded MCU, a LoRa communication chip and a power management module. Power supply and use UART to communicate with the main board. It has CD (Card Detect) pins, control IO and status IO. The expansion card realizes the hot-swap function of this interface through hardware design. The invention adopts intelligent multi-channel sensing and access protocol, the mainboard CPU can scan the CD pin state to perceive the LoRa expansion card information after the LoRa expansion card is inserted, and then configure and modify the communication parameters and network topology of each expansion card, and configure and modify the communication parameters and network topology of each expansion card. The corresponding hardware resources are allocated on the board to realize the plug-and-play of the LoRa expansion card. The LoRa expansion card can be reliably expanded, managed and unloaded from the bus at any time when the main board is powered on and working around the clock, enabling dynamic configuration and expansion of multiple channels.

Figure 202010068922

Description

Pluggable module-based LoRa multichannel communication extension method
Technical Field
The invention relates to the field of management of LoRa wireless communication equipment, in particular to a LoRa multichannel communication expansion method based on pluggable modules.
Background
In recent years, the LoRa wireless communication is widely concerned by the application field of the internet of things due to the characteristics of low power consumption, long transmission distance, simple and convenient erection and the like. The most basic LoRa communication system generally includes 3 parts of a base station, a relay, and a terminal. Within the allowable range of the communication distance, single-hop or multi-hop transmission can be realized between the base station and the terminal through the relay, and the protocol has strong customization and expansibility.
Most of the LoRa is currently applied in low-rate, low-data-volume situations, such as: and (5) remote meter reading and positioning. Along with the development of the application scene of the internet of things, the LoRa needs to be applied to the scene with high data information amount, all-weather work and certain real-time requirement, and for the requirements of data amount, workload and real-time property, the most direct processing method is to reduce communication conflict and carry out multi-channel communication expansion, thereby reducing the time of operations such as polling, conflict waiting and the like under one-to-many modes and improving the efficiency of channels. The LoRa multichannel expansion mode comprises the steps of increasing uplink and downlink communication nodes in the same channel or expanding links of a plurality of new channels, and the number of LoRa modules for parallel transceiving is increased on hardware.
At present, the communication application of the LoRa multichannel is not few, but related products in the aspect of channel instant dynamic expansion still lack in the LoRa technical field, and at present, no related technology is described that the LoRa expansion module can be expanded, managed and unloaded from a bus at any time under the condition that a mainboard works in a live state, so that multichannel dynamic configuration and dynamic expansion are realized, and a description about pluggable or plug and play of the LoRa multichannel expansion module is not found.
Disclosure of Invention
For the conditions of high data volume, all weather and real-time performance under working conditions, a base station, a relay or a terminal system cannot close a main board power supply for configuring multiple channels or maintaining a fault LoRa module. Under the condition that a system mainboard works in a charged mode, LoRa multiple channels can be expanded, managed and unloaded from a bus at any time, and the expansion and configuration modes are convenient and fast.
The invention discloses a pluggable module-based LoRa multichannel communication expansion method, which adopts a mainboard CPU to perform the functions of controlling and transmitting data of a plurality of pluggable module MCUs. The LoRa expansion card containing the MCU is convenient for customizing a software protocol, shortens development time and reduces development difficulty.
But plug module adopts the PCB expansion Card form that has the golden finger, contains embedded MCU, loRa communication chip and power management module, pilot lamp, and the expansion Card is passed the mode with the serial ports by mainboard power supply and adopt UART and mainboard UART to communicate, and the expansion Card has contained the plug that CD (Card Detect Card exists the detection) pin comes the detection Card, controls IO pin and MCU interaction customization control expansion Card function. Because the UART communication rate of the mainboard CPU and the LoRa expansion card is far higher than the LoRa transmission rate, the CPU ensures that the expansion card is in an idle state by inquiring the level of the IO port of the state of the expansion card and then carries out transparent transmission data interaction. The mainboard CPU monitors the state of the expansion card in real time through UART, CD pins and state IO.
LoRa extension card has hot plug protection circuit, ensures through the length design of design golden finger that power and signal are according to the order power-on, during the use disect insertion mainboard extension slot.
The intelligent multi-channel sensing and access protocol is adopted on software, after a main board CPU initializes each serial port and allocates and initializes a temporary buffer area, when a LoRa expansion card is inserted into a main board expansion slot and powered on, the automatic sensing and initializing process of the main board comprises the following steps:
step (1): when the CPU of the mainboard scans the GPIO state, the CD pin corresponding to the expansion slot is pulled down by the expansion card, so that the insertion of the card is detected; the LoRa expansion card comprises an MCU (microprogrammed control Unit), and can regularly send networking functions, ID numbers, channels, bit rates and card self-checking data frames through a serial port after being normally powered on, a CPU (central processing unit) starts a UART (universal asynchronous receiver/transmitter) port on a bus to be interrupted, stores and analyzes the data after stably reading a complete frame of data sent by the port, and determines that the serial port equipment type is the LoRa expansion card after judging that correct data information is received;
step (2): acquiring a configuration file, namely acquiring an expansion card configuration file from a local directory by a mainboard CPU (central processing unit), and if the expansion card configuration file cannot be detected, according to the networking function of the LoRa expansion card: when the expansion card is a base station expansion card, a request is sent to the cloud, a UDP (user datagram protocol) protocol is adopted to acquire a configuration file and store the configuration file locally, and when the expansion card is a relay or terminal expansion card, the configuration file is acquired in a configuration file packet mode through LoRa communication and is sent through an expansion card serial port and stored locally. The mainboard automatically resolves the local configuration file into a configuration command after acquiring the local configuration file;
and (3): the method comprises the steps that a LoRa expansion card is configured, a main board CPU issues a configuration command for an expansion card MCU through a serial port, a LoRa communication module on the expansion card acquires a new ID number, a channel and a bit rate, and the expansion card also acquires a routing table containing designated multi-hop transmission under the condition that a networking mode is a designated topological structure; after configuration is completed, the expansion card MCU sends a restart request, and the mainboard CPU controls the expansion card power supply to control IO to restart;
and (4): the restarted LoRa expansion card can automatically send data frames with updated networking functions, ID numbers, channels and bit rate information, and the configuration is successful if the data frames are compared and matched with the configuration files after being analyzed; if the comparison is not consistent, the configuration fails to be reconfigured; after configuration is successful, the operating system registers the expansion card device, and the mainboard CPU distributes cache resources and GPIO indicator lamps for the LoRa expansion card. Formally using the LoRa function of the channel;
and performing LoRa network updating after each expansion and unloading operation of the multiple channels, namely recording a log to update the channel state of the LoRa network, updating the network topology display, and reporting the northbound interface at regular time intervals of 5 min. The terminal and the relay send the device state to the base station through the LoRa network at regular time, and the base station device sends the device state to the internet cloud platform or the server, so that the visual management of the LoRa network is facilitated.
The uninstallation of loRa expansion card is very convenient, can be directly through the power management IO control with the power supply of expansion card cut off, also can direct physics dismantlement. When the expansion card is unloaded or fails to carry out UART communication, the CPU of the mainboard can remotely or locally detect, release resources and update the state of each expansion card in time. The process flow of manually unloading the forbidden LoRa certain channel comprises the steps of pulling down the power management IO, releasing the cache, keeping 1 path of indicator light and flashing, indicating that the module is normal but the channel is forbidden, and then updating the LoRa network.
There are two cases where multi-channel automatic offload over software and communication links occurs: 1) detecting that the CD pin of the expansion card is pulled high and the expansion port has equipment registration, and judging that the expansion card is directly and physically disassembled; 2) the CD pin is low, the power IO is pulled high, and when the UART cannot communicate for a long time and the restart frequency is more than three times, the card fault is judged. Case 1) the card is pulled out, the operation of the communication program of the expansion card is stopped, the cache and the LED resource are released, and the LoRa network is updated after the equipment is cancelled; case 2) card failure, stop expansion card communication program operation, release buffer memory and keep 1 way pilot lamp red light flashing, indicate that the card of this expansion card interface exists but is out of order, logout equipment then carries on LoRa network update.
The invention can realize hot plug and play of the LoRa multichannel expansion card, and greatly facilitates the channel expansion, management, unloading and maintenance of the LoRa communication system.
Drawings
FIG. 1 is a diagram of a multi-channel expansion hardware of a basic system motherboard and a LoRa expansion card according to the present invention;
fig. 2 is a flow of power-on sensing and initialization configuration for a motherboard CPU to perform multi-channel expansion on an LoRa expansion card according to an embodiment of the present invention;
fig. 3 is a flow chart of selecting a configuration mode of the LoRa expansion card according to the embodiment of the present invention;
fig. 4 is a flow of sensing and automatic operation of the main board CPU when the LoRa expansion card is pulled out according to the embodiment of the present invention.
Detailed Description
The following detailed description of the preferred embodiments of the present invention, taken in conjunction with the accompanying drawings, will make the advantages and features of the invention easier to understand by those skilled in the art, and thus will clearly and clearly define the scope of the invention.
Referring to fig. 1, the basic system of the present invention mainly comprises two components, namely, a system motherboard and an LoRa expansion card, wherein the system motherboard includes an embedded processor CPU1, a memory 2, an LED indicator light 3, a gigabit ethernet 4, other communication modules and interfaces 5, and an LoRa communication module expansion interface unit 6. The CPU is a processor with high performance, including MMU, and includes multiple peripheral interfaces and external memory 2 such as DDR, FLASH, e.mmc. The LED indicator 3 refers to a plurality of or multiple groups of indicator lamps for indicating networking status, when the extended LoRa multi-channel works, IO resources allocated to the extender card indicator lamps are correspondingly controlled by software, and the indicator lamps corresponding to the base station and the relay type extender cards indicate online and transceiving statuses of all nodes on their links by constantly lighting or flashing in addition to their own extender card statuses. The gigabit ethernet 4 is a debug interface, and can debug a system, transmit a configuration file, and the like through a network port, and the gigabit ethernet 4 under certain conditions can also be used as a communication mode in which a base station reports to a management server. Other communication modules and interfaces 5 are optional interfaces of the system, and can be LTE communication modules, USB and the like in a base station system mainboard; this module 5 may not be included in the repeater system motherboard; the terminal system mainboard can be used for indicating a GPS, an acquisition serial port and the like. The LoRa communication module expansion interface unit 6 is a hardware resource for inserting the LoRa expansion card, and includes a communication interface, an IO, an interrupt, a power supply wiring, and a PCB slot. The power module 7 is a power supply system of the main board, and after the direct-current power supply is connected, each power conversion chip is adopted to supply power to different modules, and the power conversion chips are provided with control IO (input/output) for power management. The mainboard is all the power supplies of loRa expansion card inserted, and power supply current has certain margin.
As shown in fig. 1, the LoRa expansion card includes an embedded MCU8, a power supply management module 9, an LoRa transceiver chip 10, and an antenna. The embedded MCU8 may be a low power chip without MMU, with simple peripherals and built-in small amounts of memory. The power supply management module 9 is a power conversion module for supplying power to the MCU, the transceiver chip and the antenna, and includes management IO for controlling power on and off of the expansion card through the motherboard. The LoRa transceiver chip 10 is a main device that performs communication transceiving functions and is mainly managed by the MCU 8.
Hardware resources required to be acquired from a mainboard by the LoRa expansion card comprise: and the power management resources comprise a power supply chip, a power control IO, an expansion card CD pin GPIO, a UART interface, a state IO and a control IO. The LoRa expansion card is provided with a hot plug protection circuit, and the power supply and the signals are ensured to be electrified in sequence by designing the length design of the gold finger. Besides, electrostatic protection measures are designed for signal lines and power lines involved in plugging and unplugging of the golden fingers of the PCB, and the direction of the standby GPIO of the expansion card is initialized to be Input to reduce current impact brought by plugging and unplugging.
Referring to fig. 2, fig. 2 illustrates a flow of power-on sensing and initialization configuration of a motherboard CPU for performing multi-channel expansion on an LoRa expansion card, where all processes are implemented in a form of middleware in a program of a motherboard, and plug-and-play and LoRa multi-channel communication expansion of the expansion card are implemented through the flow.
When the CPU operating system of the mainboard is initialized, the power supply of the expansion card is started, the detection of the GPIO corresponding to the CD pin of the expansion card is executed, and when the CD pin of a certain expansion card is detected to be pulled down, the expansion card is proved to be inserted. The variable setting of the restart times of the expansion card is set to be 0 in the plug-and-play program, the CPU reads the serial port corresponding to the CD pin and continuously monitors until a frame of complete data is obtained, and the frame of data is a data frame which is automatically sent to the UART port by the expansion card and contains networking function, ID number, channel, bit rate and card self-checking bit. If the receiving time is over, the CPU controls the expansion card to be powered off and restarted, if the complete data is still not correctly received after the expansion card is restarted for more than three times, the LoRa expansion card is judged to be abnormal, the IO of the power supply of the expansion card is pulled down, and the power supply is turned off. If the time is not over, the CPU analyzes and judges the data frame, firstly, the power-on self-test bit of the expansion card is checked, 0 is normal, 1 is abnormal, and when the self-test bit is judged to be 0, other information of the card is continuously analyzed to ensure that: when the expansion card is initialized, a special channel is configured, the bit rate is unified, and the ID can not conflict with the currently used network. And judging whether the module meets the configuration condition or not according to the information, and when the expansion card is judged to be abnormal, closing the power supply of the expansion card in time so as to avoid influencing the existing function work and waiting for further inspection. For an expansion interface with abnormal or damaged card, after the power supply of the expansion card is turned off, a mainboard CPU distributes 1-channel red card state indicator light, and the flash indicates that the expansion interface has the card but the card has the fault.
And when the expansion card is confirmed to meet the configuration conditions, configuring the LoRa expansion card, wherein the configuration items comprise LoRa communication module parameters (channel, bit rate, antenna transmission power) and network topology information (communication ID and communication routing table). And after the configuration is finished, the MCU of the expansion card sends a restart request, and the CPU restarts the power supply of the expansion card after receiving the information so as to enable the configuration to take effect. And after the system is restarted, the CPU receives new expansion card information to judge whether the configuration is successful, after the configuration is determined to be successful, the main board CPU registers the LoRa expansion card equipment in equipment management, remotely or locally updates a network topological graph, and meanwhile, the main board CPU distributes cache resources and indicator lamps IO for the LoRa expansion card. After the configuration is completed, the multichannel expansion of the LoRa is completed, and the LoRa communication program is started to run.
Referring to fig. 3, fig. 3 is a flowchart illustrating a selection of a configuration mode of an LoRa expansion card according to an embodiment of the present invention. In the configuration mode of the LoRa expansion card, the configuration management of the three expansion cards can be realized in a mode that a CPU locally acquires and analyzes configuration files and transmits configuration commands to an expansion card MCU by using a UART interface; when the expansion card is a base station, a configuration file can be remotely requested to a cloud or a server by adopting a UDP (user Datagram protocol); when the expansion card is in a relay or terminal form, the configuration file packet can be remotely issued through the LoRa base station module, the configuration file packet is transmitted to the mainboard CPU through the UART in a penetrating way to be unpacked, analyzed and converted into a configuration command, and then the configuration command is issued to the expansion card through the serial port. Configuration countermeasures are issued through a base station to some scenes: 1. remotely updating and configuring the existing relay and terminal expansion cards; 2. the multi-channel is expanded, and the terminal and the relay cannot obtain the configuration file from the local and the debugging is inconvenient; 3. and remotely starting relays and standby expansion cards of the terminals.
As shown in fig. 3, it can be seen that the flow of the expansion card configuration mode selection is that after the expansion card is determined to meet the configuration condition, the configuration file in the local directory is preferentially used, the configuration file is read, and the LoRa expansion card is configured and restarted. If the configuration file is not searched, whether the expansion card type belongs to the base station is judged, if the expansion card type belongs to the base station type, a data acquisition request is sent to a cloud end or a server, a UDP network protocol is adopted to transmit a configuration file data packet, the data packet is analyzed and then stored to the local, and the file configuration LoRa is read and restarted. When the expansion card is judged to belong to the relay or terminal type, the base station is required to initiate further configuration operation. Base station modules, devices or expansion cards are prepared to configure a dedicated channel, typically a free channel dedicated to the configuration and management device, which the dedicated base station must have a consistent dedicated channel and bit rate with the relay/terminal expansion card. The configuration special base station equipment packs the configuration file, initiates transmission, remotely issues an LoRa data packet to a relay or terminal equipment through LoRa communication, and a mainboard CPU obtains and analyzes the data packet in a serial port transparent transmission mode and stores the configuration file to the local. The MCU obtains and executes a corresponding configuration command from the UART, and the mainboard restarts the expansion card after configuration is completed.
Referring to fig. 4, fig. 4 is a flow of sensing and automatic operation of a main board CPU after a LoRa expansion card is pulled out according to an embodiment of the present invention, as shown in fig. 4, after a LoRa expansion card is pulled out, the CPU scans and finds that a CD pin of an original expansion card is at a high level, and the port has a device registration, determines that the expansion card has been pulled out, and at this time, to save system overhead, should stop a communication program related to the expansion card, and at the same time, log out the device and release cache and IO resources, update a network topology, delete the communication point, or display an offline. According to the embodiment, the equipment state and the multi-channel network state of the LoRa expansion card can be automatically updated without manual operation after the LoRa expansion card is pulled out from the mainboard.
The above description is only an embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes performed by the present specification and drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (5)

1.一种基于可插拔模块的LoRa多通道通信扩展方法,其特征在于:采用主板CPU对多个可插拔模块MCU进行控制和数据传输的形式;可插拔模块采用带有金手指的PCB扩展卡形式,包含嵌入式的可插拔模块MCU、LoRa通信芯片、电源管理模块和指示灯,LoRa扩展卡由主板供电并采用UART与主板UART以串口透传方式进行通信,LoRa扩展卡包含了卡检测引脚来检测卡的插拔,状态IO引脚检测LoRa扩展卡空闲/发送状态,控制IO引脚控制LoRa扩展卡功能,主板CPU通过UART和状态IO实时监测LoRa扩展卡状态;同时,LoRa扩展卡通过硬件设计实现接口热插拔功能;1. a LoRa multi-channel communication expansion method based on pluggable modules, is characterized in that: adopt the form of main board CPU to carry out control and data transmission to a plurality of pluggable modules MCU; In the form of PCB expansion card, it includes embedded pluggable module MCU, LoRa communication chip, power management module and indicator light. The LoRa expansion card is powered by the motherboard and communicates with the motherboard UART through serial port transparent transmission. The LoRa expansion card contains The card detection pin is used to detect the insertion and removal of the card, the status IO pin detects the idle/transmitting status of the LoRa expansion card, and the control IO pin controls the function of the LoRa expansion card. The motherboard CPU monitors the status of the LoRa expansion card in real time through UART and status IO; , the LoRa expansion card realizes the interface hot swap function through hardware design; 在软件上采用智能多通道感知及接入协议,主板CPU在初始化各串口,分配并初始化临时缓冲区后,当有LoRa扩展卡插入主板扩展插槽上电时,主板CPU自动感知及初始化的过程包含以下步骤:The software adopts intelligent multi-channel sensing and access protocol. After the mainboard CPU initializes each serial port, allocates and initializes the temporary buffer, when a LoRa expansion card is inserted into the mainboard expansion slot and powered on, the mainboard CPU automatically senses and initializes the process Contains the following steps: 步骤(1):主板CPU扫描GPIO状态时发现对应主板扩展插槽的卡检测管脚被LoRa扩展卡拉低,由此检测到卡插入;LoRa扩展卡包含可插拔模块MCU,上电完成自检后,定时通过串口发送包含组网职能、ID号、信道、位速率及卡自检位的数据帧,主板CPU开启总线上的UART端口中断,不断读取端口发送的数据,丢弃不完整数据帧,直到读取到一帧完整数据后保存并解析;判断接收到正确的符合LoRa串口通信格式的数据帧后确定该串口端口设备为符合配置条件的LoRa扩展卡,开始配置流程;Step (1): When the motherboard CPU scans the GPIO state, it finds that the card detection pin of the corresponding motherboard expansion slot is low by the LoRa expansion card, thus detecting the card insertion; the LoRa expansion card contains a pluggable module MCU, and the self-test is completed after power-on After that, the data frame including networking function, ID number, channel, bit rate and card self-check bit is sent regularly through the serial port. The mainboard CPU opens the UART port on the bus to interrupt, continuously reads the data sent by the port, and discards incomplete data frames. , until a complete frame of data is read and saved and parsed; after judging that the correct data frame conforming to the LoRa serial communication format is received, the serial port device is determined to be a LoRa expansion card that meets the configuration conditions, and the configuration process begins; 步骤(2):配置文件获取,主板CPU首先从本地目录下获取LoRa扩展卡配置文件,如果检测不到,则根据LoRa扩展卡的组网职能:当为基站LoRa扩展卡时,向云端发送请求,采用UDP协议获取配置文件并保存本地;当为中继或终端LoRa扩展卡时,以配置文件包的形式通过LoRa通信来获取,并通过LoRa扩展卡串口发送并保存本地;主板CPU获取本地配置文件后自动解析为配置命令;Step (2): configuration file acquisition, the motherboard CPU first obtains the LoRa expansion card configuration file from the local directory, if it is not detected, then according to the networking function of the LoRa expansion card: when it is a base station LoRa expansion card, send a request to the cloud , using the UDP protocol to obtain the configuration file and save it locally; when it is a relay or terminal LoRa expansion card, obtain it through LoRa communication in the form of a configuration file package, and send it through the serial port of the LoRa expansion card and save it locally; The motherboard CPU obtains the local configuration After the file is automatically parsed into a configuration command; 步骤(3):LoRa扩展卡配置,主板CPU通过串口为可插拔模块MCU下发配置命令,LoRa扩展卡上的LoRa通信模块获取新的ID号、信道和位速率,当组网方式为指定拓扑结构的情况下,LoRa扩展卡还获取包含指定多跳传输的路由表;配置完成后可插拔模块MCU发送重启请求,主板CPU控制LoRa扩展卡电源控制IO进行重启;Step (3): LoRa expansion card configuration, the motherboard CPU issues configuration commands to the pluggable module MCU through the serial port, the LoRa communication module on the LoRa expansion card obtains a new ID number, channel and bit rate, when the networking mode is specified In the case of topology structure, the LoRa expansion card also obtains the routing table containing the specified multi-hop transmission; after the configuration is completed, the pluggable module MCU sends a restart request, and the motherboard CPU controls the power control IO of the LoRa expansion card to restart; 步骤(4):重启后的LoRa扩展卡会自动发送更新了组网职能、ID号、信道、位速率信息的数据帧,判断解析后与配置文件对比匹配一致则配置成功;对比不一致,则配置失败重新配置;配置成功后操作系统注册LoRa扩展卡设备,主板CPU为LoRa扩展卡分配缓存资源及GPIO指示灯,正式使用该通道的LoRa功能;Step (4): The restarted LoRa expansion card will automatically send a data frame with updated networking function, ID number, channel, and bit rate information. If it is judged that the parsing matches the configuration file, the configuration is successful; if the comparison is inconsistent, the configuration is successful. Failed to reconfigure; after the configuration is successful, the operating system registers the LoRa expansion card device, the motherboard CPU allocates cache resources and GPIO indicators for the LoRa expansion card, and officially uses the LoRa function of this channel; 多通道的每次扩展及卸载操作后进行LoRa网络更新:记录日志更新LoRa网络的通道状态,更新网络拓扑显示,并定时上报。LoRa network update is performed after each multi-channel expansion and unloading operation: log to update the channel status of the LoRa network, update the network topology display, and report regularly. 2.根据权利要求1所述的一种基于可插拔模块的LoRa多通道通信扩展方法,其特征在于:多通道扩展主板具备主板CPU、存储器、LoRa通信模块接口扩展单元、电源模块和调试接口,其中主板的主板CPU具有内存管理单元,能够为LoRa扩展卡动态分配缓存及LED资源,LED指示灯直观展示通信链路各节点状态及LoRa扩展卡状态;多通道扩展设备包含基站功能使得该设备具备互联网通信接口。2. a kind of LoRa multi-channel communication expansion method based on pluggable module according to claim 1, is characterized in that: multi-channel expansion mainboard has mainboard CPU, memory, LoRa communication module interface expansion unit, power supply module and debugging interface , The motherboard CPU of the motherboard has a memory management unit, which can dynamically allocate cache and LED resources for the LoRa expansion card, and the LED indicators visually display the status of each node of the communication link and the status of the LoRa expansion card; the multi-channel expansion device includes the base station function to make the device With Internet communication interface. 3.根据权利要求1或2所述的一种基于可插拔模块的LoRa多通道通信扩展方法,其特征在于:LoRa扩展卡为可插拔的PCB扩展卡形式,采用UART接口与主板进行通信,同时设计了卡检测引脚来检测是否插卡;LoRa扩展卡占用的主板硬件资源有供电电源、UART接口、缓存及GPIO,多通道扩展主板上与LoRa扩展卡进行通信的UART端口占用接口资源及主板CPU中断;LoRa扩展卡具有热插拔保护电路,通过设计金手指的长度设计确保电源及信号按照顺序上电。3. a kind of LoRa multi-channel communication expansion method based on pluggable module according to claim 1 and 2, it is characterized in that: LoRa expansion card is a pluggable PCB expansion card form, adopts UART interface to communicate with main board At the same time, a card detection pin is designed to detect whether a card is inserted; the motherboard hardware resources occupied by the LoRa expansion card include power supply, UART interface, cache and GPIO, and the UART port on the multi-channel expansion motherboard that communicates with the LoRa expansion card occupies interface resources. And the motherboard CPU is interrupted; the LoRa expansion card has a hot-swap protection circuit, and the length of the golden finger is designed to ensure that the power supply and signals are powered on in sequence. 4.根据权利要求1所述的一种基于可插拔模块的LoRa多通道通信扩展方法,其特征在于:所有LoRa扩展卡的硬件电路一致,根据组网职能定制有基站、中继和终端三种形式的固件,LoRa扩展卡首先由主板CPU读取本地存储并检查是否存在配置文件,如果存在,则解析后用UART接口将配置命令下发给可插拔模块MCU;如果本地找不到配置文件,当LoRa扩展卡为基站类型时,采用UDP协议向互联网云端或服务器远程请求配置文件包,主板CPU解析该配置文件包,并转化为配置命令进行配置;当LoRa扩展卡是中继或终端形式时,通过LoRa通信向基站请求远程下发配置文件包,配置文件包通过UART透传给主板,主板CPU解析该LoRa数据包、解析转化为配置命令;解析获得配置命令后,主板通过串口下发配置命令给LoRa扩展卡。4. a kind of LoRa multi-channel communication expansion method based on pluggable module according to claim 1, is characterized in that: the hardware circuit of all LoRa expansion cards is consistent, according to the networking function customization has three base stations, relays and terminals. This form of firmware, the LoRa expansion card first reads the local storage by the motherboard CPU and checks whether there is a configuration file. If it exists, it will use the UART interface to send the configuration command to the pluggable module MCU after parsing; if the configuration file cannot be found locally file, when the LoRa expansion card is a base station type, the UDP protocol is used to remotely request the configuration file package from the Internet cloud or server, and the motherboard CPU parses the configuration file package and converts it into configuration commands for configuration; when the LoRa expansion card is a relay or terminal In the form, request the base station to remotely deliver the configuration file package through LoRa communication, the configuration file package is transparently transmitted to the main board through UART, and the main board CPU parses the LoRa data package, parses and converts it into a configuration command; Send configuration commands to the LoRa expansion card. 5.根据权利要求1所述的一种基于可插拔模块的LoRa多通道通信扩展方法,其特征在于:人为停用LoRa某一通道的处理流程为,将LoRa扩展卡的电源管理IO拉低,释放缓存同时保留1路指示灯绿灯闪烁,表示扩展接口的LoRa扩展卡正常但禁用该通道,然后进行LoRa网络更新;5. a kind of LoRa multi-channel communication expansion method based on pluggable modules according to claim 1, is characterized in that: the processing flow of artificially deactivating a certain channel of LoRa is, the power management IO of LoRa expansion card is pulled down , release the cache and keep 1 green light flashing, indicating that the LoRa expansion card of the expansion interface is normal but the channel is disabled, and then the LoRa network is updated; 若卡检测管脚电平为高,而扩展端口有设备注册,该情况判断为LoRa扩展卡已被拔出,则软件上停止LoRa扩展卡通信程序的运行,释放缓存及LED资源,注销设备后进行LoRa网络更新;If the level of the card detection pin is high and the expansion port has a device registered, it is judged that the LoRa expansion card has been pulled out, and the software stops the operation of the LoRa expansion card communication program, releases the cache and LED resources, and logs out the device. Perform LoRa network update; 若卡检测管脚电平为低,电源IO拉高,而检测到UART长时间无法通信且重启次数大于三次,该情况判断为LoRa扩展卡故障,则软件上停止LoRa扩展卡通信程序运行,释放缓存并保留1路指示灯红灯闪烁,表示扩展接口的LoRa扩展卡存在但有故障,注销设备然后进行LoRa网络更新。If the level of the card detection pin is low, the power IO is pulled high, and it is detected that the UART cannot communicate for a long time and the number of restarts is greater than three times. In this case, it is judged that the LoRa expansion card is faulty, and the software stops the operation of the LoRa expansion card communication program and releases the Cache and retain the 1-way indicator flashing red, indicating that the LoRa expansion card of the expansion interface exists but is faulty, log out of the device and then perform the LoRa network update.
CN202010068922.1A 2020-01-21 2020-01-21 A LoRa multi-channel communication expansion method based on pluggable modules Active CN111309659B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010068922.1A CN111309659B (en) 2020-01-21 2020-01-21 A LoRa multi-channel communication expansion method based on pluggable modules

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010068922.1A CN111309659B (en) 2020-01-21 2020-01-21 A LoRa multi-channel communication expansion method based on pluggable modules

Publications (2)

Publication Number Publication Date
CN111309659A CN111309659A (en) 2020-06-19
CN111309659B true CN111309659B (en) 2021-08-13

Family

ID=71151002

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010068922.1A Active CN111309659B (en) 2020-01-21 2020-01-21 A LoRa multi-channel communication expansion method based on pluggable modules

Country Status (1)

Country Link
CN (1) CN111309659B (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111818174B (en) * 2020-07-23 2023-09-26 广州市迪士普音响科技有限公司 Distributed central control system
CN113411192B (en) * 2021-02-20 2022-08-05 利尔达科技集团股份有限公司 Multi-functional loRa expansion board
CN113312289B (en) * 2021-06-04 2024-03-01 北京北瑞达电力自动化设备有限公司 Method for solving plug and play problem of intelligent board card communication
CN113595578B (en) * 2021-06-10 2023-04-07 珠海荣邦智能科技有限公司 Detachable communication module
CN113535623B (en) * 2021-06-11 2024-07-19 中国长城科技集团股份有限公司 Port configuration circuit, method and server
CN113760614B (en) * 2021-07-30 2023-09-22 郑州云海信息技术有限公司 Test control device and test system of PCIE expansion card
CN114338475B (en) * 2021-12-30 2023-12-01 北京天融信网络安全技术有限公司 Link rate abnormality detection method and device, electronic equipment and storage medium
CN114490476A (en) * 2021-12-30 2022-05-13 深圳市英威腾电气股份有限公司 Control assembly, method for automatically compatible with expansion card and embedded system
CN114443396B (en) * 2022-01-25 2025-03-14 京东方科技集团股份有限公司 Electrostatic interference processing method, device, storage medium and electronic equipment
CN115586981B (en) * 2022-11-25 2023-03-14 深圳华北工控股份有限公司 Method, system, computer and storage medium for preventing SIO signal loss
CN116233283B (en) * 2023-05-05 2023-07-25 湖南盛鼎科技发展有限责任公司 A method for dynamic expansion and hot plugging of equipment communication protocol

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104991613A (en) * 2015-06-05 2015-10-21 无锡虎甲虫计算技术有限公司 Robot operation circuit board
CN106155960A (en) * 2016-06-29 2016-11-23 广州慧睿思通信息科技有限公司 Shake hands and the UART serial port communication method of EDMA based on GPIO
KR20180025613A (en) * 2016-09-01 2018-03-09 에스케이텔레콤 주식회사 Method for time compensation in long range network terminal and terminal performing same
CN208754562U (en) * 2018-09-13 2019-04-16 国电龙源电气有限公司 Multi-functional locating base station

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10241555B2 (en) * 2015-12-04 2019-03-26 Dell Products, Lp System and method for monitoring a battery status in a server in a data center
US10191525B2 (en) * 2016-07-27 2019-01-29 Hewlett Packard Enterprise Development Lp Modules storing power configuration parameters

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104991613A (en) * 2015-06-05 2015-10-21 无锡虎甲虫计算技术有限公司 Robot operation circuit board
CN106155960A (en) * 2016-06-29 2016-11-23 广州慧睿思通信息科技有限公司 Shake hands and the UART serial port communication method of EDMA based on GPIO
KR20180025613A (en) * 2016-09-01 2018-03-09 에스케이텔레콤 주식회사 Method for time compensation in long range network terminal and terminal performing same
CN208754562U (en) * 2018-09-13 2019-04-16 国电龙源电气有限公司 Multi-functional locating base station

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
《A Study of LoRa Coverage :》;Madoune R. Seye等;《2018 1st International Conference on Smart Cities and Communities (SCCIC)》;20180726;全文 *
《室内导航融合算法研究与实现_梁昌业》;梁昌业;《中国优秀硕士学位论文全文数据库信息科技辑》;20191215(第12期);全文 *

Also Published As

Publication number Publication date
CN111309659A (en) 2020-06-19

Similar Documents

Publication Publication Date Title
CN111309659B (en) A LoRa multi-channel communication expansion method based on pluggable modules
US8386764B2 (en) BIOS architecture
CN109558371B (en) Method for communicating with a microcontroller, and computing system
US10484100B2 (en) Optical module, optical module system and monitor method using the same
WO2019042421A1 (en) Method, apparatus and device for rate adjustment of usb data transmission, and storage medium
RU2015109465A (en) STAND WITH AUTO RECOVERY FUNCTION AND METHOD FOR AUTOMATIC RECOVERY FOR THIS STAND
US12317131B2 (en) Multi-protocol communication network
CN111698582A (en) COMBO optical module and multimode PON system
CN103178899A (en) Fiber interface rate self-adaption method and device
US9779037B2 (en) Establishing connectivity of modular nodes in a pre-boot environment
CN111338676B (en) BMC (baseboard management controller) firmware upgrading system and method with in-band mode and out-of-band mode
KR20100133010A (en) Communication system, test device, communication device, communication method and test method
CN105337749A (en) Method for configuring network device, optical module, and network device system
US11604602B2 (en) Control device, execution device and device management method
CN115599721A (en) Port switching method, system, computing device and chip
CN113300773B (en) Optical module
CN110061765B (en) 5G onboard double 2X 2MIMO wireless control system
CN113364524B (en) Data receiving method and optical module
CN114499701A (en) A communication distance indication method for field testing of wireless modules
KR20060087827A (en) Other electronic devices with O. B. signaling self-test
US20210157384A1 (en) Assigning power sources
CN111131012A (en) Control circuit of Internet of things gateway, Internet of things gateway and Internet of things system
CN114866106B (en) Multi-module communication system and data processing method
CN111400079B (en) Isolator, and software resetting method, device and storage medium applicable to isolator
CN111061661B (en) PowerPC platform-based RapidIO data packet processing method and device

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