CN115276864B - DMB terminal state information receiving system based on LoRa technology - Google Patents

DMB terminal state information receiving system based on LoRa technology Download PDF

Info

Publication number
CN115276864B
CN115276864B CN202210621336.4A CN202210621336A CN115276864B CN 115276864 B CN115276864 B CN 115276864B CN 202210621336 A CN202210621336 A CN 202210621336A CN 115276864 B CN115276864 B CN 115276864B
Authority
CN
China
Prior art keywords
data
lora
gateway
module
terminal
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
CN202210621336.4A
Other languages
Chinese (zh)
Other versions
CN115276864A (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.)
Chongqing University of Post and Telecommunications
Original Assignee
Chongqing University of Post and Telecommunications
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 Chongqing University of Post and Telecommunications filed Critical Chongqing University of Post and Telecommunications
Priority to CN202210621336.4A priority Critical patent/CN115276864B/en
Publication of CN115276864A publication Critical patent/CN115276864A/en
Application granted granted Critical
Publication of CN115276864B publication Critical patent/CN115276864B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04HBROADCAST COMMUNICATION
    • H04H60/00Arrangements for broadcast applications with a direct linking to broadcast information or broadcast space-time; Broadcast-related systems
    • H04H60/29Arrangements for monitoring broadcast services or broadcast-related services
    • H04H60/31Arrangements for monitoring the use made of the broadcast services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04HBROADCAST COMMUNICATION
    • H04H20/00Arrangements for broadcast or for distribution combined with broadcast
    • H04H20/53Arrangements specially adapted for specific applications, e.g. for traffic information or for mobile receivers
    • H04H20/61Arrangements specially adapted for specific applications, e.g. for traffic information or for mobile receivers for local area broadcast, e.g. instore broadcast
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04HBROADCAST COMMUNICATION
    • H04H20/00Arrangements for broadcast or for distribution combined with broadcast
    • H04H20/65Arrangements characterised by transmission systems for broadcast
    • H04H20/71Wireless systems
    • H04H20/72Wireless systems of terrestrial networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04HBROADCAST COMMUNICATION
    • H04H40/00Arrangements specially adapted for receiving broadcast information
    • H04H40/18Arrangements characterised by circuits or components specially adapted for receiving
    • H04H40/27Arrangements characterised by circuits or components specially adapted for receiving specially adapted for broadcast systems covered by groups H04H20/53 - H04H20/95
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04HBROADCAST COMMUNICATION
    • H04H60/00Arrangements for broadcast applications with a direct linking to broadcast information or broadcast space-time; Broadcast-related systems
    • H04H60/76Arrangements characterised by transmission systems other than for broadcast, e.g. the Internet
    • H04H60/81Arrangements characterised by transmission systems other than for broadcast, e.g. the Internet characterised by the transmission system itself
    • H04H60/90Wireless transmission systems
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

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

Abstract

The invention relates to a DMB terminal state information receiving system based on LoRa technology, belonging to the technical field of wireless signals. Aiming at the problem that a DMB broadcasting system can only finish the transmission of data information in one direction and cannot feed back operation errors or broadcast information errors, a digital multimedia broadcasting (Digital Multimedia Broadcasting) state detection system based on LoRa and a LoRa ad hoc network mode based on polling are provided. The node terminal and the gateway equipment are additionally provided with the LoRa radio frequency module, so that the information of DMB terminal operation can be transmitted to the central control terminal, the terminal can timely feed back to the background when the terminal cannot work normally, and technical support is provided for DMB application.

Description

