Wifi online programming device and method
1. A wifi online programming device is characterized by comprising a code scanning instrument, a communication tool, a computer host, a first display screen, a second display screen, a wireless network card, a router, household electrical appliances and an infrared sensing device;
the scanning instrument is connected with the input end of the communication tool through a serial port; the output end of the communication tool is connected with the input end of the computer host through a serial port line;
the output end of the computer host is respectively connected with a first display screen and a second display screen; the computer host is in bidirectional connection with the router through the wireless network card;
the household appliance is connected with the router in a bidirectional mode through the wifi module;
the infrared induction device is connected with the input end of the computer host through a serial port line.
2. The wifi online programming device according to claim 1, wherein programming software is installed inside the computer host, and is used for running and installing a programming software program; the software program is used for enabling the computer host to be connected with the router, and establishing UDP communication with the household appliance to be tested connected in the router, so that on-line programming of wifi parameters is realized.
3. The wifi online programming device according to claim 1, wherein the code scanning instrument is used for scanning a bar code or a two-dimensional code pasted on a household appliance and a station code, and transmitting scanned information to the communication tool.
4. The wifi online programming device according to claim 1, wherein the communication tool is used for analyzing and shunting the received information, and respectively transmitting the analyzed and shunted information to a computer host installed with programming software and equipment needing information scanning on a production line.
5. The wifi online programming device according to claim 1, wherein the first display screen is used for displaying code scanning information; and the second display screen is used for displaying the wifi programming result of the household appliance and counting the programming success rate.
6. The wifi online programming device according to claim 1, wherein the infrared sensing device is used for sensing a household appliance that has programmed parameters at present, and transmitting a sensing result to a host computer.
7. A wifi online programming method is characterized by comprising the following steps:
step S1: starting a computer host provided with programming software, and running a software program, wherein the software program is connected with a router through a wireless network card;
step S2: the code scanning instrument scans the bar code/two-dimensional code on the household appliance equipment and transmits the scanning information to the communication tool;
step S3: the communication tool receives the bar code/two-dimensional code information, recombines the bar code/two-dimensional code information into command information according to a specified communication protocol, and transmits the command information to a software program running on a computer host and other equipment connected with the communication tool;
step S4: a software program on a computer host receives the command information, analyzes the MAC, SN and TCODE and displays the MAC, SN and TCODE on a first display screen, meanwhile, inquires parameters needing to be written to a wifi module in a local database according to the SN, combines the parameters with the MAC and SN into a broadcast command packet according to a protocol, establishes UDP communication with a connected router and sends the broadcast command packet;
step S5: the household appliance equipment is automatically powered on after the code scanning instrument scans the TCODE, the wifi module starts to work, is connected with the router and waits for receiving a broadcast command packet;
step S6: after receiving the broadcast command packet, the wifi module integrated with the household appliance equipment judges whether the MAC address contained in the broadcast information is equal to the MAC address of the household appliance equipment, and if not, no processing is performed; if the SN and the parameter are equal to the parameters, a wifi programming program is automatically started, and the SN and the parameter are programmed into the wifi module;
step S7: after the parameters of the wifi module are programmed, sending a UDP broadcast command packet back to the connected router, wherein the command comprises: MAC, SN, write success/failure, failure error code;
step S8: after receiving the UDP broadcast packet returned by the wifi module, the computer software program analyzes the programming result and stores the programming result in a database to which the computer host belongs, wherein the stored record comprises: MAC, SN, TCODE, write success/failure, failure error code;
step S9: the infrared sensing device senses the arrival of the current household appliance, calculates the TCODE of the current household appliance according to the TCODE code operation rule, and transmits the TCODE to the connected computer host provided with the programming software;
step S10: receiving the TCODE by a software program running on the computer host, and inquiring the programming result information of the current household appliance from the database, wherein the programming result information comprises the following information: MAC, SN, TCODE, programming success/failure, failure error code, and displaying the result information on a second display screen.
8. The wifi online programming method according to claim 7, wherein in step S2, the code scanning instrument obtains the MAC address of the home appliance, the factory-defined serial number SN of the home appliance, and the current station code TCODE.
Background
Along with the development of intelligent technology and the promotion of people to the intelligent demand of household electrical appliances, more and more household electrical appliances realize remote control and more intelligent scenes through integrated wifi module, nevertheless because the cloud platform that wifi module is connected is different, including internet manufacturer cloud and the manufacturer own cloud, lead to the built-in software state of wifi module different, the material quantity that same module corresponds increases thereupon. On one hand, the material management brings great management cost, and on the other hand, the household electrical appliances easily cause the material to be confused during production, and the production efficiency is reduced.
In the existing published patent, for example, a method for programming a wireless wifi program of a single chip microcomputer system with application number CN201910046181.4, it is disclosed that a PC terminal sends firmware to be programmed to a single chip microcomputer terminal through wifi as a transmission medium, so as to implement a non-contact programming program of the single chip microcomputer; for example, a serial port wired programming and wireless programming-based dual-selection switching circuit with application number CN201910008531.8 realizes online upgrade and maintenance of outdoor product programs in the power industry in a wired and wireless combined transmission mode. The technical scheme of these two can't solve in the household electrical appliances production field wifi module because of the different cloud platforms of connection and the material state that leads to is more, the material management cost who arouses increases, problem that production efficiency is low.
Disclosure of Invention
The invention aims to provide a wifi online programming device and method, which are used for establishing UDP communication by connecting an upper computer with an AP released by a wifi module of a household appliance, realizing programming of different parameters of the wifi module connected with different cloud platforms, and solving the problems of easy interruption, low success rate and low production efficiency of the conventional programming.
In order to solve the technical problems, the invention is realized by the following technical scheme:
the invention relates to a wifi online programming device, which comprises a code scanning instrument, a communication tool, a computer host, a first display screen, a second display screen, a wireless network card, a router, household electrical appliances and an infrared sensing device, wherein the code scanning instrument is connected with the computer host through a wireless network;
the scanning instrument is connected with the input end of the communication tool through a serial port; the output end of the communication tool is connected with the input end of the computer host through a serial port line;
the output end of the computer host is respectively connected with a first display screen and a second display screen; the computer host is in bidirectional connection with the router through the wireless network card;
the household appliance is connected with the router in a bidirectional mode through the wifi module;
the infrared induction device is connected with the input end of the computer host through a serial port line.
Preferably, the computer host is internally provided with programming software for running and installing a programming software program; the software program is used for enabling the computer host to be connected with the router, and establishing UDP communication with the household appliance to be tested connected in the router, so that on-line programming of wifi parameters is realized.
Preferably, the code scanning instrument is used for scanning a bar code or a two-dimensional code pasted on the household appliance equipment and a station code and transmitting the scanned information to the communication tool.
Preferably, the communication tool is used for analyzing and shunting the received information, and respectively transmitting the information to a computer host provided with programming software and equipment needing information scanning on a production line.
Preferably, the first display screen is used for displaying the code scanning information; and the second display screen is used for displaying the wifi programming result of the household appliance and counting the programming success rate.
Preferably, the infrared sensing device is used for sensing the household appliance with the programmed parameters and transmitting the sensing result to the computer host.
The invention relates to a wifi online programming method, which comprises the following steps:
step S1: starting a computer host provided with programming software, and running a software program, wherein the software program is connected with a router through a wireless network card;
step S2: the code scanning instrument scans the bar code/two-dimensional code on the household appliance equipment and transmits the scanning information to the communication tool;
step S3: the communication tool receives the bar code/two-dimensional code information, recombines the bar code/two-dimensional code information into command information according to a specified communication protocol, and transmits the command information to a software program running on a computer host and other equipment connected with the communication tool;
step S4: a software program on a computer host receives the command information, analyzes the MAC, SN and TCODE and displays the MAC, SN and TCODE on a first display screen, meanwhile, inquires parameters needing to be written to a wifi module in a local database according to the SN, combines the parameters with the MAC and SN into a broadcast command packet according to a protocol, establishes UDP communication with a connected router and sends the broadcast command packet;
step S5: the household appliance equipment is automatically powered on after the code scanning instrument scans the TCODE, the wifi module starts to work, is connected with the router and waits for receiving a broadcast command packet;
step S6: after receiving the broadcast command packet, the wifi module integrated with the household appliance equipment judges whether the MAC address contained in the broadcast information is equal to the MAC address of the household appliance equipment, and if not, no processing is performed; if the SN and the parameter are equal to the parameters, a wifi programming program is automatically started, and the SN and the parameter are programmed into the wifi module;
step S7: after the parameters of the wifi module are programmed, sending a UDP broadcast command packet back to the connected router, wherein the command comprises: MAC, SN, write success/failure, failure error code;
step S8: after receiving the UDP broadcast packet returned by the wifi module, the computer software program analyzes the programming result and stores the programming result in a database to which the computer host belongs, wherein the stored record comprises: MAC, SN, TCODE, write success/failure, failure error code;
step S9: the infrared sensing device senses the arrival of the current household appliance, calculates the TCODE of the current household appliance according to the TCODE code operation rule, and transmits the TCODE to the connected computer host provided with the programming software;
step S10: receiving the TCODE by a software program running on the computer host, and inquiring the programming result information of the current household appliance from the database, wherein the programming result information comprises the following information: MAC, SN, TCODE, programming success/failure, failure error code, and displaying the result information on a second display screen.
Preferably, in step S2, the code scanner obtains the MAC address of the home appliance, the factory-defined home appliance serial number SN, and the current station code TCODE.
Preferably, it is as described.
The invention has the following beneficial effects:
(1) according to the invention, the upper computer and the wifi module to which the household appliance belongs are connected with the same wireless router, UDP communication is established, programming of different parameters of the wifi module connected with different cloud platforms is realized, command interaction is simple, and interaction time is short.
(2) According to the invention, the first display screen and the second display screen are divided into the screens, the wifi online programming result is displayed at the second display screen, and the wifi programming time is fully ensured, so that the method is not limited by the linear speed of a production line.
(3) According to the invention, the communication tool is adopted to distribute the bar code/two-dimensional code information scanned by the code scanning instrument, so that more devices needing code scanning information share the code scanning step, the repeated operation of a production line is reduced, and the production efficiency is improved.
Of course, it is not necessary for any product in which the invention is practiced to achieve all of the above-described advantages at the same time.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a schematic structural diagram of a wifi online programming device of the present invention;
FIG. 2 is a step diagram of a wifi online programming method of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, the invention relates to a wifi online programming device, which comprises a code scanning instrument, a communication tool, a computer host, a first display screen, a second display screen, a wireless network card, a router, household appliances and an infrared sensing device;
the scanning instrument is connected with the input end of the communication tool through a serial port; the output end of the communication tool is connected with the input end of the computer host through a serial port line;
the output end of the computer host is respectively connected with a first display screen and a second display screen; the computer host is in bidirectional connection with the router through the wireless network card;
the household appliance is connected with the router in a bidirectional mode through the wifi module;
the infrared induction device is connected with the input end of the computer host through a serial port line.
The computer host is internally provided with programming software for running and installing programming software programs; the software program is used for enabling the computer host to be connected with the router and establishing UDP communication with the household appliance to be tested connected in the router, so that on-line programming of wifi parameters is realized, command interaction is simple, and interaction time is short.
The code scanning instrument is used for scanning a bar code or a two-dimensional code pasted on the household appliance equipment and a station code and transmitting scanned information to the communication tool.
Wherein, the communication frock for carry out analysis and reposition of redundant personnel with the information of receiving, specifically do: the received character strings are analyzed into target information and respectively transmitted to a computer host provided with programming software and equipment needing information scanning on a production line, so that repeated operation of the production line is reduced, and production efficiency is improved.
The first display screen is used for displaying code scanning information; and the second display screen is used for displaying the wifi programming result of the household appliance and counting the programming success rate, so that the wifi programming time is fully ensured, and the wifi programming device is not limited by the line speed of a production line.
The infrared sensing device is used for sensing the household appliance with the programmed parameters at present and transmitting a sensing result to the computer host.
Referring to fig. 2, the present invention is a wifi online programming method, including the following steps:
step S1: starting a computer host provided with programming software, and running a software program, wherein the software program is connected with a router through a wireless network card;
step S2: the code scanning instrument scans the bar code/two-dimensional code on the household appliance equipment and transmits the scanning information to the communication tool;
step S3: the communication tool receives the bar code/two-dimensional code information, recombines the bar code/two-dimensional code information into command information according to a specified communication protocol, and transmits the command information to a software program running on a computer host and other equipment connected with the communication tool;
step S4: a software program on a computer host receives the command information, analyzes the MAC, SN and TCODE and displays the MAC, SN and TCODE on a first display screen, meanwhile, inquires parameters needing to be written to a wifi module in a local database according to the SN, combines the parameters with the MAC and SN into a broadcast command packet according to a protocol, establishes UDP communication with a connected router and sends the broadcast command packet;
step S5: the household appliance equipment is automatically powered on after the code scanning instrument scans the TCODE, the wifi module starts to work, is connected with the router and waits for receiving a broadcast command packet;
step S6: after receiving the broadcast command packet, the wifi module integrated with the household appliance equipment judges whether the MAC address contained in the broadcast information is equal to the MAC address of the household appliance equipment, and if not, no processing is performed; if the SN and the parameter are equal to the parameters, a wifi programming program is automatically started, and the SN and the parameter are programmed into the wifi module;
step S7: after the parameters of the wifi module are programmed, sending a UDP broadcast command packet back to the connected router, wherein the command comprises: MAC, SN, write success/failure, failure error code;
step S8: after receiving the UDP broadcast packet returned by the wifi module, the computer software program analyzes the programming result and stores the programming result in a database to which the computer host belongs, wherein the stored record comprises: MAC, SN, TCODE, write success/failure, failure error code;
step S9: the infrared sensing device senses the arrival of the current household appliance, calculates the TCODE of the current household appliance according to the TCODE code operation rule, and transmits the TCODE to the connected computer host provided with the programming software;
step S10: receiving the TCODE by a software program running on the computer host, and inquiring the programming result information of the current household appliance from the database, wherein the programming result information comprises the following information: MAC, SN, TCODE, programming success/failure, failure error code, and displaying the result information on a second display screen.
In step S2, the code scanner obtains the MAC address of the home appliance, the factory-defined home appliance serial number SN, and the current station code TCODE.
It should be noted that, in the above system embodiment, each included unit is only divided according to functional logic, but is not limited to the above division as long as the corresponding function can be implemented; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
In addition, it is understood by those skilled in the art that all or part of the steps in the method for implementing the embodiments described above may be implemented by a program instructing associated hardware, and the corresponding program may be stored in a computer-readable storage medium.
The preferred embodiments of the invention disclosed above are intended to be illustrative only. The preferred embodiments are not intended to be exhaustive or to limit the invention to the precise embodiments disclosed. Obviously, many modifications and variations are possible in light of the above teaching. The embodiments were chosen and described in order to best explain the principles of the invention and the practical application, to thereby enable others skilled in the art to best utilize the invention. The invention is limited only by the claims and their full scope and equivalents.