CN108664434A - The means of communication based on generator set controller USB interface HID device - Google Patents
The means of communication based on generator set controller USB interface HID device Download PDFInfo
- Publication number
- CN108664434A CN108664434A CN201810467084.8A CN201810467084A CN108664434A CN 108664434 A CN108664434 A CN 108664434A CN 201810467084 A CN201810467084 A CN 201810467084A CN 108664434 A CN108664434 A CN 108664434A
- Authority
- CN
- China
- Prior art keywords
- generator set
- set controller
- data packet
- hid device
- descriptor
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/38—Information transfer, e.g. on bus
- G06F13/40—Bus structure
- G06F13/4063—Device-to-bus coupling
- G06F13/4068—Electrical coupling
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/38—Information transfer, e.g. on bus
- G06F13/42—Bus transfer protocol, e.g. handshake; Synchronisation
- G06F13/4282—Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2213/00—Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F2213/0042—Universal serial bus [USB]
Abstract
The present invention provides a kind of means of communication based on generator set controller USB interface HID device, for realizing generator set controller reading and writing data, include the following steps, step 1, the HID device descriptor for building generator set controller, obtains generator set controller HID device;Step 2, generator set controller builds usb communication data packet according to the HID device descriptor, and the usb communication data packet carries the read-write data for needing to transmit;Each usb communication data packet includes the data packet ID number and performance data packet for distinguishing different data packet;Step 3, the generator set controller HID device sends usb communication data packet to generator set controller monitor terminal, or the usb communication data packet from the generator set controller monitor terminal is received, and parse the data content of the usb communication data packet.The present invention have the advantages that design science, highly practical, working specification and flexibly it is simple.
Description
Technical field
The present invention relates to generator set controller field of data exchange, specifically, relate to a kind of based on generating set
The means of communication of controller USB interface HID device.
Background technology
Generator set controller parameter configuration and monitoring data are more, due to by geographical conditions, artificial condition and equipment
Condition limits, and configures or monitors on controller panel, generally requires computer to monitor and configure generator set controller, simultaneously
Computer needs to install respective drive;Certainly also there are other communication modes, but need to go to convert using corresponding communication module;But
It is, it, will nothing between generator set controller and computer once the communication module failure or loss that use, or driving are abnormal
Method is communicated.
Usb communication obtains very because it has the advantages that versatility is good, supports hot plug, scalability good in communication field
Good development, especially embodies incisively and vividly on host computer.Currently, research and development company also has exploitation to do USB communications, input is big
The manpower and materials of amount, but computer still needs to install respective drive, user installation is bad and can not use, and is unfavorable for generator
The marketing and plant maintenance of group controller.
In order to solve the above problems, people are seeking always a kind of ideal technical solution.
Invention content
The purpose of the present invention is in view of the deficiencies of the prior art, to provide a kind of design science, highly practical, operation rule
Model and the flexibly means of communication simply based on generator set controller USB interface HID device.
To achieve the goals above, the technical solution adopted in the present invention is:One kind is connect based on generator set controller USB
The means of communication of mouthful HID device include the following steps for realizing generator set controller reading and writing data,
Step 1, the HID device descriptor for building generator set controller, obtains generator set controller HID device;
Step 2, generator set controller builds usb communication data packet according to the HID device descriptor, and the USB is logical
Letter data packet carries the read-write data for needing to transmit;Each usb communication data packet includes for distinguishing different data packet
Data packet ID number and performance data packet;The performance data packet be divided into read data transmission data packet, read data received data packet,
It writes data transmission data packet and writes data reception data packet;
Step 3, the generator set controller HID device sends usb communication number to generator set controller monitor terminal
According to packet, or the usb communication data packet from the generator set controller monitor terminal is received, and parses the usb communication
The data content of data packet.
Based on above-mentioned, the reading data transmission data packet includes function code, address code, data amount check and CRC16 inspections successively
Test code;The reading data received data packet includes function code, data amount check, data field and CRC16 check codes successively;It is described to write number
Include function code, address code, institute's write address data and CRC16 check codes successively according to transmission data packet;Write data receive number
Include function code, address code, institute's write address data and CRC16 check codes successively according to packet.
Based on above-mentioned, the reading data manipulation of generator set controller is specially:The generator set controller HID device to
Generator set controller monitor terminal sends one and reads data transmission data packet, after meeting with a response, retransmits a reading data receiver number
According to packet;
The data writing operation of generator set controller is specially:The generator set controller HID device is to the power generation
Generator set controller monitor terminal sends one and writes data transmission data packet, after meeting with a response, retransmits one and writes data reception data packet.
Based on above-mentioned, the HID device descriptor includes that device descriptor, configures descriptor, interface descriptor, HID are retouched
State symbol, endpoint descriptor, character string descriptor and report description (RD) symbol;
It the device descriptor, the essential information for describing generator set controller HID device, including vendor id and sets
Standby version number;
The configures descriptor, the configuration information for describing generator set controller HID device include the word of descriptor
Save length, interface number, endpoint number and amount of equipment power consumption;
The interface descriptor, the interface message for describing generator set controller HID device, including use number of endpoint
Mesh and whether HID device;
The HID descriptor, the number of the report description (RD) symbol for describing the setting of generator set controller HID device;
The endpoint descriptor sends or receives for describing each endpoint that generator set controller HID device uses
Data package size;
The character string descriptor, for describing the customized equipment mark of generator set controller HID device, with character
The form of string indicates and coding mode;
The report description (RD) symbol, for describing, generator set controller HID device is sent or the format of received data packet is advised
About.
Based on above-mentioned, the generator set controller monitor terminal is computer or monitoring controller with USB interface.
The present invention has substantive distinguishing features outstanding and significant progress compared with the prior art, and specifically, the present invention carries
A kind of means of communication based on generator set controller USB interface HID device have been supplied, generator set controller HID has been constructed and sets
Standby, user realizes the number between generator set controller and generator set controller monitor terminal without installing driver
According to exchange, generator set controller connects generator set controller monitor terminal by a USB line, does not need other supports, very
To user without having corresponding communication knowledge, you can communication, it is simple and efficient, efficiently solve generator set control in the prior art
Failure when device uses communication module, loss or driving is abnormal causes can not to communicate between generator set controller and host
Technical problem, have the advantages that design science, highly practical, working specification and flexibly it is simple.
Specific implementation mode
Below by specific implementation mode, technical scheme of the present invention will be described in further detail.
A kind of means of communication based on generator set controller USB interface HID device, for realizing generator set controller
Reading and writing data includes the following steps,
Step 1, the HID device descriptor for building generator set controller, obtains generator set controller HID device;Institute
It includes device descriptor, configures descriptor, interface descriptor, HID descriptor, endpoint descriptor, character to state HID device descriptor
String descriptor and report description (RD) symbol;
Specifically, the device descriptor, the essential information for describing generator set controller HID device, including factory
Quotient ID and device version number;The configures descriptor, the configuration information for describing generator set controller HID device, including
Byte length, interface number, endpoint number and the amount of equipment power consumption of descriptor;The interface descriptor, for describing generator
The interface message of group controller HID device, including use endpoint number and whether HID device;The HID descriptor, is used for
The number of the report description (RD) symbol of generator set controller HID device setting is described;The endpoint descriptor, for describing generator
The data package size that each endpoint that group controller HID device uses sends or receives;The character string descriptor, for describing
The customized equipment mark of generator set controller HID device, mark and coding mode in the form of character string;The report is retouched
Symbol is stated, the format stipulations for describing the transmission of generator set controller HID device or received data packet.
Step 2, generator set controller builds usb communication data packet according to the HID device descriptor, and the USB is logical
Letter data packet carries the read-write data for needing to transmit;Each usb communication data packet includes for distinguishing different data packet
Data packet ID number and performance data packet;The performance data packet be divided into read data transmission data packet, read data received data packet,
It writes data transmission data packet and writes data reception data packet;
The reading data transmission data packet includes function code, address code, data amount check and CRC16 check codes successively;It is described
It includes function code, data amount check, data field and CRC16 check codes to read data received data packet successively;Write data send number
Include function code, address code, institute's write address data and CRC16 check codes successively according to packet;Write data received data packet is successively
Including function code, address code, institute's write address data and CRC16 check codes.
Step 3, the generator set controller HID device sends usb communication number to generator set controller monitor terminal
According to packet, or the usb communication data packet from the generator set controller monitor terminal is received, and parses the usb communication
The data content of data packet;
The reading data manipulation of generator set controller is specially:The generator set controller HID device is to generating set
Controller monitoring terminal sends one and reads data transmission data packet, after meeting with a response, retransmits a reading data received data packet;
The data writing operation of generator set controller is specially:The generator set controller HID device is to the power generation
Generator set controller monitor terminal sends one and writes data transmission data packet, after meeting with a response, retransmits one and writes data reception data packet.
Specifically, the generator set controller monitor terminal is computer or monitoring controller with USB interface.
Specifically, generator set controller HID device, i.e. USB interface HID device are established in step 1, to specialize in power generation
The HID device that generator set controller uses.The equipment that generator set controller HID device builds generator set controller is established to retouch
Symbol is stated, each descriptor is string number, includes the meaning of corresponding descriptor, device descriptor follows USB standard communications protocol.
Whole equipment descriptor establishes the generator set controller HID device of the present invention, includes the basic condition of equipment, transmission data
Message format, which endpoint is to send, which endpoint is to receive, and transmits and receives point how many a report messages, in each message
It is what etc..
Specifically, building usb communication data packet in step 2, the data packet is exactly above-mentioned definition generator set controller
HID device accords with the integration of defined data in report description (RD).Particularly, the present invention integrates two messages as the logical of entire USB
Letter data packet, each message are 64 bytes, that is, 128 bytes, and each communication data packet at most communicates 128 bytes,
ID number of the first character section as data packet is subsequently explained according to different data packets different for distinguishing different data packets
Function is divided into according to function difference and reads data transmission, read data receiver, write data transmission, write four data packets of data receiver:
Data are read to send
Read data receiver
Write data transmission
Write data receiver
Specifically, computer, monitoring controller or configuration software find generator set controller by USB interface in step 3
HID device reads and writes data without installing any driving in generator set controller HID device, according to above-mentioned communication data
Packet analyzing data content, is completed to the data read-write operation of generator set controller, due to there is fixed data model, send and
Receiving terminal can send and receive data well, convenient for exploitation.Generator set controller is good data address layout, user
It is read and write according to address.
Finally it should be noted that:The above embodiments are merely illustrative of the technical scheme of the present invention and are not intended to be limiting thereof;To the greatest extent
The present invention is described in detail with reference to preferred embodiments for pipe, those of ordinary skills in the art should understand that:Still
It can modify to the specific implementation mode of the present invention or equivalent replacement is carried out to some technical characteristics;Without departing from this hair
The spirit of bright technical solution should all cover within the scope of the technical scheme claimed by the invention.
Claims (5)
1. a kind of means of communication based on generator set controller USB interface HID device, for realizing generator set controller number
According to read-write, it is characterised in that:Include the following steps,
Step 1, the HID device descriptor for building generator set controller, obtains generator set controller HID device;
Step 2, generator set controller builds usb communication data packet, the usb communication number according to the HID device descriptor
The read-write data for needing to transmit are carried according to packet;Each usb communication data packet includes the number for distinguishing different data packet
According to packet ID number and performance data packet;The performance data packet, which is divided into, to be read data transmission data packet, reads data received data packet, writes number
According to transmission data packet and write data reception data packet;
Step 3, the generator set controller HID device sends usb communication data packet to generator set controller monitor terminal,
Or the usb communication data packet from the generator set controller monitor terminal is received, and parse the usb communication data packet
Data content.
2. the means of communication according to claim 1 based on generator set controller USB interface HID device, feature exist
In:The reading data transmission data packet includes function code, address code, data amount check and CRC16 check codes successively;The reading data
Received data packet includes function code, data amount check, data field and CRC16 check codes successively;Write data transmission data packet according to
Secondary includes function code, address code, institute's write address data and CRC16 check codes;Write data received data packet includes work(successively
It can code, address code, institute's write address data and CRC16 check codes.
3. the means of communication according to claim 2 based on generator set controller USB interface HID device, feature exist
In:The reading data manipulation of generator set controller is specially:The generator set controller HID device is to generator set controller
Monitor terminal sends one and reads data transmission data packet, after meeting with a response, retransmits a reading data received data packet;
The data writing operation of generator set controller is specially:The generator set controller HID device is to the generating set
Controller monitoring terminal sends one and writes data transmission data packet, after meeting with a response, retransmits one and writes data reception data packet.
4. according to the means of communication of the claim 1-3 any one of them based on generator set controller USB interface HID device,
It is characterized in that:The HID device descriptor includes device descriptor, configures descriptor, interface descriptor, HID descriptor, end
Point descriptor, character string descriptor and report description (RD) symbol;
The device descriptor, the essential information for describing generator set controller HID device, including vendor id and equipment version
This number;
The configures descriptor, the configuration information for describing generator set controller HID device include the byte long of descriptor
Degree, interface number, endpoint number and amount of equipment power consumption;
The interface descriptor, the interface message for describing generator set controller HID device, including use endpoint number and
Whether HID device;
The HID descriptor, the number of the report description (RD) symbol for describing the setting of generator set controller HID device;
The endpoint descriptor, the number for sending or receiving for describing each endpoint that generator set controller HID device uses
According to packet size;
The character string descriptor, for describing the customized equipment mark of generator set controller HID device, with character string
Form indicates and coding mode;
The report description (RD) symbol, the format stipulations for describing the transmission of generator set controller HID device or received data packet.
5. the means of communication according to claim 4 based on generator set controller USB interface HID device, feature exist
In:The generator set controller monitor terminal is computer or monitoring controller with USB interface.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810467084.8A CN108664434B (en) | 2018-05-16 | 2018-05-16 | Communication method of HID (high intensity discharge) equipment based on USB (Universal Serial bus) interface of generator set controller |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810467084.8A CN108664434B (en) | 2018-05-16 | 2018-05-16 | Communication method of HID (high intensity discharge) equipment based on USB (Universal Serial bus) interface of generator set controller |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108664434A true CN108664434A (en) | 2018-10-16 |
CN108664434B CN108664434B (en) | 2021-10-22 |
Family
ID=63779615
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810467084.8A Active CN108664434B (en) | 2018-05-16 | 2018-05-16 | Communication method of HID (high intensity discharge) equipment based on USB (Universal Serial bus) interface of generator set controller |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108664434B (en) |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102890587A (en) * | 2012-10-24 | 2013-01-23 | 中山佳时光电科技有限公司 | Driver-free electronic whiteboard control device crossing operating system platforms |
CN103412837A (en) * | 2013-07-10 | 2013-11-27 | 北京深思数盾科技有限公司 | Method, device and system for improving communication stability of human interface device |
CN103973889A (en) * | 2014-04-25 | 2014-08-06 | 方小祥 | Device and method for using intelligent handheld device as wireless USB HID device |
CN104077252A (en) * | 2013-03-29 | 2014-10-01 | 联想(北京)有限公司 | USB (universal serial bus) device communication method and device and electronic device |
CN104991870A (en) * | 2015-06-10 | 2015-10-21 | 四川华拓光通信股份有限公司 | Optical communication apparatus interface accessing method free of driver based on HID |
US20170039151A1 (en) * | 2015-08-05 | 2017-02-09 | American Megatrends, Inc. | Universal intelligent platform management interface (ipmi) host to baseboard management controller (bmc) communication for non-x86 and legacy free systems |
CN107562676A (en) * | 2017-09-15 | 2018-01-09 | 郑州众智科技股份有限公司 | A kind of method communicated by USB and generator set controller based on VB.net |
-
2018
- 2018-05-16 CN CN201810467084.8A patent/CN108664434B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102890587A (en) * | 2012-10-24 | 2013-01-23 | 中山佳时光电科技有限公司 | Driver-free electronic whiteboard control device crossing operating system platforms |
CN104077252A (en) * | 2013-03-29 | 2014-10-01 | 联想(北京)有限公司 | USB (universal serial bus) device communication method and device and electronic device |
CN103412837A (en) * | 2013-07-10 | 2013-11-27 | 北京深思数盾科技有限公司 | Method, device and system for improving communication stability of human interface device |
CN103973889A (en) * | 2014-04-25 | 2014-08-06 | 方小祥 | Device and method for using intelligent handheld device as wireless USB HID device |
CN104991870A (en) * | 2015-06-10 | 2015-10-21 | 四川华拓光通信股份有限公司 | Optical communication apparatus interface accessing method free of driver based on HID |
US20170039151A1 (en) * | 2015-08-05 | 2017-02-09 | American Megatrends, Inc. | Universal intelligent platform management interface (ipmi) host to baseboard management controller (bmc) communication for non-x86 and legacy free systems |
CN107562676A (en) * | 2017-09-15 | 2018-01-09 | 郑州众智科技股份有限公司 | A kind of method communicated by USB and generator set controller based on VB.net |
Also Published As
Publication number | Publication date |
---|---|
CN108664434B (en) | 2021-10-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102820959B (en) | In Modbus main website and the method for carrying out big data quantity between slave station and communicating | |
CN109272733B (en) | Multi-terminal multi-mode Internet of things communication terminal supporting multi-meter combined reading and meter reading method thereof | |
CN1953458B (en) | Apparatus and method of remote physical layer apparatus auto-negotiation | |
CN106462528A (en) | Power-saving mode for USB power delivery sourcing device | |
CN101309306A (en) | Method for allocating addresses from node device in Modbus communication network | |
CN106959935A (en) | A kind of method that compatible I2C communications communicate with IPMB | |
CN210955050U (en) | USB multi-serial port converter | |
CN109495135A (en) | A kind of debugging system and method based on power line carrier communication | |
CN102857380A (en) | Remote upgrading method for power line carrier communication routing | |
CN107547475A (en) | A kind of data processing equipment and its system for supporting more communication protocol conversions | |
CN105100000B (en) | Interface conversion device and network system | |
CN108664434A (en) | The means of communication based on generator set controller USB interface HID device | |
CN206759733U (en) | A kind of equipment communicated based on bluetooth | |
CN101566661A (en) | Electricity quality online monitoring system based on transparent transmission technology | |
CN103581228A (en) | Method and system for device communication in Internet of Things | |
CN102881146A (en) | Industrial on-site equipment data acquirer of multiple industrial buses | |
CN201196089Y (en) | Communication circuit used for down-hole instrument | |
CN207216602U (en) | A kind of network multiple single chip microcomputer once brush machine system | |
CN106681778A (en) | Multi-single-chip-microcomputer one-time flash system based on network and implementation method | |
US7286903B2 (en) | Robotic library communication protocol | |
CN108540478A (en) | A kind of micro-base station system and implementation method for intelligent grid | |
CN108833593A (en) | Smart machine monitoring device and monitoring method, system, equipment, computer media | |
CN101924668B (en) | Serial port-based MODEM outage restart control circuit | |
CN101368876B (en) | Testing bench frame control system for open type internal combustion engine | |
CN1889567B (en) | Medium-speed series connection bus controller |
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 |