WO2011160341A1 - Reader driver device, system and method based on llrp (low-level reader protocol) - Google Patents

Reader driver device, system and method based on llrp (low-level reader protocol) Download PDF

Info

Publication number
WO2011160341A1
WO2011160341A1 PCT/CN2010/076960 CN2010076960W WO2011160341A1 WO 2011160341 A1 WO2011160341 A1 WO 2011160341A1 CN 2010076960 W CN2010076960 W CN 2010076960W WO 2011160341 A1 WO2011160341 A1 WO 2011160341A1
Authority
WO
WIPO (PCT)
Prior art keywords
message
reader
llrp
module
interface
Prior art date
Application number
PCT/CN2010/076960
Other languages
French (fr)
Chinese (zh)
Inventor
陆娜
刘万立
朱睿
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2011160341A1 publication Critical patent/WO2011160341A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/0008General problems related to the reading of electronic memory record carriers, independent of its reading method, e.g. power transfer
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/10Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
    • G06K7/10009Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation sensing by radiation using wavelengths larger than 0.1 mm, e.g. radio-waves or microwaves
    • G06K7/10297Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation sensing by radiation using wavelengths larger than 0.1 mm, e.g. radio-waves or microwaves arrangements for handling protocols designed for non-contact record carriers such as RFIDs NFCs, e.g. ISO/IEC 14443 and 18092

