Disclosure of Invention
The invention aims to provide a debugging method for detecting radio frequency signals in a radio frequency optical terminal based on network communication, which aims to solve the problems that each radio frequency service board is debugged by a single board and then assembled into a complete machine, detection data is troublesome to test, write in and modify, and program debugging efficiency is low.
In order to achieve the above object, the present invention provides a method for debugging radio frequency signal detection in a radio frequency optical transceiver based on network communication, comprising the following steps:
designing a network communication interface of a network tube plate program for measuring, writing and reading the power sampling table;
the power sampling table is sent to a radio frequency service board program through a network port and is stored in an internal Flash of the microcontroller according to a specific format;
and after the radio frequency service board program is started, the power sampling table is identified and loaded, and the detection value is calculated by looking up the table.
After the radio frequency service board program is started, whether a power sampling table read from the Flash is legal or not needs to be judged, and an illegal frame format indicates that the data is invalid.
The specific mode of the power sampling table measurement is as follows:
Inputting an index of a radio frequency service board to be tested on a PC network management software interface, and sending a command for inquiring a radio frequency signal sampling value of a specified radio frequency service board;
The network tube plate software receives the command, processes and forwards the command to the appointed radio frequency service plate program, and calculates a radio frequency signal sampling value;
The radio frequency service board program reports the radio frequency signal sampling value to the network management board software for processing and reporting;
And aiming at the input service board index, the PC network management software queries sampling values of radio frequency signals with different powers in a transmission range one by one according to power values, and displays the sampling values in a table form.
The specific mode of writing the power sampling table is as follows:
inputting a designated radio frequency service board index on the PC network management software interface, and sending a command of writing in a power sampling table;
The network tube plate software receives the command, processes and forwards the command to the radio frequency service plate program, and stores the power sampling table in the internal Flash high address area;
And the radio frequency service board program reports the processing result to the network management board software for processing according to a response format, and the network management board software reports the processing result to the PC network management software.
The specific mode of the power sampling table is as follows:
inputting a designated radio frequency service board index on the PC network management software interface, and sending a command for reading a power sampling table;
the network tube plate software receives the command, processes and forwards the command to the appointed radio frequency service plate program;
After receiving the command, the radio frequency service board program processes the command and reports the power sampling table to network management board software according to a response format;
after receiving the response, the network management board software processes the response and reports the power sampling table to the PC network management software.
The invention relates to a debugging method for radio frequency signal detection in a radio frequency optical terminal based on network communication, which designs a network communication interface for measuring, writing and reading a power sampling table by a network tube plate program, sends the power sampling table to a radio frequency service plate program through a network port, stores the power sampling table into a Flash in a microcontroller according to a specific format, recognizes and loads the power sampling table after the radio frequency service plate program is started, and calculates a detection value by looking up a table, wherein when the power sampling table needs to be modified every time, a software developer is not required to update the radio frequency service plate program by using a professional tool (a downloading/debugger and a software compiler), and a production debugging person can finish updating the power sampling table through PC upper computer software; when the radio frequency optical terminal equipment is installed on a test site and is in a working state, the optical terminal is usually not allowed to be powered off to interrupt signal service, at the moment, the power sampling table can be updated online and remotely, equipment maintenance is carried out in operation, on the batch production process, the whole machine assembly can be carried out first, and then detection of all radio frequency service boards in the radio frequency optical terminal can be measured and written together, so that the efficiency is improved, the process is flexible, and the problems that the existing radio frequency service boards are debugged by a single board first, then the whole machine is assembled into the whole machine, and the debugging efficiency is low are solved.
Detailed Description
Embodiments of the present invention are described in detail below, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to like or similar elements or elements having like or similar functions throughout. The embodiments described below by referring to the drawings are illustrative and intended to explain the present invention and should not be construed as limiting the invention.
Referring to fig. 1 to 12, the invention provides a method for debugging radio frequency signal detection in a radio frequency optical transceiver based on network communication, comprising the following steps:
s1, designing a network communication interface of a network tube plate program for measuring, writing and reading the power sampling table.
In the embodiment of the invention, the process of measuring the power sampling table is that a radio frequency service board index to be tested is input on a PC network management software interface, a command for inquiring a radio frequency signal sampling value of a specified radio frequency service board is sent to an optical terminal machine through a network port, the command is received by the network management board software, the command is forwarded to the specified radio frequency service board program after being processed, the radio frequency signal sampling value is calculated after the command is received by the radio frequency service board program, the radio frequency signal sampling value result is reported to the network management board software according to a response format, and the radio frequency signal sampling value result is reported to the PC network management software according to the response format after the response is received by the network management board software. As shown in fig. 1. The formats of the command and response for querying the sampled values of the rf signal are shown in fig. 7 and 8, respectively. In the figure, the source and the destination of data are distinguished according to the source and the destination codes, when PC network management software sends a command to the network management board software, the source is 01H, the destination is 02H, and when the network management board software sends a command to the radio frequency service board program, the source is 02H, and the destination is 03H. The same principle applies to the transmission of response data. On the PC network management software interface, aiming at the input service board index, the radio frequency signals with different powers in the transmission range are searched for AD sampling values one by one according to the power values, and each power value and the corresponding sampling value are clearly displayed on the PC network management software interface in a form of a table, namely the measurement of the power sampling table is completed.
The process of writing in the power sampling table is similar to the process of measuring, after the power sampling table is measured, inputting the appointed radio frequency service board index on the PC network management software interface, sending the command of writing in the power sampling table to the optical terminal through the network port, receiving the command by the network management board software, processing and transmitting the command to the appointed radio frequency service board program, after receiving the command by the radio frequency service board program, storing the power sampling table in an internal Flash high address area according to the format of figure 6, reporting the processing result to the network management board software according to the response flow of figure 4, after receiving the response, processing and reporting the processing result to the PC network management software again. The schematic diagram is shown in fig. 1. The writing command format and the response format of the rf signal sampling value are shown in fig. 9 and fig. 10, respectively.
The source and destination of data are distinguished according to source and destination codes in the table, when PC network management software sends command to the network management board software, the source is 01H, the destination is 02H, and when the network management board software sends command to the radio frequency service board program, the source is 02H, and the destination is 03H. The same principle applies to the transmission of response data.
And the read-out process of the power sampling table is that after the power sampling table is written in, the read-out is supported, so that the repeated use is convenient. Inputting a designated radio frequency service board index on a PC network management software interface, sending a command for reading a power sampling table to an optical terminal through a network port, receiving the command by the network management board software, processing and forwarding the command to the designated radio frequency service board program, after receiving the command, reporting the power sampling table to the network management board software through processing according to a response flow shown in fig. 5, and reporting the power sampling table to the PC network management software through processing after receiving the response by the network management board software. The schematic diagram is shown in fig. 1. The read command format and the response format of the power sample table are shown in fig. 11 and 12, respectively. In the figure, the source and the destination of data are distinguished according to the source and the destination codes, when PC network management software sends a command to the network management board software, the source is 01H, the destination is 02H, and when the network management board software sends a command to the radio frequency service board program, the source is 02H, and the destination is 03H. The same principle applies to the transmission of response data. After the power sampling table is read out, the power sampling table can be reused for other radio frequency service boards with high consistency of hardware characteristics.
The specific mode is as follows:
S101, inputting an index of a radio frequency service board to be tested on a PC network management software interface, and sending a command for inquiring a radio frequency signal sampling value of a specified radio frequency service board;
S102, the network tube plate software receives the command, processes and forwards the command to the appointed radio frequency service plate program, and calculates a radio frequency signal sampling value;
S103, the radio frequency service board program reports the radio frequency signal sampling value to the network management board software for processing and reporting;
s104, aiming at the input service board index on the PC network management software, the radio frequency signals with different powers in the transmission range are searched for sampling values one by one according to the power values, and are displayed in a table form.
The specific mode of writing the power sampling table is as follows:
S111, inputting a designated radio frequency service board index on the PC network management software interface, and sending a command of writing in a power sampling table;
S112, the network tube plate software receives the command, processes and forwards the command to the radio frequency service plate program, and the radio frequency service plate program is processed and stored with the power sampling table in the internal Flash high address area;
s113, the radio frequency service board program reports the processing result to the network management board software for processing according to the response format, and the network management board software reports the processing result to the PC network management software.
The specific mode of the power sampling table is as follows:
s121, inputting a designated radio frequency service board index on the PC network management software interface, and sending a command for reading a power sampling table;
S122, the network tube plate software receives the command, processes and forwards the command to the appointed radio frequency service plate program;
S123, after receiving the command, the radio frequency service board program processes the command and reports the power sampling table to network management board software according to a response format;
s124, after receiving the response, the network management board software processes the response and reports the power sampling table to the PC network management software.
S2, transmitting the power sampling table to a radio frequency service board program through a network port, and storing the power sampling table into an internal Flash of the microcontroller according to a specific format;
In the embodiment of the invention, the separation of the power sampling table of the radio frequency service board and the radio frequency service board program is realized, and the power sampling table can be stored by using the sector space behind the Flash in the microcontroller on the radio frequency service board. Therefore, the space occupied by the program (the program starts to be stored from the starting address of the internal Flash) is not affected, and additional external Flash is not needed.
S3, after the radio frequency service board program is started, the power sampling table is identified and loaded, and a detection value is calculated by looking up a table;
In the embodiment of the invention, after a radio frequency service board program is started, firstly judging whether a power sampling table read from an internal Flash high address area is legal, wherein an illegal frame format indicates that the data is invalid, the first power represents the radio frequency signal power corresponding to a sampling value AD1, one bit of decimal is reserved in precision and is multiplied by 10 to be converted into an integer for transmission and storage, the radio frequency signal power corresponding to AD 1-ADn is arranged in an arithmetic progression, the difference of the last power value minus the previous power value is a power step, the power step is represented by 1 byte signed number (type int 8), the number of the AD sampling value is represented by 1 byte unsigned number (type uint 8), and finally, CRC-16 check values are calculated for all data bytes from the first power to the ADn and are attached to the frame tail for checking the data integrity of the power sampling table, wherein the storage format of the power sampling table is shown in figure 6.
The method has the beneficial effects that:
1. When the power sampling table needs to be modified, a software developer is not required to use a professional tool (a downloading/debugger and a software compiler) to update the radio frequency service board program, and the production debugger can complete the update of the power sampling table through PC upper computer software;
2. When the power sampling table needs to be modified, the radio frequency service board does not need to be detached from the whole machine to update the program, and the structural tightness of the whole machine is not damaged;
3. when the power sampling table is measured on the radio frequency service board, the radio frequency service board does not need to be detached from the whole machine, the electromagnetic environment at the moment is the final working environment of the radio frequency service board, the measured power sampling table is more accurate, and the radio frequency signal detection calculated by the service board program is more true and accurate.
4. When the radio frequency optical transceiver equipment is installed on a test site and is in a working state, the optical transceiver is not allowed to be powered off to interrupt signal service, at the moment, a power sampling table can be updated online and remotely, and equipment maintenance is carried out in operation;
5. Because the power sampling table is separated from the program, all the radio frequency service boards use the unified program, thereby facilitating the archiving and mass downloading of the software. On the other hand, for the radio frequency service board with the consistent height of the power sampling table, the power sampling table can be measured once (or read out to be measured), and then the radio frequency service board is reused and used in batches, so that the efficiency is obviously improved.
6. In the batch production process, the whole machine assembly can be firstly carried out, then detection of all radio frequency business boards in the radio frequency optical terminal machine is carried out, the detection and the writing are carried out, the efficiency is improved, and the process is flexible.
The above disclosure is only a preferred embodiment of the method for detecting and debugging a radio frequency signal in a radio frequency optical transceiver based on network communication, but it should be understood that the scope of the invention is not limited thereto, and those skilled in the art will understand that all or part of the procedures for implementing the above embodiments are equivalent and still fall within the scope of the invention.