CN113378150A - Autonomous identification and connection method and system for serial port terminal equipment - Google Patents

Autonomous identification and connection method and system for serial port terminal equipment Download PDF

Info

Publication number
CN113378150A
CN113378150A CN202110691490.4A CN202110691490A CN113378150A CN 113378150 A CN113378150 A CN 113378150A CN 202110691490 A CN202110691490 A CN 202110691490A CN 113378150 A CN113378150 A CN 113378150A
Authority
CN
China
Prior art keywords
module
equipment
check
connection
new access
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
CN202110691490.4A
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.)
Crazy Shell Shenzhen Technology Co ltd
Original Assignee
Crazy Shell Shenzhen 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 Crazy Shell Shenzhen Technology Co ltd filed Critical Crazy Shell Shenzhen Technology Co ltd
Priority to CN202110691490.4A priority Critical patent/CN113378150A/en
Publication of CN113378150A publication Critical patent/CN113378150A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/44Program or device authentication
    • G06F21/445Program or device authentication by mutual authentication, e.g. between devices or programs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/382Information transfer, e.g. on bus using universal interface adapter
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4282Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/70Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer
    • G06F21/82Protecting input, output or interconnection devices
    • G06F21/85Protecting input, output or interconnection devices interconnection devices, e.g. bus-connected or in-line devices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2213/00Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F2213/0002Serial port, e.g. RS232C

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The invention discloses an autonomous identification and connection method of serial port terminal equipment, belonging to the technical field of automatic detection of equipment, and the autonomous identification and connection method comprises the following specific steps: (1) polling the equipment; (2) acquiring basic information of equipment and authenticating; (3) trying to connect and sending a checking instruction; (4) checking password data packet return; (5) checking password data packet check; (6) keeping the connection; the invention polls the newly accessed serial port terminal equipment by proper frequency, and then completes the autonomous identification and connection of the newly accessed serial port terminal equipment by the steps of information comparison, password check, system definition confirmation and the like; therefore, the method is beneficial to the situation that the connection quantity of the serial port terminal equipment is large and the user industry knowledge is not strong, the software is helped to automatically and quickly connect the serial port terminal equipment which the user wants by using, and then the problem that the user selects wrong equipment or selects equipment which cannot be connected is avoided, and the convenience and operability of the system are favorably improved.

Description

Autonomous identification and connection method and system for serial port terminal equipment
Technical Field
The invention relates to the technical field of automatic detection of equipment, in particular to an autonomous identification and connection method and system for serial port terminal equipment.
Background
Through retrieval, the chinese patent No. CN106254101B discloses a method and a device for detecting the communication state of RS485 serial port equipment, which can detect the communication state of the serial port terminal equipment, but cannot help the software user to automatically and quickly connect the desired serial port terminal equipment, and further cannot avoid the user selecting the wrong equipment; at present, a great part of upper computer software of serial devices needs to be operated, the operation steps are that a user inserts the serial devices into a computer, then clicks on a selection device on the software, the software lists all the devices which can be detected, then the user selects a correct device to connect, and finally other operations are carried out; this operation mode presents a great obstacle to users with poor expertise, and the users may not know which device needs to be selected from a plurality of devices, and whether the device is occupied or not and whether the device can be correctly connected to software, and such software is often difficult for the users to operate; therefore, it becomes more important to invent an autonomous identification and connection method and system for serial terminal devices;
the existing serial port terminal equipment can only detect the communication state, the connection mode of the existing serial port terminal equipment mostly adopts artificial connection, but the existing serial port terminal equipment cannot help a software user to automatically and quickly connect the desired serial port terminal equipment when the connection quantity of the serial port terminal equipment is large and the user industry knowledge is not strong, so that the user cannot be prevented from selecting wrong equipment, and the convenience and operability of the system are easily reduced; therefore, an autonomous identification and connection method and system for serial port terminal equipment are provided.
Disclosure of Invention
The invention aims to solve the defects in the prior art, and provides an autonomous identification and connection method and system for serial port terminal equipment.
In order to achieve the purpose, the invention adopts the following technical scheme:
an autonomous identification and connection method of serial port terminal equipment comprises the following specific steps:
the method comprises the following steps: the software system continuously polls all serial devices accessed in the computer at a proper frequency;
step two: if detecting that a new access device exists, performing basic information authentication on the new access device;
step three: if the basic information passes the authentication, the software system tries to connect the new access equipment in the second step and sends a request check data packet according to an authentication protocol;
step four: the new access equipment receives the request check data packet in the third step and returns a check password data packet according to the authentication protocol in the third step;
step five: the software system receives the check password data packet in the fourth step and analyzes the check password data packet according to an authentication protocol;
step six: if the analysis result of the password data packet is checked to be correct, the software system keeps the connection with the new access equipment, and the polling operation of the system is closed, so that the user can normally use the new access equipment in the step two in the software system in the step one.
Further, the proper frequency in step one should ensure not to occupy the system CPU resource excessively, and also ensure not to prolong the response time of the system to the new device insertion.
Further, the basic information in step two includes, but is not limited to, manufacturer information of the device and basic model information of the device.
Further, the request check data packet and the received check password data packet are authentication protocols determined by the co-negotiation between the software developer and the hardware device developer, and the contents of the authentication protocols include, but are not limited to, the format of the data packets and the meaning represented by each part of the data packets.
Further, before the software system in the third step tries to connect, the polling operation in the first step is stopped; and the sending request check data packet is sent for a limited number of times within a certain time period at a certain frequency, if the system does not receive the check password data packet specified by the protocol within the time period, the connection to the equipment is disconnected, and the polling operation in the first step is restarted.
Further, after parsing the check password data packet in step five, the detailed information of the device may be determined, where the detailed information is defined in the authentication protocol.
Further, when the new access device is actively or passively disconnected from the software system at a certain time point, a disconnection callback function of the software system is triggered, and the disconnection callback function enables the software system to reenter the polling operation in the step one.
An autonomous identification and connection system of serial port terminal equipment comprises a starting module, an equipment polling module, an equipment identification module, a connection maintaining module and a callback triggering module;
the device identification module comprises a basic information acquisition module, an information comparison module, an attempt connection module, a check instruction sending module, a check password returning module, a check password checking module and a device use determination module;
the starting module is used for starting the software system to run by a user;
the device polling module is used for polling all serial devices accessed in the computer after a user enters the system so as to discover new accessed devices;
the basic information acquisition module is used for acquiring basic information of the discovered new access equipment;
the information comparison module is used for comparing the basic information of the newly accessed equipment with the equipment information defined in the protocol, and if the comparison is successful, the next operation is carried out; otherwise, the system enters a polling state;
the attempted connection module is used for attempting connection of the new access equipment with successfully compared information;
the checking instruction sending module is used for sending a checking instruction to the new access equipment after the connection attempt is successful;
the check password returning module is used for returning a check password to the authentication protocol after receiving the check instruction;
the password checking module is used for checking whether the returned check password is correct or not, and entering the next operation if the check password is correct; otherwise, the system disconnects and enters a polling state;
the device usage determining module is used for confirming the new access device which checks the password check to be correct and confirming whether the new access device is the required device defined by the system;
the connection maintaining module is used for maintaining connection of the required new access equipment determined to be defined by the system;
the callback triggering module is used for re-polling the new access equipment which is manually unplugged by a user or is disconnected from the system due to other factors.
Compared with the prior art, the invention has the beneficial effects that:
according to the autonomous identification and connection method and system for the serial port terminal equipment, the newly accessed serial port terminal equipment is polled through proper frequency, and then the autonomous identification and connection of the newly accessed serial port terminal equipment are completed through steps of information comparison, password check, system definition confirmation and the like; therefore, the method is beneficial to the situation that the connection quantity of the serial port terminal equipment is large and the user industry knowledge is not strong, the software is helped to automatically and quickly connect the serial port terminal equipment which the user wants by using, and then the problem that the user selects wrong equipment or selects equipment which cannot be connected is avoided, and the convenience and operability of the system are favorably improved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the principles of the invention and not to limit the invention.
Fig. 1 is an overall flowchart of an autonomous identification and connection method for a serial port terminal device according to the present invention;
fig. 2 is an overall schematic diagram of an autonomous identification and connection system of a serial port terminal device according to the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments.
In the description of the present invention, it is to be understood that the terms "upper", "lower", "front", "rear", "left", "right", "top", "bottom", "inner", "outer", and the like, indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings, are merely for convenience in describing the present invention and simplifying the description, and do not indicate or imply that the device or element being referred to must have a particular orientation, be constructed and operated in a particular orientation, and thus, should not be construed as limiting the present invention.
Referring to fig. 1, this embodiment discloses an autonomous identification and connection method for a serial port terminal device, which includes the following specific steps:
the method comprises the following steps: the software system continuously polls all serial devices accessed in the computer at a proper frequency;
specifically, all serial devices are stored in a device list, and if the device list is found to be changed after a certain polling, the system tries to connect the device and identifies the device; specifically, the appropriate frequency is not only guaranteed not to occupy the system CPU resource excessively, but also guaranteed not to prolong the response time of the system to the insertion of a new device.
Step two: if detecting that a new access device exists, performing basic information authentication on the new access device;
specifically, detecting that a new device is accessed means that one more device is found in the device list compared with the last time; the basic information includes, but is not limited to, manufacturer information of the device and basic model information of the device.
Step three: if the basic information authentication in the step two is passed, the software system tries to connect the new access equipment in the step two and sends a request check data packet according to the authentication protocol;
specifically, the polling operation in the first step is stopped before the software system tries to connect; and sending a request check data packet for limited times at a certain frequency in a certain time period, and if the system does not receive the check password data packet specified by the protocol in the time period, disconnecting the equipment and restarting the polling operation in the first step.
Step four: the new access equipment receives the request inspection data packet in the third step and returns an inspection password data packet according to the authentication protocol in the third step;
specifically, the request check packet and the receipt check password packet are authentication protocols that are determined by the co-negotiation between the software developer and the hardware device developer, and the contents of the authentication protocols include, but are not limited to, the format of the packet and the meaning represented by each part of the packet.
Step five: the software system receives the checking password data packet in the step four and analyzes the checking password data packet according to the authentication protocol;
specifically, examining the password packet after parsing, the details of the device, which are defined in the authentication protocol, can be determined.
Step six: if the analysis result of the password data packet is checked to be correct, the software system keeps the connection of the new access equipment, and the polling operation of the system is closed, so that the user can normally use the new access equipment in the step two in the software system in the step one.
Specifically, when the new access device is actively or passively disconnected from the software system at a certain time point, the disconnection callback function of the software system is triggered, and the disconnection callback function enables the software system to reenter the polling operation in the first step.
Referring to fig. 2, the embodiment discloses an autonomous identification and connection system of a serial port terminal device, which includes a startup module, a device polling module, a device identification module, a connection maintaining module and a callback triggering module;
the equipment identification module comprises a basic information acquisition module, an information comparison module, an attempt connection module, a check instruction sending module, a check password returning module, a check password checking module and an equipment use determination module;
the starting module is used for starting the software system to run by a user;
the device polling module is used for polling all serial devices accessed in the computer after a user enters the system so as to discover new accessed devices;
the basic information acquisition module is used for acquiring basic information of the discovered new access equipment;
the information comparison module is used for comparing the basic information of the newly accessed equipment with the equipment information defined in the protocol, and if the comparison is successful, the next operation is carried out; otherwise, the system enters a polling state;
the trial connection module is used for performing trial connection on the new access equipment with the successfully compared information;
the checking instruction sending module is used for sending a checking instruction to the new access equipment after the connection attempt is successful;
the check password returning module is used for returning a check password to the authentication protocol after receiving the check instruction;
the password checking module is used for checking whether the returned password is correct or not, and entering the next operation if the returned password is correct; otherwise, the system disconnects and enters a polling state;
the device usage determining module is used for confirming the new access device which checks the password check to be correct and confirming whether the new access device is the required device defined by the system;
the connection maintaining module is used for maintaining connection of the required new access equipment determined to be defined by the system;
the callback trigger module is used for re-polling a new access device which is manually unplugged by a user or disconnected from the system due to other factors.
The above description is only for the preferred embodiment of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art should be considered to be within the technical scope of the present invention, and the technical solutions and the inventive concepts thereof according to the present invention should be equivalent or changed within the scope of the present invention.