Definitions

  • Reader driving device system and method based on LLRP protocol
  • the present invention relates to the field of RFID (Radio Frequency Identification), and more particularly to a reader driving device, system and method based on LLRP (Low-level reader protocol) protocol.
  • RFID Radio Frequency Identification
  • LLRP Low-level reader protocol
  • RFID systems typically include a reader (Reader), an electronic tag (TAG), and an upper application.
  • the reader is a radio frequency tag reading and writing device, which is an information control and processing center of the RFID system, and is used for transmitting read and write commands to the electronic tag through the spatial channel; the electronic tag receives the read/write command and then responds as necessary, and the reader is also from the upper layer.
  • the application obtains the data written to the electronic tag, or reports the data read from the electronic tag to the upper application.
  • the reader interacts with the upper application through a specific command format or a contracted protocol, which is implemented by an API (Application Program Interface) between the reader and the upper application.
  • API Application Program Interface
  • the API interface between most readers and the upper application uses RID (Reader Interface Driver: Reader Interface Driver or Reader Driver) to implement link control of the reader and basic operations such as reading and writing.
  • RID Reader Interface Driver: Reader Interface Driver or Reader Driver
  • the format encapsulated into a DLL is provided to the upper application for development. Since the communication protocol between the reader and the upper application is not completely unified, different reader vendors generally define their own APIs, so readers provided by different device vendors need to use a specific RID to implement the interface driver. Although these interface drivers provide device access, they may have incompatible control modules, command parameters, and even support different air interface protocols, so they cannot be used universally. Moreover, when the driver is updated, the upper application is also upgraded. If the system uses products from different vendors, it will obviously increase maintenance costs.
  • the introduction of the LLRP protocol provides a common interface for reader integration. It provides control over air interface operations and air interface protocol command parameters, enhances access to lower-level reader operations, and resolves the gap between readers and upper-layer applications.
  • the communication protocol cannot be completely unified.
  • the LLRP protocol has certain scalability to support other possible air interface protocols.
  • the user performs the reader on the LLRP protocol.
  • the premise of application development is to understand the LLRP protocol and the EPC protocol in depth, and the development complexity is high, which makes it difficult for users who need only simple secondary development of the reader. Summary of the invention
  • the main technical problem to be solved by the present invention is to provide a reader driving device, system and method based on LLRP protocol which are easy to realize secondary development of a reader.
  • the present invention provides a reader driving device based on the low-level reader/writer standard LLRP protocol, which comprises a basic interface, an extended interface and a communication unit;
  • the basic interface is configured to perform interaction with the upper layer application for the LLRP basic operation message;
  • the extended interface is set to perform interaction with the upper layer application for the LLRP extended operation message;
  • the communication unit is configured to implement the basic interface or the extended interface Information interaction between readers.
  • the device further includes a message processing unit, where the message processing unit includes an encoding module and a decoding module;
  • the encoding module is configured to transmit an LLRP basic operation message from the base interface or an LLRP extended operation message from the extended interface into a bitstream format and transmit the format to the communication unit;
  • the decoding module is configured to convert the LLRP basic operation message or the LLRP extended operation message from the communication unit into a message format and transmit to the base interface or the extension interface accordingly.
  • the message processing unit further includes a buffer area configured to store an LLRP basic operation message or an LLRP extended operation message from the communication unit, and provide an LLRP basic operation message or an LLRP extended operation message to the decoding module .
  • the message processing unit further includes a queue processing module, which is configured to add the LLRP basic operation message or the LLRP extended operation message that is completely decoded by the decoding module to the message queue, and then provide the corresponding basic interface or extended interface.
  • a queue processing module which is configured to add the LLRP basic operation message or the LLRP extended operation message that is completely decoded by the decoding module to the message queue, and then provide the corresponding basic interface or extended interface.
  • the message processing unit further includes a message lookup module configured to: after finding a specific LLRP basic operation message or an LLRP extended operation message from the message queue, provide the corresponding basic interface or extended interface.
  • the extension interface includes a message reading module, a parsing module, and an extended operation module.
  • the message reading module is configured to read an LLRP extended operation message in an extensible markup language XML format from an upper layer application, and send the message to the office.
  • the parsing module; and the LLRP extended operation message in XML format forwarded by the parsing module is provided to the upper layer application;
  • the parsing module is configured to convert the LLRP extended operation message in the XML format into a message format, and forward the message to the corresponding extended operation module; and parse the LLRP extended operation message of the message format into an XML format, and forward the message to the Message reading module
  • the extended operation module is configured to forward the LLRP extended operation message of the message format to the communication unit; and receive an LLRP extended operation message from the message format of the communication unit, and forward the message to the parsing module.
  • the extended operation module includes at least one of a reader operation RO rule module, an access operation AO rule module, a configuration module, and a fourth notification module;
  • the RO rule module is configured to forward the RO rule message of the message format from the parsing module to the communication unit; and forward the RO rule message of the message format from the communication unit to the parsing module;
  • the AO rule module is configured to forward the AO rule message from the message format of the parsing module to the communication unit; and forward the AO rule message of the message format from the communication unit to the parsing module;
  • the configuration module is configured to forward the rule configuration message of the message format from the parsing module to the communication unit; and forward the rule configuration message of the message format from the communication unit to the parsing module;
  • the reporting module is configured to forward the reporting rule message of the message format from the parsing module to the communication unit; and forward the reporting rule message of the message format from the communication unit to the parsing module.
  • the device further includes a reader management interface, and the reader management interface includes a reader open module and a reader close module;
  • the reader open module is configured to open the communication unit by setting a corresponding parameter object
  • the reader close module is set to close the communication unit.
  • the reader management interface further includes a link listening module configured to listen to the reader in a reader client mode.
  • the reader management interface also includes a link detection module configured to detect a link status of the reader.
  • the present invention also protects a reader control system based on the LLRP protocol, including a reader, an upper layer application, and a reader driver device based on the LLRP protocol, the reader driving device including a base interface, an expansion interface, and a communication unit;
  • the basic interface is configured to perform interaction with the upper layer application for the LLRP basic operation message;
  • the extended interface is set to perform interaction with the upper layer application for the LLRP extended operation message;
  • the communication unit is configured to implement the basic interface or the extended interface Information interaction between readers.
  • the present invention also protects a reader-driven method based on the LLRP protocol, the method comprising: performing interaction between an LLRP basic operation message and an LLRP extended operation message between an upper layer application and a base interface and an extended interface of the reader driving device; as well as
  • the basic interface or the extended interface exchanges information with the reader through the communication unit of the reader driving device.
  • the method further includes: the step of the reader driving device establishing a link with the reader in any one of the following manners:
  • the upper application calls the reader management interface, and sets the corresponding parameter object in the reader open module to the serial port parameter;
  • the upper application calls the reader management interface, and sets the corresponding parameter object in the reader open module to the IP information of the reader that needs to be linked;
  • the upper application calls the reader management interface, and listens to the reader through the link listening module, waiting for the reader to build a link.
  • the reader driver will perform the basic operation of the LLRP from the upper application.
  • the LLRP extended operation message is converted into a format of the bit stream, and the bit stream is transmitted to the reader;
  • the reader driver converts the LLRP basic operation message or the LLRP extended operation message from the reader into a message format and provides it to the upper layer application.
  • the beneficial effects of the present invention are as follows:
  • the RID and the driving method based on the LLRP protocol provided by the present invention enable the user to understand the complex LLRP protocol without having to deeply understand the complex LLRP protocol, and only need to invoke the corresponding interface to realize the extended service of the reader through simple information interaction.
  • the basic operation business facilitates secondary development of the reader, which significantly reduces development costs and improves development efficiency and flexibility compared with the prior art.
  • the invention can also control the link state of the reader, and interact with the reader through various communication modes, and can be widely applied to various work scenarios.
  • FIG. 1 is a schematic diagram of a reader control system based on the LLRP protocol according to an embodiment of the present invention
  • FIG. 2 is a flow chart of communication based on the LLRP protocol according to an embodiment of the present invention
  • Figure 3 is a flow chart of the link of the reader as a client
  • Figure 4 is a flow chart of the link of the reader as a server
  • FIG. 5 is a flowchart of implementing queue processing of an uplink message according to the present invention.
  • FIG. 6 is a flowchart of a process for finding a specific message according to the present invention.
  • FIG. 7 is a decoding flowchart of the present invention.
  • Figure 9 is a flow chart of the encoding of the present invention. Preferred embodiment of the invention
  • the invention provides a driving device and a method for realizing data interaction between a reader and an upper layer application through an LLRP protocol, which can support an LLRP basic operation message between a reader and an upper layer application.
  • LLRP extends the transmission of operational messages.
  • Embodiment 1 is a diagrammatic representation of Embodiment 1:
  • the reader control system based on the LLRP protocol of the present invention includes an upper application 10, a reader 20, and a reader driving device (referred to as RID) 30.
  • the upper application 10 can call different interfaces in the reader driving device 30, thereby implementing reader link control, basic operation control, and extended operation control.
  • reader link control includes opening the reader, turning off the reader, detecting the link, and listening to the link in the reader server mode.
  • the basic operation control includes controlling the reader to read, write, count, lock, and kill the electronic tag.
  • Basic services such as dead, query basic configuration, update basic configuration, and acquisition capabilities; extended operational controls include RO (READER OPERATION) rules for controlling readers, AO (ACESS OPERATION) rules, configuration rules, reporting rules , rule management, etc., can be used to achieve secondary development of the reader 20.
  • RO READER OPERATION
  • AO ACESS OPERATION
  • the reader 20 includes an LLRP primitive interface 21 that supports the LLRP protocol, which is arranged to interact with the RID 30 for information.
  • the RID 30 includes a reader management interface 31, a base interface 32, an extension interface 33, a message processing unit 34, and a communication unit 35.
  • the reader management interface 31, the base interface 32, and the extension interface 33 all implement corresponding operation control according to the call of the upper layer application 10;
  • the communication unit 35 is configured to implement the basic operation of the LLRP between the base interface 32 or the extension interface 33 and the reader 20.
  • Messages or LLRP extend the interaction of operational messages and other data information.
  • the reader management interface 31 is configured to manage the link status of the reader 20, including a reader open module 311, a reader close module 312, a link listening module 313, and a link detection module 314.
  • the reader open module 311 or the reader close module 312 is respectively configured to receive the opening or closing of the communication unit 35 to establish a link or disconnect link with the reader 20.
  • the communication mode of the RID 30 includes a serial port mode or a network port mode.
  • the upper layer application 10 calls the reader management interface 31, and sets the corresponding parameter object in the reader open module 31.
  • the RID 30 can open the serial port of the communication unit 35 and establish a link with the reader 20. After the link is completed, the reader closes the module 312 to disconnect and read. A link to the reader 20.
  • the network port mode includes a reader server mode and a reader client mode.
  • the upper application 10 calls the reader management interface 31 in the RID 30, and sets the corresponding parameter object in the reader open module 311 to the IP of the reader 20 that needs to be linked.
  • the RID 30 can open the network port of the communication unit 35 to implement the link with the reader 20.
  • the upper application 10 can call the reader close module 312 to disconnect the link.
  • the reader management interface 31 listens to the reader 20 by the link monitoring module 313, and waits for the reader 20 to establish a chain. After the link is completed, the link monitoring disconnection and reading can be stopped. The link to the device 20.
  • the link detection module 314 is configured to detect the link status of the reader 20 in real time or periodically during the link process, thereby determining the number of readers 20 currently linked with the upper application 10, and whether each reader 20 is normally linked with the upper application 10. If a reader 20 has disconnected the link, the upper application 10 can be reported.
  • the heartbeat detection mode is used, that is, the link detection module 314 periodically returns the heartbeat information of the reader 20 during the link process, for example, the heartbeat interval time defaults to 5s, and if the heartbeat information cannot be received within 10 seconds, the reader 20 is considered to be disconnected. Linking, the link detection module 314 can also periodically send heartbeat information to the reader 20 and wait for a response.
  • the base interface 32 is configured to perform an interaction of the LLRP basic operation message with the upper layer application 10, thereby controlling the basic service of the reader 20.
  • the LLRP basic operation message includes various messages based on the LLRP protocol, such as writing a label, reading a label, checking a label, locking a label, killing a label, querying a basic configuration, and updating a basic configuration interface, for example, including multiple RO rule messages, AO rule messages, and the like. .
  • the basic interface 32 After receiving the call of the upper layer application 10, the basic interface 32 usually needs to perform several message interactions with the reader 20 to implement a basic service, and the basic interface 32 encapsulates the parameters in each message and provides the upper layer application 10 .
  • UHF tags there are two main types of UHF tags: ISO18000-6B protocol tag and EPC C1G2 (ISO18000-6C) protocol tag.
  • ISO18000-6B protocol is the communication protocol between UHF tag and reader introduced by ISO/IEC organization.
  • the EPC C1G2 protocol differs in some key technologies such as physical layer data encoding, modulation mode, and anti-collision algorithm; depending on the tag type, the base interface 32 can implement basic service operations independently for the two tags.
  • the LLRP basic operation message is sent in the downlink direction mainly in the Message format, and after being encoded and converted into a bit (output) stream, the LLRP basic operation message is exchanged with the reader 20 through the communication unit 35; In the uplink direction, the LLRP basic operation message in the bit stream format is decoded, converted into a Message format, and the extracted result is output to the upper layer application 10.
  • the extension interface 33 is configured to perform an interaction of the LLRP extended operation message with the upper layer application 10, thereby controlling the extended service of the reader 20.
  • the LLRP extended operation message includes controlling the RO rule, the AO rule, the configuration rule, the report rule, etc. based on the LLRP protocol.
  • the various messages generally include only one RO rule message, AO rule message or other rule message.
  • the extended interface 33 After receiving the call of the upper application 10, the extended interface 33 usually only needs to perform an information interaction with the reader 20 to implement an extended service, which is usually used to independently set a certain parameter, for example, for a certain RO rule. Add, delete, start, stop, activate, etc., report rule messages are used to obtain report messages returned by the reader 20, and the like.
  • the LLRP extended operation message is sent in the downlink direction mainly in an XML (Extensible Markup Language) file format, first parsed into a Message format, and then encoded into a bit stream, and then transmitted to the reader 20 through the communication unit 35;
  • the LLRP basic operation message in the bit stream format is decoded and converted into a Message format, and then the generated XML file is reported to the upper layer application 10.
  • the extension interface 33 includes a message reading module 331, a parsing module 332, and a plurality of extended operation modules.
  • the message reading module 331 is configured to read the LLRP extended operation message in the XML format from the upper layer application 10 and send it to the parsing module 332.
  • the uplink direction it is set to the XML format forwarded by the parsing module 332.
  • the LLRP extended operation message is provided to the upper layer application 10.
  • the parsing module 332 is configured to convert the LLRP extended operation message in XML format into a Message format and forward it to the corresponding extended operation module 333.
  • it is configured to parse the LLRP extended operation message in the message format.
  • the format is XML and forwarded to the message reading module 331.
  • the extended operation module 333 is configured to forward the LLRP extended operation message in the Message format to the communication unit 35; in the uplink direction, it is further configured to receive the LLRP extended operation message in the Message format from the communication unit 35, and forward the message.
  • the parsing module 332 is provided.
  • the extended operation module 333 includes at least one or more of an RO rule module, an AO rule module, a configuration module, and a report module, and controls RO rules, AO rules, configuration rules, report rules, and the like, respectively.
  • the RO rule module is configured to forward the message rule RO rule message from the parsing module 332 to the communication unit 35, and also set the message format RO from the communication unit 35.
  • the rule message is forwarded to the parsing module 332;
  • the AO rule module is configured to forward the AO rule message in the Message format from the parsing module 332 to the communication unit 35, and further set to forward the AO rule message in the Message format from the communication unit 35 to the parsing
  • the module 332 is configured to forward the rule configuration message of the Message format from the parsing module 332 to the communication unit 35, and further set to forward the rule configuration message of the Message format from the communication unit 35 to the parsing module 332;
  • the report rule message of the Message format from the parsing module 332 is forwarded to the communication unit 35, and is further configured to forward the report rule message of the Message format from the communication unit 35 to the parsing module 332.
  • the message processing unit 34 is configured to perform corresponding codec on the LLRP basic operation message or the LLRP extended operation message, including the encoding module 341, the decoding module 342, the buffer area 343, the queue processing module 344, the message lookup module 345, and the like.
  • the encoding module 341 is arranged to transmit the LLRP basic operation message from the Message format of the base interface 32 or the LLRP extended operation message of the Message format from the extended interface 33 into a bit stream format for transmission to the communication unit 35.
  • the decoding module 342 is arranged to convert the bit stream from the communication unit 35 into an LLRP basic operation message or an LLRP extended operation message in the message format and forward it to the base interface 32 or the extension interface 33 accordingly.
  • the Message based on the LLRP protocol is mainly composed of a parameter and a field. The decoding process will be described in detail below with reference to FIGS. 6 to 8.
  • the buffer area 343 is set to store the LLRP basic operation message or the LLRP extended operation message from the bit stream format of the communication unit 35, and perform reception processing in accordance with the corresponding reception state and then transmit to the decoding module 342.
  • the receiving status of the message in the buffer area 343 includes three states: READY, FRAME_ERROR, NEED_MORE, etc., which respectively represent the receipt of a complete frame message, receiving error, and need to continue receiving.
  • the queue processing module 344 is arranged to add the LLRP basic operation message or the LLRP extended operation message that is completely decoded by the decoding module 342 to the message queue, and to the base interface 32 or the extension interface 33 in the order of the message queue.
  • the message lookup module 345 is configured to look up a specific LLRP basic operation from the message queue.
  • the message or LLRP extended the operation message and provides it to the corresponding base interface 32 or extension interface 33, which can be searched according to the message type or ID number, and the message is deleted from the message queue after the search is completed.
  • RID 30 sends an AddROSpec message to reader 20, and after receiving 20, it returns an AddROSpecResponse message, and RID 30 needs to find the AddROSpecResponse message from the message queue.
  • the ID number of the AddROSpecResponse message is the same as the ID number of the AddROSpec, it is judged that the response message of the AddROSpec is found, and after the AddROSpecResponse message is extracted to the base interface 32 or the extended interface 33, the message is deleted from the message queue.
  • the present invention also protects a reader-driven method based on the LLRP protocol.
  • the upper layer application 10 and the reader 20 implement the interaction between the LLRP basic operation message and the LLRP extension operation message through the RID 30 described above. Specifically, after the reader 20 is linked with the RID 30, in the downlink direction, the upper layer application 10 calls the corresponding interface of the RID 30, converts the LLRP basic operation message or the LLRP extended operation message into a bit stream format, and transmits the bit stream to the bit stream.
  • the reader 20 in the uplink direction, the RID 30 converts the LLRP basic operation message or the LLRP extended operation message from the bit stream format of the reader 20 into a Message format and provides it to the upper layer application 10 through a corresponding interface.
  • an embodiment of the present invention is based on a communication flow of the LLRP protocol, and the RID 30 is used to control the reader 20 to implement an inventory operation by using an RO rule, including the following steps:
  • Step S201 The RID 30 establishes a link with the reader 20.
  • the communication mode of the communication unit 35 can be set to the serial port mode or the network port mode, and the network port mode includes the reader server mode or the reader client mode.
  • the upper application 10 can also invoke the basic interface 32 of the RID 30 to query and update the basic configuration of the reader 20, including antenna power, antenna in-position detection, antenna status query, pre-reverse rate, coding type, modulation mode, Common parameters such as communication type parameters, protocol type, device code, and fixed frequency hopping.
  • the interaction between the LLRP basic operation message or the LLRP extended operation message can be implemented with the reader 20.
  • Step S202 According to the LLRP protocol standard, the RID 30 is sent through the basic interface 32.
  • the AddROSpec message is sent to the reader 20, indicating the addition of the RO rule.
  • the LLRP protocol typically uses various Spec (Spec) commands to declare various parameter objects of the reader 20, each Spec command representing a rule of operation or an operation itself.
  • Step S203 The base interface 32 receives the AddROSpecResponse message returned by the reader 20. (ie add a RO rule response) to determine that the AddROSpec operation was successful.
  • Step S204 The base interface 32 sends an EnableROSpec message to the reader 20 indicating that the RO rule is activated.
  • Step S205 The base interface 32 receives the EnableROSpecResponse message returned by the reader 20 to determine that the EnableROSpec operation is successful.
  • Step S206 The base interface 32 sends a StartROSpec message to the reader 20 instructing the reader 20 to begin performing an inventory operation based on the specific parameters in the RO rule.
  • Step S207 The base interface 32 receives the result of the inventory operation returned by the reader 20, and provides the result of the inventory operation to the upper layer application 10.
  • Step S208 The base interface 32 sends a StopROSpec message to the reader 20 indicating that the RO rule is stopped.
  • Step S209 The base interface 32 sends a DeleteROSpec message to the reader 20, indicating that the RO rule is deleted.
  • the link process of the reader 20 as a client includes the following steps:
  • Step S301 The RID 30 starts the link monitoring module 313 to listen to the reader 20.
  • the link monitoring module 313 first calls the Windows network programming interface WSAStart to initialize Winsock, thereby creating a socket function.
  • Step S302 Call the socket function to create a listener.
  • Step S303 Binding the interception to the communication object specified by the socket function.
  • Step S304 Calling a listener (listen) to wait for a link.
  • Step S305 Call accept (accept) to accept the link, and generate a session socket.
  • Step S306 The send function (send ( )) and the receive function (recv ( )) are called to talk with the reader 20.
  • Step S307 After the link is completed, the close socket is called to close the socket, and the reader 20 is stopped.
  • the reader 20 serves as a service.
  • the link process of the end includes the following steps;
  • Step S401 RID 30 starts the reader to open the module 311, and the reader opens the module 311 to first call the Windows network programming interface WSAStart to initialize Winsock, thereby creating a socket function.
  • Step S402 Call a socket function to create a session.
  • Step S403 After the session is successfully created, a connection (connect) is invoked, and the corresponding parameter object is set to the IP information of the reader 20 that needs to be linked.
  • Step S403 Calling send ( ) and recv ( ) to make a conversation with the reader 20 through the communication unit 35.
  • Step S404 After the link is completed, the reader close module 311 calls the closesocket function to close the socket and stops the reader 20 from listening.
  • FIG. 5 is a flowchart of a process for implementing queue processing of an uplink message according to the present invention
  • Step S501 The process starts.
  • Step S502 The communication unit 35 receives the bit stream format LLRP basic operation message or the LLRP extended operation message from the reader 20 through the serial port or the network port.
  • Step S503 The received bit stream is stored in the buffer area 343.
  • Step S504 Determine the status of the message. If the message status is NEED_MORE, the process proceeds to step S502 to continue receiving. If it is FRAME_ERROR, step S508 is performed, and if it is READY, step S505 is performed.
  • Step S505 Parsing the LLRP basic operation message in the bit stream format by the decoding module 342 or
  • Step S506 It is judged whether a complete message is obtained, and if yes, step S507 is performed, otherwise step S508 is performed.
  • Step S507 Add the parsed complete LLRP basic operation message or LLRP extended operation message to the message queue by the queue processing module 344; Go to step 502.
  • Step S508 Clear the buffer area 343, and proceed to step S502 to continue receiving the message.
  • FIG. 6 is a flowchart of a process for finding a specific message according to the present invention: Step S601: The process starts.
  • Step S602 The message lookup module 345 starts the exclusive message queue and searches for a message with a specific type or ID number from the message queue.
  • Step S603 If a corresponding specific message is found, go to step S604, otherwise go to step S606.
  • Step S604 Extract the corresponding specific message and correspondingly forward to the basic interface 32 or the extended interface 33, and delete the specific message from the message queue.
  • Step S605 Cancel the exclusive use of the message queue, and proceed to step S609.
  • Step S606 determining whether to traverse the entire message queue, if yes, proceeding to step S607, otherwise returning to step S602 to continue searching.
  • Step S607 Cancel the exclusive use of the message queue.
  • Step S608 The search operation may also be controlled by a certain timing mechanism. If the predetermined time is up, the process proceeds to step S609, otherwise, the process proceeds to step S602.
  • Step S609 The search process ends; for different services, such as inventory business, the process can also be cycled multiple times.
  • Figure 7 shows the decoding process of the present invention comprising the following steps:
  • Step S701 Start decoding.
  • Step S702 The decoding process of the present invention is used to convert the bit stream into a message object, and the decoding module 342 first obtains the complete data in a bit stream format.
  • the specific acquisition process is as shown in FIG. 8.
  • Step S703 First parsing the frame header to obtain three parameters MessageType, MessageLength,
  • MessagelD which refers to the message type, message length, and ID number of the message, respectively.
  • Step S704 Create a Message object according to the MessageType.
  • Step S705 Parse the field part of the Message object, and set the object attribute of the parameter to the corresponding value.
  • Step S706 Next, parse the Parameter part of the Message object. Since the Fields in the Parameter of the TLV type parameter may be a value or a sub-parameter, first determine whether the parameter type is a TLV type, if yes, go to step S707, otherwise go to step S708. Step S707: Traverse the sub-parameters, and then proceeds to step S708.
  • Step S708 Set an object attribute of the parameter to the corresponding value.
  • Step S709 Obtain a complete Parameter part of the Message object.
  • Step S710 The decoding process ends.
  • Step S801 The process starts.
  • Step S802 After the RID 30 receives the binary bit stream, the encoding module 342 first parses the current stream length CurrentFrameLength »
  • Step S803 It is judged whether CurrentFrameLength is less than 10 bytes, if yes, go to step S804, otherwise, go to step S805.
  • Step S804 Continue to receive data until the CurrentFrameLength is greater than 10 bytes, and the process proceeds to step S805.
  • Step S805 When the CurrentFrameLength is greater than 10 bytes, it indicates that the frame header is received, and the analysis header obtains the total frame length TotalFrameLength.
  • Step S806 determining whether CurrentFrameLength ⁇ TotalFrameLength, if yes, proceeding to step S807, otherwise proceeding to step S808.
  • Step S808 Obtain a complete one frame message.
  • Step S809 The receiving process ends.
  • Figure 9 is a flow chart of the encoding of the present invention.
  • Step S901 Encoding starts.
  • Step S902 The encoding module 341 first acquires a message object.
  • Step S903 The message header is generated according to the obtained message object.
  • Step S904 traverse all the message parameters to generate a binary bit stream.
  • Step S905 Processing the message byte stream length in the message header.
  • Step S906 The encoding process ends.
  • the RID and driving method based on the LLRP protocol provided by the invention makes it unnecessary for the user to deeply understand the complex LLRP protocol, and only needs to invoke the corresponding interface, so that the extended service and the basic operation service of the reader can be realized through simple information interaction, which is convenient for the user to
  • the secondary development of the reader significantly reduces development costs and improves development efficiency and flexibility compared to the prior art.
  • the invention can also control the link state of the reader, and interact with the reader through various communication modes, and can be widely applied to various work scenarios.
  • the LLRP protocol-based reader driving device, system and method provided by the invention enable the user to understand the complex LLRP protocol without having to deeply understand the complex LLRP protocol, and can realize the extended service and basic operation of the reader through simple information interaction.
  • the business facilitates secondary development of the reader, significantly reducing development costs and improving development efficiency and flexibility.
  • the present invention can also control the link state of the reader, and perform data interaction with the reader through various communication modes, and can be widely applied to various work scenarios.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Health & Medical Sciences (AREA)
  • Toxicology (AREA)
  • Artificial Intelligence (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Electromagnetism (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Communication Control (AREA)

Abstract

A reader driver device, a system and a method based on a LLRP (Low-level reader protocol) protocol are provided, wherein, the reader driver device based on LLRP protocol comprises a base interface, an extension interface and a communication interface. The base interface is configured to interact with upper layer application about LLRP base operation messages. The extension interface is configured to interact with upper layer application about LLRP extension operation messages. The communication interface is configured to implement the message interaction between the base interface or the extension interface and the reader. The device is convenient to re-develop the reader based on LLRP protocol, reduces the development cost obviously, and improves the development efficiency and flexibility.

Description

基于 LLRP协议的阅读器驱动装置、 系统及方法  Reader driving device, system and method based on LLRP protocol
技术领域 Technical field
本发明涉及 RFID ( Radio Frequency Identification: 射频识别)领域, 尤 其涉及一种基于 LLRP ( Low-level reader protocol: 低层读写器标准 )协议的 阅读器驱动装置、 系统及方法。  The present invention relates to the field of RFID (Radio Frequency Identification), and more particularly to a reader driving device, system and method based on LLRP (Low-level reader protocol) protocol.
背景技术 Background technique
RFID系统通常包括阅读器(Reader ) 、 电子标签(TAG )和上层应用。 阅读器即射频标签读写设备, 是 RFID 系统的信息控制和处理中心, 用 于通过空间信道向电子标签发送读写命令; 电子标签接收读写命令后做出必 要的响应, 阅读器还从上层应用获取写入电子标签的数据, 或者向上层应用 上报从电子标签读取的数据。 一般情况下, 阅读器与上层应用之间通过特定 的命令格式或约定的协议进行数据交互, 该交互功能通过阅读器与上层应用 之间的 API ( Application Program Interface: 应用程序编程接口) 实现。 大多 数阅读器与上层应用之间的 API接口釆用 RID ( Reader Interface Driver: 阅读 器接口驱动或阅读器驱动装置) 实现对阅读器的链接控制以及读、 写等基本 操作, RID将相应的信息封装成 DLL ( Dynamic Link Library: 动态链接库) 的格式提供给上层应用以便进行开发。 由于阅读器与上层应用之间的通信协 议没有完全统一, 不同的阅读器设备商一般都定义了自己的 API, 因此不同 设备商提供的阅读器需要使用特定的 RID实现接口驱动。 这些接口驱动虽然 都提供了设备访问功能, 但可能具有互不相容的控制模块、 命令参数甚至是 支持不同的空口协议, 因此无法通用。 而且当驱动程序更新时, 上层应用也 随之升级, 如果系统釆用了不同设备商的产品, 显然会增加维护成本。  RFID systems typically include a reader (Reader), an electronic tag (TAG), and an upper application. The reader is a radio frequency tag reading and writing device, which is an information control and processing center of the RFID system, and is used for transmitting read and write commands to the electronic tag through the spatial channel; the electronic tag receives the read/write command and then responds as necessary, and the reader is also from the upper layer. The application obtains the data written to the electronic tag, or reports the data read from the electronic tag to the upper application. In general, the reader interacts with the upper application through a specific command format or a contracted protocol, which is implemented by an API (Application Program Interface) between the reader and the upper application. The API interface between most readers and the upper application uses RID (Reader Interface Driver: Reader Interface Driver or Reader Driver) to implement link control of the reader and basic operations such as reading and writing. The RID will respond to the corresponding information. The format encapsulated into a DLL (Dynamic Link Library) is provided to the upper application for development. Since the communication protocol between the reader and the upper application is not completely unified, different reader vendors generally define their own APIs, so readers provided by different device vendors need to use a specific RID to implement the interface driver. Although these interface drivers provide device access, they may have incompatible control modules, command parameters, and even support different air interface protocols, so they cannot be used universally. Moreover, when the driver is updated, the upper application is also upgraded. If the system uses products from different vendors, it will obviously increase maintenance costs.
LLRP协议的推出为阅读器集成提供了一个共用的接口,它提供了对空口 操作和空口协议命令参数的控制能力 ,增强了更底层阅读器操作的访问能力 , 解决了阅读器与上层应用之间的通信协议不能完全统一的问题。 LLRP协议除 了目前对 EPC (电子产品代码)协议的支持外, 还具备一定的扩展能力, 能 够支持其它可能出现的空口协议。 然而, 用户基于 LLRP协议对阅读器进行 应用开发的前提是深入了解 LLRP协议以及 EPC协议等,开发的复杂性较高 , 这对于只需要对阅读器进行简单二次开发的用户带来困难。 发明内容 The introduction of the LLRP protocol provides a common interface for reader integration. It provides control over air interface operations and air interface protocol command parameters, enhances access to lower-level reader operations, and resolves the gap between readers and upper-layer applications. The communication protocol cannot be completely unified. In addition to the current support for the EPC (Electronic Product Code) protocol, the LLRP protocol has certain scalability to support other possible air interface protocols. However, the user performs the reader on the LLRP protocol. The premise of application development is to understand the LLRP protocol and the EPC protocol in depth, and the development complexity is high, which makes it difficult for users who need only simple secondary development of the reader. Summary of the invention
本发明要解决的主要技术问题是, 提供一种易于实现阅读器二次开发的 基于 LLRP协议的阅读器驱动装置、 系统及方法。  The main technical problem to be solved by the present invention is to provide a reader driving device, system and method based on LLRP protocol which are easy to realize secondary development of a reader.
为解决上述技术问题, 本发明提供一种基于低层读写器标准 LLRP协议 的阅读器驱动装置, 包括基础接口、 扩展接口和通信单元;  In order to solve the above technical problem, the present invention provides a reader driving device based on the low-level reader/writer standard LLRP protocol, which comprises a basic interface, an extended interface and a communication unit;
基础接口设置为, 与上层应用之间进行 LLRP基本操作消息的交互; 扩展接口设置为, 与上层应用之间进行 LLRP扩展操作消息的交互; 通信单元设置为, 实现所述基础接口或扩展接口与阅读器之间的信息交 互。  The basic interface is configured to perform interaction with the upper layer application for the LLRP basic operation message; the extended interface is set to perform interaction with the upper layer application for the LLRP extended operation message; the communication unit is configured to implement the basic interface or the extended interface Information interaction between readers.
进一步地, 所述装置还包括消息处理单元, 所述消息处理单元包括编码 模块和解码模块;  Further, the device further includes a message processing unit, where the message processing unit includes an encoding module and a decoding module;
编码模块设置为, 将来自所述基础接口的 LLRP基本操作消息、 或来自 所述扩展接口的 LLRP扩展操作消息转换成比特流的格式传输至所述通信单 元;  The encoding module is configured to transmit an LLRP basic operation message from the base interface or an LLRP extended operation message from the extended interface into a bitstream format and transmit the format to the communication unit;
解码模块设置为, 将来自所述通信单元的 LLRP基本操作消息或 LLRP 扩展操作消息转换成消息格式, 并相应传输至所述基础接口或扩展接口。  The decoding module is configured to convert the LLRP basic operation message or the LLRP extended operation message from the communication unit into a message format and transmit to the base interface or the extension interface accordingly.
优选地, 所述消息处理单元还包括緩存区, 其设置为存储来自所述通信 单元的 LLRP基本操作消息或 LLRP扩展操作消息,并将 LLRP基本操作消息 或 LLRP扩展操作消息提供给所述解码模块。  Preferably, the message processing unit further includes a buffer area configured to store an LLRP basic operation message or an LLRP extended operation message from the communication unit, and provide an LLRP basic operation message or an LLRP extended operation message to the decoding module .
优选地, 所述消息处理单元还包括队列处理模块, 其设置为将所述解码 模块完整解码的 LLRP基本操作消息或 LLRP扩展操作消息添加至消息队列 后, 提供给对应的基础接口或扩展接口。  Preferably, the message processing unit further includes a queue processing module, which is configured to add the LLRP basic operation message or the LLRP extended operation message that is completely decoded by the decoding module to the message queue, and then provide the corresponding basic interface or extended interface.
所述消息处理单元还包括消息查找模块, 其设置为从所述消息队列中查 找特定的 LLRP基本操作消息或 LLRP扩展操作消息后, 提供给对应的基础 接口或扩展接口。 进一步地, 所述扩展接口包括消息读取模块、解析模块和扩展操作模块; 所述消息读取模块设置为, 从上层应用读取可扩展标记语言 XML格式 的 LLRP扩展操作消息,并发送给所述解析模块;以及将解析模块转发的 XML 格式的 LLRP扩展操作消息提供给上层应用; The message processing unit further includes a message lookup module configured to: after finding a specific LLRP basic operation message or an LLRP extended operation message from the message queue, provide the corresponding basic interface or extended interface. Further, the extension interface includes a message reading module, a parsing module, and an extended operation module. The message reading module is configured to read an LLRP extended operation message in an extensible markup language XML format from an upper layer application, and send the message to the office. The parsing module; and the LLRP extended operation message in XML format forwarded by the parsing module is provided to the upper layer application;
解析模块设置为,将所述 XML格式的 LLRP扩展操作消息转换成消息格 式, 并转发给相应的扩展操作模块; 以及将所述消息格式的 LLRP扩展操作 消息解析成 XML格式, 并转发给所述消息读取模块;  The parsing module is configured to convert the LLRP extended operation message in the XML format into a message format, and forward the message to the corresponding extended operation module; and parse the LLRP extended operation message of the message format into an XML format, and forward the message to the Message reading module
扩展操作模块设置为, 将所述消息格式的 LLRP扩展操作消息转发至通 信单元; 以及接收来自所述通信单元的消息格式的 LLRP扩展操作消息, 并 转发给所述解析模块。  The extended operation module is configured to forward the LLRP extended operation message of the message format to the communication unit; and receive an LLRP extended operation message from the message format of the communication unit, and forward the message to the parsing module.
所述扩展操作模块包括阅读器操作 RO规则模块、 访问操作 AO规则模 块、 配置模块、 4艮告模块中的至少一种;  The extended operation module includes at least one of a reader operation RO rule module, an access operation AO rule module, a configuration module, and a fourth notification module;
RO规则模块设置为,将来自解析模块的消息格式的 RO规则消息转发至 通讯单元; 以及将来自所述通讯单元的消息格式的 RO规则消息转发给所述 解析模块;  The RO rule module is configured to forward the RO rule message of the message format from the parsing module to the communication unit; and forward the RO rule message of the message format from the communication unit to the parsing module;
AO规则模块设置为,将来自解析模块的消息格式的 AO规则消息转发至 通讯单元; 以及将来自所述通讯单元的消息格式的 AO规则消息转发给所述 解析模块;  The AO rule module is configured to forward the AO rule message from the message format of the parsing module to the communication unit; and forward the AO rule message of the message format from the communication unit to the parsing module;
配置模块设置为, 将来自解析模块的消息格式的规则配置消息转发至通 讯单元; 以及将来自所述通讯单元的消息格式的规则配置消息转发给所述解 析模块;  The configuration module is configured to forward the rule configuration message of the message format from the parsing module to the communication unit; and forward the rule configuration message of the message format from the communication unit to the parsing module;
报告模块设置为, 将来自解析模块的消息格式的报告规则消息转发至通 讯单元; 以及将来自所述通讯单元的消息格式的报告规则消息转发给所述解 析模块。  The reporting module is configured to forward the reporting rule message of the message format from the parsing module to the communication unit; and forward the reporting rule message of the message format from the communication unit to the parsing module.
进一步地, 所述装置还包括阅读器管理接口, 所述阅读器管理接口包括 阅读器打开模块和阅读器关闭模块;  Further, the device further includes a reader management interface, and the reader management interface includes a reader open module and a reader close module;
阅读器打开模块设置为, 通过设置相应的参数对象, 打开所述通信单元, 阅读器关闭模块设置为, 关闭所述通讯单元。 以及, 所述阅读器管理接口还包括链路监听模块, 其设置为在阅读器客 户端模式下监听所述阅读器。 The reader open module is configured to open the communication unit by setting a corresponding parameter object, and the reader close module is set to close the communication unit. And, the reader management interface further includes a link listening module configured to listen to the reader in a reader client mode.
所述阅读器管理接口还包括链路检测模块, 其设置为检测所述阅读器的 链接状态。  The reader management interface also includes a link detection module configured to detect a link status of the reader.
本发明还保护了一种基于 LLRP协议的阅读器控制系统, 包括阅读器、 上层应用和基于 LLRP协议的阅读器驱动装置, 所述阅读器驱动装置包括基 础接口、 扩展接口和通信单元;  The present invention also protects a reader control system based on the LLRP protocol, including a reader, an upper layer application, and a reader driver device based on the LLRP protocol, the reader driving device including a base interface, an expansion interface, and a communication unit;
基础接口设置为, 与上层应用之间进行 LLRP基本操作消息的交互; 扩展接口设置为, 与上层应用之间进行 LLRP扩展操作消息的交互; 通信单元设置为, 实现所述基础接口或扩展接口与阅读器之间的信息交 互。  The basic interface is configured to perform interaction with the upper layer application for the LLRP basic operation message; the extended interface is set to perform interaction with the upper layer application for the LLRP extended operation message; the communication unit is configured to implement the basic interface or the extended interface Information interaction between readers.
本发明还保护了一种基于 LLRP协议的阅读器驱动方法, 所述方法包括: 上层应用分别与阅读器驱动装置的基础接口和扩展接口之间进行 LLRP基本 操作消息和 LLRP扩展操作消息的交互; 以及  The present invention also protects a reader-driven method based on the LLRP protocol, the method comprising: performing interaction between an LLRP basic operation message and an LLRP extended operation message between an upper layer application and a base interface and an extended interface of the reader driving device; as well as
所述基础接口或扩展接口通过所述阅读器驱动装置的通讯单元与阅读器 之间进行信息交互。  The basic interface or the extended interface exchanges information with the reader through the communication unit of the reader driving device.
进一步地, 进行所述 LLRP基本操作消息和 LLRP扩展操作消息的交互 之前, 所述方法还包括: 阅读器驱动装置通过以下任一方式与阅读器建立链 接的步骤:  Further, before performing the interaction between the LLRP basic operation message and the LLRP extended operation message, the method further includes: the step of the reader driving device establishing a link with the reader in any one of the following manners:
串口模式下, 上层应用调用阅读器管理接口, 并将阅读器打开模块中相 应的参数对象设置为串口参数;  In the serial port mode, the upper application calls the reader management interface, and sets the corresponding parameter object in the reader open module to the serial port parameter;
阅读器服务端模式下, 上层应用调用阅读器管理接口, 并将阅读器打开 模块中相应的参数对象设置为需要链接的阅读器的 IP信息;  In the reader server mode, the upper application calls the reader management interface, and sets the corresponding parameter object in the reader open module to the IP information of the reader that needs to be linked;
阅读器客户端模式下, 上层应用调用阅读器管理接口, 并通过链路监听 模块监听阅读器, 等待阅读器建链。  In the reader client mode, the upper application calls the reader management interface, and listens to the reader through the link listening module, waiting for the reader to build a link.
进一步地, 所述交互的具体方式为:  Further, the specific manner of the interaction is:
在下行方向, 阅读器驱动装置将来自所述上层应用的 LLRP基本操作消 息或 LLRP扩展操作消息转换成比特流的格式, 并将所述比特流传输给阅读 器; In the downstream direction, the reader driver will perform the basic operation of the LLRP from the upper application. The LLRP extended operation message is converted into a format of the bit stream, and the bit stream is transmitted to the reader;
在上行方向, 阅读器驱动装置将来自所述阅读器的 LLRP基本操作消息 或 LLRP扩展操作消息转换成消息格式, 并提供给上层应用。  In the upstream direction, the reader driver converts the LLRP basic operation message or the LLRP extended operation message from the reader into a message format and provides it to the upper layer application.
本发明的有益效果是: 本发明提供的基于 LLRP协议的 RID和驱动方法 使得用户不必深入了解复杂的 LLRP协议, 只需调用相应的接口, 即可通过 简单的信息交互实现阅读器的扩展业务和基本操作业务, 便于对阅读器进行 二次开发, 与现有技术相比, 显著降低了开发成本, 提高了开发效率和灵活 度。  The beneficial effects of the present invention are as follows: The RID and the driving method based on the LLRP protocol provided by the present invention enable the user to understand the complex LLRP protocol without having to deeply understand the complex LLRP protocol, and only need to invoke the corresponding interface to realize the extended service of the reader through simple information interaction. The basic operation business facilitates secondary development of the reader, which significantly reduces development costs and improves development efficiency and flexibility compared with the prior art.
本发明还能够控制阅读器的链接状态, 通过多种通讯模式与阅读器进行 数据交互, 可广泛应用于多种工作场景。 附图概述  The invention can also control the link state of the reader, and interact with the reader through various communication modes, and can be widely applied to various work scenarios. BRIEF abstract
图 1为本发明一种实施例基于 LLRP协议的阅读器控制系统示意图; 图 2为本发明一种实施例基于 LLRP协议的通讯流程图;  1 is a schematic diagram of a reader control system based on the LLRP protocol according to an embodiment of the present invention; FIG. 2 is a flow chart of communication based on the LLRP protocol according to an embodiment of the present invention;
图 3为阅读器作为客户端的链接流程图;  Figure 3 is a flow chart of the link of the reader as a client;
图 4为阅读器作为服务端的链接流程图;  Figure 4 is a flow chart of the link of the reader as a server;
图 5为本发明实现上行消息的队列处理的流程图;  FIG. 5 is a flowchart of implementing queue processing of an uplink message according to the present invention;
图 6为本发明查找特定消息的工作流程图;  6 is a flowchart of a process for finding a specific message according to the present invention;
图 7为本发明的解码流程图;  Figure 7 is a decoding flowchart of the present invention;
图 8为解码流程中获取完整一帧消息的流程图;  8 is a flow chart of obtaining a complete frame message in a decoding process;
图 9为本发明的编码流程图。 本发明的较佳实施方式  Figure 9 is a flow chart of the encoding of the present invention. Preferred embodiment of the invention
下面通过具体实施方式结合附图对本发明作进一步详细说明。  The present invention will be further described in detail below with reference to the accompanying drawings.
本发明提供了阅读器与上层应用之间进行通过 LLRP协议实现数据交互 的驱动装置和方法, 能够支持阅读器与上层应用之间 LLRP基本操作消息和 LLRP扩展操作消息的传输。 The invention provides a driving device and a method for realizing data interaction between a reader and an upper layer application through an LLRP protocol, which can support an LLRP basic operation message between a reader and an upper layer application. LLRP extends the transmission of operational messages.
实施例一:  Embodiment 1:
请参考图 1 , 本发明基于 LLRP协议的阅读器控制系统包括上层应用 10、 阅读器 20和阅读器驱动装置 (简称 RID ) 30。  Referring to FIG. 1, the reader control system based on the LLRP protocol of the present invention includes an upper application 10, a reader 20, and a reader driving device (referred to as RID) 30.
其中, 上层应用 10能够调用阅读器驱动装置 30中的不同接口, 从而实 现阅读器链接控制, 基本操作控制以及扩展操作控制。 例如阅读器链接控制 包括打开阅读器、 关闭阅读器、 链路检测、 阅读器服务端模式下的链路监听 等; 基本操作控制包括控制阅读器对于电子标签的读、 写、 清点、 锁定、 杀 死、 查询基础配置、 更新基础配置、 获取能力等基本业务; 扩展操作控制包 括控制阅读器的 RO ( READER OPERATION:阅读器操作 )规则、 AO ( ACESS OPERATION: 访问操作)规则、 配置规则、 报告规则、 规则管理等, 可用于 实现阅读器 20的二次开发。  Among them, the upper application 10 can call different interfaces in the reader driving device 30, thereby implementing reader link control, basic operation control, and extended operation control. For example, reader link control includes opening the reader, turning off the reader, detecting the link, and listening to the link in the reader server mode. The basic operation control includes controlling the reader to read, write, count, lock, and kill the electronic tag. Basic services such as dead, query basic configuration, update basic configuration, and acquisition capabilities; extended operational controls include RO (READER OPERATION) rules for controlling readers, AO (ACESS OPERATION) rules, configuration rules, reporting rules , rule management, etc., can be used to achieve secondary development of the reader 20.
阅读器 20包括支持 LLRP协议的 LLRP原语接口 21 ,其设置为和 RID 30 进行信息交互。  The reader 20 includes an LLRP primitive interface 21 that supports the LLRP protocol, which is arranged to interact with the RID 30 for information.
RID 30包括阅读器管理接口 31、 基础接口 32、 扩展接口 33、 消息处理 单元 34和通信单元 35。 阅读器管理接口 31、基础接口 32、扩展接口 33都根 据上层应用 10的调用实现相应的操作控制; 通讯单元 35设置为, 实现基础 接口 32或扩展接口 33与阅读器 20之间的 LLRP基本操作消息或 LLRP扩展 操作消息以及其他数据信息的交互。  The RID 30 includes a reader management interface 31, a base interface 32, an extension interface 33, a message processing unit 34, and a communication unit 35. The reader management interface 31, the base interface 32, and the extension interface 33 all implement corresponding operation control according to the call of the upper layer application 10; the communication unit 35 is configured to implement the basic operation of the LLRP between the base interface 32 or the extension interface 33 and the reader 20. Messages or LLRP extend the interaction of operational messages and other data information.
其中, 阅读器管理接口 31设置为, 管理阅读器 20的链接状态, 包括阅 读器打开模块 311、 阅读器关闭模块 312、链路监听模块 313和链路检测模块 314。 上层应用 10与阅读器 20进行交互时, 阅读器打开模块 311或阅读器关 闭模块 312分别设置为, 接收打开或关闭通信单元 35, 从而与阅读器 20建 立链接或者断开链接。  The reader management interface 31 is configured to manage the link status of the reader 20, including a reader open module 311, a reader close module 312, a link listening module 313, and a link detection module 314. When the upper application 10 interacts with the reader 20, the reader open module 311 or the reader close module 312 is respectively configured to receive the opening or closing of the communication unit 35 to establish a link or disconnect link with the reader 20.
RID 30的通讯模式包括串口模式或网口模式, 阅读器 20与 RID 30在串 口模式下实现通信时, 上层应用 10调用阅读器管理接口 31 , 并将阅读器打 开模块 31中相应的参数对象设置为串口参数, RID 30即可打开通信单元 35 的串口与阅读器 20建立链接,链接完成后调用阅读器关闭模块 312断开与阅 读器 20的链接。 The communication mode of the RID 30 includes a serial port mode or a network port mode. When the reader 20 and the RID 30 communicate in the serial port mode, the upper layer application 10 calls the reader management interface 31, and sets the corresponding parameter object in the reader open module 31. For the serial port parameter, the RID 30 can open the serial port of the communication unit 35 and establish a link with the reader 20. After the link is completed, the reader closes the module 312 to disconnect and read. A link to the reader 20.
网口模式包括阅读器服务端模式和阅读器客户端模式。 在阅读器服务端 模式下,阅读器 20启动后,上层应用 10调用 RID 30中的阅读器管理接口 31 , 并将阅读器打开模块 311中相应的参数对象设置为需要链接的阅读器 20的 IP 信息, RID 30即可打开通信单元 35的网口与该阅读器 20实现链接, 链接完 成后, 上层应用 10可调用阅读器关闭模块 312断开链接。 在阅读器客户端模 式下, 上层应用 10调用阅读器管理接口 31 , 利用链路监听模块 313监听阅 读器 20并等待阅读器 20建链, 建链完成后, 可停止链路监听断开与阅读器 20的链接。  The network port mode includes a reader server mode and a reader client mode. In the reader server mode, after the reader 20 is started, the upper application 10 calls the reader management interface 31 in the RID 30, and sets the corresponding parameter object in the reader open module 311 to the IP of the reader 20 that needs to be linked. The RID 30 can open the network port of the communication unit 35 to implement the link with the reader 20. After the link is completed, the upper application 10 can call the reader close module 312 to disconnect the link. In the reader client mode, the upper application 10 calls the reader management interface 31, listens to the reader 20 by the link monitoring module 313, and waits for the reader 20 to establish a chain. After the link is completed, the link monitoring disconnection and reading can be stopped. The link to the device 20.
链路检测模块 314设置为,在链接过程中实时或者定期检测阅读器 20的 链接状态, 从而判断当前与上层应用 10链接的阅读器 20数量, 以及各个阅 读器 20是否与上层应用 10正常链接等,如果某个阅读器 20已经断开链接则 可上报上层应用 10。 优选釆用心跳的检测方式, 即链接过程中链路检测模块 314定期回复阅读器 20的心跳信息, 例如心跳间隔时间默认为 5s, 如果 10 秒内无法收到心跳信息则认为阅读器 20断开链接, 还可由链路检测模块 314 定期向阅读器 20发送心跳信息并等待回应。  The link detection module 314 is configured to detect the link status of the reader 20 in real time or periodically during the link process, thereby determining the number of readers 20 currently linked with the upper application 10, and whether each reader 20 is normally linked with the upper application 10. If a reader 20 has disconnected the link, the upper application 10 can be reported. Preferably, the heartbeat detection mode is used, that is, the link detection module 314 periodically returns the heartbeat information of the reader 20 during the link process, for example, the heartbeat interval time defaults to 5s, and if the heartbeat information cannot be received within 10 seconds, the reader 20 is considered to be disconnected. Linking, the link detection module 314 can also periodically send heartbeat information to the reader 20 and wait for a response.
基础接口 32设置为, 与上层应用 10之间进行 LLRP基本操作消息的交 互, 从而控制阅读器 20的基本业务。 LLRP基本操作消息包括基于 LLRP协 议实现写标签、 读标签、 清点标签、 锁定标签、 杀死标签、 查询基础配置、 更新基础配置接口的各种消息,例如包括多条 RO规则消息、 AO规则消息等。 接收上层应用 10的调用后,基础接口 32通常需要与阅读器 20之间进行几次 消息交互才能实现一项基本业务,基础接口 32对各项消息中的参数进行封装 后, 提供给上层应用 10。 目前超高频标签主要有两种: ISO18000-6B协议标 签和 EPC C1G2 ( ISO18000-6C )协议标签, ISO18000-6B 协议是 ISO/IEC 组织推出的超高频标签和阅读器之间的通信协议, 与 EPC C1G2协议在物理 层数据编码、 调制方式、 防碰撞算法等一些关键技术上有所不同; 根据标签 类型的不同, 基础接口 32可对两种标签独立地实现基本业务操作。  The base interface 32 is configured to perform an interaction of the LLRP basic operation message with the upper layer application 10, thereby controlling the basic service of the reader 20. The LLRP basic operation message includes various messages based on the LLRP protocol, such as writing a label, reading a label, checking a label, locking a label, killing a label, querying a basic configuration, and updating a basic configuration interface, for example, including multiple RO rule messages, AO rule messages, and the like. . After receiving the call of the upper layer application 10, the basic interface 32 usually needs to perform several message interactions with the reader 20 to implement a basic service, and the basic interface 32 encapsulates the parameters in each message and provides the upper layer application 10 . At present, there are two main types of UHF tags: ISO18000-6B protocol tag and EPC C1G2 (ISO18000-6C) protocol tag. ISO18000-6B protocol is the communication protocol between UHF tag and reader introduced by ISO/IEC organization. The EPC C1G2 protocol differs in some key technologies such as physical layer data encoding, modulation mode, and anti-collision algorithm; depending on the tag type, the base interface 32 can implement basic service operations independently for the two tags.
LLRP基本操作消息在下行方向主要以 Message (消息 )格式下发, 经过 编码后转换成 bit (输出)流后, 通过通信单元 35与阅读器 20进行交互; 在 上行方向 , 对 bit流格式的 LLRP基本操作消息进行解码后 , 转换成 Message 格式, 并提取结果输出给上层应用 10。 The LLRP basic operation message is sent in the downlink direction mainly in the Message format, and after being encoded and converted into a bit (output) stream, the LLRP basic operation message is exchanged with the reader 20 through the communication unit 35; In the uplink direction, the LLRP basic operation message in the bit stream format is decoded, converted into a Message format, and the extracted result is output to the upper layer application 10.
扩展接口 33设置为, 与上层应用 10之间进行 LLRP扩展操作消息的交 互, 从而控制阅读器 20的扩展业务, LLRP扩展操作消息包括基于 LLRP协 议控制 RO规则、 AO规则、 配置规则、 报告规则等的各种消息, 一般情况下 仅包括一条 RO规则消息、 AO规则消息或其他规则消息等。 接收上层应用 10的调用后, 扩展接口 33通常只需与阅读器 20之间进行一次信息交互即可 实现一项扩展业务, 通常用于独立地设置某一参数, 例如用于某一 RO规则 的添加、 删除、 启动、 停止、 激活等, 报告规则消息用于获取阅读器 20返回 的报告消息等。 LLRP扩展操作消息在下行方向主要以 XML (可扩展标记语 言)文件格式下发, 首先解析成 Message格式, 经过编码转换成 bit流后, 再 通过通信单元 35传输给阅读器 20; 在上行方向, 对 bit流格式的 LLRP基本 操作消息进行解码转换成 Message格式后 ,再生成 XML文件上报给上层应用 10。  The extension interface 33 is configured to perform an interaction of the LLRP extended operation message with the upper layer application 10, thereby controlling the extended service of the reader 20. The LLRP extended operation message includes controlling the RO rule, the AO rule, the configuration rule, the report rule, etc. based on the LLRP protocol. The various messages generally include only one RO rule message, AO rule message or other rule message. After receiving the call of the upper application 10, the extended interface 33 usually only needs to perform an information interaction with the reader 20 to implement an extended service, which is usually used to independently set a certain parameter, for example, for a certain RO rule. Add, delete, start, stop, activate, etc., report rule messages are used to obtain report messages returned by the reader 20, and the like. The LLRP extended operation message is sent in the downlink direction mainly in an XML (Extensible Markup Language) file format, first parsed into a Message format, and then encoded into a bit stream, and then transmitted to the reader 20 through the communication unit 35; The LLRP basic operation message in the bit stream format is decoded and converted into a Message format, and then the generated XML file is reported to the upper layer application 10.
扩展接口 33包括消息读取模块 331、 解析模块 332和多个扩展操作模块 The extension interface 33 includes a message reading module 331, a parsing module 332, and a plurality of extended operation modules.
333。 333.
在下行方向, 消息读取模块 331设置为, 从上层应用 10读取 XML格式 的 LLRP扩展操作消息, 并发送给解析模块 332; 在上行方向, 其设置为, 将 解析模块 332转发的 XML格式的 LLRP扩展操作消息提供给上层应用 10。  In the downlink direction, the message reading module 331 is configured to read the LLRP extended operation message in the XML format from the upper layer application 10 and send it to the parsing module 332. In the uplink direction, it is set to the XML format forwarded by the parsing module 332. The LLRP extended operation message is provided to the upper layer application 10.
在下行方向,解析模块 332设置为,将 XML格式的 LLRP扩展操作消息 转换成 Message格式, 并转发给相应的扩展操作模块 333; 在上行方向, 其 设置为,将消息格式的 LLRP扩展操作消息解析成 XML格式, 并转发给消息 读取模块 331。  In the downlink direction, the parsing module 332 is configured to convert the LLRP extended operation message in XML format into a Message format and forward it to the corresponding extended operation module 333. In the uplink direction, it is configured to parse the LLRP extended operation message in the message format. The format is XML and forwarded to the message reading module 331.
在下行方向, 扩展操作模块 333设置为, 将 Message格式的 LLRP扩展 操作消息转发至通信单元 35; 在上行方向, 其还设置为, 接收来自通信单元 35的 Message格式的 LLRP扩展操作消息, 并转发给解析模块 332。  In the downlink direction, the extended operation module 333 is configured to forward the LLRP extended operation message in the Message format to the communication unit 35; in the uplink direction, it is further configured to receive the LLRP extended operation message in the Message format from the communication unit 35, and forward the message. The parsing module 332 is provided.
根据不同的扩展操作业务,扩展操作模块 333包括 RO规则模块、 AO规 则模块、 配置模块、 报告模块中至少一种或多种, 分别控制 RO规则、 AO规 则、 配置规则、 报告规则等。 具体地, 针对 RO规则消息、 AO规则消息、 配 置规则消息、 报告规则消息等 LLRP扩展操作消息, RO规则模块设置为, 将 来自解析模块 332的 Message格式的 RO规则消息转发至通讯单元 35 , 还设 置为将来自通讯单元 35的 Message格式的 RO规则消息转发给解析模块 332; AO规则模块设置为,将来自解析模块 332的 Message格式的 AO规则消息转 发至通讯单元 35 ,还设置为将来自通讯单元 35的 Message格式的 AO规则消 息转发给解析模块 332; 配置模块设置为, 将来自解析模块 332的 Message 格式的规则配置消息转发至通讯单元 35 , 还设置为将来自通讯单元 35 的 Message格式的规则配置消息转发给解析模块 332; 报告模块设置为, 将来自 解析模块 332的 Message格式的报告规则消息转发至通讯单元 35 , 还设置为 将来自通讯单元 35的 Message格式的报告规则消息转发给解析模块 332。 The extended operation module 333 includes at least one or more of an RO rule module, an AO rule module, a configuration module, and a report module, and controls RO rules, AO rules, configuration rules, report rules, and the like, respectively. Specifically, for the RO rule message, the AO rule message, and the allocation An LLRP extended operation message, such as a rule message, a report rule message, and the like, the RO rule module is configured to forward the message rule RO rule message from the parsing module 332 to the communication unit 35, and also set the message format RO from the communication unit 35. The rule message is forwarded to the parsing module 332; the AO rule module is configured to forward the AO rule message in the Message format from the parsing module 332 to the communication unit 35, and further set to forward the AO rule message in the Message format from the communication unit 35 to the parsing The module 332 is configured to forward the rule configuration message of the Message format from the parsing module 332 to the communication unit 35, and further set to forward the rule configuration message of the Message format from the communication unit 35 to the parsing module 332; The report rule message of the Message format from the parsing module 332 is forwarded to the communication unit 35, and is further configured to forward the report rule message of the Message format from the communication unit 35 to the parsing module 332.
消息处理单元 34设置为, 对 LLRP基本操作消息或 LLRP扩展操作消息 进行相应的编解码, 包括编码模块 341、 解码模块 342、 緩存区 343、 队列处 理模块 344、 消息查找模块 345等。  The message processing unit 34 is configured to perform corresponding codec on the LLRP basic operation message or the LLRP extended operation message, including the encoding module 341, the decoding module 342, the buffer area 343, the queue processing module 344, the message lookup module 345, and the like.
在下行方向, 编码模块 341设置为, 将来自基础接口 32的 Message格式 的 LLRP基本操作消息、 或来自扩展接口 33的 Message格式的 LLRP扩展操 作消息转换成 bit流的格式传输至通信单元 35。  In the downstream direction, the encoding module 341 is arranged to transmit the LLRP basic operation message from the Message format of the base interface 32 or the LLRP extended operation message of the Message format from the extended interface 33 into a bit stream format for transmission to the communication unit 35.
在上行方向, 解码模块 342设置为, 将来自通信单元 35的 bit流转换成 Message格式的 LLRP基本操作消息或 LLRP扩展操作消息,并相应地转发至 基础接口 32 或扩展接口 33。 基于 LLRP 协议的 Message 主要由参数 ( Parameter )和域( Field )构成, 以下将结合图 6至图 8详细描述解码流程。  In the upstream direction, the decoding module 342 is arranged to convert the bit stream from the communication unit 35 into an LLRP basic operation message or an LLRP extended operation message in the message format and forward it to the base interface 32 or the extension interface 33 accordingly. The Message based on the LLRP protocol is mainly composed of a parameter and a field. The decoding process will be described in detail below with reference to FIGS. 6 to 8.
在上行方向, 緩存区 343设置为, 存储来自通信单元 35的 bit流格式的 LLRP基本操作消息或 LLRP扩展操作消息,并按照相应的接收状态进行接收 处理后传输至所述解码模块 342。緩存区 343内消息的接收状态包括 READY、 FRAME— ERROR、 NEED— MORE等三种状态 , 分别代表接收到完整的一帧消 息、 接收错误、 需继续接收。  In the upstream direction, the buffer area 343 is set to store the LLRP basic operation message or the LLRP extended operation message from the bit stream format of the communication unit 35, and perform reception processing in accordance with the corresponding reception state and then transmit to the decoding module 342. The receiving status of the message in the buffer area 343 includes three states: READY, FRAME_ERROR, NEED_MORE, etc., which respectively represent the receipt of a complete frame message, receiving error, and need to continue receiving.
队列处理模块 344设置为, 将解码模块 342完整解码的 LLRP基本操作 消息或 LLRP扩展操作消息添加至消息队列, 并按照消息队列的顺序提供给 基础接口 32或扩展接口 33。  The queue processing module 344 is arranged to add the LLRP basic operation message or the LLRP extended operation message that is completely decoded by the decoding module 342 to the message queue, and to the base interface 32 or the extension interface 33 in the order of the message queue.
消息查找模块 345设置为, 从消息队列中查找特定的 LLRP基本操作消 息或 LLRP扩展操作消息, 并将其提供给对应的基础接口 32或扩展接口 33 , 可根据消息类型或者 ID号进行查找, 查找完成后从消息队列中删除消息。 例 如 RID 30发送一个 AddROSpec (增加 RO规则) 消息给阅读器 20, 阅读器 20接收后会返回 AddROSpecResponse (增加 RO规则回应 ) 消息, 这时 RID 30 需要到从消息队列 中查找该 AddROSpecResponse 消息, 若该 AddROSpecResponse消息的 ID号与 AddROSpec的 ID号一致, 则判断找到 AddROSpec的回应消息, 提取该 AddROSpecResponse消息给基础接口 32或 扩展接口 33后, 从消息队列中删除该消息。 The message lookup module 345 is configured to look up a specific LLRP basic operation from the message queue. The message or LLRP extended the operation message and provides it to the corresponding base interface 32 or extension interface 33, which can be searched according to the message type or ID number, and the message is deleted from the message queue after the search is completed. For example, RID 30 sends an AddROSpec message to reader 20, and after receiving 20, it returns an AddROSpecResponse message, and RID 30 needs to find the AddROSpecResponse message from the message queue. If the ID number of the AddROSpecResponse message is the same as the ID number of the AddROSpec, it is judged that the response message of the AddROSpec is found, and after the AddROSpecResponse message is extracted to the base interface 32 or the extended interface 33, the message is deleted from the message queue.
本发明还保护了一种基于 LLRP协议的阅读器驱动方法, 上层应用 10与 阅读器 20之间通过以上所述的 RID 30实现 LLRP基本操作消息和 LLRP扩 展操作消息的交互。 具体地, 阅读器 20与 RID 30实现链接后, 在下行方向, 上层应用 10调用 RID 30的相应接口, 将 LLRP基本操作消息或 LLRP扩展 操作消息转换成 bit流的格式,并将 bit流传输给阅读器 20;在上行方向, RID 30将来自阅读器 20的 bit流格式的 LLRP基本操作消息或 LLRP扩展操作消 息转换成 Message格式, 并通过相应的接口提供给上层应用 10。  The present invention also protects a reader-driven method based on the LLRP protocol. The upper layer application 10 and the reader 20 implement the interaction between the LLRP basic operation message and the LLRP extension operation message through the RID 30 described above. Specifically, after the reader 20 is linked with the RID 30, in the downlink direction, the upper layer application 10 calls the corresponding interface of the RID 30, converts the LLRP basic operation message or the LLRP extended operation message into a bit stream format, and transmits the bit stream to the bit stream. The reader 20; in the uplink direction, the RID 30 converts the LLRP basic operation message or the LLRP extended operation message from the bit stream format of the reader 20 into a Message format and provides it to the upper layer application 10 through a corresponding interface.
如图 2所示, 本发明一种实施例基于 LLRP协议的通讯流程, RID 30用 于控制阅读器 20利用一种 RO规则实现清点操作, 包括以下步骤:  As shown in FIG. 2, an embodiment of the present invention is based on a communication flow of the LLRP protocol, and the RID 30 is used to control the reader 20 to implement an inventory operation by using an RO rule, including the following steps:
步骤 S201 : RID 30与阅读器 20建立链接。 链接过程中, 通信单元 35的 通讯模式可以设置为串口模式或网口模式, 网口模式包括阅读器服务端模式 或阅读器客户端模式。 链接成功后, 上层应用 10还可调用 RID 30 的基础接 口 32查询及更新阅读器 20的基本配置, 包括天线功率、 天线在位检测、 天 线状态查询、 前反向速率、 编码类型、 调制方式、 通信类型参数、 协议类型、 设备编码、 定频跳频等常用参数。 协议类型、 天线功率等配置完成后, 即可 与阅读器 20实现 LLRP基本操作消息或 LLRP扩展操作消息的交互。  Step S201: The RID 30 establishes a link with the reader 20. During the linking process, the communication mode of the communication unit 35 can be set to the serial port mode or the network port mode, and the network port mode includes the reader server mode or the reader client mode. After the link is successful, the upper application 10 can also invoke the basic interface 32 of the RID 30 to query and update the basic configuration of the reader 20, including antenna power, antenna in-position detection, antenna status query, pre-reverse rate, coding type, modulation mode, Common parameters such as communication type parameters, protocol type, device code, and fixed frequency hopping. After the configuration of the protocol type, antenna power, etc. is completed, the interaction between the LLRP basic operation message or the LLRP extended operation message can be implemented with the reader 20.
步骤 S202 : 根据 LLRP 协议标准, RID 30 通过基础接口 32 发送 Step S202: According to the LLRP protocol standard, the RID 30 is sent through the basic interface 32.
AddROSpec消息给阅读器 20, 指示添加 RO规则。 LLRP协议通常釆用各种 规格 ( Spec )命令来声明阅读器 20的各种参数对象, 每个 Spec命令代表一 种操作的规则或者说一种操作本身。 The AddROSpec message is sent to the reader 20, indicating the addition of the RO rule. The LLRP protocol typically uses various Spec (Spec) commands to declare various parameter objects of the reader 20, each Spec command representing a rule of operation or an operation itself.
步骤 S203:基础接口 32接收阅读器 20返回的 AddROSpecResponse消息 (即添加 RO规则回应) , 从而确定 AddROSpec操作成功。 Step S203: The base interface 32 receives the AddROSpecResponse message returned by the reader 20. (ie add a RO rule response) to determine that the AddROSpec operation was successful.
步骤 S204: 基础接口 32向阅读器 20发送 EnableROSpec消息, 指示激 活 RO规则。  Step S204: The base interface 32 sends an EnableROSpec message to the reader 20 indicating that the RO rule is activated.
步骤 S205: 基础接口 32接收阅读器 20返回的 EnableROSpecResponse (激活 RO规则回应) 消息, 从而确定 EnableROSpec操作成功。  Step S205: The base interface 32 receives the EnableROSpecResponse message returned by the reader 20 to determine that the EnableROSpec operation is successful.
步骤 S206:基础接口 32向阅读器 20发送 StartROSpec (开始执行 RO规 则) 消息, 指示阅读器 20开始根据 RO规则中的具体参数执行清点操作。  Step S206: The base interface 32 sends a StartROSpec message to the reader 20 instructing the reader 20 to begin performing an inventory operation based on the specific parameters in the RO rule.
步骤 S207: 基础接口 32接收阅读器 20返回的清点操作结果, 并提供清 点操作结果给上层应用 10。  Step S207: The base interface 32 receives the result of the inventory operation returned by the reader 20, and provides the result of the inventory operation to the upper layer application 10.
步骤 S208: 基础接口 32向阅读器 20发送 StopROSpec (停止执行 RO规 则 ) 消息, 指示停止 RO规则。  Step S208: The base interface 32 sends a StopROSpec message to the reader 20 indicating that the RO rule is stopped.
步骤 S209:基础接口 32向阅读器 20发送 DeleteROSpec (删除 RO规则 ) 消息, 指示删除 RO规则。  Step S209: The base interface 32 sends a DeleteROSpec message to the reader 20, indicating that the RO rule is deleted.
如图 3所示, RID 30工作在阅读器客户端模式时, 阅读器 20作为客户 端的链接流程包括以下步骤:  As shown in FIG. 3, when the RID 30 works in the reader client mode, the link process of the reader 20 as a client includes the following steps:
步骤 S301 : RID 30启动链路监听模块 313监听阅读器 20, 链路监听模 块 313首先调用 Windows网络编程接口 WSAStart初始化 Winsock,从而创建 一个套接字 (socket ) 函数。  Step S301: The RID 30 starts the link monitoring module 313 to listen to the reader 20. The link monitoring module 313 first calls the Windows network programming interface WSAStart to initialize Winsock, thereby creating a socket function.
步骤 S302: 调用 socket函数创建一个监听。  Step S302: Call the socket function to create a listener.
步骤 S303: 绑定监听为 socket函数指定的通信对象。  Step S303: Binding the interception to the communication object specified by the socket function.
步骤 S304: 调用监听(listen )等待链接。  Step S304: Calling a listener (listen) to wait for a link.
步骤 S305: 调用接受 (accept )接受链接, 并生成会话 socket。  Step S305: Call accept (accept) to accept the link, and generate a session socket.
步骤 S306: 调用发送函数(send ( ) )和接收函数(recv ( ) )与阅读 器 20进行会话。  Step S306: The send function (send ( )) and the receive function (recv ( )) are called to talk with the reader 20.
步骤 S307:链接完成后,调用关闭套接字(closesocket )函数关闭 socket, 停止阅读器 20监听。  Step S307: After the link is completed, the close socket is called to close the socket, and the reader 20 is stopped.
如图 4所示, RID 30工作在阅读器服务端模式时, 阅读器 20作为服务 端的链接流程包括以下步骤; As shown in FIG. 4, when the RID 30 operates in the reader server mode, the reader 20 serves as a service. The link process of the end includes the following steps;
步骤 S401 : RID 30启动阅读器打开模块 311 , 阅读器打开模块 311首 先调用 Windows 网络编程接口 WSAStart初始化 Winsock, 从而创建一个 socket函数。  Step S401: RID 30 starts the reader to open the module 311, and the reader opens the module 311 to first call the Windows network programming interface WSAStart to initialize Winsock, thereby creating a socket function.
步骤 S402: 调用 socket函数创建一个会话。  Step S402: Call a socket function to create a session.
步骤 S403: 会话创建成功后调用连接(connect ) , 相应的参数对象设置 为需要链接的阅读器 20的 IP信息。  Step S403: After the session is successfully created, a connection (connect) is invoked, and the corresponding parameter object is set to the IP information of the reader 20 that needs to be linked.
步骤 S403: 调用 send ( )和 recv ( ) , 通过通信单元 35与阅读器 20进 行会话。  Step S403: Calling send ( ) and recv ( ) to make a conversation with the reader 20 through the communication unit 35.
步骤 S404: 链接完成后, 阅读器关闭模块 311调用 closesocket函数关闭 socket, 停止阅读器 20监听。  Step S404: After the link is completed, the reader close module 311 calls the closesocket function to close the socket and stops the reader 20 from listening.
图 5为本发明一种实现上行消息的队列处理的工作流程图;  FIG. 5 is a flowchart of a process for implementing queue processing of an uplink message according to the present invention;
步骤 S501 : 流程开始。  Step S501: The process starts.
步骤 S502: 通信单元 35通过串口或网口接收来自阅读器 20的 bit流格 式的 LLRP基本操作消息或 LLRP扩展操作消息。  Step S502: The communication unit 35 receives the bit stream format LLRP basic operation message or the LLRP extended operation message from the reader 20 through the serial port or the network port.
步骤 S503: 将接收到的 bit流储存在緩存区 343。  Step S503: The received bit stream is stored in the buffer area 343.
步骤 S504: 判断消息状态, 如果是消息状态是 NEED— MORE则执行步 骤 S502继续接收,如果是 FRAME— ERROR则执行步骤 S508,如果是 READY 则执行步骤 S505。  Step S504: Determine the status of the message. If the message status is NEED_MORE, the process proceeds to step S502 to continue receiving. If it is FRAME_ERROR, step S508 is performed, and if it is READY, step S505 is performed.
步骤 S505: 通过解码模块 342解析 bit流格式的 LLRP基本操作消息或 Step S505: Parsing the LLRP basic operation message in the bit stream format by the decoding module 342 or
LLRP扩展操作消息, 解码流程如图 7所示。 LLRP extended the operation message, and the decoding process is shown in Figure 7.
步骤 S506: 判断是否得到完整消息, 若是, 则执行步骤 S507, 否则执行 步骤 S508。  Step S506: It is judged whether a complete message is obtained, and if yes, step S507 is performed, otherwise step S508 is performed.
步骤 S507: 通过队列处理模块 344将解析后的完整的 LLRP基本操作消 息或 LLRP扩展操作消息添加到消息队列中; 转向步骤 502。  Step S507: Add the parsed complete LLRP basic operation message or LLRP extended operation message to the message queue by the queue processing module 344; Go to step 502.
步骤 S508: 清空緩存区 343 , 进入步骤 S502继续接收消息。  Step S508: Clear the buffer area 343, and proceed to step S502 to continue receiving the message.
图 6为本发明一种查找特定消息的工作流程图: 步骤 S601 : 流程开始。 FIG. 6 is a flowchart of a process for finding a specific message according to the present invention: Step S601: The process starts.
步骤 S602消息查找模块 345开始独占消息队列,从消息队列中查找具有 特定类型或 ID号的消息。  Step S602 The message lookup module 345 starts the exclusive message queue and searches for a message with a specific type or ID number from the message queue.
步骤 S603: 如果找到对应的特定消息, 则进入步骤 S604, 否则进入步骤 S606。  Step S603: If a corresponding specific message is found, go to step S604, otherwise go to step S606.
步骤 S604:提取对应特定消息并对应转发至基础接口 32或扩展接口 33 , 并从消息队列中删除该特定消息。  Step S604: Extract the corresponding specific message and correspondingly forward to the basic interface 32 or the extended interface 33, and delete the specific message from the message queue.
步骤 S605: 取消对消息队列的独占, 并进入步骤 S609。  Step S605: Cancel the exclusive use of the message queue, and proceed to step S609.
步骤 S606: 判断是否遍历整个消息队列, 是则进入步骤 S607 , 否则回到 步骤 S602继续查找。  Step S606: determining whether to traverse the entire message queue, if yes, proceeding to step S607, otherwise returning to step S602 to continue searching.
步骤 S607: 取消对消息队列的独占。  Step S607: Cancel the exclusive use of the message queue.
步骤 S608: 还可通过一定的定时机制控制该查找操作, 如果预定时间到 则进入步骤 S609 , 否则进入步骤 S602。  Step S608: The search operation may also be controlled by a certain timing mechanism. If the predetermined time is up, the process proceeds to step S609, otherwise, the process proceeds to step S602.
步骤 S609: 查找流程结束; 对于不同的业务, 例如清点业务, 还可多次 循环该流程。  Step S609: The search process ends; for different services, such as inventory business, the process can also be cycled multiple times.
图 7为本发明的解码流程包括以下步骤:  Figure 7 shows the decoding process of the present invention comprising the following steps:
步骤 S701 : 开始解码。  Step S701: Start decoding.
步骤 S702: 本发明的解码过程用于将 bit流转换为消息对象, 解码模块 342首先获得完整的一帧 bit流格式的数据, 具体获取过程如图 8所示。  Step S702: The decoding process of the present invention is used to convert the bit stream into a message object, and the decoding module 342 first obtains the complete data in a bit stream format. The specific acquisition process is as shown in FIG. 8.
步骤 S703: 首先解析帧头得到三种参数 MessageType, MessageLength, Step S703: First parsing the frame header to obtain three parameters MessageType, MessageLength,
MessagelD, 分别指消息类型、 消息长度和消息的 ID号 MessagelD, which refers to the message type, message length, and ID number of the message, respectively.
步骤 S704: 根据 MessageType创建一个 Message对象。  Step S704: Create a Message object according to the MessageType.
步骤 S705: 解析 Message对象所带的 field部分, 对相应的 value设置参 数的对象属性。  Step S705: Parse the field part of the Message object, and set the object attribute of the parameter to the corresponding value.
步骤 S706: 接着解析 Message对象所带的 Parameter部分, 由于 TLV类 型参数的 Parameter中的 Fields可能是 value或者子参数, 首先判断参数类型 是否为 TLV类型, 是则进入步骤 S707 , 否则进入步骤 S708。 步骤 S707: 遍历子参数, 接着进入步骤 S708。 Step S706: Next, parse the Parameter part of the Message object. Since the Fields in the Parameter of the TLV type parameter may be a value or a sub-parameter, first determine whether the parameter type is a TLV type, if yes, go to step S707, otherwise go to step S708. Step S707: Traverse the sub-parameters, and then proceeds to step S708.
步骤 S708: 对相应的 value设置参数的对象属性。  Step S708: Set an object attribute of the parameter to the corresponding value.
步骤 S709: 得到 Message对象完整的 Parameter部分。  Step S709: Obtain a complete Parameter part of the Message object.
步骤 S710: 解码流程结束。  Step S710: The decoding process ends.
图 8为解码流程中获取完整一帧消息的流程图;  8 is a flow chart of obtaining a complete frame message in a decoding process;
步骤 S801 : 流程开始。  Step S801: The process starts.
步骤 S802: RID 30接收到二进制的 bit流后, 编码模块 342首先对其进 行解析得到当前贞长 CurrentFrameLength »  Step S802: After the RID 30 receives the binary bit stream, the encoding module 342 first parses the current stream length CurrentFrameLength »
步骤 S803: 判断 CurrentFrameLength是否小于 10字节, 是则进入步骤 S804, 否则进入步骤 S805。  Step S803: It is judged whether CurrentFrameLength is less than 10 bytes, if yes, go to step S804, otherwise, go to step S805.
步骤 S804: 继续接收数据, 直到 CurrentFrameLength大于 10字节时进入 步骤 S805。  Step S804: Continue to receive data until the CurrentFrameLength is greater than 10 bytes, and the process proceeds to step S805.
步骤 S805: CurrentFrameLength大于 10字节时, 表明帧头接收完成, 分 析消息头得到总帧长度 TotalFrameLength。  Step S805: When the CurrentFrameLength is greater than 10 bytes, it indicates that the frame header is received, and the analysis header obtains the total frame length TotalFrameLength.
步骤 S806: 判断是否 CurrentFrameLength<TotalFrameLength, 是则进入 步骤 S807, 否则进入步骤 S808。  Step S806: determining whether CurrentFrameLength<TotalFrameLength, if yes, proceeding to step S807, otherwise proceeding to step S808.
步骤 S807: 继续接收直到 CurrentFrameLength=TotalFrameLength时进入 步骤 S808。  Step S807: Continue to receive until CurrentFrameLength=TotalFrameLength, and proceed to step S808.
步骤 S808: 得到完整的一帧消息。  Step S808: Obtain a complete one frame message.
步骤 S809: 接收流程结束。  Step S809: The receiving process ends.
图 9为本发明的编码流程图。  Figure 9 is a flow chart of the encoding of the present invention.
步骤 S901 : 编码开始。  Step S901: Encoding starts.
步骤 S902: 编码模块 341首先获取消息对象。  Step S902: The encoding module 341 first acquires a message object.
步骤 S903: 才艮据得到的消息对象生成消息头。  Step S903: The message header is generated according to the obtained message object.
步骤 S904: 遍历所有的消息参数生成二进制的 bit流。  Step S904: traverse all the message parameters to generate a binary bit stream.
步骤 S905: 处理消息头中的消息字节流长度。 步骤 S906: 编码流程结束。 Step S905: Processing the message byte stream length in the message header. Step S906: The encoding process ends.
本发明提供的基于 LLRP协议的 RID和驱动方法使得用户不必深入了解 复杂的 LLRP协议, 只需调用相应的接口, 即可通过简单的信息交互实现阅 读器的扩展业务和基本操作业务, 便于用户对阅读器进行二次开发, 与现有 技术相比, 显著降低了开发成本, 提高了开发效率和灵活度。  The RID and driving method based on the LLRP protocol provided by the invention makes it unnecessary for the user to deeply understand the complex LLRP protocol, and only needs to invoke the corresponding interface, so that the extended service and the basic operation service of the reader can be realized through simple information interaction, which is convenient for the user to The secondary development of the reader significantly reduces development costs and improves development efficiency and flexibility compared to the prior art.
本发明还能够控制阅读器的链接状态, 通过多种通讯模式与阅读器进行 数据交互, 可广泛应用于多种工作场景。  The invention can also control the link state of the reader, and interact with the reader through various communication modes, and can be widely applied to various work scenarios.
本领域普通技术人员可以理解上述方法中的全部或部分步骤可通过程序 来指令相关硬件完成, 所述程序可以存储于计算机可读存储介质中, 如只读 存储器、 磁盘或光盘等。 可选地, 上述实施例的全部或部分步骤也可以使用 一个或多个集成电路来实现。 相应地, 上述实施例中的各模块 /单元可以釆用 硬件的形式实现, 也可以釆用软件功能模块的形式实现。 本发明不限制于任 何特定形式的硬件和软件的结合。  One of ordinary skill in the art will appreciate that all or a portion of the steps above may be accomplished by a program to instruct the associated hardware, such as a read-only memory, a magnetic disk, or an optical disk. Alternatively, all or part of the steps of the above embodiments may also be implemented using one or more integrated circuits. Correspondingly, each module/unit in the above embodiment may be implemented in the form of hardware or in the form of a software function module. The invention is not limited to any specific form of combination of hardware and software.
以上内容是结合具体的实施方式对本发明所作的进一步详细说明, 不能 认定本发明的具体实施只局限于这些说明。 对于本发明所属技术领域的普通 技术人员来说, 在不脱离本发明构思的前提下, 还可以做出若干简单推演或 替换, 都应当视为属于本发明的保护范围。  The above is a further detailed description of the present invention in connection with the specific embodiments, and it is not intended that the specific embodiments of the invention are limited to the description. It will be apparent to those skilled in the art that the present invention may be practiced without departing from the spirit and scope of the invention.
工业实用性 Industrial applicability
本发明提供的基于 LLRP协议的阅读器驱动装置、 系统及方法, 使得用 户不必深入了解复杂的 LLRP协议, 只需调用相应的接口, 即可通过简单的 信息交互实现阅读器的扩展业务和基本操作业务, 便于对阅读器进行二次开 发, 显著降低了开发成本, 提高了开发效率和灵活度。 并且, 本发明还能够 控制阅读器的链接状态, 通过多种通讯模式与阅读器进行数据交互, 可广泛 应用于多种工作场景。  The LLRP protocol-based reader driving device, system and method provided by the invention enable the user to understand the complex LLRP protocol without having to deeply understand the complex LLRP protocol, and can realize the extended service and basic operation of the reader through simple information interaction. The business facilitates secondary development of the reader, significantly reducing development costs and improving development efficiency and flexibility. Moreover, the present invention can also control the link state of the reader, and perform data interaction with the reader through various communication modes, and can be widely applied to various work scenarios.

Claims

权 利 要 求 书 Claim
1、 一种基于低层读写器标准 LLRP协议的阅读器驱动装置, 其包括: 基 础接口、 扩展接口和通信单元;  1. A reader driver device based on a low-level reader/writer standard LLRP protocol, comprising: a base interface, an expansion interface, and a communication unit;
基础接口设置为, 与上层应用之间进行 LLRP基本操作消息的交互; 扩展接口设置为, 与上层应用之间进行 LLRP扩展操作消息的交互; 通信单元设置为, 实现所述基础接口或扩展接口与阅读器之间的信息交 互。  The basic interface is configured to perform interaction with the upper layer application for the LLRP basic operation message; the extended interface is set to perform interaction with the upper layer application for the LLRP extended operation message; the communication unit is configured to implement the basic interface or the extended interface Information interaction between readers.
2、 如权利要求 1所述的装置, 所述装置还包括消息处理单元, 所述消息 处理单元包括编码模块和解码模块;  2. The apparatus of claim 1, the apparatus further comprising a message processing unit, the message processing unit comprising an encoding module and a decoding module;
编码模块设置为, 将来自所述基础接口的 LLRP基本操作消息、 或来自 所述扩展接口的 LLRP扩展操作消息转换成比特流的格式传输至所述通信单 元;  The encoding module is configured to transmit an LLRP basic operation message from the base interface or an LLRP extended operation message from the extended interface into a bitstream format and transmit the format to the communication unit;
解码模块设置为, 将来自所述通信单元的 LLRP基本操作消息或 LLRP 扩展操作消息转换成消息格式, 并相应传输至所述基础接口或扩展接口。  The decoding module is configured to convert the LLRP basic operation message or the LLRP extended operation message from the communication unit into a message format and transmit to the base interface or the extension interface accordingly.
3、 如权利要求 2所述的装置, 其中, 所述消息处理单元还包括緩存区, 其设置为存储来自所述通信单元的 LLRP基本操作消息或 LLRP扩展操作消 息, 并将 LLRP基本操作消息或 LLRP扩展操作消息提供给所述解码模块。  3. The apparatus according to claim 2, wherein the message processing unit further comprises a buffer area configured to store an LLRP basic operation message or an LLRP extended operation message from the communication unit, and to perform an LLRP basic operation message or An LLRP extended operation message is provided to the decoding module.
4、 如权利要求 3所述的装置, 其中, 所述消息处理单元还包括队列处理 模块, 其设置为将所述解码模块完整解码的 LLRP基本操作消息或 LLRP扩 展操作消息添加至消息队列后, 提供给对应的基础接口或扩展接口。  4. The apparatus according to claim 3, wherein the message processing unit further comprises a queue processing module configured to add an LLRP basic operation message or an LLRP extended operation message that is completely decoded by the decoding module to the message queue. Provided to the corresponding base interface or extended interface.
5、 如权利要求 4所述的装置, 其中, 所述消息处理单元还包括消息查找 模块, 其设置为从所述消息队列中查找特定的 LLRP基本操作消息或 LLRP 扩展操作消息后, 提供给对应的基础接口或扩展接口。  5. The apparatus according to claim 4, wherein the message processing unit further comprises a message lookup module configured to: after finding a specific LLRP basic operation message or an LLRP extended operation message from the message queue, providing the corresponding Basic interface or extended interface.
6、 如权利要求 2至 5中任一权利要求所述的装置, 其中, 所述扩展接口 包括消息读取模块、 解析模块和扩展操作模块;  The apparatus according to any one of claims 2 to 5, wherein the extension interface comprises a message reading module, a parsing module and an extended operation module;
所述消息读取模块设置为, 从上层应用读取可扩展标记语言 XML格式 的 LLRP扩展操作消息,并发送给所述解析模块;以及将解析模块转发的 XML 格式的 LLRP扩展操作消息提供给上层应用; The message reading module is configured to: read an LLRP extended operation message in an extensible markup language XML format from an upper layer application, and send the LLRP extended operation message to the parsing module; and forward the XML forwarded by the parsing module The formatted LLRP extended operation message is provided to the upper layer application;
解析模块设置为,将所述 XML格式的 LLRP扩展操作消息转换成消息格 式, 并转发给相应的扩展操作模块; 以及将所述消息格式的 LLRP扩展操作 消息解析成 XML格式, 并转发给所述消息读取模块;  The parsing module is configured to convert the LLRP extended operation message in the XML format into a message format, and forward the message to the corresponding extended operation module; and parse the LLRP extended operation message of the message format into an XML format, and forward the message to the Message reading module
扩展操作模块设置为 , 将所述消息格式的 LLRP扩展操作消息转发至通 信单元; 以及接收来自所述通信单元的消息格式的 LLRP扩展操作消息, 并 转发给所述解析模块。  The extended operation module is configured to: forward the LLRP extended operation message of the message format to the communication unit; and receive an LLRP extended operation message from the message format of the communication unit, and forward the message to the parsing module.
7、 如权利要求 6所述的装置, 其中, 所述扩展操作模块包括阅读器操作 RO规则模块、 访问操作 AO规则模块、 配置模块、 报告模块中的至少一种; RO规则模块设置为,将来自解析模块的消息格式的 RO规则消息转发至 通讯单元; 以及将来自所述通讯单元的消息格式的 RO规则消息转发给所述 解析模块;  The apparatus according to claim 6, wherein the extended operation module comprises at least one of a reader operation RO rule module, an access operation AO rule module, a configuration module, and a report module; and the RO rule module is configured to An RO rule message from a message format of the parsing module is forwarded to the communication unit; and an RO rule message of a message format from the communication unit is forwarded to the parsing module;
AO规则模块设置为,将来自解析模块的消息格式的 AO规则消息转发至 通讯单元; 以及将来自所述通讯单元的消息格式的 AO规则消息转发给所述 解析模块;  The AO rule module is configured to forward the AO rule message from the message format of the parsing module to the communication unit; and forward the AO rule message of the message format from the communication unit to the parsing module;
配置模块设置为, 将来自解析模块的消息格式的规则配置消息转发至通 讯单元; 以及将来自所述通讯单元的消息格式的规则配置消息转发给所述解 析模块;  The configuration module is configured to forward the rule configuration message of the message format from the parsing module to the communication unit; and forward the rule configuration message of the message format from the communication unit to the parsing module;
报告模块设置为, 将来自解析模块的消息格式的报告规则消息转发至通 讯单元; 以及将来自所述通讯单元的消息格式的报告规则消息转发给所述解 析模块。  The reporting module is configured to forward the reporting rule message of the message format from the parsing module to the communication unit; and forward the reporting rule message of the message format from the communication unit to the parsing module.
8、如权利要求 2至 5中任一权利要求所述的装置, 所述装置还包括阅读 器管理接口 , 所述阅读器管理接口包括阅读器打开模块和阅读器关闭模块; 阅读器打开模块设置为, 通过设置相应的参数对象, 打开所述通信单元, 阅读器关闭模块设置为, 关闭所述通讯单元。  8. Apparatus according to any of claims 2 to 5, said apparatus further comprising a reader management interface, said reader management interface comprising a reader open module and a reader close module; the reader open module settings To open the communication unit by setting a corresponding parameter object, the reader close module is set to close the communication unit.
9、 如权利要求 8所述的装置, 其中, 所述阅读器管理接口还包括链路监 听模块, 其设置为在阅读器客户端模式下监听所述阅读器。  9. The apparatus of claim 8, wherein the reader management interface further comprises a link listening module configured to listen to the reader in a reader client mode.
10、 如权利要求 8所述的装置, 其中, 所述阅读器管理接口还包括链路 检测模块, 其设置为检测所述阅读器的链接状态。 10. The apparatus of claim 8, wherein the reader management interface further comprises a link A detection module configured to detect a link status of the reader.
11、 一种基于低层读写器标准 LLRP协议的阅读器控制系统, 包括阅读 器、 上层应用和基于 LLRP协议的阅读器驱动装置, 所述阅读器驱动装置包 括基础接口、 扩展接口和通信单元;  11. A reader control system based on a low-level reader/writer standard LLRP protocol, comprising a reader, an upper layer application, and a reader driver device based on an LLRP protocol, the reader driving device comprising a base interface, an expansion interface, and a communication unit;
基础接口设置为, 与上层应用之间进行 LLRP基本操作消息的交互; 扩展接口设置为, 与上层应用之间进行 LLRP扩展操作消息的交互; 通信单元设置为, 实现所述基础接口或扩展接口与阅读器之间的信息交 互。  The basic interface is configured to perform interaction with the upper layer application for the LLRP basic operation message; the extended interface is set to perform interaction with the upper layer application for the LLRP extended operation message; the communication unit is configured to implement the basic interface or the extended interface Information interaction between readers.
12、 一种基于低层读写器标准 LLRP协议的阅读器驱动方法, 所述方法 包括:  12. A reader driving method based on a low layer reader/writer standard LLRP protocol, the method comprising:
上层应用分别与阅读器驱动装置的基础接口和扩展接口之间进行 LLRP 基本操作消息和 LLRP扩展操作消息的交互; 以及  The upper layer application performs interaction between the LLRP basic operation message and the LLRP extended operation message respectively with the base interface and the extended interface of the reader driver;
所述基础接口或扩展接口通过所述阅读器驱动装置的通讯单元与阅读器 之间进行信息交互。  The basic interface or the extended interface exchanges information with the reader through the communication unit of the reader driving device.
13、 如权利要求 12所述的方法, 其中, 进行所述 LLRP基本操作消息和 13. The method of claim 12, wherein the LLRP basic operation message is performed and
LLRP扩展操作消息的交互之前,所述方法还包括: 阅读器驱动装置通过以下 任一方式与阅读器建立链接的步骤: Before the LLRP extends the interaction of the operation message, the method further comprises: the step of the reader driver establishing a link with the reader in any of the following ways:
串口模式下, 上层应用调用阅读器管理接口, 并将阅读器打开模块中相 应的参数对象设置为串口参数;  In the serial port mode, the upper application calls the reader management interface, and sets the corresponding parameter object in the reader open module to the serial port parameter;
阅读器服务端模式下, 上层应用调用阅读器管理接口, 并将阅读器打开 模块中相应的参数对象设置为需要链接的阅读器的 IP信息;  In the reader server mode, the upper application calls the reader management interface, and sets the corresponding parameter object in the reader open module to the IP information of the reader that needs to be linked;
阅读器客户端模式下, 上层应用调用阅读器管理接口, 并通过链路监听 模块监听阅读器, 等待阅读器建链。  In the reader client mode, the upper application calls the reader management interface, and listens to the reader through the link listening module, waiting for the reader to build a link.
14、 如权利要求 12所述的方法, 其中, 所述交互的具体方式为: 在下行方向, 阅读器驱动装置将来自所述上层应用的 LLRP基本操作消 息或 LLRP扩展操作消息转换成比特流的格式, 并将所述比特流传输给阅读 器; 在上行方向, 阅读器驱动装置将来自所述阅读器的 LLRP基本操作消息 或 LLRP扩展操作消息转换成消息格式, 并提供给上层应用。 14. The method according to claim 12, wherein the specific manner of the interaction is: in a downlink direction, the reader driving device converts an LLRP basic operation message or an LLRP extended operation message from the upper layer application into a bit stream. Formatting, and transmitting the bit stream to a reader; In the upstream direction, the reader driver converts the LLRP basic operation message or the LLRP extended operation message from the reader into a message format and provides it to the upper layer application.
PCT/CN2010/076960 2010-06-21 2010-09-15 Reader driver device, system and method based on llrp (low-level reader protocol) WO2011160341A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201010204581.2 2010-06-21
CN201010204581.2A CN102289636B (en) 2010-06-21 2010-06-21 Reader driving device, system and method based on low level reader protocol (LLRP) protocol

Publications (1)

Publication Number Publication Date
WO2011160341A1 true WO2011160341A1 (en) 2011-12-29

Family

ID=45336051

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2010/076960 WO2011160341A1 (en) 2010-06-21 2010-09-15 Reader driver device, system and method based on llrp (low-level reader protocol)

Country Status (2)

Country Link
CN (1) CN102289636B (en)
WO (1) WO2011160341A1 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102761518B (en) * 2011-04-25 2015-04-01 中兴通讯股份有限公司 Communication method and server supporting multiple socket connection modes
CN103488469A (en) * 2012-06-13 2014-01-01 中兴通讯股份有限公司 Reader as well as realization method and realization device for business operation of reader
CN103544050B (en) * 2012-07-13 2017-05-31 天津中兴智联科技有限公司 A kind of reader drive device, method and reader control system
CN103634357A (en) * 2012-08-27 2014-03-12 中兴通讯股份有限公司 Radio frequency identification controller and radio frequency identification system, and controlling method of radio frequency identification reader
CN103679081B (en) * 2012-09-21 2017-03-29 天津中兴智联科技有限公司 Radio-frequency identification method and system, reader, traffic application device
CN105139053B (en) * 2015-10-15 2018-01-30 江苏本能科技有限公司 Radio-frequency identification reader/writer interface protocol debugging apparatus and method

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101086763A (en) * 2007-06-15 2007-12-12 广东电子工业研究院有限公司 A collaborative working RFID reader and its collaborative work method

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101086763A (en) * 2007-06-15 2007-12-12 广东电子工业研究院有限公司 A collaborative working RFID reader and its collaborative work method

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
CAI, LEI: "Design and Realization of Simple Model Based on EPCglobal Low-level Reader Protocol", COMPUTER SYSTEM APPLICATION, no. 10, 2009, pages 136 - 137 *
WU, JUNSHENG ET AL.: "Design of RFID Low-Level Reader Protocol Toolkit", COMPUTER MEASUREMENT & CONTROL, no. 1, 2010, pages 179 - 180 *

Also Published As

Publication number Publication date
CN102289636A (en) 2011-12-21
CN102289636B (en) 2014-04-30

Similar Documents

Publication Publication Date Title
JP6138184B2 (en) Multiple application management method and system in near field communication
KR101495915B1 (en) Method and system for communication in near field communication network
US8989658B2 (en) Methods and apparatuses for improving NFC parameter update mechanisms
US20090282130A1 (en) Resource sharing via close-proximity wireless communication
WO2011160341A1 (en) Reader driver device, system and method based on llrp (low-level reader protocol)
CN108810086A (en) Intelligent equipment communication platform based on MQTT message protocol
JP5855014B2 (en) Application-enabled data switch to enhance legacy NFC systems with web services
WO2016173434A1 (en) Nfc-based communication method and apparatus
US9942092B2 (en) Method and an apparatus for controlling messages between host and controller
CN105472038A (en) Control method, control apparatus and control system for file transmission
WO2013117048A1 (en) Wifi data transmission method and terminal
KR20170124187A (en) Iot platform having a funtion automatically compatible with the communication protocol
US20130067094A1 (en) Directly transfering data between devices
US9628149B2 (en) Emulation of multiple NFC devices inside a communication device
CN111740960A (en) Communication method of Internet of things equipment, Internet of things equipment and storage medium
US20080313309A1 (en) Client-server data transfer control
Antoniou et al. NFC-based mobile middleware for intuitive user interaction with security in smart homes.
WO2019140648A1 (en) Method and device for reporting information by terminal, and a computer storage medium
US8233386B2 (en) Device that uses parameters to provide multi-channel serial data transmissions and method thereof
KR20100097690A (en) Communication device, communication system, communication method, and program
CN103853602A (en) Reader driving device, reader driving method and reader control system
CN102479313A (en) Reader driving method based on low level reader protocols (LLRPs)
WO2024027339A1 (en) Counting method and apparatus
WO2021018086A1 (en) Method and apparatus for communication between storage devices, storage medium and storage device
Yue et al. P2P File Transfer System Based on NFC

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 10853480

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 10853480

Country of ref document: EP

Kind code of ref document: A1