CN117891766A - Driving method, device, equipment and storage medium compatible with serial communication module - Google Patents

Driving method, device, equipment and storage medium compatible with serial communication module Download PDF

Info

Publication number
CN117891766A
CN117891766A CN202410070111.3A CN202410070111A CN117891766A CN 117891766 A CN117891766 A CN 117891766A CN 202410070111 A CN202410070111 A CN 202410070111A CN 117891766 A CN117891766 A CN 117891766A
Authority
CN
China
Prior art keywords
serial port
target identifier
port module
target
hardware configuration
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202410070111.3A
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.)
Wuxi Yuning Intelligent Technology Co ltd
Original Assignee
Wuxi Yuning Intelligent 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 Wuxi Yuning Intelligent Technology Co ltd filed Critical Wuxi Yuning Intelligent Technology Co ltd
Priority to CN202410070111.3A priority Critical patent/CN117891766A/en
Publication of CN117891766A publication Critical patent/CN117891766A/en
Pending legal-status Critical Current

Links

Classifications

    • 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
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Stored Programmes (AREA)

Abstract

The application relates to the technical field of communication and discloses a driving method, a device, equipment and a storage medium of a compatible serial port communication module, wherein the application generates a target identifier through version information under the condition that the target identifier does not exist in an erasable partition, and determines hardware configuration information from an external preset database through the target identifier so as to determine serial port module driving; under the condition that the target identifier exists in the non-erasable partition, the hardware configuration information and the serial port module drive are directly called according to the target identifier, the matched interface is finally determined according to the target identifier, the hardware configuration information and the serial port module drive, and the target virtual machine is started, so that compatibility among different serial port modules is realized, and compatibility among different serial port communication modules in the hardware platform is improved.

Description