DMB terminal state information receiving system based on LoRa technology
Technical Field
The invention belongs to the technical field of wireless signals, and relates to a DMB terminal state information receiving system based on LoRa technology.
Background
Digital Multimedia Broadcasting (DMB) is a wireless information transmission technology that has been developed and expanded on the basis of Digital Audio Broadcasting (DAB). According to the current pilot DMB technology, its six sets of high quality audio are shared 1kW power transmissions close to the coverage of a set of FM broadcasts of only 10kW transmissions. It can be seen that DAB is hundreds of times more power efficient than FM. The significant improvement of the power efficiency not only means energy saving, but also significantly reduces the cost of DMB building, which would be very advantageous for large-scale popularization and use of DMB in scenic spots.
The DMB broadcasting system applied in the scenic spot can only unidirectionally complete the transmission of data information, and only the central control end can be controlled by a worker to transmit the data information to the DMB terminal, but the DMB terminal cannot reversely transmit the information to the central control end, so that once the broadcasting terminal operates in error or the broadcasting information is wrong, the worker cannot timely know and take effective measures to maintain or remedy, and therefore, when a crisis condition occurs, the DMB terminal in certain areas of the scenic spot cannot well receive the information, and therefore, the broadcasting function cannot be realized, and therefore, the DMB digital broadcasting terminal in the scenic spot is researched and has important significance.
Disclosure of Invention
In view of the above, an object of the present invention is to provide a DMB terminal status information receiving system based on the LoRa technology. A DMB terminal status information receiving system is built based on a long-range radio (LongRangeRadio, loRa) technology, and information of terminal operation is transmitted to a central control terminal through LoRa. The broadcasting can be timely fed back to the background when the broadcasting cannot work normally, and powerful technical support is provided for scenic spot information release and emergency management.
In order to achieve the above purpose, the present invention provides the following technical solutions:
A DMB terminal state information receiving system based on LoRa technology, the system includes node terminal and gateway;
the node terminal and the gateway are provided with digital multimedia broadcasting technology DMB terminals and remote radio LoRa modules which are connected in sequence;
the LoRa module is also in data connection with the MCU;
the MCU is also respectively connected with the LED module, the upper computer and the key module;
the DMB terminal transmits data to the LoRa module through the associated port, the LoRa module integrates the data information into a digital signal, and partial data information is transmitted to the MCU through a wireless transmission mode;
The MCU collects the data information transmitted by the LoRa module, analyzes and processes the collected data information, and finally presents the analyzed information in a screen;
The LED module is used for representing different working states and data information transmission and receiving states;
The key module regulates and controls the transmission state of the polling data;
The upper computer presents the analyzed data to the PC end of the staff;
Communication by the LoRa module includes transparent transmission and directional transmission;
the directional transmission is as follows: the gateway sequentially sends polling request data to the nodes according to a certain sequence, and when the nodes receive the polling request data once, the nodes return the data once through directional transmission; the polling of one node is expected to be completed within 1 s-2 s, and the data reception of 30-60 nodes is expected to be completed within one minute;
In the information receiving system, a node is in a receiving state when idle, and when data is received, the data is compared with agreed polling request data; if the signals are the same, adding the address and the channel of the gateway before a frame of complete data, and returning to the gateway through directional transmission; if the data is different from the polling request signal, the data is in a receiving state;
After the gateway continuously transmits the polling request data, judging whether the data returned by the slave computer is received or not, if yes, transmitting the data to the computer through a serial port, and polling the node address +1; if the slave machine does not receive the returned data after overtime, skipping the request, and carrying out polling of the next node;
The gateway comprises a gateway polling module, a gateway LoRa module, an upper computer, a gateway LoRa configuration module, a key module and an LED lamp module, wherein the gateway LoRa configuration module configures LoRa parameters when being electrified, after the parameters are set, the gateway polling module controls the gateway LoRa module to send a polling request signal to each node terminal, and if data returned by the node is received, the data is uploaded to the upper computer through a serial port; the node terminal comprises a DMB terminal, a node LoRa module and a node LoRa configuration module, wherein when the node LoRa module receives a polling request signal sent by the gateway terminal, the node LoRa module controls the DMB terminal to send data to the gateway.
Optionally, the built-in chip model of the LoRa module is SX1278;
the gateway LoRa module is a wireless signal transmission module of 01-LoRa-ATK, and the built-in core chip model is SX1278;
Connecting the gateway LoRa module with the DMB terminal through a serial port; the power supply voltage VCC, the grounding point GND, the data receiving pin RXD and the data transmitting pin TXD of the DMB terminal are respectively connected with VCC, GND, TXD, RXD of the gateway LoRa module; wherein TXD is cross-connected with RXD.
Optionally, the RXD is associated with a PB10 pin on the singlechip, and the TXB pin is directly associated with PB11 on the singlechip; PB10/11 has the effect of completing bidirectional transmission of data information; the KEY pin is related to a PA4 pin on the singlechip, and the LED end is directly related to a PA15 pin on the singlechip.
Optionally, in the information receiving system, an array is defined, data in the array simulates data sent by a serial port of the DMB terminal, a channel identifier is added behind the original data, and the gateway end distinguishes whether the data is the data sent by the node.
The invention has the beneficial effects that:
The DMB broadcasting system applied in the foreground area can only finish the transmission of data information in one direction, and only the central control end can be controlled by staff to transmit the data information to the DMB terminal, but the DMB terminal can not reversely transmit the information to the central control end, so that once the broadcasting terminal operates in error or the broadcasting information is wrong, the system applicability is greatly reduced, therefore, the research builds a DMB terminal state information receiving system based on the LoRa technology, and the information of the terminal operation is transmitted to the central control end through the LoRa. The broadcasting can be timely fed back to the background when the broadcasting cannot work normally, and powerful technical support is provided for scenic spot information release and emergency management.
Firstly, drawing a system block diagram, and constructing corresponding hardware equipment of a gateway end and a node end. And compiling the program by using software, thereby realizing the function by matching with hardware facilities, simultaneously teaching the program compiling mode and path of the gateway end and the terminal, introducing a directional signal transmission mode taking the LoRa module as a core, and collecting data information transmitted by the LoRa modules of different terminals in a channel changing mode, namely, carrying out LoRa networking in a polling mode.
Meanwhile, the original PCB layout is optimized, and a LoRa module is added on the basis of the original receiver PCB layout, so that the remote monitoring function of the system is realized, and a worker can find out problems in time. Meanwhile, wiring is optimized, and extra parasitic capacitance and parasitic inductance are avoided. After the system is built, the system is subjected to rigorous test from two dimensions of signal connectivity and transmission distance among the modules, and finally the quality of the system is evaluated through the obtained structure.
Additional advantages, objects, and features of the invention will be set forth in part in the description which follows and in part will become apparent to those having ordinary skill in the art upon examination of the following or may be learned from practice of the invention. The objects and other advantages of the invention may be realized and obtained by means of the instrumentalities and combinations particularly pointed out in the specification.
Drawings
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in the following preferred detail with reference to the accompanying drawings, in which:
FIG. 1 is a block diagram of a node terminal system;
FIG. 2 is a block diagram of a gateway system;
FIG. 3 is a schematic diagram of the networking mode of operation;
FIG. 4 is a node frame diagram;
FIG. 5 is a gateway framework diagram;
FIG. 6 is an overall design;
FIG. 7 is a system device association;
FIG. 8 is a flowchart of a judgment response program;
FIG. 9 is a program execution flow;
FIG. 10 is a program execution flow;
Fig. 11 is a diagram of the relative positions of the gateway and the node.
Detailed Description
Other advantages and effects of the present invention will become apparent to those skilled in the art from the following disclosure, which describes the embodiments of the present invention with reference to specific examples. The invention may be practiced or carried out in other embodiments that depart from the specific details, and the details of the present description may be modified or varied from the spirit and scope of the present invention. It should be noted that the illustrations provided in the following embodiments merely illustrate the basic idea of the present invention by way of illustration, and the following embodiments and features in the embodiments may be combined with each other without conflict.
Wherein the drawings are for illustrative purposes only and are shown in schematic, non-physical, and not intended to limit the invention; for the purpose of better illustrating embodiments of the invention, certain elements of the drawings may be omitted, enlarged or reduced and do not represent the size of the actual product; it will be appreciated by those skilled in the art that certain well-known structures in the drawings and descriptions thereof may be omitted.
The same or similar reference numbers in the drawings of embodiments of the invention correspond to the same or similar components; in the description of the present invention, it should be understood that, if there are terms such as "upper", "lower", "left", "right", "front", "rear", etc., that indicate an azimuth or a positional relationship based on the azimuth or the positional relationship shown in the drawings, it is only for convenience of describing the present invention and simplifying the description, but not for indicating or suggesting that the referred device or element must have a specific azimuth, be constructed and operated in a specific azimuth, so that the terms describing the positional relationship in the drawings are merely for exemplary illustration and should not be construed as limiting the present invention, and that the specific meaning of the above terms may be understood by those of ordinary skill in the art according to the specific circumstances.
1. Design principle and thought of system
1.1. Design of system block diagram
Block diagram of DMB terminal system
The system block diagram corresponding to the DMB system terminal is relatively simple, the pre-packaged gateway LoRa module and the terminal are directly associated by adopting a serial port, so that the corresponding function can be realized, the terminal can transmit data into the gateway LoRa module through the associated port, then the gateway LoRa module can integrate the data information into a digital signal, and the partial data information is transmitted to the gateway terminal in a wireless transmission mode, as shown in fig. 1.
1.1.2. Gateway end system block diagram
The gateway terminal needs to realize more functions, firstly, data information transmitted by the gateway LoRa module needs to be collected, then, the collected data information is analyzed and processed, and finally, the analyzed information is presented in a screen, as shown in fig. 2.
Observing the system block diagram, the gateway end is adapted with the LED functional blocks, and different LED lamp flashes represent different working states and data information transmission and receiving states. The key board has the core function of regulating and controlling the transmission state of the polling data. The gateway LoRa module has the core function of receiving signals transmitted by the terminal, collecting the signals and then directly transmitting the signals to the MCU for analysis, and the upper computer plate has the main function of presenting the analyzed data on a working panel of a PC end of a worker, so that a user can clearly and clearly see the data sent by the DMB terminal.
1.2. Debugging software
And a parameter debugging tool matched with the gateway LoRa module is used for dispatching the parameter values of the module. The gateway LoRa module on the terminal needs to do work to directly transmit the collected terminal state information to the gateway terminal and does not need to allocate the parameters, in other words, the gateway LoRa module on the terminal is self-adaptive to specific parameter values, and a developer only needs to apply the software to allocate the parameters and then directly associate the parameters with the terminal.
LoRa module
The research work selects a wireless signal transmission module which is independently researched and developed by a positive atomic company, the specific model is 01-LoRa-ATK, and the module has a plurality of excellent characteristics such as: low energy consumption, long-distance wireless signal transmission, low power, smaller specification and the like. The module adapts itself to 6 pins through which it is necessary to associate with external scenarios. And gateway LoRa module of this model can also directly be correlated with STM32 singlechip through the serial port.
The gateway LoRa module is a protocol and a product for communication in the whole system, data is sent to broadcasting through serial data simulation, then the broadcasting can be fed back to an LED screen through the protocol, if the data is always sent, the user can always receive the feedback, and when the information cannot be normally received, the user can judge that the broadcasting possibly has a problem, and then staff can be arranged to go forward for investigation.
2. Functional implementation of a system
LoRa System design
LoRa networking mode
The LoRa module communication functions include transparent transmission and directional transmission. As shown in fig. 3, the system uses the directional transmission function of the LoRa module to enable the gateway to sequentially send polling request data to the nodes according to a certain sequence, and when the nodes receive the polling request data once, the nodes return data once to the gateway through the directional transmission function. It is expected that 1 s-2 s complete the polling of one node, and 30-60 nodes can complete the data reception in one minute. The specific time needs to be determined after subsequent debugging.
2.1.2. Node frame
The node is in a receiving state when idle, once the data is received, the data is compared with the agreed polling request data, if the signals are the same, the address and the channel of the gateway are added before a frame of complete data, and the data is returned to the gateway through directional transmission. If the data is different from the polling request signal, the data is still in a receiving state. Fig. 4 illustrates the framework flow of the node portion.
2.1.3. Gateway frame
The gateway needs to continuously send the polling request data, judges whether the data returned by the slave is received after the polling request data is sent once, if the data is received, the data is sent to the computer through the serial port, and the node address +1 is polled, and the next node is polled. If the slave machine return data is not received after the timeout, the request is skipped, and the next node is polled. Fig. 5 illustrates the framework flow of the gateway side part.
2.1.4. Integral design
The integral part comprises node terminals and gateways as shown in fig. 6. The gateway comprises a gateway polling module, a gateway LoRa module, an upper computer, a gateway LoRa configuration module, a key module and an LED lamp module, wherein the gateway LoRa configuration module can configure LoRa parameters when being electrified, after the parameters are set, the gateway polling module can control the gateway LoRa module to send a polling request signal to each node terminal, and if data returned by the nodes are received, the data can be uploaded to the upper computer through a serial port. The node terminal comprises a DMB terminal, a node LoRa radio frequency module and a node LoRa configuration module, wherein when the node LoRa module receives a polling request signal sent by the gateway terminal, the node LoRa module can control the DMB terminal to send data to the gateway.
2.2. Hardware design of each part of monitoring system
The hardware design of the whole system can be divided into the following two parts:
1. Node terminal
2. Gateway (GW)
The terminal and the gateway end both adopt LoRa modules with identical specifications, the built-in chip model of the modules is SX1278, and the built-in chip models are the LoRa modules with the model of 01-LoRa-ATK which are researched and developed by the same company. The specific association form of the DMB system terminal and the gateway terminal can be observed through fig. 7.
LoRa radio frequency module
The model and specification of the LoRa module applied to the gateway end and the terminal are completely consistent, the model is a wireless signal transmission module of 01-LoRa-ATK, the model of the built-in core chip of the module is SX1278, and other external circuits which are adapted on the basis of the chip are also arranged in the packaged module. The module has many good properties such as: the wireless signal transmission and collection module has the advantages of high signal transmission precision, long transmission distance, less energy consumption, small specification and the like, and has extremely strong applicability.
2.2.2. Terminal node hardware design
The hardware design of the terminal node is not so much, and is mainly based on the developed DMB terminal design. And connecting the node LoRa module with the DMB terminal through a serial port. VCC, GND, RXD, TXD of the DMB terminal are connected to VCC, GND, TXD, RXD of the gateway LoRa module, respectively. Special care should be taken that TXD should be cross-connected with RXD.
2.2.3. Gateway end hardware design
The gateway end hardware design involves the following modules:
1. upper computer
LED lamp module
3. Key module
LoRa module
The functional constitution at the gateway side has been fully explained above in the form of a system block diagram. The following explains how to associate the functional modules on the gateway side.
1) Hardware design of LED lamp
The gateway end is provided with two LED lamps, and when the gateway LoRa module transmits and collects information and distributes parameters outwards, the LED lamps emit light according to actual conditions.
The LED0/1 needs to be matched with a resistor with the specification of 550 omega and then is associated with a power supply, the other end of the LED needs to be directly associated with a PE5 pin, and by observing the internal circuit structure, the two lamps can emit light when the level state is low, and the two lamps cannot emit light when the level state is high. Therefore, the purpose of light emission can be achieved by only regulating the level states of the two LED ports down.
2) Hardware design of key module
The gateway end is also adapted with key modules with different functions, specifically: KEY0/1 and WK_UP. The development board purchased at this time is pre-adapted with four keys, one key being capable of performing a reset operation. And the system construction work only needs to apply three other keys except reset.
Looking at the KEY schematic diagram, it can be found that one end of the KEY wk_up needs to be directly associated with the PA0 pin, the other end needs to be directly associated with the power supply, the KEY0 port needs to be directly associated with the pin PE4, the KEY1 KEY port needs to be directly associated with the pin PE3, and the other ends of the two KEYs need to be directly associated with the ground wire. When the user operates the WK UP button, the level state on pin PA0 goes high, and when the user operates the other two buttons, the level state on the PE4/3 port goes low. Therefore, the user can directly achieve the purpose by controlling the keys.
3) Hardware design of LoRa module
The gateway end must be configured with a gateway LoRa MODULE identical to the terminal to collect the running state information of the terminal, and the development board purchased at this time is self-adaptive with a USART3 serial port, and the port and the pins PA4/15 extend together to form a MODULE-ATK MODULE, so that only the gateway LoRa MODULE purchased in advance needs to be associated with the MODULE.
As can be seen from the observation principle diagram, the RXD pin of the module needs to be directly associated with the PB10 pin on the singlechip, while the TXB pin needs to be directly associated with the PB11 pin on the singlechip. The actual role of PB10/11 is to accomplish bi-directional transmission of data information. The KEY pin is related to a PA4 pin on the singlechip, and the LED end is required to be directly related to a PA15 pin on the singlechip. After the connection work between the module and the singlechip is completed, the LoRa module needs to be associated with the module, firstly one end of TXD and RXD pins on the LoRa module needs to be staggered and associated with the TXD and RXD pins on the module, and the other end needs to be associated with a power supply, so that an AUX pin on the LoRa module needs to be directly associated with the KEY, and an MD0 pin needs to be directly associated with the LED. When the user regulates the level states on the two pins, the module working mode and parameter allocation can be completed, and when the module is in the configuration working state, the user needs to realize the module parameter allocation function in a mode of transmitting AT instructions.
The right side of the development board is a LoRa module, the three yellow KEYs on the right lower side are KEY modules, the transmission of the polling data is started when the key_UP KEY is pressed, and the transmission of the polling data is terminated when the red KEY is pressed. And an LED indicator light is arranged beside the red key, when the red key flashes once, polling data is sent once, and when the green key flashes once, data sent to the gateway by the receiving node is received.
2.3. Software design
2.3.1. Terminal node software design
Because the DMB terminal reserves serial ports to send data volume big and speed is too fast, the loRa transmission data can appear very serious packet drop. Considering that the source code of the DMB terminal is already shaped, it cannot be directly modified. A code simulating transmission of original data is rewritten in the DMB terminal to perform a test.
Firstly, an array is defined, the data in the array simulates the data sent by a serial port of a DMB terminal, and a channel identifier is added behind the original data, so that the data sent by the node can be distinguished at the gateway end.
This code lights up the yellow light, then sends a string of data in the array, then blinks the red light once, delays for 1.9s, and then performs the above function again. The final function is that the DMB terminal transmits the data packet once every 2 s. Although this is not data actually transmitted by the DMB terminal, it is possible to verify that the gateway side can correctly receive the data. And connecting an external MCU to the serial port of the DMB terminal in the later period, identifying the frame head and the frame tail of the data transmitted by the serial port of the DMB terminal by the MCU, cutting out a complete string of data according to the frame head and the frame tail, temporarily storing the string of data, and transmitting the data according to the requirement.
2.3.2. Gateway LoRa parameter configuration code
Because the LoRa module at the gateway end needs to continuously send the polling signal to each node terminal, and meanwhile, needs to receive the data sent from the DMB terminal and upload the data to the MCU, the parameter configuration of the LoRa module needs to be adjusted to realize different function selections.
In this project, this configuration code of loRa can effectively realize the parameter configuration to the loRa module, because with the direct connection of loRa module on terminal node in this project, also appear can't dismantle the module alone in the time of saving space, be difficult to carry out the problem of individual configuration. Considering that when the scenic spot is actually applied, the problem that the LoRa modules cannot be detached one by one to carry out parameter adjustment is also solved, the code can be used for realizing the autonomous parameter configuration of the LoRa modules, the problems are solved, and the portability is greatly improved.
2.3.3. Gateway side software design
For the whole system building operation, the most core operation is program compiling at the gateway end, because the purchased LoRa module is adapted to the official function program example. Therefore, the compiling work of the gateway terminal driving source code can be completed only by slightly modifying the example program according to the own function realization requirement. Several core programs are selected and explained below.
1) Power-on detection design
After the power is connected, in order to enable the functions on the gateway end to be normally realized, the relevance of all modules needs to be detected, so that a module detection feedback function is specially compiled for the operation.
LoRa_check_cmd () is a test feedback function whose entry position indicates a specific parameter that can refer to a specific feedback result, with the feedback value being specifically 0 or any arbitrary value. Assuming that the final feedback parameter value is 0, it means that no predicted feedback result is detected; but other values are ultimately obtained, then the predicted feedback result is detected, and the program specified by the result can be called and run. The application mechanism of the function is as follows: when the if statement collects data information, it automatically calls strstr () function, which functions as: the value obtained by the feedback of the second entry represents the specific position of the first entry parameter, so as to evaluate whether the second entry is a substring of the first entry, and then the obtained feedback value is directly given to the str variable, so that the feedback value finally obtained by detecting the feedback function is equal to the specific value of the str variable.
The LoRa_check_cmd () function can transmit an instruction to the outside, and the function has three entries in total, and each entry corresponds to a parameter specifically: one, waitime parameters; second, ack parameters; thirdly, cmd parameters. The concrete meaning of Waitime parameters is feedback time, the minimum unit is 10 milliseconds; the ack parameter refers to the expected feedback value; the specific meaning of cmd is an instruction string. The feedback value res detected by the function has a value of 0 or 1, when the feedback value is 1, the instruction transmission is wrong, and when the feedback value is 0, the instruction transmission is completed, and the value of res is 0 in the initial state. Before transmitting the instruction, the system evaluates whether the cmd address does not exceed 0xff in advance, and if the cmd address does not exceed 0xff, the system transmits data information to the outside; assume that the command string information is transmitted to the outside beyond. After the information transmission is completed, whether feedback needs to be waited or not is required to be evaluated, if the feedback needs to be waited, a while is started to enter a function loop, a LoRa_check_cmd () function is automatically called in the loop to evaluate whether the feedback result is an expected response result, if the evaluation result is yes, the loop function is automatically closed, res is assigned 0, but if the expected feedback result is not detected in the loop, the loop is closed, and res is assigned 1. This part of the procedure evaluation feedback process can be observed through fig. 8.
2) Module initialization function
LoRa_Init () is a function that performs a reset operation, which has no entry parameter, a feedback value temp of either 0 or 1, meaning that the test is complete when the feedback value is 0, and meaning that the test is faulty when the feedback value is 1.
When the function is applied, the GPIO and the interrupt source are required to be allocated, the working condition of the current module is required to be evaluated after the allocation is completed, in other words, whether the level state on the AUX end is low is scanned, and if the current state of the module is busy, the function enters infinite loop. However, if the feedback results in the module currently being in an idle state, then a reset operation is performed on the serial port 3, and the MD0 end level state on the LoRa module is synchronously adjusted to be high, at this time, the module enters a deployment mode, and then the function needs to perform three detection on the module. In the detection process, the cmd function is required to be called to transmit the AT command to the module, the module in the mode receives the AT command, then the receiving result is fed back to the function inlet, the value 0 is fed back once in three detection works, but the value 1 is fed back finally if the detection is not successful once, which means that the detection is wrong. This part of the procedure evaluation feedback process can be observed through fig. 9.
3) Design of polling function
In the project, a networking mode is designed by utilizing the directional transmission function of LoRa. The gateway sequentially sends the polling request data to the nodes according to a certain sequence, and the nodes receive the polling request data once and return the data once to the gateway through the directional transmission function.
2.3.4. Program execution flow
The execution flow of the whole program is shown in fig. 10, firstly, parameter configuration is carried out on the LoRa module through codes, polling can be formally started after configuration and preparation work are completed, the gateway terminal sends polling request data, the node terminal returns the data to the gateway terminal after receiving the polling request data, the gateway terminal receives the data sent by the node terminal and then transmits the data to an upper computer (namely a PC terminal) through a serial port, and the data can be clearly checked through a serial port debugging assistant.
2.3.5.PCB optimal design
The PCB board of the system is optimized in design, and the original PCB layout has the following problems:
first, lacking a remote monitoring system, the staff cannot know at the first time when the device is not working.
Secondly, the antenna wiring adopts the right angle, produces parasitic capacitance and parasitic inductance easily, and the LED lamp is diode drive, and is comparatively nonstandard.
The current PCB layout is mainly optimized as follows:
First, add the loRa module on the basis of original receiver PCB territory, realize the remote monitoring function of system for the staff can in time discover the problem.
Secondly, the wiring is optimized, and because the capacity of the pins of the singlechip for outputting current is limited, a triode is used as a switch to drive the LED lamp. Therefore, the LED lamp is changed into triode driving in optimization. Meanwhile, the original right-angle wiring of the antenna is changed into an arc wiring, so that extra parasitic capacitance and parasitic inductance are avoided.
Example 3
3.1 Connectivity test
The equipment to which the test work needs to be applied is specifically: one of them, two of the treasures of charging (used for supplying power); secondly, one gateway end is arranged; thirdly, three DMB system terminal devices; fourth, one notebook computer, gateway end and a terminal loRa module need directly be correlated with the computer, drive through 5V power, and two other loRa modules need be correlated with treasured that charges, drive through 5V voltage.
3.2 Data reception test
And after the connectivity test is completed, a formal test link can be started. After the key_UP KEY is pressed, the gateway terminal sends polling data, and the red light of the gateway terminal flashes at the moment, and each flash represents that the data is sent once; and when the gateway side blinks in green light, the data sent from the node terminal is received by the representative.
After the gateway terminal collects the transmitted data information, the gateway terminal can transmit the data information to the computer again through the serial port, and then a developer can watch the transmitted data information only through a serial port debugging tool.
3.3 Distance test
In the distance test, the distance test is selected to be tested in the school because the distance test cannot be carried out in the scenic spot due to epidemic situation. In order to simulate the situation in the scenic spot as much as possible, two node terminals are respectively placed at different positions, and an old playground of Chongqing university is selected as a test position. A schematic view of the scene is shown in fig. 11.
The weather condition of the test work is good on the same day, the barriers in the area are few, and the antenna height is not high. The specific results of data information transmission at different distances are shown in table 1. The LoRa-related parameters set forth in the system are shown in Table 2.
Table 1 test results under 4dbi gain antenna
Distance (m) Effects of
<=500m Data can be received stably
500m-600m The antenna position is adjusted and fixed, and then the data can be stably received
>600m Not receiving data
Table 2 LoRa parameters in the test
Parameters (parameters) Numerical value
Air rate 19.2K
Transmitting power 20dBm
Antenna gain 4dBi
Before the test work is carried out, the signal transmission rate of the LoRa module is required to be allocated firstly, specifically: the signal transmission rate is: 19.2K, the signal generation power value is 20dBm, the signal transmission frequency value interval is 413-453MHz, the parameter specification of the antenna is 4dBi, and the antenna is directly related with the LoRa module through an SMA pin.
The LoRa module and the receiving device of the terminal are powered by the charger, and all devices on the gateway end are powered by the notebook computer, so that the notebook computer is carried to travel towards the far end after the correct placement of the terminal is completed. During the test, it can be derived that:
1. The transmission of the signal during the movement is slightly distorted, but the normal transmission accuracy is restored once the movement is stopped;
2. If the antennas on the terminal and gateway side can be placed higher, the smoothness of signal transmission is higher.
3. Within 500m, the signal can be stably received; when the signal is between 500m and 600m, the signal is received unstably, and the antenna orientation and lifting equipment can be adjusted to receive the signal; when the signal is larger than 600m, the gateway end can not receive the signal. 600m is the limit distance for the antenna equipped with the current model.
The selected test environment is still walked by students, and because the antenna cannot be placed at a high place due to the line, it can be presumed that the distance of system signal transmission can be larger if the system antenna is placed at a higher place and the scene is more open. In the test work, the quality and the stability of the signal transmission are also greatly related to the height and the number of the obstacles, so that the antenna should be placed at a higher position in practical application, for example: the roof is equal, so that the signal transmission quality can be effectively improved.
Finally, it is noted that the above embodiments are only for illustrating the technical solution of the present invention and not for limiting the same, and although the present invention has been described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications and equivalents may be made thereto without departing from the spirit and scope of the present invention, which is intended to be covered by the claims of the present invention.

Claims (4)

1. DMB terminal state information receiving system based on loRa technique, its characterized in that: the system comprises a node terminal and a gateway;
the node terminal and the gateway are provided with digital multimedia broadcasting technology DMB terminals and remote radio LoRa modules which are connected in sequence;
the LoRa module is also in data connection with the MCU;
the MCU is also respectively connected with the LED module, the upper computer and the key module;
the DMB terminal transmits data to the LoRa module through the associated port, the LoRa module integrates the data information into a digital signal, and partial data information is transmitted to the MCU through a wireless transmission mode;
The MCU collects the data information transmitted by the LoRa module, analyzes and processes the collected data information, and finally presents the analyzed information in a screen;
The LED module is used for representing different working states and data information transmission and receiving states;
The key module regulates and controls the transmission state of the polling data;
The upper computer presents the analyzed data to the PC end of the staff;
Communication by the LoRa module includes transparent transmission and directional transmission;
the directional transmission is as follows: the gateway sequentially sends polling request data to the nodes according to a certain sequence, and when the nodes receive the polling request data once, the nodes return the data once through directional transmission; the polling of one node is expected to be completed within 1 s-2 s, and the data reception of 30-60 nodes is expected to be completed within one minute;
In the information receiving system, a node is in a receiving state when idle, and when data is received, the data is compared with agreed polling request data; if the signals are the same, adding the address and the channel of the gateway before a frame of complete data, and returning to the gateway through directional transmission; if the data is different from the polling request signal, the data is in a receiving state;
After the gateway continuously transmits the polling request data, judging whether the data returned by the slave computer is received or not, if yes, transmitting the data to the computer through a serial port, and polling the node address +1; if the slave machine does not receive the returned data after overtime, skipping the request, and carrying out polling of the next node;
The gateway comprises a gateway polling module, a gateway LoRa module, an upper computer, a gateway LoRa configuration module, a key module and an LED lamp module, wherein the gateway LoRa configuration module configures LoRa parameters when being electrified, after the parameters are set, the gateway polling module controls the gateway LoRa module to send a polling request signal to each node terminal, and if data returned by the node is received, the data is uploaded to the upper computer through a serial port;
The node terminal comprises a DMB terminal, a node LoRa module and a node LoRa configuration module, wherein when the node LoRa module receives a polling request signal sent by the gateway terminal, the node LoRa module controls the DMB terminal to send data to the gateway.
2. The DMB terminal status information receiving system based on the LoRa technique as recited in claim 1, wherein: the built-in chip model of the LoRa module is SX1278;
the gateway LoRa module is a wireless signal transmission module of 01-LoRa-ATK, and the built-in core chip model is SX1278;
Connecting the gateway LoRa module with the DMB terminal through a serial port; the power supply voltage VCC, the grounding point GND, the data receiving pin RXD and the data transmitting pin TXD of the DMB terminal are respectively connected with VCC, GND, TXD, RXD of the gateway LoRa module; wherein TXD is cross-connected with RXD.
3. The DMB terminal status information receiving system based on the LoRa technique as recited in claim 2, wherein: the RXD is associated with a PB10 pin on the singlechip, and the TXB pin is directly associated with PB11 on the singlechip; PB10/11 has the effect of completing bidirectional transmission of data information; the KEY pin is related to a PA4 pin on the singlechip, and the LED end is directly related to a PA15 pin on the singlechip.
4. The DMB terminal status information receiving system based on the LoRa technique as recited in claim 1, wherein: in the information receiving system, an array is defined, data in the array simulates data sent by a DMB terminal serial port, a channel identifier is added behind the original data, and the gateway end distinguishes whether the data is the data sent by the node.
CN202210621336.4A 2022-06-01 2022-06-01 DMB terminal state information receiving system based on LoRa technology Active CN115276864B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210621336.4A CN115276864B (en) 2022-06-01 2022-06-01 DMB terminal state information receiving system based on LoRa technology

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210621336.4A CN115276864B (en) 2022-06-01 2022-06-01 DMB terminal state information receiving system based on LoRa technology