Claims (8)

1. An autonomous identification and connection method of serial port terminal equipment is characterized by comprising the following specific steps:
the method comprises the following steps: the software system continuously polls all serial devices accessed in the computer at a proper frequency;
step two: if detecting that a new access device exists, performing basic information authentication on the new access device;
step three: if the basic information passes the authentication, the software system tries to connect the new access equipment in the second step and sends a request check data packet according to an authentication protocol;
step four: the new access equipment receives the request check data packet in the third step and returns a check password data packet according to the authentication protocol in the third step;
step five: the software system receives the check password data packet in the fourth step and analyzes the check password data packet according to an authentication protocol;
step six: if the analysis result of the password data packet is checked to be correct, the software system keeps the connection with the new access equipment, and the polling operation of the system is closed, so that the user can normally use the new access equipment in the step two in the software system in the step one.
2. The method for autonomously identifying and connecting the serial port terminal device according to claim 1, wherein the proper frequency in the step one is ensured not to excessively occupy system CPU resources and not to prolong the response time of the system to the insertion of a new device.
3. The method for autonomously identifying and connecting the serial port terminal device according to claim 1, wherein the basic information in the second step includes but is not limited to manufacturer information of the device and basic model information of the device.
4. The method as claimed in claim 1, wherein the request check packet and the received check password packet are authentication protocols that are determined by a software developer and a hardware device developer through negotiation, and the contents of the authentication protocols include, but are not limited to, the format of the packet and the meaning represented by each part of the packet.
5. The method for autonomously identifying and connecting the serial port terminal device according to claim 1, wherein the polling operation in the first step is stopped before the software system in the third step tries to connect; and the sending request check data packet is sent for a limited number of times within a certain time period at a certain frequency, if the system does not receive the check password data packet specified by the protocol within the time period, the connection to the equipment is disconnected, and the polling operation in the first step is restarted.
6. The method according to claim 1, wherein the check password packet in step five is parsed to determine the detailed information of the device, and the detailed information is defined in the authentication protocol.
7. The method according to claim 1, wherein when the new access device is actively or passively disconnected from the software system at a certain time point, a disconnection callback function of the software system is triggered, and the disconnection callback function causes the software system to re-enter the polling operation of the step one.
8. An autonomous identification and connection system of serial port terminal equipment is characterized by comprising a starting-up starting module, an equipment polling module, an equipment identification module, a connection maintaining module and a callback triggering module;
the device identification module comprises a basic information acquisition module, an information comparison module, an attempt connection module, a check instruction sending module, a check password returning module, a check password checking module and a device use determination module;
the starting module is used for starting the software system to run by a user;
the device polling module is used for polling all serial devices accessed in the computer after a user enters the system so as to discover new accessed devices;
the basic information acquisition module is used for acquiring basic information of the discovered new access equipment;
the information comparison module is used for comparing the basic information of the newly accessed equipment with the equipment information defined in the protocol, and if the comparison is successful, the next operation is carried out; otherwise, the system enters a polling state;
the attempted connection module is used for attempting connection of the new access equipment with successfully compared information;
the checking instruction sending module is used for sending a checking instruction to the new access equipment after the connection attempt is successful;
the check password returning module is used for returning a check password to the authentication protocol after receiving the check instruction;
the password checking module is used for checking whether the returned check password is correct or not, and entering the next operation if the check password is correct; otherwise, the system disconnects and enters a polling state;
the device usage determining module is used for confirming the new access device which checks the password check to be correct and confirming whether the new access device is the required device defined by the system;
the connection maintaining module is used for maintaining connection of the required new access equipment determined to be defined by the system;
the callback triggering module is used for re-polling the new access equipment which is manually unplugged by a user or is disconnected from the system due to other factors.
CN202110691490.4A 2021-06-22 2021-06-22 Autonomous identification and connection method and system for serial port terminal equipment Pending CN113378150A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110691490.4A CN113378150A (en) 2021-06-22 2021-06-22 Autonomous identification and connection method and system for serial port terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110691490.4A CN113378150A (en) 2021-06-22 2021-06-22 Autonomous identification and connection method and system for serial port terminal equipment

Publications (1)

Publication Number Publication Date
CN113378150A true CN113378150A (en) 2021-09-10

Family

ID=77578227

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110691490.4A Pending CN113378150A (en) 2021-06-22 2021-06-22 Autonomous identification and connection method and system for serial port terminal equipment

Country Status (1)

Country Link
CN (1) CN113378150A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101719212A (en) * 2009-12-11 2010-06-02 北京飞天诚信科技有限公司 Identification method and device of serial-port card reader
CN103916230A (en) * 2012-12-31 2014-07-09 中国移动通信集团广东有限公司 Sensor identification method, host computer, sensor and sensor identification system
CN105407001A (en) * 2015-11-27 2016-03-16 飞天诚信科技股份有限公司 Method, system and device for rapidly identifying communication parameter configuration
CN106250758A (en) * 2016-07-06 2016-12-21 北京元心科技有限公司 A kind of storage device connection control method and system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101719212A (en) * 2009-12-11 2010-06-02 北京飞天诚信科技有限公司 Identification method and device of serial-port card reader
CN103916230A (en) * 2012-12-31 2014-07-09 中国移动通信集团广东有限公司 Sensor identification method, host computer, sensor and sensor identification system
CN105407001A (en) * 2015-11-27 2016-03-16 飞天诚信科技股份有限公司 Method, system and device for rapidly identifying communication parameter configuration
CN106250758A (en) * 2016-07-06 2016-12-21 北京元心科技有限公司 A kind of storage device connection control method and system