Driving method, device, equipment and storage medium compatible with serial communication module
Technical Field
The present disclosure relates to the field of communications technologies, and in particular, to a driving method, apparatus, device, and storage medium for a compatible serial port communication module.
Background
In the prior art, if the hardware platforms are the same, only when the modules mounted on the serial ports are different, a plurality of software code versions are required to be maintained respectively, so that the software maintenance cost and the burning management cost during production are increased. When the modules mounted on the serial ports of the same hardware platform are different, all serial port modules are identified and integrated through software logic when the serial ports are started, communication protocols of different mounting points and all modules are enumerated, a software algorithm is used for quick identification and matching, which hardware version the module belongs to is judged according to the identification result, then the system executes different actions, different algorithm libraries are loaded, upper-layer system application, system attributes and display resources are respectively processed, and finally the system is started to meet the requirements of the hardware version.
Under the same scene, if different types, resources and application programs are required to be displayed on the software, the traditional method can only configure different attributes, display resources and application programs before producing the software, the software version is generated after compiling, and the software version configured by A can only be used for producing hardware equipment configured by A. When in production, different modules are required to be installed according to hardware equipment, corresponding software is burnt, and the efficiency is quite low. Therefore, how to improve the compatibility between different serial communication modules in the hardware platform becomes a technical problem to be solved in the present day.
Disclosure of Invention
The application provides a driving method, a driving device, driving equipment and a storage medium for a compatible serial port communication module, so as to improve compatibility among different serial port communication modules in a hardware platform.
In a first aspect, the present application provides a driving method for a serial port compatible communication module, where the method includes:
before starting a target virtual machine, detecting whether a target identifier exists in the non-erasable partition;
under the condition that the target identifier does not exist, reading version information of a current serial port module, generating the target identifier based on the version information, determining the hardware configuration information from a preset database based on the target identifier, and determining a corresponding serial port module driver based on the hardware configuration information;
determining hardware configuration information of the current serial port module and serial port module driving based on the target identifier when the target identifier exists;
and determining a matched interface based on the target identification, the hardware configuration information and the serial port module driver, and starting the target virtual machine.
Further, determining hardware configuration information of the current serial port module and serial port module driving based on the target identifier when the target identifier exists comprises the following steps:
determining the version information corresponding to the current serial port module in the target virtual machine based on a first binding relationship and the target identifier, wherein the first binding relationship is a binding relationship between the target identifier and the version information in the target virtual machine;
and determining the hardware configuration information and serial port module driving based on the version information.
Further, under the condition that the target identifier does not exist, reading version information of a current serial port module, generating the target identifier based on the version information, determining the hardware configuration information from a preset database based on the target identifier, and determining a corresponding serial port module driver based on the hardware configuration information, wherein the method comprises the following steps:
reading the version information to generate the target identifier;
and determining the hardware configuration information and the serial port module driver from the preset database based on a second binding relationship and the target identifier, wherein the second binding relationship is a binding relationship between the target identifier and the hardware configuration information, and the preset database is an external database of the target virtual machine.
Further, reading the version information to generate the target identifier, including:
performing serial port module detection on the current serial port module to write a firmware version query instruction into the current serial port module;
the target flag is determined based on the firmware query instruction.
Further, performing serial port module detection on the current serial port module to write a firmware version query instruction into the current serial port module, including:
calling the current serial port module through a preset ioctl function, and providing power supply and enabling for the current serial port module;
and establishing serial communication of the current serial module after power supply and enabling, and writing the firmware version query instruction based on the serial communication.
Further, determining a corresponding serial port module driver based on the hardware configuration information includes:
and assigning the hardware configuration information to the firmware version query instruction, and determining the serial port module driver.
Further, when the target identifier does not exist, reading version information of the current serial port module, generating the target identifier based on the version information, determining the hardware configuration information from a preset database based on the target identifier, and determining a corresponding serial port module driver based on the hardware configuration information, wherein the method comprises the following steps:
and storing the target identifier to the non-erasable partition for calling the target identifier before starting other virtual machines.
In a second aspect, the present application further provides a driving device compatible with a serial port communication module, where the device includes:
the target identification detection module is used for detecting whether a target identification exists in the non-erasable partition before the target virtual machine is started;
the target identifier generating module is used for reading version information of the current serial port module under the condition that the target identifier does not exist, generating the target identifier based on the version information, determining the hardware configuration information from a preset database based on the target identifier, and determining a corresponding serial port module driver based on the hardware configuration information;
the serial port module driving determining module is used for determining hardware configuration information of the current serial port module and serial port module driving based on the target identifier under the condition that the target identifier exists;
and the target virtual machine starting module is used for determining a matched interface based on the target identification, the hardware configuration information and the serial port module driver and starting the target virtual machine.
In a third aspect, the present application also provides a computer device comprising a memory and a processor; the memory is used for storing a computer program; the processor is configured to execute the computer program and implement the driving method of the compatible serial communication module when executing the computer program.
In a fourth aspect, the present application further provides a computer readable storage medium, where a computer program is stored, where the computer program when executed by a processor causes the processor to implement a method for driving a serial port communication module as described above.
The application discloses a driving method, a device, equipment and a storage medium of a compatible serial communication module, wherein the driving method of the compatible serial communication module comprises the steps of detecting whether a target mark exists in an unerased partition before a target virtual machine is started; under the condition that the target identifier does not exist, reading version information of a current serial port module, generating the target identifier based on the version information, determining the hardware configuration information from a preset database based on the target identifier, and determining a corresponding serial port module driver based on the hardware configuration information; determining hardware configuration information of the current serial port module and serial port module driving based on the target identifier when the target identifier exists; and determining a matched interface based on the target identification, the hardware configuration information and the serial port module driver, and starting the target virtual machine. By means of the method, the target mark is generated through the version information under the condition that the target mark does not exist in the non-erasable partition, the hardware configuration information is determined from an external preset database through the target mark, and then the serial port module driver is determined; under the condition that the target identifier exists in the non-erasable partition, the hardware configuration information and the serial port module drive are directly called according to the target identifier, the matched interface is finally determined according to the target identifier, the hardware configuration information and the serial port module drive, and the target virtual machine is started, so that compatibility among different serial port modules is realized, and compatibility among different serial port communication modules in the hardware platform is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic flow chart of a driving method of a compatible serial communication module according to a first embodiment of the present application;
fig. 2 is a schematic flow chart of a driving method of a compatible serial communication module according to a second embodiment of the present application;
FIG. 3 is a schematic block diagram of a driving device compatible with a serial communication module according to an embodiment of the present application;
fig. 4 is a schematic block diagram of a computer device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
The flow diagrams depicted in the figures are merely illustrative and not necessarily all of the elements and operations/steps are included or performed in the order described. For example, some operations/steps may be further divided, combined, or partially combined, so that the order of actual execution may be changed according to actual situations.
It is to be understood that the terminology used in the description of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should also be understood that the term "and/or" as used in this specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations.
The embodiment of the application provides a driving method, a device, equipment and a storage medium of a compatible serial communication module. The method for driving the compatible serial port communication module can be applied to a server, and generates a target identifier through version information under the condition that the target identifier does not exist in the non-erasable partition, and determines hardware configuration information from an external preset database through the target identifier, so as to determine serial port module driving; under the condition that the target identifier exists in the non-erasable partition, the hardware configuration information and the serial port module drive are directly called according to the target identifier, the matched interface is finally determined according to the target identifier, the hardware configuration information and the serial port module drive, and the target virtual machine is started, so that compatibility among different serial port modules is realized, and compatibility among different serial port communication modules in the hardware platform is improved. The server may be an independent server or a server cluster.
Some embodiments of the present application are described in detail below with reference to the accompanying drawings. The following embodiments and features of the embodiments may be combined with each other without conflict.
Referring to fig. 1, fig. 1 is a schematic flow chart of a driving method of a compatible serial communication module according to a first embodiment of the present application. The driving method of the compatible serial port communication module can be applied to a server, and is used for generating a target identifier through version information under the condition that the target identifier does not exist in the non-erasable partition, determining hardware configuration information from an external preset database through the target identifier, and further determining serial port module driving; under the condition that the target identifier exists in the non-erasable partition, the hardware configuration information and the serial port module drive are directly called according to the target identifier, the matched interface is finally determined according to the target identifier, the hardware configuration information and the serial port module drive, and the target virtual machine is started, so that compatibility among different serial port modules is realized, and compatibility among different serial port communication modules in the hardware platform is improved.
As shown in fig. 1, the driving method of the compatible serial communication module specifically includes steps S10 to S40.
Step S10, before starting a target virtual machine, detecting whether a target identifier exists in an erasable partition;
step S20, under the condition that the target identifier does not exist, reading version information of a current serial port module, generating the target identifier based on the version information, determining the hardware configuration information from a preset database based on the target identifier, and determining a corresponding serial port module driver based on the hardware configuration information;
step S30, determining hardware configuration information of the current serial port module and serial port module driving based on the target identifier under the condition that the target identifier exists;
and step S40, determining a matched interface based on the target identification, the hardware configuration information and the serial port module driver, and starting the target virtual machine.
In one embodiment, according to the version information of the serial port module of the identification record, which item the hardware product belongs to is confirmed, and the corresponding library, system resource, application program and the like are loaded. And writing the result of the serial port module identification and version information into an erasable partition of the platform to realize permanent recording. The factory setting is restored or the preset starting service of the machine is refreshed, version information of the serial port module is not required to be queried again, information is read from the non-erasable partition to be configured, and the possibility of error in switching of the version information is prevented.
In one embodiment, the hardware configuration information is pre-stored in a pre-set database external to the target virtual machine, and the version information is pre-stored in a non-erasable partition internal to the target virtual machine. In popular terms, when the target identifier does not exist in the non-erasable partition, the target identifier needs to be generated according to the version information, and corresponding hardware configuration information is matched from a preset database outside the target virtual machine according to the target identifier, so that the serial port module driver is determined.
Correspondingly, under the condition that the target identifier exists in the non-erasable partition, corresponding hardware configuration information and serial port module drive are directly obtained according to the target identifier.
In one embodiment, the companion interface includes display resources such as on-off animations, wallpaper, and the like.
The embodiment discloses a driving method, a device, equipment and a storage medium of a compatible serial communication module, wherein the driving method of the compatible serial communication module comprises the steps of detecting whether a target identifier exists in a non-erasable partition before a target virtual machine is started; under the condition that the target identifier does not exist, reading version information of a current serial port module, generating the target identifier based on the version information, determining the hardware configuration information from a preset database based on the target identifier, and determining a corresponding serial port module driver based on the hardware configuration information; determining hardware configuration information of the current serial port module and serial port module driving based on the target identifier when the target identifier exists; and determining a matched interface based on the target identification, the hardware configuration information and the serial port module driver, and starting the target virtual machine. By means of the method, the target mark is generated through the version information under the condition that the target mark does not exist in the non-erasable partition, the hardware configuration information is determined from an external preset database through the target mark, and then the serial port module driver is determined; under the condition that the target identifier exists in the non-erasable partition, the hardware configuration information and the serial port module drive are directly called according to the target identifier, the matched interface is finally determined according to the target identifier, the hardware configuration information and the serial port module drive, and the target virtual machine is started, so that compatibility among different serial port modules is realized, and compatibility among different serial port communication modules in the hardware platform is improved.
Referring to fig. 2, fig. 2 is a schematic flow chart of a driving method of a compatible serial communication module according to a second embodiment of the present application. The driving method of the compatible serial port communication module can be applied to a server, and is used for generating a target identifier through version information under the condition that the target identifier does not exist in the non-erasable partition, determining hardware configuration information from an external preset database through the target identifier, and further determining serial port module driving; under the condition that the target identifier exists in the non-erasable partition, the hardware configuration information and the serial port module drive are directly called according to the target identifier, the matched interface is finally determined according to the target identifier, the hardware configuration information and the serial port module drive, and the target virtual machine is started, so that compatibility among different serial port modules is realized, and compatibility among different serial port communication modules in the hardware platform is improved.
Based on the embodiment shown in fig. 1, in this embodiment, as shown in fig. 2, step S30 includes steps S301 to S302.
Step 301, determining the version information corresponding to the current serial port module in the target virtual machine based on a first binding relationship and the target identifier, wherein the first binding relationship is a binding relationship between the target identifier and the version information in the target virtual machine;
in one embodiment, hardware configuration information that needs to be configured by different hardware devices is preset, including but not limited to parameter attribute information, display resources (on/off animation, wallpaper, etc.), an application configuration list, and a loading path.
In one embodiment, the information of all serial port modules mounted on the hardware platform is enumerated, the version information of the serial port modules is queried by sending an instruction through serial port communication, and the version information of the serial port modules is recorded for subsequent use.
And step S302, determining the hardware configuration information and serial port module driving based on the version information.
In one embodiment, the default parameters of the software configuration are modified by matching parameter information to be displayed and loading preset resources according to the queried module version information at different stages of the system. And using the number to customize the parameter information of the hardware equipment, burning the number in the non-erasable partition, storing the parameter information in an external database, and directly reading the parameter information from the external database based on the number information during subsequent configuration.
The embodiment discloses a driving method, a device, equipment and a storage medium of a compatible serial port communication module, wherein the driving method of the compatible serial port communication module comprises the steps of determining version information corresponding to a current serial port module in a target virtual machine based on a first binding relation and a target identifier, wherein the first binding relation is a binding relation between the target identifier and the version information in the target virtual machine; and determining the hardware configuration information and serial port module driving based on the version information. By means of the method, the target mark is generated through the version information under the condition that the target mark does not exist in the non-erasable partition, the hardware configuration information is determined from an external preset database through the target mark, and then the serial port module driver is determined; under the condition that the target identifier exists in the non-erasable partition, the hardware configuration information and the serial port module drive are directly called according to the target identifier, the matched interface is finally determined according to the target identifier, the hardware configuration information and the serial port module drive, and the target virtual machine is started, so that compatibility among different serial port modules is realized, and compatibility among different serial port communication modules in the hardware platform is improved.
Based on the embodiment shown in fig. 1, in this embodiment, step S20 includes:
reading the version information to generate the target identifier;
and determining the hardware configuration information and the serial port module driver from the preset database based on a second binding relationship and the target identifier, wherein the second binding relationship is a binding relationship between the target identifier and the hardware configuration information, and the preset database is an external database of the target virtual machine.
Further, reading the version information to generate the target identifier, including:
performing serial port module detection on the current serial port module to write a firmware version query instruction into the current serial port module;
the target flag is determined based on the firmware query instruction.
Further, performing serial port module detection on the current serial port module to write a firmware version query instruction into the current serial port module, including:
calling the current serial port module through a preset ioctl function, and providing power supply and enabling for the current serial port module;
and establishing serial communication of the current serial module after power supply and enabling, and writing the firmware version query instruction based on the serial communication.
In one embodiment, the ioctl (input/output control) function is a device control interface function in the device driver, and is dedicated to a system call of a device input/output operation, the call is input into a request code related to the device, and the function of the system call depends entirely on the request code. A character device driver typically performs functions such as device opening, closing, reading, writing, etc., and in some situations where subdivision is required, if a new function needs to be extended, it is typically implemented by adding an ioctl () command.
Further, determining a corresponding serial port module driver based on the hardware configuration information includes:
and assigning the hardware configuration information to the firmware version query instruction, and determining the serial port module driver.
Based on the embodiment shown in fig. 1, in this embodiment, step S20 includes:
and storing the target identifier to the non-erasable partition for calling the target identifier before starting other virtual machines.
In one embodiment, when target identification detection is performed on the non-erasable partition before the target virtual machine is started, if the target identification does not exist in the non-erasable partition, version information is acquired, and the target identification is generated according to the version information.
In order to facilitate the subsequent virtual machine starting, after the target identifier is generated, the target identifier is stored in the non-erasable partition, and the subsequent virtual machine is restarted, the target identifier is detected by the subsequent virtual machine in the process of detecting the target identifier, so that the target identifier is detected in the non-erasable partition, and the hardware configuration information and the serial port module driving can be directly called from an external preset database and started.
In one embodiment, in combination with the foregoing embodiments, a driving method of a compatible serial communication module provided in the present application is illustrated as follows.
Taking two serial port modules as an example, when needing to be described, the configuration A and the configuration B have the same functions and configurations except the following distinguishing points.
Configuration a: model M100E, through serial port plug-in common precision Beidou positioning module, uses configuration interface A
Configuration B: model M100CE, through the external high accuracy RTK positioning module of serial ports, use RTK difference location APP, use configuration interface B.
Presetting in system software of a hardware platform:
two hardware configuration models: M100E, M CE;
pre-loading gps.att6558 r.so and gps.cm260r.so (driving configuration a and configuration B, respectively);
preassembled RTK differential positioning APP: rtkService;
preassembling two sets of wallpaper: a configuration interface A and a configuration interface B;
1) Boot detection stage
When the device is started, firstly, a flag bit persistent.hardware.rtk.lib is detected from the non-erasable partition, if the flag does not exist, the device is started for the first time, a serial port module detection flow is entered, power supply and enabling of the serial port module are called through an ioctl function, serial port communication is established, and a firmware version inquiry instruction is written into the serial port module: "$PDTINFO", a fixed string is matched within the received serial data: if the version number is AT6558R-5N-32-1C580901, the Beidou positioning module representing the common progress belongs to configuration A, and a flag bit persist, hardware, rtk, lib=at 6558R is set; if the version number is: CM260R R2001, then, represents that the high precision RTK positioning module belongs to configuration B, setting flag bit susist. And then, the power supply and the enabling of the serial port module are closed, the flag bit is stored in an erasable partition of the system, and the programming and the recovery of the factory setting cannot be erased.
If the detection flag bit is already present during starting, no action is needed to be performed, and the starting process is continued.
2) Configuration model
Then the system continues to start, and some logic is added before the target virtual machine starts, at this time, the detection of the serial device has been completed, so the flag bit is directly judged here, and if a is configured for susist.hardware.rtk.lib=at 6558r, the attribute related to the system model is configured as M100E:
ro.product.model=M100E;
ro.product.name=M100E;
ro.product.device=M100E;
if B is configured for susst.hardware.rtk.lib=cm260 r, the system model related attribute is configured as M100CE
ro.product.model=M100CE;
ro.product.name=M100CE;
ro.product.device=M100CE;
These model attributes are used by the target virtual machine once it is started, and are configured before the target virtual machine is started.
3) Drive for loading different positioning modules
When gnsslocalprovider starts up, it goes to find the GPS driver (GPS. So by default) and loads it, and all functions of GPS are completed by calling functions in the driver. Adding compatible logic at lookup: judging a flag bit, and loading gps.at6558r.so if the flag bit is the configuration A of susist.hardware.rtk.lib=at 6558r; if the configuration B is the persist.hardware.rtk.lib=cm260 r, the gps.cm260r.so is loaded, and the driving compatible with the two positioning modules is completed.
4) Differential positioning APP
When the packageManager starts and scans all the APP of the system, adding compatible logic, if the system A is configured for susist. Hardware. Rtk. Lib=at 6558r, the RtkService needs to be skipped, so that the machine configured with the system A does not display RtkService after the system is started; if configuration B is susst.hardware.rtk.lib=cm260 r, rtkService is scanned according to native logic, and the machine of configuration B may display RtkService and use after power-on.
5) Configuration interface
The configuration interface may be understood as wallpaper or display animation that, when the wallpaperPicker is started, starts according to native logic if the user has set wallpaper by himself. If the wallpaper is not set, starting a compatible logic detection flag bit, and if the wallpaper is the configuration A, setting a matched configuration interface A; if configuration B is susst.hardware.rtk.lib=cm260 r, then a matching configuration interface B is set.
Through the starting-up process, after the system is started up and enters a desktop menu, the function that the same version of system software is compatible with two sets of configuration is realized.
Referring to fig. 3, fig. 3 is a schematic block diagram of a driving device of a compatible serial communication module according to an embodiment of the present application, where the driving device of the compatible serial communication module is used for executing the driving method of the compatible serial communication module. The driving device compatible with the serial communication module can be configured on the server.
As shown in fig. 3, the driving device of the compatible serial communication module includes:
the target identifier detection module 410 is configured to detect whether a target identifier exists in the non-erasable partition before the target virtual machine is started;
the target identifier generating module 420 is configured to read version information of a current serial port module, generate the target identifier based on the version information, determine the hardware configuration information from a preset database based on the target identifier, and determine a corresponding serial port module driver based on the hardware configuration information when the target identifier does not exist;
a serial port module driver determining module 430, configured to determine, in the case where the target identifier exists, hardware configuration information of the current serial port module and a serial port module driver based on the target identifier;
and a target virtual machine starting module 440, configured to determine a mating interface based on the target identifier, the hardware configuration information, and the serial module driver, and start the target virtual machine.
Further, the serial port module driving determining module 430 includes:
the version information determining module is used for determining the version information corresponding to the current serial port module in the target virtual machine based on a first binding relation and the target identifier, wherein the first binding relation is a binding relation between the target identifier in the target virtual machine and the version information;
and the serial port module driving determining module is used for determining the hardware configuration information and the serial port module driving based on the version information.
Further, the target identifier generating module 420 includes:
the target identifier generation module is used for reading the version information and generating the target identifier;
the preset database module is used for determining the hardware configuration information and the serial port module drive from the preset database based on a second binding relation and the target identifier, wherein the second binding relation is the binding relation between the target identifier and the hardware configuration information, and the preset database is an external database of the target virtual machine.
Further, the target identifier generating module includes:
the firmware version inquiry instruction writing sub-module is used for carrying out serial port module detection on the current serial port module so as to write the firmware version inquiry instruction into the current serial port module;
and the query sub-module is used for determining the target mark based on the firmware query instruction.
Further, the firmware version query instruction writing submodule includes:
the ioct l function calling subunit is used for calling the current serial port module through a preset ioct l function and providing power supply and enabling for the current serial port module;
and the firmware version inquiry instruction writing unit is used for establishing serial communication of the current serial module after power supply and enabling, and writing the firmware version inquiry instruction based on the serial communication.
Further, the serial port module drives the determining module 430, including:
and the serial port module driving determination submodule is used for assigning the hardware configuration information to the firmware version query instruction and determining the serial port module driving.
Further, the driving device compatible with the serial port communication module further comprises:
and the target identifier storage module is used for storing the target identifier to the non-erasable partition so as to call the target identifier before starting other virtual machines.
It should be noted that, for convenience and brevity of description, the specific working process of the apparatus and each module described above may refer to the corresponding process in the foregoing method embodiment, which is not described herein again.
The apparatus described above may be implemented in the form of a computer program which is executable on a computer device as shown in fig. 4.
Referring to fig. 4, fig. 4 is a schematic block diagram of a computer device according to an embodiment of the present application. The computer device may be a server.
With reference to FIG. 4, the computer device includes a processor, memory, and a network interface connected by a system bus, where the memory may include a non-volatile storage medium and an internal memory.
The non-volatile storage medium may store an operating system and a computer program. The computer program comprises program instructions which, when executed, cause the processor to execute any one of the serial communication module compatible driving methods.
The processor is used to provide computing and control capabilities to support the operation of the entire computer device.
The internal memory provides an environment for the execution of a computer program in the non-volatile storage medium, which when executed by the processor, causes the processor to perform any one of the serial communication module compatible drive methods.
The network interface is used for network communication such as transmitting assigned tasks and the like. Those skilled in the art will appreciate that the structures shown in FIG. 4 are block diagrams only and do not constitute a limitation of the computer device on which the present aspects apply, and that a particular computer device may include more or less components than those shown, or may combine some of the components, or have a different arrangement of components.
It should be appreciated that the processor may be a central processing unit (Central Processing Unit, CPU), but may also be other general purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field-programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. Wherein the general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
Wherein in one embodiment the processor is configured to run a computer program stored in the memory to implement the steps of:
before starting a target virtual machine, detecting whether a target identifier exists in the non-erasable partition;
under the condition that the target identifier does not exist, reading version information of a current serial port module, generating the target identifier based on the version information, determining the hardware configuration information from a preset database based on the target identifier, and determining a corresponding serial port module driver based on the hardware configuration information;
determining hardware configuration information of the current serial port module and serial port module driving based on the target identifier when the target identifier exists;
and determining a matched interface based on the target identification, the hardware configuration information and the serial port module driver, and starting the target virtual machine.
In one embodiment, in the case that the target identifier exists, determining hardware configuration information of the current serial port module and serial port module driving based on the target identifier is used for realizing:
determining the version information corresponding to the current serial port module in the target virtual machine based on a first binding relationship and the target identifier, wherein the first binding relationship is a binding relationship between the target identifier and the version information in the target virtual machine;
and determining the hardware configuration information and serial port module driving based on the version information.
In one embodiment, in the absence of the target identifier, version information of a current serial port module is read, the target identifier is generated based on the version information, the hardware configuration information is determined from a preset database based on the target identifier, and a corresponding serial port module driver is determined based on the hardware configuration information, so as to realize:
reading the version information to generate the target identifier;
and determining the hardware configuration information and the serial port module driver from the preset database based on a second binding relationship and the target identifier, wherein the second binding relationship is a binding relationship between the target identifier and the hardware configuration information, and the preset database is an external database of the target virtual machine.
In one embodiment, the version information is read, and the target identifier is generated for implementation:
performing serial port module detection on the current serial port module to write a firmware version query instruction into the current serial port module;
the target flag is determined based on the firmware query instruction.
In one embodiment, the current serial port module is subjected to serial port module detection to write a firmware version query instruction into the current serial port module, so as to realize:
calling the current serial port module through a preset ioctl function, and providing power supply and enabling for the current serial port module;
and establishing serial communication of the current serial module after power supply and enabling, and writing the firmware version query instruction based on the serial communication.
In one embodiment, determining a corresponding serial port module driver based on the hardware configuration information is used to implement:
and assigning the hardware configuration information to the firmware version query instruction, and determining the serial port module driver.
In one embodiment, in the absence of the target identifier, version information of a current serial port module is read, the target identifier is generated based on the version information, the hardware configuration information is determined from a preset database based on the target identifier, and after the corresponding serial port module driver is determined based on the hardware configuration information, the method is used for realizing:
and storing the target identifier to the non-erasable partition for calling the target identifier before starting other virtual machines.
The embodiment of the application also provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, the computer program comprises program instructions, and the processor executes the program instructions to realize the driving method of any serial port compatible communication module provided by the embodiment of the application.
The computer readable storage medium may be an internal storage unit of the computer device according to the foregoing embodiment, for example, a hard disk or a memory of the computer device. The computer readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), or the like, which are provided on the computer device.
While the invention has been described with reference to certain preferred embodiments, it will be understood by those skilled in the art that various changes and substitutions of equivalents may be made and equivalents will be apparent to those skilled in the art without departing from the scope of the invention. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. The driving method of the compatible serial port communication module is characterized by comprising the following steps of:
before starting a target virtual machine, detecting whether a target identifier exists in the non-erasable partition;
under the condition that the target identifier does not exist, reading version information of a current serial port module, generating the target identifier based on the version information, determining the hardware configuration information from a preset database based on the target identifier, and determining a corresponding serial port module driver based on the hardware configuration information;
determining hardware configuration information of the current serial port module and serial port module driving based on the target identifier when the target identifier exists;
and determining a matched interface based on the target identification, the hardware configuration information and the serial port module driver, and starting the target virtual machine.
2. The method for driving a compatible serial port communication module according to claim 1, wherein determining hardware configuration information of the current serial port module and serial port module driving based on the target identifier in the case that the target identifier exists comprises:
determining the version information corresponding to the current serial port module in the target virtual machine based on a first binding relationship and the target identifier, wherein the first binding relationship is a binding relationship between the target identifier and the version information in the target virtual machine;
and determining the hardware configuration information and serial port module driving based on the version information.
3. The method for driving a compatible serial port communication module according to claim 1, wherein, in the case that the target identifier does not exist, reading version information of a current serial port module, generating the target identifier based on the version information, determining the hardware configuration information from a preset database based on the target identifier, and determining a corresponding serial port module driver based on the hardware configuration information, includes:
reading the version information to generate the target identifier;
and determining the hardware configuration information and the serial port module driver from the preset database based on a second binding relationship and the target identifier, wherein the second binding relationship is a binding relationship between the target identifier and the hardware configuration information, and the preset database is an external database of the target virtual machine.
4. The method for driving a compatible serial communication module according to claim 3, wherein the reading the version information to generate the target identifier comprises:
performing serial port module detection on the current serial port module to write a firmware version query instruction into the current serial port module;
the target flag is determined based on the firmware query instruction.
5. The method for driving a compatible serial port communication module according to claim 4, wherein the performing serial port module detection on the current serial port module to write a firmware version query instruction into the current serial port module includes:
calling the current serial port module through a preset ioctl function, and providing power supply and enabling for the current serial port module;
and establishing serial communication of the current serial module after power supply and enabling, and writing the firmware version query instruction based on the serial communication.
6. The method for driving a compatible serial port communication module according to claim 5, wherein determining a corresponding serial port module driver based on the hardware configuration information comprises:
and assigning the hardware configuration information to the firmware version query instruction, and determining the serial port module driver.
7. The method for driving a compatible serial port communication module according to any one of claims 1 to 6, wherein, in the case where the target identifier does not exist, reading version information of a current serial port module, generating the target identifier based on the version information, determining the hardware configuration information from a preset database based on the target identifier, and determining that a corresponding serial port module is driven based on the hardware configuration information, includes:
and storing the target identifier to the non-erasable partition for calling the target identifier before starting other virtual machines.
8. A drive device compatible with a serial communication module, comprising:
the target identification detection module is used for detecting whether a target identification exists in the non-erasable partition before the target virtual machine is started;
the target identifier generating module is used for reading version information of the current serial port module under the condition that the target identifier does not exist, generating the target identifier based on the version information, determining the hardware configuration information from a preset database based on the target identifier, and determining a corresponding serial port module driver based on the hardware configuration information;
the serial port module driving determining module is used for determining hardware configuration information of the current serial port module and serial port module driving based on the target identifier under the condition that the target identifier exists;
and the target virtual machine starting module is used for determining a matched interface based on the target identification, the hardware configuration information and the serial port module driver and starting the target virtual machine.
9. A computer device, the computer device comprising a memory and a processor;
the memory is used for storing a computer program;
the processor is configured to execute the computer program and implement the driving method of the compatible serial communication module according to any one of claims 1 to 7 when the computer program is executed.
10. A computer-readable storage medium storing a computer program which, when executed by a processor, causes the processor to implement the method of driving a compatible serial communication module according to any one of claims 1 to 7.
CN202410070111.3A 2024-01-17 2024-01-17 Driving method, device, equipment and storage medium compatible with serial communication module Pending CN117891766A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410070111.3A CN117891766A (en) 2024-01-17 2024-01-17 Driving method, device, equipment and storage medium compatible with serial communication module

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410070111.3A CN117891766A (en) 2024-01-17 2024-01-17 Driving method, device, equipment and storage medium compatible with serial communication module

Publications (1)

Publication Number Publication Date
CN117891766A true CN117891766A (en) 2024-04-16

Family

ID=90644070

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410070111.3A Pending CN117891766A (en) 2024-01-17 2024-01-17 Driving method, device, equipment and storage medium compatible with serial communication module

Country Status (1)

Country Link
CN (1) CN117891766A (en)

Similar Documents

Publication Publication Date Title
TWI581188B (en) The way to load the driver and the embedded device
CN109947482B (en) Loading method of USB (universal serial bus) equipment, storage medium and smart television
CN107704282B (en) Loading method and device applied to embedded system
CN109408122B (en) Equipment starting method, electronic equipment and computer storage medium
WO2014200511A1 (en) Unified extensible firmware interface (uefi) driver and protocol
US9513889B2 (en) System and method of automating installation of applications
CN106909362A (en) The method and apparatus that the method and apparatus of BMC firmwares generation, BMC systems start
CN111638916B (en) General android mobile terminal driving system and method for data forensics
CN109002331A (en) Starting method and device of touch screen, computer equipment and storage medium
CN105117250A (en) Compatibility processing method and electronic device
US11526363B2 (en) Electronic apparatus and control method thereof
CN113448643A (en) Configuration data management system and method
CN117008934A (en) Method, device, equipment and medium for automatically making mirror image of information creation operating system
CN117407065A (en) Network card pre-start control method, device, equipment, system and storage medium
CN109710292B (en) Mobile terminal machine brushing control processing method, mobile terminal and storage medium
CN117891766A (en) Driving method, device, equipment and storage medium compatible with serial communication module
CN115827347A (en) Control method of embedded equipment and embedded equipment
CN116737472A (en) Method and device for testing memory time sequence training process
CN115357355A (en) Method, device and equipment for software cross-system migration and readable storage medium
CN114911541A (en) Configuration information processing method and device, electronic equipment and storage medium
CN110989876B (en) Application program adaptation method, mobile terminal and storage medium
CN108052337A (en) A kind of firmware upgrade method and device of eMMC production tools
CN113934463A (en) Starting method and device of server, computer equipment and storage medium
KR101473633B1 (en) Control device
CN111722880A (en) Equipment production method, device, terminal equipment and 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