Publications (2)

Publication Number Publication Date
CN115276864A CN115276864A (en) 2022-11-01
CN115276864B true CN115276864B (en) 2024-06-04

Family

ID=83760241

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210621336.4A Active CN115276864B (en) 2022-06-01 2022-06-01 DMB terminal state information receiving system based on LoRa technology

Country Status (1)

Country Link
CN (1) CN115276864B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108494815A (en) * 2018-02-06 2018-09-04 北京极智感科技有限公司 A kind of method and system of transmission message
WO2020134554A1 (en) * 2018-12-26 2020-07-02 中兴通讯股份有限公司 Data transmission method and device, and computer readable storage medium
EP3692683A1 (en) * 2017-10-02 2020-08-12 Woodenshark LLC Systems including a gateway receiving sensor data, and related methods
US10958463B1 (en) * 2018-03-26 2021-03-23 Lynq Technologies, Inc. Pairing multiple devices into a designated group for a communication session
CN112953934A (en) * 2021-02-08 2021-06-11 重庆邮电大学 DAB low-delay real-time voice broadcasting method and system
CN114222269A (en) * 2021-11-30 2022-03-22 深圳市领创星通科技有限公司 Method for enhancing reliability of multi-node transmission
CN114221894A (en) * 2021-12-27 2022-03-22 中科海微(北京)科技有限公司 Internet of things networking loss prevention system and method

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3692683A1 (en) * 2017-10-02 2020-08-12 Woodenshark LLC Systems including a gateway receiving sensor data, and related methods
CN108494815A (en) * 2018-02-06 2018-09-04 北京极智感科技有限公司 A kind of method and system of transmission message
US10958463B1 (en) * 2018-03-26 2021-03-23 Lynq Technologies, Inc. Pairing multiple devices into a designated group for a communication session
WO2020134554A1 (en) * 2018-12-26 2020-07-02 中兴通讯股份有限公司 Data transmission method and device, and computer readable storage medium
CN112953934A (en) * 2021-02-08 2021-06-11 重庆邮电大学 DAB low-delay real-time voice broadcasting method and system
CN114222269A (en) * 2021-11-30 2022-03-22 深圳市领创星通科技有限公司 Method for enhancing reliability of multi-node transmission
CN114221894A (en) * 2021-12-27 2022-03-22 中科海微(北京)科技有限公司 Internet of things networking loss prevention system and method

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Design and Implementation of Cloud-based Single-channel LoRa IIoT Gateway Using Raspberry Pi;Changqing Sun et al.;《Chinese Control Conference (CCC)》;20200909;第5259-5263页 *
DMB单频网及适配器电路的设计与实现;张红升 等;《重庆理工大学学报(自然科学)》;20210630;第35卷(第6期);第185-194页 *

Also Published As

Publication number Publication date
CN115276864A (en) 2022-11-01

Similar Documents

Publication Publication Date Title
CN106774260B (en) The automatic test approach and its system of on-board air conditioner controller
CN101588272B (en) Movable self-organization network test platform and method thereof
CN104640073A (en) Reverse synchronous perception-based wifi (Wireless Fidelity) wireless positioning method and system
CN110673510B (en) Rowland-C navigation signal simulation platform based on CPU + FPGA
CN115276864B (en) DMB terminal state information receiving system based on LoRa technology
CN110445561B (en) Radio station communication information acquisition and channel optimization method and device
CN108519936B (en) Verification system and method for data transmission bus of effective load subsystem
CN202677604U (en) Wireless networking control system
CN107404731A (en) The test system and method for testing of wireless communication module
CN110166922A (en) Testing communication system and method based on bluetooth headset
CN107179724B (en) Traffic light signal period collection system
WO2018143094A1 (en) Management node for wireless communication system, and wireless communication system
CN204926591U (en) Intelligence is learned and is driven real analog system entirely
CN213122965U (en) Test system of vehicle-mounted networking terminal
CN108052113A (en) A kind of multiple no-manned plane and more intelligent vehicle composite formations communication means
CN113179201A (en) Multi-region multi-device remote joint debugging and testing system and method
CN112073897A (en) Method for rapidly establishing ad hoc network by using unmanned aerial vehicle projection
CN116015487B (en) V2X equipment testing system and method
CN112797383A (en) LED lamp capable of providing position service
CN103200584B (en) The bearing calibration of indoor propagation model and device
CN112351416B (en) Communication network acquisition method and device, storage medium and electronic equipment
CN102665293A (en) Mobile device and street lamp communication method
CN114499701A (en) Communication distance indicating method for wireless module external field test
CN114040372B (en) Bluetooth Mesh network remote meter reading system based on relay node
CN212064018U (en) LoRaWAN gateway module detection device based on raspberry group

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