Write-in device and method for parameter information of intelligent equipment
By integrating a test router, NFC data reader/writer, and host computer test software, the problem of existing systems being unable to complete the writing of NFC tag data and network information at the same workstation has been solved, achieving efficient and secure intelligent equipment production testing and simplifying user operation processes.
Patent Information
- Application Number
- CN202511567993.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-30
- Publication Date
- 2026-01-27
AI Technical Summary
Existing smart device production testing systems cannot complete the writing of NFC tag data and network information at the same workstation, resulting in high production testing costs and low efficiency.
The existing testing system integrates a test router, an NFC data reader/writer, and host computer testing software. It uses serial communication and UDP protocol to achieve targeted writing of NFC tag data and network configuration information. It uses configuration files to store the public and private key information corresponding to each device model to ensure the uniqueness of the network configuration information of each device.
It enables the targeted writing of NFC tag data and power distribution information at existing workstations, reducing equipment investment and management costs, improving production and testing efficiency, and ensuring power distribution security through "one machine, one key" and simplifying user operation procedures.
Smart Images

Figure CN121413641A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of smart product technology, and specifically to a device and method for writing parameter information of smart devices. Background Technology
[0002] As a communication carrier developed based on contactless radio frequency identification (RFID) technology and combined with wireless interconnection technology, NFC tags can provide smart home appliances with secure and fast near-field interaction capabilities. Currently, they have been widely used to solve the pain points of smart home appliance network configuration experience. Through the associated data stored in the NFC tag, users can quickly bring up the device configuration interface or control interface by touching the tag with their mobile phone, greatly simplifying the operation process.
[0003] However, the need to write NFC tag data and device network configuration information during the production and testing of smart home appliances presents new challenges to existing production testing systems. The core components of existing smart device assembly line testing systems are as follows: Figure 1 As shown, the system mainly includes the device under test (DUT), a test router, and host computer testing software. The host computer needs to be connected to the test router via a wireless network card and be on the same local area network as the DUT. The system's operating logic is as follows: The host computer testing software first obtains the MAC address of the DUT, then generates test data based on this MAC address and sends it to the DUT via UDP broadcast. After receiving the UDP broadcast data, the DUT parses and compares the MAC address in the data with its own MAC address. If they match, it performs operations such as software version verification, serial port detection, and switching from factory mode to user mode, and then replies with the test results to the host computer via UDP unicast.
[0004] The existing host computer testing software is limited to basic test data transmission and reception and basic device detection based on MAC identifiers, and cannot meet the newly added information writing requirements. NFC tags need to be written with NDEF data bound to the corresponding smart device, and this data needs to be associated with the device's MAC identifier, which cannot be written in batches in advance; however, the existing system does not integrate the interaction function with the NFC data reading and writing device, and cannot complete the targeted data writing of NFC tags.
[0005] To meet the requirements for writing NFC tag data and network information, an independent workstation needs to be added in addition to the existing testing workstation, which will significantly increase the investment in production equipment and workstation management costs, and does not meet the requirements of high efficiency and low cost in intelligent production.
[0006] In summary, existing smart device production testing systems are no longer adequate for the production and testing needs of smart home appliances carrying NFC tags, and there is an urgent need for a solution that can integrate NFC tag data and device network configuration information writing at the same testing station. Summary of the Invention
[0007] The technical problem to be solved by the present invention is to provide a device and method for writing parameter information of smart devices, which solves the problem that the existing smart device production and testing system has limited functions and cannot complete the writing of NFC tag data and network information at the same workstation.
[0008] The technical solution adopted by the present invention to solve the above-mentioned technical problems is as follows: On one hand, the present invention provides a device for writing parameter information of a smart device, used to write NFC tag data and network configuration information to a smart device under test with an NFC tag. The device includes: The test includes a router, an NFC data reader / writer, and a host computer with test software installed; the host computer is connected to the NFC data reader / writer via a serial port. The host computer is equipped with a wireless network card device, which is used to connect to the test router through the wireless network card device. The host computer testing software includes a first configuration file and a second configuration file; the first configuration file is used to store public key information corresponding to different device models; the second configuration file is used to store a series of different private key information for different device models. After being powered on, the smart device under test enters factory testing mode and automatically connects to the test router; When writing parameter information, the NFC tag is placed on the panel of the NFC data reading and writing device. The host computer test software controls the NFC data reading and writing device to write data to the NFC tag by sending serial port commands. It also extracts the public key information corresponding to the smart device under test model from the first configuration file and one private key from a series of different private key information of the smart device under test model from the second configuration file, combines them into network configuration information, and writes the network configuration information to the smart device under test by communicating with the smart device under test.
[0009] Furthermore, the smart device under test is equipped with a MAC tag, which is a QR code or barcode tag containing the MAC identifier of the smart device under test, and the tag content cannot be changed.
[0010] Furthermore, the host computer and the smart device under test communicate via the UDP protocol.
[0011] Furthermore, the NFC tag is a tag card containing a high-frequency electronic tag chip, and after the NFC tag writes NDEF data, it can be automatically discovered and read by the underlying Android or iOS system.
[0012] Furthermore, the public key information in the first configuration file is configured with different public keys according to different device models; the private key information in the second configuration file is configured according to device models, with a series of different private key information configured under each device model, and each private key occupying a separate line.
[0013] On the other hand, the present invention also provides a method for writing parameter information of a smart device, applied in the above-mentioned writing device, the method comprising the following steps: S1. After the smart device under test is powered on, it enters the factory test state, automatically connects to the test router and starts the UDP data transmission and reception thread; S2. Place the NFC tag on the panel of the NFC data reader / writer device, and the host computer test software establishes communication with the NFC data reader / writer device; S3. Select the model of the smart device under test in the host computer test software, and enter the MAC label content of the smart device; S4. The host computer test software detects and confirms the NFC tag through serial port commands, and then packages the data to be written to the NFC tag according to the MAC tag content of the smart device; S5. The host computer test software controls the NFC data reading and writing device to write the data packet to the NFC tag via serial port commands; S6. The host computer testing software searches for the corresponding public key information in the first configuration file according to the model of the smart device under test, and reads a corresponding private key information in the second configuration file to combine them into the network configuration information of the smart device under test. S7. The host computer test software packages the MAC tag content and network configuration information into a packet and sends it to the smart device under test via UDP broadcast. S8. The device under test receives and parses UDP broadcast data packets, compares the parsed MAC information with its own MAC information, and if the comparison is successful, writes the parsed network configuration information.
[0014] Furthermore, in step S2, the host computer test software establishes communication with the NFC data reading and writing device, including: the host computer test software opens the serial port, obtains the card reader information by sending serial port commands to the NFC data reading and writing device, opens the sensor, and switches to the protocol mode that matches the NFC tag to be written.
[0015] Furthermore, in step S4, the step of detecting and confirming the NFC tag via serial port command includes: checking whether there is an NFC tag within the valid range via serial port command; and when an NFC tag is found, confirming the UID number of the found NFC tag again via serial port command.
[0016] Furthermore, in step S4, the data to be written to the NFC tag consists of a fixed value and a converted value of the MAC tag content.
[0017] Furthermore, step S8 also includes: after the smart device under test successfully writes the network configuration information, it sends a message of successful writing to the host computer test software via UDP unicast. After receiving the message of successful writing, the host computer test software deletes the private key information used by the smart device under test from the second configuration file.
[0018] The beneficial effects of this invention are: (1) By integrating the serial communication function of the NFC data reading and writing device and the smart device network information packet writing function into the host computer test software, the present invention can complete the directional writing of NFC tag NDEF data and smart device network information in the same operation process. This allows the host computer test software function to be expanded only on the basis of the existing smart device production and testing station, avoiding the increase in equipment investment and management costs brought about by adding a new station, while reducing the turnover time of smart devices between different stations and improving production and testing efficiency.
[0019] (2) The present invention stores the general public key corresponding to each model through the first configuration file and stores a series of private keys of different devices under each model through the second configuration file. After the network configuration information of a single device is successfully written, the private key used in the second configuration file is automatically deleted, ensuring that the network configuration information of each smart device can achieve "one device, one key", effectively avoiding the network configuration security risk caused by the reuse of private keys and improving the security of the network configuration process of smart devices.
[0020] (3) The NDEF data written into the NFC tag in this invention can be associated with the device MAC identifier. When using the device later, users only need to touch the NFC tag with their mobile phones to quickly bring up the device's network configuration interface (before network configuration) or control interface (after network configuration). There is no need to manually input device information or search for the device, which greatly simplifies the user's operation process and improves the user experience of smart home appliances. Attached Figure Description
[0021] Figure 1 A schematic diagram of the existing intelligent equipment production and testing device.
[0022] Figure 2 This is a schematic diagram of the structure of the intelligent device parameter information writing device in an embodiment of the present invention.
[0023] Figure 3 This is a flowchart of the method for writing parameter information of a smart device in an embodiment of the present invention. Detailed Implementation
[0024] This invention aims to provide a device and method for writing parameter information of smart devices, solving the problem that existing smart device production testing systems have limited functionality and cannot complete the writing of NFC tag data and network configuration information at the same workstation. The core idea is: in the production testing scenario of smart devices carrying NFC tags, by expanding the functionality of existing host computer testing software and optimizing the system architecture, the two major functions of writing NFC tag data and writing smart device network configuration information are integrated into the same testing workstation, achieving multi-target information targeted writing without adding workstation costs: serial communication is established between the host computer testing software and the NFC data reading and writing device; NDEF data is packetized based on the smart device's MAC tag and written to the NFC tag; simultaneously, combining two configuration files in the host computer testing software, the public key information and private key information corresponding to the device model are extracted respectively, packetized into "one device, one key" network configuration information, and written to the smart device via the UDP protocol.
[0025] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0026] This embodiment first provides a device for writing parameter information of a smart device, see [link]. Figure 2 It includes: a test router, an NFC data reader / writer, and a host computer with host computer testing software installed. The host computer is equipped with a wireless network card for connecting to the test router via the wireless network card.
[0027] The smart device under test has a MAC tag and an NFC tag: The MAC label here specifically refers to a barcode whose content is a MAC identifier. For example, if the MAC identifier of the smart module corresponding to the smart device under test is 601D9DAFBD3A, then the MAC label is a paper QR code (or barcode) label with the content "601D9DAFBD3A" (the label content cannot be changed).
[0028] An NFC tag refers to a tag card containing a high-frequency electronic tag chip. After NDEF data is written to the tag card, it can be automatically discovered and read by the underlying Android and iOS systems. In this embodiment, NDEF data will be written to the NFC tag using an NFC data reader / writer (the tag content can be repeatedly erased and rewritten). In user mode, the NFC tag can be touched by a mobile phone, improving the user's operating experience.
[0029] The host computer testing software includes a first configuration file (corresponding to configuration file 1 in the figure) and a second configuration file (corresponding to configuration file 2 in the figure); the first configuration file is used to store public key information corresponding to different device models; the second configuration file is used to store a series of different private key information for different device models.
[0030] The aforementioned device mainly performs two tasks: writing relevant data to the NFC tag corresponding to the smart device under test through the NFC data reader / writer (after the NFC tag has the relevant data, touching it with a mobile phone can bring up the device's network configuration interface or the device's control interface); and writing the relevant data required for the network configuration process to the smart device under test through the host computer test software.
[0031] The writing of NFC tag data relies on communication between the NFC data reader / writer and the host computer software. The NFC data reader / writer communicates with the host computer software via a serial communication interface and completes the corresponding operations according to the commands of the host computer. The communication process requires the host computer to first send commands and data to the reader / writer, and then the reader / writer returns the command execution result status and data to the host computer.
[0032] The host computer testing software writes the relevant data required for the network configuration process to the smart device under test (DUT) using UDP data communication. The data is composed of packets from configuration files 1 and 2. The process is mainly described as follows: the host computer testing software (via a wireless network card) and the DUT simultaneously connect to the test router during the testing phase. After the host computer testing software packages the relevant data, it broadcasts the data to the DUT via UDP. The smart device then returns the execution result to the host computer testing software via UDP unicast. In essence, writing network configuration information to the smart device actually involves writing the network configuration information into the corresponding smart module of the DUT.
[0033] Based on the above-described writing device, this embodiment also provides a method for writing parameter information of a smart device, see [link to documentation]. Figure 3 It includes the following implementation process: S1. The smart device under test is powered on: In this step, the smart device under test is powered on and in factory test mode. In this mode, the smart device under test will automatically connect to the test router, and the UDP data transmission and reception thread will be started.
[0034] S2. Place the NFC tag, and the host computer software establishes communication with the NFC data reader / writer device: In this step, the NFC tag of the smart device under test is placed on the panel of the NFC data reading and writing device. The host computer software opens the serial port to establish data communication with the NFC data reading and writing fixture. This process requires the test software to send three serial port commands to the NFC data reading and writing device: serial port command 1 is to obtain the information of the card reader, serial port command 2 is to open the sensor, and serial port command 3 is to switch the communication protocol to the protocol mode that matches the NFC tag to be written.
[0035] S3. Select the model of the smart device to be tested, and enter the MAC address information of the smart device: In this step, you need to select the model of the smart device under test in the host computer test software. The software will automatically load the configuration file path corresponding to the model to prepare for subsequent network configuration information packet assembly. Then, scan the MAC tag on the smart module under test with the barcode scanner connected to the host computer. The software will automatically parse and store the MAC identifier.
[0036] S4. The testing software detects and confirms the NFC tag, and assembles the data to be written to the NFC tag based on the MAC tag content: In this step, the test software sends serial port commands to the NFC data reader / writer: Serial port command 4 checks whether an NFC tag exists within the valid range; this command must be executed before selecting a new NFC tag for operation. Serial port command 5 further confirms the UID serial number (identifier of the NFC tag) of the discovered NFC tag.
[0037] If the serial port command 4 and serial port command 5 return the correct results, the test software will start to assemble a data packet to be written to the NFC tag based on the MAC tag. This data consists of some fixed values and the conversion value of the MAC tag.
[0038] S5. The test software controls the NFC data reader / writer to write packet data to the NFC tag via serial port commands: In this step, after the data is assembled, the test software sends serial port command 6 to the NFC data reader / writer to write the NDEF data into the designated block area of the NFC tag until the data writing is complete. Then, the written data is verified to ensure the accuracy and integrity of the data writing.
[0039] S6. The testing software generates the network configuration information of the smart device under test based on the smart device model: In this step, the host computer testing software searches for the public key information corresponding to the model of the smart device under test in the first configuration file, then reads an unused private key from a series of private key information under the model in the second configuration file, and then combines the searched public key information and private key information to generate the network configuration information of the smart device under test.
[0040] S7. The testing software packages the network configuration information and MAC tag content into a packet and sends it to the smart device via UDP broadcast; In this step, the host computer testing software packages the MAC tag content and network configuration information together and sends it to the smart device under test via UDP broadcast.
[0041] S8. The smart device parses the UDP broadcast data packet and writes the network configuration information after a successful MAC information comparison: In this step, since the smart device under test is connected to the test router after power-on, it can receive UDP broadcasts sent by the host computer test software. Upon receiving the UDP broadcast, it first parses the data to obtain the MAC information in the data packet and compares it with its own MAC address. If they match, it further writes the network configuration information in the data packet into the module and replies with the writing result to the host computer test software via UDP unicast. If they do not match, the data is discarded directly.
[0042] After the host computer test software receives a message indicating that the write result was successful, it deletes the private key information used by the smart device in the second configuration file. This design is intended to prevent the same private key from being repeatedly assigned to multiple smart devices, ensuring the uniqueness of the network configuration information for each device, i.e., "one device, one key", thus eliminating the network configuration security risk caused by duplicate private keys from the source.
[0043] After completing all the above steps, the host computer testing software displays that the device information has been successfully written on the interface, and records data such as the MAC identifier, NFC tag UID, and network information writing time of the smart device to the log file, which facilitates quality traceability during the production process.
[0044] After the smart device under test is taken offline, it exits the factory test state and enters the network configuration mode upon power-on. When the user touches the NFC tag attached to the device with their mobile phone (Android or iOS system), the phone's underlying system automatically recognizes the NDEF data and redirects to the preset network configuration page. The page automatically fills in the device's MAC address. The user only needs to confirm the SSID and password of the home router, and the smart module can complete the encrypted network configuration based on the written public and private keys (the public key is used to verify the legitimacy of the network configuration server, and the private key is used for device and server authentication). After the network configuration is completed, touching the NFC tag again will directly launch the device control interface, greatly simplifying user operation and realizing the convenient experience of "touch to configure network, touch to control".
[0045] Although embodiments of the present invention have been described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the present invention, and all such changes and alterations shall not depart from the protection scope of the present invention.
Claims
1. A device for writing parameter information of a smart device, used to write NFC tag data and network configuration information to a smart device under test with an NFC tag, characterized in that, The device includes: The test includes a router, an NFC data reader / writer, and a host computer with test software installed; the host computer is connected to the NFC data reader / writer via a serial port. The host computer is equipped with a wireless network card device, which is used to connect to the test router through the wireless network card device. The host computer testing software includes a first configuration file and a second configuration file; the first configuration file is used to store public key information corresponding to different device models; the second configuration file is used to store a series of different private key information for different device models. After being powered on, the smart device under test enters factory testing mode and automatically connects to the test router; When writing parameter information, the NFC tag is placed on the panel of the NFC data reading and writing device. The host computer test software controls the NFC data reading and writing device to write data to the NFC tag by sending serial port commands. It also extracts the public key information corresponding to the smart device under test model from the first configuration file and one private key from a series of different private key information of the smart device under test model from the second configuration file, combines them into network configuration information, and writes the network configuration information to the smart device under test by communicating with the smart device under test.
2. The device for writing parameter information of a smart device as described in claim 1, characterized in that, The smart device under test is equipped with a MAC tag, which is a QR code or barcode tag containing the MAC identifier of the smart device under test, and the tag content cannot be changed.
3. The device for writing parameter information of a smart device as described in claim 1, characterized in that, The host computer and the smart device under test communicate via the UDP protocol.
4. The device for writing parameter information of a smart device as described in claim 1, characterized in that, The NFC tag is a tag card containing a high-frequency electronic tag chip. After the NFC tag writes NDEF data, it can be automatically discovered and read by the underlying Android or iOS system.
5. The device for writing parameter information of a smart device as described in claim 1, characterized in that, The public key information in the first configuration file is configured with different public keys according to different device models; the private key information in the second configuration file is configured according to device models, with a series of different private key information configured under each device model, and each private key occupying a separate line.
6. A method for writing parameter information of a smart device, applied in the device for writing parameter information of a smart device as described in any one of claims 2-5, characterized in that, The method includes the following steps: S1. After the smart device under test is powered on, it enters the factory test state, automatically connects to the test router and starts the UDP data transmission and reception thread; S2. Place the NFC tag on the panel of the NFC data reader / writer device, and the host computer test software establishes communication with the NFC data reader / writer device; S3. Select the model of the smart device under test in the host computer test software, and enter the MAC label content of the smart device; S4. The host computer test software detects and confirms the NFC tag through serial port commands, and then packages the data to be written to the NFC tag according to the MAC tag content of the smart device; S5. The host computer test software controls the NFC data reading and writing device to write the data packet to the NFC tag via serial port commands; S6. The host computer testing software searches for the corresponding public key information in the first configuration file according to the model of the smart device under test, and reads a corresponding private key information in the second configuration file to combine them into the network configuration information of the smart device under test. S7. The host computer test software packages the MAC tag content and network configuration information into a packet and sends it to the smart device under test via UDP broadcast. S8. The device under test receives and parses UDP broadcast data packets, compares the parsed MAC information with its own MAC information, and if the comparison is successful, writes the parsed network configuration information.
7. The method for writing parameter information of a smart device as described in claim 6, characterized in that, In step S2, the host computer test software establishes communication with the NFC data reading and writing device, including: the host computer test software opens the serial port, obtains the card reader information by sending serial port commands to the NFC data reading and writing device, opens the sensor, and switches to the protocol mode that matches the NFC tag to be written.
8. The method for writing parameter information of a smart device as described in claim 7, characterized in that, In step S4, detecting and confirming the NFC tag via serial port command includes: checking whether there is an NFC tag within the valid range via serial port command; and when an NFC tag is found, confirming the UID number of the found NFC tag again via serial port command.
9. The method for writing parameter information of a smart device as described in claim 6, characterized in that, In step S4, the data to be written to the NFC tag consists of a fixed value and a converted value of the MAC tag content.
10. A method for writing parameter information of a smart device as described in any one of claims 6-9, characterized in that, Step S8 also includes: after the smart device under test successfully writes the network configuration information, it sends a message of successful writing to the host computer test software via UDP unicast. After receiving the message of successful writing, the host computer test software deletes the private key information used by the smart device under test from the second configuration file.