CN113904945A - Internet of things equipment simulation debugging method and device, electronic device and storage medium - Google Patents

Internet of things equipment simulation debugging method and device, electronic device and storage medium Download PDF

Info

Publication number
CN113904945A
CN113904945A CN202111203727.6A CN202111203727A CN113904945A CN 113904945 A CN113904945 A CN 113904945A CN 202111203727 A CN202111203727 A CN 202111203727A CN 113904945 A CN113904945 A CN 113904945A
Authority
CN
China
Prior art keywords
simulation
firmware
internet
equipment
things
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.)
Granted
Application number
CN202111203727.6A
Other languages
Chinese (zh)
Other versions
CN113904945B (en
Inventor
陈焕
信心
范渊
吴卓群
王欣
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
DBAPPSecurity Co Ltd
Original Assignee
DBAPPSecurity 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 DBAPPSecurity Co Ltd filed Critical DBAPPSecurity Co Ltd
Priority to CN202111203727.6A priority Critical patent/CN113904945B/en
Publication of CN113904945A publication Critical patent/CN113904945A/en
Application granted granted Critical
Publication of CN113904945B publication Critical patent/CN113904945B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/14Network analysis or design
    • H04L41/145Network analysis or design involving simulating, designing, planning or modelling of a network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application relates to a simulation debugging method and device for equipment of the Internet of things, an electronic device and a storage medium, wherein the simulation debugging method for the equipment of the Internet of things comprises the following steps: acquiring equipment information of the equipment of the Internet of things; constructing a firmware driving function according to the equipment information; performing access operation on the bare data file according to the firmware driving function to generate simulation equipment; and debugging the simulation equipment to obtain a debugging result. Through the application, the problem of inconvenience in function debugging of the Internet of things equipment is solved, the Internet of things equipment does not need to be supported and configured fussy, the purpose of simulating any Internet of things equipment by software is achieved, the debugging cost of the Internet of things equipment is reduced, the hardware driving development requirement is reduced, and the debugging efficiency is improved.

Description

Internet of things equipment simulation debugging method and device, electronic device and storage medium
Technical Field
The application relates to the technical field of Internet of things equipment, in particular to a simulation debugging method and device for the Internet of things equipment, an electronic device and a storage medium.
Background
The firmware is an important component in an internet of things device architecture, specifically, a device "driver" stored in the device, and through the firmware, an operating system can realize the operation action of a specific machine according to a standard device driver.
The technology of the internet of things plays an increasingly important role in daily life, and in recent years, the concepts of all businesses in the internet of things are developed vigorously, but the security of the embedded system software of the equipment of the internet of things is not optimistic. With the rapid development of the internet of things and the falling of related laws and standards of the safety of the internet of things, the internet of things equipment has attracted high attention as the weakest link of safety. The firmware is an important component in an internet of things device architecture, specifically, a device "driver" stored in the device, and through the firmware, an operating system can realize the operation action of a specific machine according to a standard device driver.
Under the scene of analyzing the internet of things equipment, the internet of things equipment needs to be debugged on line, even special driving development needs to be carried out on specific equipment, and unnecessary workload is increased. In the firmware simulation process, a firmadyne tool is used in many cases, and firmadyne is a linux embedded firmware simulation platform based on a qemu system simulator, has very limited supported firmware types, has poor simulation effect, and is not friendly to the development of researchers. If a real internet of things device is used, in some firmware debugging processes, problems such as that passwords cannot be bypassed exist. The existing firmware debugging or Internet of things equipment debugging means has the defects of high hardware cost, large driving and developing workload, inconvenient debugging and incompleteness of hardware type support of the existing simulation.
Aiming at the problem that the function debugging of the Internet of things equipment is inconvenient in the related technology, no effective solution is provided at present.
Disclosure of Invention
The embodiment provides a simulation debugging method and device for equipment of the internet of things, an electronic device and a storage medium, so as to solve the problem that the function debugging of the equipment of the internet of things is inconvenient in the related technology.
In a first aspect, in this embodiment, a simulation debugging method for an internet of things device is provided, including:
acquiring equipment information of the equipment of the Internet of things;
constructing a firmware driving function according to the equipment information;
performing access operation on the bare data file according to the firmware driving function to generate simulation equipment;
and debugging the simulation equipment to obtain a debugging result.
In some of these embodiments, constructing the firmware driver function based on the device information includes:
extracting firmware parameters in the equipment information;
and constructing a firmware driving function according to the firmware parameters.
In some of these embodiments, constructing the firmware driver function according to the firmware parameters includes:
identifying a parameter class in the firmware parameters;
and acquiring an access method of a specific firmware type by using a preset function library, and constructing a firmware drive function.
In some embodiments, the performing an access operation on a bare data file according to the firmware driver function, and generating a simulation device includes:
performing access operation on the bare data file according to the firmware driving function;
and mounting the bare data file on a directory in the UML simulation environment, running firmware in the simulation environment, and generating a firmware driver of the simulation equipment.
In some of these embodiments, the identifying a class of parameters in the firmware parameters comprises:
wherein the parameter categories include: at least one of memory parameters, a file system, binary files and firmware partition information;
and building a UML simulation environment, and transmitting the parameter types into the UML simulation environment.
In some embodiments, the accessing method for obtaining a specific firmware type by using a preset function library includes:
and simulating the access operation of the equipment node to the hardware Flash chip by using the reading and address offset positioning functions in the function library to construct a firmware driving function.
In some embodiments, the performing an access operation on a bare data file according to the firmware driver function, and generating a simulation device includes:
generating a uniform interface of a bare data file through a virtual file system;
and performing access operation on the bare data file through a uniform interface according to the firmware driving function to generate simulation equipment.
In a second aspect, in this embodiment, an internet of things device simulation debugging apparatus is provided, including:
the acquisition module is used for acquiring equipment information of the Internet of things equipment;
the construction module is used for constructing a firmware driving function according to the equipment information;
the simulation module is used for performing access operation on the bare data file according to the firmware driving function to generate simulation equipment;
and the debugging module is used for debugging the simulation equipment to obtain a debugging result.
In a third aspect, in this embodiment, an electronic apparatus is provided, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the method for simulating and debugging the device of the internet of things according to the first aspect is implemented.
In a fourth aspect, in this embodiment, a storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the method for simulating and debugging the device in the internet of things according to the first aspect is implemented.
Compared with the prior art, the simulation debugging method, the simulation debugging device, the electronic device and the storage medium for the equipment of the internet of things provided in the embodiment have the advantages that the firmware driving function is constructed to directly access the firmware and the bare data file of the equipment of the internet of things through the equipment information of the equipment of the internet of things, the problem of inconvenience in function debugging of the equipment of the internet of things is solved, support and complex configuration for the equipment of the internet of things are not needed, the simulation of any equipment of the internet of things through software is realized, the debugging cost of the equipment of the internet of things is reduced, the hardware driving development requirement is reduced, and the debugging efficiency is improved.
The details of one or more embodiments of the application are set forth in the accompanying drawings and the description below to provide a more thorough understanding of the application.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
fig. 1 is a block diagram of a hardware structure of a terminal of an internet of things device simulation debugging method according to the embodiment;
FIG. 2 is a flow chart of a related art device for simulating a Linux kernel read-write hardware of an Internet of things;
fig. 3 is a read-write flow chart of the simulation debugging method for the internet of things device in the embodiment.
Fig. 4 is a framework diagram of the simulation debugging method for the internet of things device according to the embodiment;
fig. 5 is a flowchart of a simulation debugging method for the internet of things device according to the embodiment;
fig. 6 is a storage device simulation flow chart of the simulation debugging method for the internet of things device according to the embodiment;
fig. 7 is a block diagram of a simulation debugging apparatus for an internet of things device according to the present embodiment.
Detailed Description
For a clearer understanding of the objects, aspects and advantages of the present application, reference is made to the following description and accompanying drawings.
Unless defined otherwise, technical or scientific terms used herein shall have the same general meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The use of the terms "a" and "an" and "the" and similar referents in the context of this application do not denote a limitation of quantity, either in the singular or the plural. The terms "comprises," "comprising," "has," "having," and any variations thereof, as referred to in this application, are intended to cover non-exclusive inclusions; for example, a process, method, and system, article, or apparatus that comprises a list of steps or modules (elements) is not limited to the listed steps or modules, but may include other steps or modules (elements) not listed or inherent to such process, method, article, or apparatus. Reference throughout this application to "connected," "coupled," and the like is not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. Reference to "a plurality" in this application means two or more. "and/or" describes an association relationship of associated objects, meaning that three relationships may exist, for example, "A and/or B" may mean: a exists alone, A and B exist simultaneously, and B exists alone. In general, the character "/" indicates a relationship in which the objects associated before and after are an "or". The terms "first," "second," "third," and the like in this application are used for distinguishing between similar items and not necessarily for describing a particular sequential or chronological order.
The method embodiments provided in the present embodiment may be executed in a terminal, a computer, or a similar computing device. For example, the method is executed on a terminal, and fig. 1 is a hardware structure block diagram of the terminal of the internet of things device simulation debugging method in this embodiment. As shown in fig. 1, the terminal may include one or more processors 102 (only one shown in fig. 1) and a memory 104 for storing data, wherein the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA. The terminal may also include a transmission device 106 for communication functions and an input-output device 108. It will be understood by those of ordinary skill in the art that the structure shown in fig. 1 is merely an illustration and is not intended to limit the structure of the terminal described above. For example, the terminal may also include more or fewer components than shown in FIG. 1, or have a different configuration than shown in FIG. 1.
The memory 104 may be used to store a computer program, for example, a software program and a module of application software, such as a computer program corresponding to the internet of things device simulation debugging method in the embodiment, and the processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, so as to implement the method described above. The memory 104 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory located remotely from the processor 102, which may be connected to the terminal over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 106 is used to receive or transmit data via a network. The network described above includes a wireless network provided by a communication provider of the terminal. In one example, the transmission device 106 includes a Network adapter (NIC) that can be connected to other Network devices through a base station to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is used to communicate with the internet in a wireless manner.
As shown in fig. 2, fig. 2 is a flow chart of hardware for simulating Linux kernel read-write of the internet of things device in the related art.
In the existing simulation mode of the internet of things equipment, developers need to have deep knowledge and development experience on protocols corresponding to all functions of the internet of things equipment in a linux kernel and hardware related layers, and a firmware driver is simulated to simulate the functions of the internet of things equipment. For example, in the read-write operation flow simulation of the nor flash storage device, developers need to deeply understand a user layer, device nodes, an internal data bus, a mapping relation and the like, configure a hardware time sequence and a hardware instruction, and realize codes when developing firmware drivers, and the process is very complicated.
As shown in fig. 3, fig. 3 is a read-write flow chart of the simulation debugging method for the internet of things device in this embodiment.
The invention realizes reading and writing functions based on the UML simulation method, and realizes the operations of address positioning, data reading and writing and the like by using the existing library function. For example, in the read-write function simulation of the internet of things device, a naked data file target and an address where data needs to be written are firstly transmitted into the UML simulation environment, the os _ seek _ file function is used for positioning, and then the read _ file/write _ file function is used for reading and writing contents and the content length, so that the read-write operation can be completed, the development requirement is greatly reduced, and various types of internet of things device hardware can be quickly adapted. It can be understood that the simulation can also be carried out in the way of the function simulation of the storage component, the function simulation of the communication component, the function simulation of the power supply component, the function simulation of the multimedia component, the function simulation of various sensor components and the function simulation of the air monitoring component of the equipment of the internet of things.
As shown in fig. 4, fig. 4 is a framework diagram of the simulation debugging method for the internet of things device in this embodiment.
According to the invention, UML (user mode Linux) and VFS (virtual File System) are started in Linux, firmware, equipment of the Internet of things and peripheral equipment are simulated by using the existing library function, the operations such as firmware modification can be realized, and all the equipment of the Internet of things based on Linux is compatible.
The UML is a short name of User Mode Linux, and as the name implies, the Linux system is operated as a User process. UML provides a convenient way for researching linux kernel codes, and the whole linux system is a user process completely and can be debugged like a common user process. The linux kernel refers to one of the ARCH (architecture) for different platforms, each ARCH realizes functions depending on a specific hardware platform, and the UML is realized as one ARCH, and hardware functions are simulated by software.
The VFS (virtual File System) is a virtual File System, and the VFS is used for reading and writing different File systems on different physical media by adopting standard Unix System calls, so that a uniform operating interface and an application programming interface are provided for various File systems. The VFS is a bond layer that allows system calls such as open (), read (), write (), and the like to operate without regard to the underlying storage medium and file system type.
Specifically, in the Linux system, the user mode Linux can be started in a user mode, and the Linux system can be started as a user process to debug and use the Linux kernel. The UML enables a virtual file system VFS that can provide a unified interface for file and file system operations for the user without regard to differences between different file systems or different media. In the UML simulation environment, the VFS simulates the operation of a bottom layer drive on hardware by calling an existing library function and constructing a specific function, so that the access operation of a bare data file is realized, further, the simulation of the whole hardware is realized, and all Linux-based Internet of things equipment is compatible. Such as functional simulation of a storage component, functional simulation of a communication component, functional simulation of a power supply component, functional simulation of a multimedia component, functional simulation of various sensor components, and functional simulation of an air monitoring component.
In this embodiment, an internet of things device simulation debugging method is provided, and fig. 5 is a flowchart of the internet of things device simulation debugging method in this embodiment, and as shown in fig. 5, the flowchart includes the following steps:
step S301, obtaining equipment information of the Internet of things equipment.
Step S302, according to the device information, a firmware driving function is constructed.
The equipment information comprises information such as firmware parameters and equipment names of the equipment of the Internet of things.
Specifically, firmware parameters in the device information are extracted; and constructing a firmware driving function according to the firmware parameters. More specifically, identifying a parameter class in the firmware parameters; and acquiring an access method of a specific firmware type by using a preset function library, and constructing a firmware drive function. Wherein the parameter categories include: at least one of memory parameters, file system, binary file, and firmware partition information. Further, a UML simulation environment is built, and the parameter types are transmitted into the UML simulation environment. Furthermore, the access operation of the equipment node to the hardware Flash chip is simulated by using the reading and address offset positioning functions in the function library, and the firmware driving function is constructed. It can be understood that the simulation of various functions of the internet of things equipment can be realized by constructing different firmware driving functions, such as the function simulation of a storage component, the function simulation of a communication component, the function simulation of a power supply component, the function simulation of a multimedia component, the function simulation of various sensor components and the function simulation of an air monitoring component.
In one embodiment, a user-mode Linux environment is simulated by starting a UML simulation environment in a Linux system, and information such as memory parameters, a file system, binary files, and firmware partition information is transmitted into the UML simulation environment through a command line. And (5) calling back to mtd _ info structure body by constructing a file reading-writing erasing function method, and initializing the file _ nor structure body.
Wherein the file _ nor structure comprises at least one of a nor _ params structure, an mtd _ info structure and a mtd _ partition structure.
The MTD emulated device is registered to the kernel in the UML emulation environment through MTD _ device _ register, and the firmware driver function is built using the read, address offset location function in the file.c function library. The firmware driving functions comprise functions of file _ nor _ read, file _ nor _ write, file _ nor _ erase, file _ nor _ resume and the like. The file _ nor _ read function is a read function and is used for reading data in the naked data file; the file _ nor _ write function is a write-in function and is used for writing data in the naked data file; the file _ nor _ erase function is an erase function and is used for erasing data in the bare data file; the file _ nor _ resume function is a write function used to restore data in the bare data file.
Step S303, access operation is carried out on the bare data file according to the firmware driving function, and simulation equipment is generated.
Specifically, the firmware driver function performs different operations on the bare data file, so as to simulate each function of the internet of things device and generate the simulation device.
The performing access operation on the bare data file according to the firmware driving function to generate the simulation device includes: generating a uniform interface of a bare data file through a virtual file system; and performing access operation on the bare data file through a uniform interface according to the firmware driving function to generate simulation equipment.
Specifically, the virtual file system provides a unified interface for bare data files for the UML simulation environment, and performs access operations such as reading, writing, erasing and the like on the bare data files by using the firmware driving function through the unified interface to generate a function of the simulation device.
Step S304, debugging the simulation equipment to obtain a debugging result.
Specifically, simulation of the internet of things equipment is achieved in the UML simulation environment, the simulation equipment can be debugged without networking, and a debugging result is obtained. Through the off-line debugging mode, the function of debugging the Internet of things equipment becomes more convenient. Furthermore, the method for simulating the Internet of things equipment to realize the deception attack attacks on the real Internet of things equipment and tests the vulnerability of the real Internet of things equipment.
Through the steps, the equipment information of the Internet of things equipment is acquired, the firmware driving function is constructed to directly access the firmware and the naked data file of the Internet of things equipment, the problem of inconvenience in function debugging of the Internet of things equipment is solved, the Internet of things equipment does not need to be supported and configured fussy, the purpose of simulating any Internet of things equipment by software is achieved, the debugging cost of the Internet of things equipment is reduced, the hardware driving development requirement is reduced, and the debugging efficiency is improved.
The present embodiment is described and illustrated below by means of preferred embodiments.
Fig. 6 is a storage device simulation flowchart of the internet of things device simulation debugging method in this embodiment, and as shown in fig. 6, the process includes the following steps:
in step S401, the UML is started, and a firmware driver function is constructed.
Specifically, memory parameters, a file system, a loading binary file and firmware partition information are imported into the UML simulation environment through a command line, and a firmware driver function constructed by a function in the existing libc function library is used for realizing the access operation of a bare data file.
Step S402, mounting the naked data file.
Specifically, the bare data file is mounted to an existing directory in the UML simulation environment, and the bare data file can be accessed through the firmware driver function after being mounted.
In step S403, a simulation device is generated.
Specifically, operations such as byte reading and writing, data erasing and the like are performed on the bare data file through the firmware driving function, so that the access process of the internet of things equipment to the hardware storage chip is simulated, and the simulation equipment is generated.
The method can also be used for simulating the functions of communication components, power supply components, multimedia components, various sensor components and air monitoring components. In the UML simulation environment, by constructing the corresponding firmware driver function, the device node in the UML simulation environment can simulate the corresponding function by running the corresponding firmware driver function.
The method can be suitable for all linux-based Internet of things equipment. For example, Video for Linux wo (Video4Linux2, abbreviated as V4L2) in the camera device, and V4L2 is a kernel driver related to the Video device in Linux, register configuration needs to be performed on the camera hardware device in the workflow, support and cumbersome configuration do not need to be performed on the hardware device, the hardware device is simulated in a software manner, and simulated Video frame data is output.
It should be noted that the steps illustrated in the above-described flow diagrams or in the flow diagrams of the figures may be performed in a computer system, such as a set of computer-executable instructions, and that, although a logical order is illustrated in the flow diagrams, in some cases, the steps illustrated or described may be performed in an order different than here.
For example, the bare data file is mounted, then a firmware driving function is constructed according to the device information, and the simulation of the internet of things device is realized according to the access operation of the firmware driving function on the bare data file.
The embodiment also provides an internet of things device simulation debugging device, which is used for implementing the above embodiments and preferred embodiments, and the description of the device is omitted. The terms "module," "unit," "subunit," and the like as used below may implement a combination of software and/or hardware for a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Fig. 7 is a block diagram of a simulation debugging apparatus for an internet of things device in this embodiment, and as shown in fig. 7, the apparatus includes: an acquisition module 710, a construction module 720, a simulation module 730, and a debugging module 740.
The obtaining module 710 is configured to obtain device information of the internet of things device.
A constructing module 720, configured to construct a firmware driver function according to the device information.
And the simulation module 730 is configured to perform access operation on the bare data file according to the firmware driver function, and generate simulation equipment.
And the debugging module 740 is configured to debug the analog device to obtain a debugging result.
The constructing module 720 is further configured to extract firmware parameters in the device information; and constructing a firmware driving function according to the firmware parameters.
The construction module 720 is further configured to identify a parameter type in the firmware parameters; and acquiring an access method of a specific firmware type by using a preset function library, and constructing a firmware drive function.
The simulation module 730 is further configured to perform an access operation on the bare data file according to the firmware driver function; and mounting the bare data file on a directory in the UML simulation environment, running firmware in the simulation environment, and generating a firmware driver of the simulation equipment.
The construction module 720 is further configured to build a UML simulation environment, and transmit the parameter categories into the UML simulation environment.
The constructing module 720 is further configured to simulate an access operation of the device node to the hardware Flash chip by using the read and address offset positioning functions in the function library, and construct a firmware driver function.
The simulation module 730 is further configured to generate a unified interface of the bare data file through the virtual file system; and performing access operation on the bare data file through a uniform interface according to the firmware driving function to generate simulation equipment.
The above modules may be functional modules or program modules, and may be implemented by software or hardware. For a module implemented by hardware, the modules may be located in the same processor; or the modules can be respectively positioned in different processors in any combination.
There is also provided in this embodiment an electronic device comprising a memory having a computer program stored therein and a processor arranged to run the computer program to perform the steps of any of the above method embodiments.
Optionally, the electronic apparatus may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
Optionally, in this embodiment, the processor may be configured to execute the following steps by a computer program:
acquiring equipment information of the equipment of the Internet of things;
constructing a firmware driving function according to the equipment information;
performing access operation on the bare data file according to the firmware driving function to generate simulation equipment;
and debugging the simulation equipment to obtain a debugging result.
In one embodiment the computer program performs the steps of: the constructing a firmware driver function according to the device information includes:
extracting firmware parameters in the equipment information;
and constructing a firmware driving function according to the firmware parameters.
In one embodiment the computer program performs the steps of: the constructing the firmware driver function according to the firmware parameters comprises:
identifying a parameter class in the firmware parameters;
and acquiring an access method of a specific firmware type by using a preset function library, and constructing a firmware drive function.
In one embodiment the computer program performs the steps of: the performing access operation on the bare data file according to the firmware driving function to generate the simulation device includes:
performing access operation on the bare data file according to the firmware driving function;
and mounting the bare data file on a directory in the UML simulation environment, running firmware in the simulation environment, and generating a firmware driver of the simulation equipment.
In one embodiment the computer program performs the steps of: the identifying a parameter class in the firmware parameters comprises:
wherein the parameter categories include: at least one of memory parameters, a file system, binary files and firmware partition information;
and building a UML simulation environment, and transmitting the parameter types into the UML simulation environment.
In one embodiment the computer program performs the steps of: the access method for acquiring the specific firmware type by using the preset function library comprises the following steps of:
and simulating the access operation of the equipment node to the hardware Flash chip by using the reading and address offset positioning functions in the function library to construct a firmware driving function.
In one embodiment the computer program performs the steps of: the performing access operation on the bare data file according to the firmware driving function to generate the simulation device includes:
generating a uniform interface of a bare data file through a virtual file system;
and performing access operation on the bare data file through a uniform interface according to the firmware driving function to generate simulation equipment.
It should be noted that, for specific examples in this embodiment, reference may be made to the examples described in the foregoing embodiments and optional implementations, and details are not described again in this embodiment.
In addition, in combination with the simulation debugging method for the internet of things device provided in the above embodiment, a storage medium may also be provided in this embodiment. The storage medium having stored thereon a computer program; when executed by a processor, the computer program realizes the simulation debugging method of the internet of things equipment in any one of the embodiments.
It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to be limiting. All other embodiments, which can be derived by a person skilled in the art from the examples provided herein without any inventive step, shall fall within the scope of protection of the present application.
It is obvious that the drawings are only examples or embodiments of the present application, and it is obvious to those skilled in the art that the present application can be applied to other similar cases according to the drawings without creative efforts. Moreover, it should be appreciated that in the development of any such actual implementation, as in any engineering or design project, numerous implementation-specific decisions must be made to achieve the developers' specific goals, such as compliance with system-related and business-related constraints, which may vary from one implementation to another.
The term "embodiment" is used herein to mean that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the present application. The appearances of such phrases in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is to be expressly or implicitly understood by one of ordinary skill in the art that the embodiments described in this application may be combined with other embodiments without conflict.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the patent protection. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present application shall be subject to the appended claims.

Claims (10)

1. An Internet of things equipment simulation debugging method is characterized by comprising the following steps:
acquiring equipment information of the equipment of the Internet of things;
constructing a firmware driving function according to the equipment information;
performing access operation on the bare data file according to the firmware driving function to generate simulation equipment;
and debugging the simulation equipment to obtain a debugging result.
2. The Internet of things device simulation debugging method of claim 1, wherein constructing a firmware driver function according to the device information comprises:
extracting firmware parameters in the equipment information;
and constructing a firmware driving function according to the firmware parameters.
3. The Internet of things device simulation debugging method of claim 2, wherein constructing a firmware driver function according to the firmware parameters comprises:
identifying a parameter class in the firmware parameters;
and acquiring an access method of a specific firmware type by using a preset function library, and constructing a firmware drive function.
4. The Internet of things device simulation debugging method of claim 3, wherein the performing access operation on the bare data file according to the firmware driver function to generate the simulation device comprises:
performing access operation on the bare data file according to the firmware driving function;
and mounting the bare data file on a directory in the UML simulation environment, running firmware in the simulation environment, and generating a firmware driver of the simulation equipment.
5. The Internet of things device simulation debugging method of claim 3, wherein the identifying the parameter types in the firmware parameters comprises:
wherein the parameter categories include: at least one of memory parameters, a file system, binary files and firmware partition information;
and building a UML simulation environment, and transmitting the parameter types into the UML simulation environment.
6. The Internet of things equipment simulation debugging method of claim 3, wherein the method for accessing the specific firmware type by using the preset function library comprises the following steps:
and simulating the access operation of the equipment node to the hardware Flash chip by using the reading and address offset positioning functions in the function library to construct a firmware driving function.
7. The Internet of things device simulation debugging method of claim 3, wherein the performing access operation on the bare data file according to the firmware driver function to generate the simulation device comprises:
generating a uniform interface of a bare data file through a virtual file system;
and performing access operation on the bare data file through a uniform interface according to the firmware driving function to generate simulation equipment.
8. The utility model provides a thing networking device simulation debugging device which characterized in that includes:
the acquisition module is used for acquiring equipment information of the Internet of things equipment;
the construction module is used for constructing a firmware driving function according to the equipment information;
the simulation module is used for performing access operation on the bare data file according to the firmware driving function to generate simulation equipment;
and the debugging module is used for debugging the simulation equipment to obtain a debugging result.
9. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the computer program to perform the method for simulation debugging of the internet of things device according to any one of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements the steps of the internet of things device simulation debugging method according to any one of claims 1 to 7.
CN202111203727.6A 2021-10-15 2021-10-15 Internet of things equipment simulation debugging method and device, electronic device and storage medium Active CN113904945B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111203727.6A CN113904945B (en) 2021-10-15 2021-10-15 Internet of things equipment simulation debugging method and device, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111203727.6A CN113904945B (en) 2021-10-15 2021-10-15 Internet of things equipment simulation debugging method and device, electronic device and storage medium

Publications (2)

Publication Number Publication Date
CN113904945A true CN113904945A (en) 2022-01-07
CN113904945B CN113904945B (en) 2024-04-09

Family

ID=79192336

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111203727.6A Active CN113904945B (en) 2021-10-15 2021-10-15 Internet of things equipment simulation debugging method and device, electronic device and storage medium

Country Status (1)

Country Link
CN (1) CN113904945B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20020033224A (en) * 2000-10-30 2002-05-06 구자홍 Method for software pre-test using device emulator
CN109101319A (en) * 2018-08-09 2018-12-28 郑州云海信息技术有限公司 It is a kind of to realize TPCM fully virtualized platform and its working method on QEMU
CN112241311A (en) * 2020-10-22 2021-01-19 杭州安恒信息技术股份有限公司 Firmware simulation method and device, electronic equipment and readable storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20020033224A (en) * 2000-10-30 2002-05-06 구자홍 Method for software pre-test using device emulator
CN109101319A (en) * 2018-08-09 2018-12-28 郑州云海信息技术有限公司 It is a kind of to realize TPCM fully virtualized platform and its working method on QEMU
CN112241311A (en) * 2020-10-22 2021-01-19 杭州安恒信息技术股份有限公司 Firmware simulation method and device, electronic equipment and readable storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
杨明;杨晨;: "基于User-Mode Linux的无线网络模拟器设计与实现", 电脑知识与技术, no. 34, 5 December 2008 (2008-12-05) *

Also Published As

Publication number Publication date
CN113904945B (en) 2024-04-09

Similar Documents

Publication Publication Date Title
CN103345406A (en) System and method for achieving cloud virtual mobile terminal of intelligent mobile terminal
WO2016029792A1 (en) Hardware device debugging method, device and system
CN112286746B (en) Universal verification platform and method for AXI slave device interface
CN108446225A (en) Creating device, method and the computer readable storage medium of analog interface
CN113076227A (en) MCU verification method, system and terminal equipment
CN109783340B (en) SoC test code programming method, IP test method and device
CN111258680B (en) Resource loading method and device, storage medium and electronic device
CN109086176A (en) A kind of SSD steady-state method of test, device, equipment and storage medium based on FIO
CN109783378A (en) GPU is in the compatibility test method of Ubnutu system, device, terminal and storage medium
CN109597653A (en) Method, BIOS and the BMC of BIOS and BMC command interaction
CN114089975A (en) Expansion method and device of computing software, nonvolatile storage medium and processor
CN115184764A (en) Chip testing method and device, electronic equipment and storage medium
CN113657069A (en) SOC simulation verification method and device, verification server and storage medium
CN105592492B (en) Higher-layer protocols uniformity test platform and test method
CN113641381A (en) DSP firmware remote upgrading device and method and industrial robot
CN113434422A (en) Virtual device debugging method and device and virtual device debugging system
CN113657068A (en) SOC simulation verification and SOC simulation verification equipment verification environment construction method
CN114253823A (en) Distributed test method and related equipment
CN112099902A (en) Network adapter configuration method and device of virtual machine, electronic device and storage medium
CN113904945B (en) Internet of things equipment simulation debugging method and device, electronic device and storage medium
CN109039765B (en) Network configuration method and device
CN109460280B (en) Method and terminal for running program
CN113391931B (en) Remote control method and device based on Bluetooth, computer equipment and storage medium
CN111897582B (en) All-in-one machine Ethernet refreshing method and device, storage medium and all-in-one machine equipment
CN111443994B (en) Device, system and method for simulating smart card driver

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant