CN116347474A - Wireless terminal communication module control method and system - Google Patents

Wireless terminal communication module control method and system Download PDF

Info

Publication number
CN116347474A
CN116347474A CN202310224478.1A CN202310224478A CN116347474A CN 116347474 A CN116347474 A CN 116347474A CN 202310224478 A CN202310224478 A CN 202310224478A CN 116347474 A CN116347474 A CN 116347474A
Authority
CN
China
Prior art keywords
communication module
module
serial port
instruction
type
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.)
Pending
Application number
CN202310224478.1A
Other languages
Chinese (zh)
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.)
Xuchang XJ Software Technology Co Ltd
Original Assignee
Xuchang XJ Software Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xuchang XJ Software Technology Co Ltd filed Critical Xuchang XJ Software Technology Co Ltd
Priority to CN202310224478.1A priority Critical patent/CN116347474A/en
Publication of CN116347474A publication Critical patent/CN116347474A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/02Arrangements for optimising operational condition
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/04Arrangements for maintaining operational condition
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/08Testing, supervising or monitoring using real traffic
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/10Scheduling measurement reports ; Arrangements for measurement reports
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/20Services signaling; Auxiliary data signalling, i.e. transmitting data via a non-traffic channel

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Communication Control (AREA)

Abstract

The invention belongs to the technical field of communication software, and particularly relates to a wireless terminal communication module control method and system, wherein the method comprises the following steps: 1) Acquiring module type identification information of a corresponding communication module through a USB serial port of each communication module; the module type identification information comprises a network card name, a network card driver and a firmware version; 2) Identifying the corresponding communication module type according to the acquired module type identification information; 3) And acquiring an AT instruction determined according to the type of the communication module, and sending the AT instruction to the corresponding communication module to control the communication module. Therefore, the invention solves the problem of low efficiency of the communication terminal in the prior art when the communication terminal performs wireless network debugging work and protocol consistency test work.

Description