Similar Documents

Publication Publication Date Title
US8838812B2 (en) Network security enhancement methods, apparatuses, system, media, signals and computer programs
EP3013086A1 (en) Method, apparatus and electronic device for connection management
RU2655971C2 (en) Method, device for implementation of terminal device access to wireless network
EP2320328B1 (en) Operation mode switching of data card and its control method, device and data card
CN111884879A (en) Network detection method, device and related equipment
US8849999B2 (en) Device control apparatus and method for monitoring device, client apparatus, and device control system
CN113490218A (en) Pairing method, pairing device, Bluetooth remote controller, intelligent device and storage medium
CN109947482A (en) A kind of loading method of USB device, storage medium and smart television
CN111200877A (en) Network connection method, terminal and storage medium
CN113378150A (en) Autonomous identification and connection method and system for serial port terminal equipment
CN113055225A (en) Method for acquiring network fault analysis data, terminal and server
US20150222591A1 (en) Method, Device, and System for Acquiring Internet Protocol Address
CN111918236B (en) Internet of things security sensor network searching method, device, equipment and storage medium
WO2021047465A1 (en) Method for matching vehicle with charging pile, and method for determining charging apparatus being engaged with vehicle, and corresponding device
CN103442377A (en) Method for WPS session negotiation between WIFI module and plurality of APs at same time
US10795848B2 (en) Dual way communication method, system, and master device thereof
CN112399242A (en) Mobile network connection method, device, equipment and medium based on television
CN111935235A (en) Control method, system, device, storage medium and processor of equipment
WO2018113353A1 (en) Software upgrade method and device
CN110891053A (en) Method for establishing communication connection between android APP and operating system based on local area network
CN110740439A (en) Intelligent matching method of Zigbee equipment and Zigbee equipment
CN111327581B (en) Equipment access method and device, electronic equipment and storage medium
CN115085800B (en) Ground satellite equipment, satellite transit monitoring method and storage medium
CN109561168B (en) MAC address synchronization method
CN111540133B (en) Method and device for detecting state of external equipment and related equipment

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