Wireless terminal communication module control method and system
Technical Field
The invention belongs to the technical field of communication software, and particularly relates to a wireless terminal communication module control method and system.
Background
When the 5G module is debugged, many communication modules operate through serial ports by adopting AT instructions. Before using these modules, engineers typically use a PC to connect with a communication module for testing, that is, the communication module connects the communication module with the PC by converting TTL UART into USB. A specialized AT command input tool is then used during the test, typically in the form of a series of buttons. For example, a series of buttons are placed, the function description of the instruction is set as the title of the button, and when the user clicks the button, a corresponding instruction is issued. Also, for example, an instruction is placed in a series of edit boxes, or a series of blank edit boxes are prepared, each edit box being associated with a button, and when the user clicks the button, the corresponding instruction is sent to the serial port.
Currently, when a 5G communication terminal with a 5G module is performing debugging of a wireless network, an AT command needs to be input, the following contents are included, as shown in fig. 2:
(1) And (3) logging in a LINUX system of the equipment, opening a serial port of the equipment by using a microcom application to which the 5G module is mapped, opening the serial port of the equipment, and then inputting an AT instruction, wherein a return result of the AT instruction can be received only in an opened session.
(2) For high adaptability, the 5G communication terminal is adapted to modules of multiple manufacturers in driving and hardware, including remote, allied, violet, etc., and most of AT instructions of each manufacturer are general instructions, but some manufacturers have their own independent AT instruction library, so that different AT instructions need to be adapted during debugging.
For different AT instructions of different manufacturer modules, a plurality of buttons are required to be arranged one by one according to the corresponding AT instructions, the implementation is very complicated, and the efficiency of the wireless data terminal is low when the wireless network debugging work and the protocol consistency test work are carried out.
Disclosure of Invention
The invention aims to provide a wireless terminal communication module control method and a wireless terminal communication module control system, which are used for solving the problem that in the prior art, the efficiency of a communication terminal is low when wireless network debugging work and protocol consistency test work are carried out.
In order to solve the technical problems, the technical scheme and the corresponding beneficial effects of the technical scheme provided by the invention are as follows:
the invention discloses a wireless terminal communication module control method, which comprises the following steps:
1) Acquiring module type identification information of a corresponding communication module through a USB serial port of each communication module; the module type identification information comprises a network card name, a network card driver and a firmware version;
2) Identifying the corresponding communication module type according to the acquired module type identification information;
3) And acquiring an AT instruction determined according to the type of the communication module, and sending the AT instruction to the corresponding communication module to control the communication module.
The beneficial effects of the technical scheme are as follows: the invention can automatically identify the type of the communication module according to the name of the network card, the drive of the network card and the version information of the firmware through the serial port for direct communication, determine the corresponding AT instruction according to the type of the communication module, and send the corresponding AT instruction to the communication module of the type so as to control the communication module. The method of the invention does not need to set corresponding AT command buttons for the modules of each module manufacturer, only needs to identify the module in the wireless data terminal, and can select the AT command set according to the module, and the commands with the same function can be sent only through one button. The invention has simple realization and can greatly improve the working efficiency of the control communication module, for example, the efficiency of wireless network debugging work and protocol consistency testing work.
Further, in order to facilitate identifying the communication module type, in step 2), the communication module type corresponding to the module type identification information is identified by using the module type correspondence relationship; the corresponding relation of the module types is the corresponding relation of the communication module types and the module type identification information stored in advance.
Further, in order to improve reliability, the module type identification information further includes a vendor ID and a product identification PID of the communication module, and step 3) further includes verifying the type of the communication module identified in step 2) by using the vendor ID and the product identification PID.
Further, in step 3), determining an AT command in the command mapping relation according to the type of the communication module, and acquiring the AT command through a serial port and sending the AT command to a corresponding communication module; the instruction mapping relation is the mapping relation between the communication module type and the AT instruction set.
Further, the step 1) further includes the steps of serial port initialization and serial port opening.
Further, step 3) further includes a step of serial port inverse initialization to close the serial port.
The invention also provides a wireless terminal communication module control system, which comprises an MCU; the MCU is provided with a plurality of serial ports; the serial port comprises a USB serial port; the MCU is used for being connected with the communication module through the USB serial port; the serial port of the MCU is also used for being connected with an external PC to acquire an AT instruction; wherein, MCU is used for:
1) Acquiring module type identification information of a corresponding communication module through a USB serial port of each communication module; the module type identification information comprises a network card name, a network card driver and a firmware version;
2) Identifying the corresponding communication module type according to the acquired module type identification information;
3) And acquiring an AT instruction determined according to the type of the communication module, and sending the AT instruction to the corresponding communication module to control the communication module.
The beneficial effects of the technical scheme are as follows: the MCU is connected with the communication module through the USB serial port, acquires the name of the network card, the drive of the network card and the version information of the firmware to realize automatic identification of the type of the communication module, acquires the corresponding AT instruction determined according to the type of the communication module, and sends the corresponding AT instruction to the communication module of the type so as to control the communication module. The invention has simple realization and can greatly improve the working efficiency of the control communication module, for example, the efficiency of wireless network debugging work and protocol consistency testing work.
Further, in order to facilitate recognition of the communication module type, the MCU recognizes the communication module type corresponding to the module type recognition information by using the module type correspondence relationship; the corresponding relation of the module types is the corresponding relation of the communication module types and the module type identification information stored in advance.
Further, in order to improve reliability, the module type identification information further includes a vendor ID of the communication module and a product identification code PID; the MCU further includes verifying the communication module type identified in step 2) using the vendor ID and the product identification PID before step 3).
Further, the system also comprises an external PC, wherein the external PC is used for determining a corresponding AT instruction in the instruction mapping relation according to the type of the communication module, and sending the corresponding AT instruction to the MCU; the instruction mapping relation is the mapping relation between the communication module type and the AT instruction set.
Drawings
Fig. 1 is a block diagram of a 5G wireless data terminal in an embodiment of the system of the present invention;
fig. 2 is a schematic diagram of an AT command transmission data flow in the prior art;
FIG. 3 is a schematic diagram of a serial port channel AT command transmit data flow in an embodiment of the system of the present invention;
FIG. 4 is a schematic diagram of the working principle of a serial port channel in an embodiment of the system of the present invention;
FIG. 5 is a schematic diagram of USB module identification in an embodiment of the system of the present invention;
fig. 6 is a schematic diagram of a control method of a wireless terminal communication module in an embodiment of the system of the present invention.
Detailed Description
The invention provides a control method of a wireless terminal communication module, which is based on a 5G communication terminal (wireless data terminal) of a Linux system, and the method is characterized in that the USB port of an internal communication module (5G module) of the 5G communication terminal is automatically identified to determine the module type, the internal 5G wireless communication module type (communication module type or 5G module type) of the wireless data terminal is read and communicated with an external port of the wireless data terminal so as to conveniently send out the 5G wireless communication module type, and an AT instruction is sent by the outside according to the 5G wireless communication module type, so that the input work and daily test use of the AT instruction are more conveniently carried out when the wireless terminal carries out protocol consistency test and radio frequency consistency test, and the work efficiency is improved.
The present invention will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present invention more apparent.
System embodiment:
the invention provides an embodiment of a wireless terminal communication module control system, which comprises an external PC and a wireless data terminal, wherein the external PC comprises an external AT command input tool. As shown in fig. 1, a wireless data terminal (also referred to as a wireless terminal) includes an MCU, a 5G module, a power module, and a status indicator lamp. The MCU is provided with serial ports such as RJ45, RS232, USB and the like, and is connected with an external PC through the RS 232; the MCU is connected with the 5G module through a USB interface; the MCU is provided with a SIM card slot and an antenna; wherein, MCU is used for: 1) Acquiring USB port information and network card driving information of the corresponding communication module through the USB serial port of each communication module; the USB port information comprises a provider ID and a product identification code PID; 2) Identifying the corresponding communication module type according to the acquired USB port information and network card driving information; 3) And acquiring an AT instruction determined according to the identified communication module type, and sending the AT instruction to the corresponding communication module to control the communication module. The external PC is used for determining a corresponding AT instruction according to the type of the communication module and sending the corresponding AT instruction to the MCU.
The invention discloses a wireless terminal communication module control system which is divided into the following two parts:
a first part: and the module USB port AT instruction forwarding part.
As shown in fig. 3, the PC is connected to the wireless network terminal through a serial port (serial port a) outside the 5G wireless terminal device, and the wireless network terminal is connected to the terminal internal communication module through a serial port (serial port B) connected to the internal module of the 5G wireless terminal device. Specifically, the MCU communicates with the PC through RS232 (serial port A), and is connected with the terminal internal communication module through the USB port (serial port B). The entire serial port channel program is divided into three parts as shown in fig. 4:
1) The serial port server initializes and opens the serial port.
Serial port server initialization (also called serial port initialization) is a preparation work for establishing a serial port channel, and firstly, a serial port printing function (echo 0 >/proc/sys/kernel/printk) when a device system works is closed, only serial port channel programs are allowed to use serial ports, and then serial port A and serial port B are opened.
2) The program main loop transmits data.
The program takes the input AT instruction (ReadFile function) from serial port a and sends it to serial port B (WriteFile function). And receiving the returned processing condition from the serial port B and sending the returned processing condition to the serial port A. And then sleep timing, and before the sleep timing is not finished, the serial port continuously reads and writes and transmits data, namely, the functions are always operated in the running process of the serial port program.
3) The serial port server is reversely initialized and closes the serial port channel.
A second part: and a module USB port identification part.
According to the method, for the 5G modules of different manufacturers, the type of the 5G module is judged according to the information such as the USB port and the network card drive by acquiring the information such as the USB port and the network card drive mapped by the 5G module, and then the identification value representing the type of the module is sent outwards through the serial port of the 5G wireless data terminal.
Due to the provision in the USB specification, all USB devices carry a Vendor ID (VID) and a product identification code (PID), and different devices are distinguished by different VIDs and PIDs. Different manufacturers vary their 5G modules VID and PID, and thus the present invention is used to identify different modules. In the method, firstly, module VID/PID information is added in a Linux kernel/driver/usb/serial/option.c of an MCU in a wireless data terminal so that the MCU kernel can normally identify a 5G module to enumerate ttyUSB devices. When the module USB port identification is performed, as shown in FIG. 5, the method specifically comprises the following steps:
1) Judging the module type according to the network card name.
Firstly, module USB description information (network card name) is obtained, which is generally/dev/ttyUSB, and the module mapping port names of different manufacturers may be different. If the 5G module type cannot be identified in the step. If the module type can be normally acquired, the next step is continued to acquire more relevant information for judging the module type.
Specifically, the outermost layer is that different modules show network card names in the system, for example, the network card names which can be inquired by the ifconfig inquiry, for example, eth0/usb0. However, this name is not stable and there is a possibility of a phenomenon of a heavy name, so the name is not directly used to determine the module type.
2) Judging the module type according to the network card driver and the firmware version.
If the information of the USB description information and the physical address is still insufficient to judge the module type, further judgment is needed through the network card driver and the firmware version information mapped by the module, so that the 5G module type can be completely determined.
Specifically, using the ethtool-i usb0, the driver and firmware version of the ethernet card may be checked, and the following information may be obtained:
driver:cdc_ncm
version:22-Aug-2005
firmware-version:CDC NCM
and 5G module equipment information can be judged through the name of the network card, the driver and the firmware version. The MCU stores the corresponding relation between each communication module type and the corresponding network card name, driver and firmware version for identifying the communication module type.
3) And verifying the module type according to the VID/PID.
In order to improve reliability, the invention finally provides a most fundamental verification scheme, namely, a ls-l/sys/class/tty/ttyUSB2 query module is used for realizing specific equipment files in the MCU, the VID/PID storage address of the 5G communication module can be obtained, then the corresponding equipment catalog is entered, and the PID and VID of the USB equipment can be obtained by checking the idProduct and idVendor files, for example, the VID of one module is 2c7c, and the PID information is 0900. Where the VID is applied by the vendor to the USB-IF (Implementers Forum applicator Forum). The VID of each provider is unique, and the PID is determined by the provider; thus, the 5G module equipment information can be completely confirmed. The MCU stores the corresponding relation between the VID and PID of each communication module and the type of the VID and PID for use in verification.
Specifically, the system of the present invention is controlled by a wireless terminal communication module control method of the present invention, which comprises the steps of:
the first step: the serial port server initializes and opens the serial port.
And a second step of: the MCU identifies the USB port of the module according to the name of the network card, the drive of the network card and version information obtained from the USB serial port of the 5G module, obtains VID/PID information for re-verification, and finally obtains the type of the 5G module.
And a third step of: and the external PC determines a corresponding AT instruction according to the type of the 5G module and sends the AT instruction to the MCU through the serial port.
After the 5G module type is determined, data (the data is a 5G module type) is sent to an external device serial port (the serial port of the PC in this embodiment), and after the computer PC end AT instruction input tool receives the module type data (also referred to as module manufacturer information), a corresponding AT instruction set can be selected according to module manufacturer data (the module manufacturer data is a mapping relationship between a communication module type stored by an external PC and an AT instruction set) embedded in the AT instruction input tool, and the AT instruction is sent to the wireless data terminal through the serial port, so as to realize the function of the control module.
Fourth step: the serial port server is reversely initialized and closes the serial port channel.
When the invention is used for protocol consistency test, the comprehensive tester device USB (with the function of an AT instruction input tool) can be directly connected with a device serial port for test, directly input an AT instruction, and can record the module type of an internal module of the device, thereby improving the working efficiency. Comprehensive tester: the wireless communication test platform is used for instruments in the technical field of electronics and communication, is used for radio disturbance detection of telecommunication terminal equipment, and needs a module to receive the control of AT instructions of the comprehensive tester.
The invention can more conveniently use the AT command control equipment module in the daily use process of the 5G wireless data terminal, reduces the workload and improves the working efficiency.
Method embodiment:
the embodiment of the control method of the wireless terminal communication module comprises the following steps:
1) Acquiring USB port information and/or network card driving information of the corresponding communication module through the USB serial port of each communication module; the USB port information comprises a provider ID and/or a product identification code PID; 2) Identifying the corresponding communication module type according to the acquired USB port information and/or network card driving information; 3) And acquiring an AT instruction determined according to the identified communication module type, and sending the AT instruction to the corresponding communication module to control the communication module. The method for controlling the wireless terminal communication module in the system embodiment of the present invention is described in detail in the system embodiment, and thus will not be described in detail herein. The method is convenient for controlling the 5G module through the AT command, and effectively improves the working efficiency.

Claims (10)

1. A wireless terminal communication module control method is characterized in that: the method comprises the following steps:
1) Acquiring module type identification information of a corresponding communication module through a USB serial port of each communication module; the module type identification information comprises a network card name, a network card driver and a firmware version;
2) Identifying the corresponding communication module type according to the acquired module type identification information;
3) And acquiring an AT instruction determined according to the type of the communication module, and sending the AT instruction to the corresponding communication module to control the communication module.
2. The wireless terminal communication module control method according to claim 1, wherein: step 2), identifying the communication module type corresponding to the module type identification information by utilizing the corresponding relation of the module types; the corresponding relation of the module types is the corresponding relation of the communication module types and the module type identification information stored in advance.
3. The wireless terminal communication module control method according to claim 1, wherein: the module type identification information also comprises a supplier ID and a product identification code PID of the communication module, and the step 3) is preceded by verifying the communication module type identified in the step 2) by using the supplier ID and the product identification code PID.
4. The wireless terminal communication module control method according to claim 1, wherein: step 3), determining an AT command in the command mapping relation according to the type of the communication module, acquiring the AT command through a serial port and sending the AT command to a corresponding communication module; the instruction mapping relation is the mapping relation between the communication module type and the AT instruction set.
5. The wireless terminal communication module control method according to claim 1, wherein: the step 1) is preceded by the steps of serial port initialization and serial port opening.
6. The wireless terminal communication module control method according to any one of claims 1 to 5, characterized in that: step 3) further includes a step of serial port inverse initialization to close the serial port.
7. A wireless terminal communication module control system, characterized by: the system comprises an MCU; the MCU is provided with a plurality of serial ports; the serial port comprises a USB serial port; the MCU is used for being connected with the communication module through the USB serial port; the serial port of the MCU is also used for being connected with an external PC to acquire an AT instruction; wherein, MCU is used for:
1) Acquiring module type identification information of a corresponding communication module through a USB serial port of each communication module; the module type identification information comprises a network card name, a network card driver and a firmware version;
2) Identifying the corresponding communication module type according to the acquired module type identification information;
3) And acquiring an AT instruction determined according to the type of the communication module, and sending the AT instruction to the corresponding communication module to control the communication module.
8. The wireless terminal communication module control system according to claim 7, wherein: the MCU identifies the communication module type corresponding to the module type identification information by utilizing the corresponding relation of the module types; the corresponding relation of the module types is the corresponding relation of the communication module types and the module type identification information stored in advance.
9. The wireless terminal communication module control system according to claim 8, wherein: the module type identification information also comprises a provider ID and a product identification code PID of the communication module; the MCU further includes verifying the communication module type identified in step 2) using the vendor ID and the product identification PID before step 3).
10. The wireless terminal communication module control system according to any one of claims 7 to 9, wherein: the system also comprises an external PC, wherein the external PC is used for determining a corresponding AT instruction in the instruction mapping relation according to the type of the communication module and sending the corresponding AT instruction to the MCU; the instruction mapping relation is the mapping relation between the communication module type and the AT instruction set.
CN202310224478.1A 2023-03-08 2023-03-08 Wireless terminal communication module control method and system Pending CN116347474A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310224478.1A CN116347474A (en) 2023-03-08 2023-03-08 Wireless terminal communication module control method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310224478.1A CN116347474A (en) 2023-03-08 2023-03-08 Wireless terminal communication module control method and system

Publications (1)

Publication Number Publication Date
CN116347474A true CN116347474A (en) 2023-06-27

Family

ID=86887026

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310224478.1A Pending CN116347474A (en) 2023-03-08 2023-03-08 Wireless terminal communication module control method and system

Country Status (1)

Country Link
CN (1) CN116347474A (en)

Similar Documents

Publication Publication Date Title
CN109361562B (en) Automatic testing method based on associated network equipment access
EP1457901A2 (en) System and method for simulating USB smart cards connected to USB host
CN103544122B (en) The cooperative system and its Synergistic method of a kind of interface adaptive matching
US6772248B1 (en) Protocol adapter for in-vehicle networks
US20040202015A1 (en) SDIO card development system
CN110275833B (en) Universal test equipment and use method
CN102004952B (en) Measuring resource control system and measuring resource control method
EP0480527A2 (en) Test apparatus
CN103793307A (en) Electronic device, management method thereof and cabinet servo system
CN106326171A (en) Method and device for recognizing hard disk type of hard disk back plate
CN105224483B (en) Data transmission method, electronic equipment and universal serial bus device
CN111756858B (en) Remote development processing system, method and device for embedded equipment
CN110235393A (en) Automated testing method and system
CN106933754A (en) A kind of USB drives recognition methods and device
CN113608790A (en) Linux system based self-adaptive management method and system for serial device and storage medium
CN109033804A (en) A kind of software virtual machine authorization method and device
CN114124694A (en) Configuration method and configuration device of Internet of things equipment, electronic equipment and medium
CN113901754B (en) FPGA-based Ethernet MACIP board-level verification structure and method
CN109857433B (en) Single chip microcomputer software upgrading tool and method
CN112380078B (en) USB equipment communication test method and test device
CN112162890B (en) DMA pressure test method and device of MCU and storage medium
CN116347474A (en) Wireless terminal communication module control method and system
CN112491653A (en) Automatic test system and test method for communication equipment
CN100498732C (en) Universal serial bus device test system and its method
CN112445490A (en) File sequence processing method and device, terminal equipment and storage medium

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