CN116260869B - Method and system for remotely waking up same local area network host by utilizing MQTT protocol - Google Patents

Method and system for remotely waking up same local area network host by utilizing MQTT protocol Download PDF

Info

Publication number
CN116260869B
CN116260869B CN202310225631.2A CN202310225631A CN116260869B CN 116260869 B CN116260869 B CN 116260869B CN 202310225631 A CN202310225631 A CN 202310225631A CN 116260869 B CN116260869 B CN 116260869B
Authority
CN
China
Prior art keywords
chip
serial port
wake
module
pin
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202310225631.2A
Other languages
Chinese (zh)
Other versions
CN116260869A (en
Inventor
许吉锋
蓝世才
刘付观运
彭瀚林
李聪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Coco Software Technology Co ltd
Original Assignee
Guangzhou Coco Software Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Coco Software Technology Co ltd filed Critical Guangzhou Coco Software Technology Co ltd
Priority to CN202310225631.2A priority Critical patent/CN116260869B/en
Publication of CN116260869A publication Critical patent/CN116260869A/en
Application granted granted Critical
Publication of CN116260869B publication Critical patent/CN116260869B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • H04L67/125Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks involving control of end-device applications over a network
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4416Network booting; Remote initial program loading [RIPL]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4418Suspend and resume; Hibernate and awake
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04QSELECTING
    • H04Q9/00Arrangements in telecontrol or telemetry systems for selectively calling a substation from a main station, in which substation desired apparatus is selected for applying a control signal thereto or for obtaining measured values therefrom

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • General Health & Medical Sciences (AREA)
  • Signal Processing (AREA)
  • Medical Informatics (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • Small-Scale Networks (AREA)
  • Selective Calling Equipment (AREA)

Abstract

The application relates to the technical field of the Internet of things, in particular to a method and a system for remotely waking up the same local area network host by utilizing an MQTT protocol. A method for remotely waking up the same lan host using MQTT protocol, comprising the steps of: receiving a remote wake-up signal of a main control machine sent by an MQTT server in real time; converting the remote wake-up signal into a MAGIC PACKET-format wake-up data packet; and sending a wake-up data packet to all the controlled computers in the local area network so as to wake up all the controlled computers. The application has the function effect that each controlled machine in the same LAN is awakened by the cross-network main control machine remotely.

Description

Method and system for remotely waking up same local area network host by utilizing MQTT protocol
Technical Field
The invention relates to the technical field of the Internet of things, in particular to a method and a system for remotely waking up the same local area network host by utilizing an MQTT protocol.
Background
Currently, as the demand for use increases, it is often necessary to remotely control the turning On and off of electrical devices to increase efficiency, and WOL (Wake-On-LAN) is one of the solutions for remotely waking up hosts within a LAN.
However, the existing remote wake-up function is limited by a router in the network, and the solution can only be used when the main control machine and the controlled machine are located in the same local area network.
The prior art solutions described above have the following drawbacks:
Because the router can only be used when the master control machine and the slave machines are located in the same lan, each slave machine located in the same lan is difficult to wake up remotely by the master control machine across the network, and therefore improvement is needed.
Disclosure of Invention
In order to enable all controlled computers in the same local area network to be awakened remotely by a cross-network main control computer, the application provides a method and a system for awakening the same local area network main control computer remotely by utilizing an MQTT protocol.
In a first aspect, the present application provides a method for remotely waking up the same lan host using MQTT protocol, comprising the steps of:
receiving a remote wake-up signal of a main control machine sent by an MQTT server in real time;
Converting the remote wake-up signal into a MAGIC PACKET-format wake-up data packet;
and sending a wake-up data packet to all the controlled computers in the local area network so as to wake up all the controlled computers.
By adopting the technical scheme, the main control machine transmits the remote wake-up signal to the router of the local area network through the MQTT server, converts the remote wake-up signal transmitted by the main control machine into the wake-up data packet in MAGIC PACKET format which can be analyzed by the router in the local area network, and transmits the wake-up data packet to the controlled machine in the local area network, and the controlled machine is started after receiving the wake-up data packet, so that the function that each controlled machine in the same local area network is remotely waken by the main control machine crossing the network is realized.
The present application may be further configured in a preferred example to: before the step of receiving the remote wake-up signal of the master control machine sent by the MQTT server in real time, the method specifically comprises the following steps:
All controlled computers in the local area network subscribe to the main control computer through an MQTT protocol;
And automatically sending Wake On Lan for ASP an installation package to the controlled machine of the subscribed main control machine in the local area network.
By adopting the technical scheme, each controlled machine and the main control machine form a subscription relation, each controlled machine receives a remote wake-up signal sent by the main control machine in the local area network, and automatically sends an installation package to the controlled machine after being connected with the controlled machine, so that the controlled machine has the function of receiving the remote wake-up signal.
The present application may be further configured in a preferred example to: the step of sending a wake-up data packet to all the controlled computers in the lan to wake up all the controlled computers specifically includes:
The remote wake-up signal comprises a network wake-up data packet, and the network wake-up data packet comprises identification characters and identification code characters;
when the controlled machine receives the wake-up data packet, identifying identification characters in the wake-up data packet in real time;
after the controlled computer identifies the identification character of the wake-up data packet, reading the identification code character;
the controlled machine judges whether the identification code character is matched with the unique identification code of the controlled machine;
if yes, the controlled machine is started.
Through adopting above-mentioned technical scheme, possess the identification code that corresponds with the controlled machine in the long-range wake-up signal that the main control computer sent, make the connection of main control computer and controlled machine more accurate, be difficult for appearing misjudgement, make another controlled machine of main control computer control, the accuracy when improving the use.
The present application may be further configured in a preferred example to: after this step of converting the remote wake-up signal into a wake-up packet in MAGIC PACKET format, it specifically comprises:
Sending a wake-up data packet to a local area network router through a UDP protocol;
the local area network router receives the wake-up data packet;
The local area network router broadcasts a wake-up data packet to all the controlled computers in the local area network.
By adopting the technical scheme, the data information of the wake-up data packet has a specific format, and the data information is used as the identification character and the identification code character according to the specific format, so that the main control computer and the controlled computer are matched more efficiently.
In a second aspect, the present application provides a system for remotely waking up the same lan host by using MQTT protocol, which adopts the following technical scheme:
The system comprises a power supply module, a main control module, an interface module and a serial port downloading module, wherein the output end of the power supply module is coupled with the main control module, a first signal end of the main control module is coupled with a first signal end of the serial port downloading module, a second signal end of the main control module is used for being externally connected with a computer, a second signal end of the serial port downloading module is coupled with the first signal end of the interface module, and the interface module is used for being externally connected with the computer.
By adopting the technical scheme, the interface module is externally connected with the computer, so that the system program is easy to modify and update, and the main control module receives the remote wake-up signal of the main control computer and sends the remote wake-up signal to the controlled computer.
Preferably, the device further comprises a breathing lamp module, wherein the breathing lamp module is coupled with the second signal end of the main control module, and the breathing lamp module is used for prompting the working state of the main control module.
Through adopting above-mentioned technical scheme, the operating condition of breathing lamp is main control module's operating condition, and the breathing lamp makes the operating condition of system visual, and the staff of being convenient for inspect is convenient for get rid of when system's trouble, improves system error correction efficiency.
Preferably, the serial port downloading module includes a serial port downloading chip unit for converting the UART device into a USB interface, an automatic downloading unit and a serial port voltage stabilizing unit, a first signal end of the serial port downloading chip unit is a first signal end of the serial port downloading module, a second signal end of the serial port downloading chip unit is coupled with the first signal end of the automatic downloading unit, a second signal end of the automatic downloading unit is a second signal end of the serial port downloading unit, and a third signal end of the serial port downloading chip unit is coupled with a signal end of the serial port voltage stabilizing unit.
By adopting the technical scheme, the serial port downloading chip unit enables UART equipment to be converted into a USB interface, the serial port downloading chip unit provides a virtual serial port and is used for upgrading the existing serial port equipment or adding the serial port to a PC, and the serial port voltage stabilizing unit enables the serial port downloading chip unit to supply power to a stable point and protects the serial port downloading module.
Preferably, the serial port downloading module further comprises a serial port indicator lamp unit, one end of the serial port indicator lamp unit is used for being connected with electricity, and the other end of the serial port indicator lamp is coupled with the fourth signal end of the serial port downloading chip unit.
By adopting the technical scheme, the serial port indicator lamp prompts the working state of the serial port downloading chip unit, and when the serial port downloading chip unit works, the serial port indicator lamp is turned on; when the serial port downloading chip unit does not work, the serial port indicating lamp is turned off.
Preferably, the device further comprises a key module for controlling the on-off, wherein a signal end of the key module is coupled with a third signal end C of the main control module.
By adopting the technical scheme, the system has the function of external control on-off, namely has the standby function, and is started through the key module when the system needs to be started.
Preferably, the serial port downloading chip unit includes a chip U2 for converting the existing UART device into a USB interface; the automatic downloading unit comprises a resistor R1, a resistor R4, a triode Q1 and a triode Q2; the serial port indicator lamp unit comprises a resistor R5, a resistor R6, a Light Emitting Diode (LED) 3 and a Light Emitting Diode (LED) 4, and the serial port voltage stabilizing unit comprises a crystal voltage stabilizer X2; the LED power supply is characterized in that a 13 pin of the chip U2 is coupled with one end of the resistor R4, the other end of the resistor R4 is coupled with a base electrode of the triode Q2, a 14 pin of the chip U2 is coupled with one end of the resistor R1, the 14 pin of the chip U2 is also coupled with an emitting electrode of the triode Q2, the other end of the resistor R1 is coupled with the base electrode of the triode Q1, the emitting electrode of the triode Q1 is coupled with the 13 pin of the chip U2, a 1 pin of the chip U2 is grounded, a 2 pin of the chip U2 is coupled with one end of the resistor R6, the other end of the resistor R6 is used for being connected with a power supply, a 3 pin of the chip U2 is coupled with one end of the resistor R5, the other end of the resistor R5 is used for being connected with the power supply, a 3 pin of the chip U2 is coupled with the emitting diode, a 2 pin of the chip U2 is coupled with a 3 pin of the chip U2 is coupled with a carrier pin of the chip U2, a 2 is coupled with a 2B end of the chip 2 is coupled with a carrier pin of the chip 2, and a signal carrier pin of the chip 2 is coupled with a carrier pin of the chip 2 is coupled with the carrier pin of the chip 2B.
Through adopting above-mentioned technical scheme, chip U2 as serial ports download chip with current UART equipment conversion USB interface, crystal oscillator X2 and chip U2 coupling play the guard action to chip U2, and triode Q1 and triode Q2 combined action make the signal amplification, and realize signal transmission.
In summary, the present application includes at least one of the following beneficial technical effects:
1. The MQTT protocol enables a cross-network controlled machine of the same local area network to be networked, a remote wake-up signal sent by a main control machine is received, an identification code carried in the remote wake-up signal is matched with the controlled machine, and the MQTT protocol is called to carry out remote wake-up operation on a target controlled machine after the controlled machine is confirmed, so that a cross-network wake-up function is realized, and the scheme is smaller in limitation and wider in controllable controlled machine range compared with the conventional method of broadcasting the remote wake-up signal through a router;
2. the remote wake-up signal sent by the main control machine is provided with the identification code corresponding to the controlled machine, so that the connection between the main control machine and the controlled machine is more accurate, misjudgment is not easy to occur, the main control machine controls the other controlled machine, and the accuracy in use is improved;
3. The working state of the breathing lamp, namely the working state of the main control module, is visualized by the breathing lamp, so that the system is convenient for a worker to check, and is convenient for removing when the system fails, and the error correction efficiency of the system is improved;
4. The serial port downloading chip unit enables UART equipment to be converted into a USB interface, the serial port downloading chip unit provides a virtual serial port for upgrading existing serial port equipment or adding the serial port to a PC, and the serial port voltage stabilizing unit enables a power supply stable point of the serial port downloading chip unit to protect a serial port downloading module.
Drawings
FIG. 1 is a flow chart of an embodiment of a method of remotely waking up the same LAN host using the MQTT protocol according to the present application;
FIG. 2 is a flow chart before step 10 in an embodiment of a method for remotely waking up the same LAN host using the MQTT protocol according to the present application;
FIG. 3 is a flowchart of step 20 of a method for remotely waking up the same LAN host using the MQTT protocol according to the present application;
FIG. 4 is a flowchart of a method for remotely waking up the same LAN host using the MQTT protocol according to the present application in step 40;
FIG. 5 is a circuit block diagram of a system for remotely waking up the same LAN host using the MQTT protocol in accordance with the present application;
FIG. 6 is an overall circuit block diagram of an embodiment of a system for remotely waking up the same LAN host using the MQTT protocol in accordance with the present application;
FIG. 7 is an overall circuit diagram of an embodiment of a system for remotely waking up the same LAN host using the MQTT protocol in accordance with the present application;
FIG. 8 is a circuit diagram of a master control module of a system for remotely waking up the same LAN host using the MQTT protocol according to the present application.
FIG. 9 is a circuit diagram of a respiratory light module of an embodiment of the present application that utilizes the MQTT protocol to remotely wake up the same LAN host.
FIG. 10 is a circuit diagram of an interface module of an embodiment of a system for remotely waking up the same LAN host using the MQTT protocol.
FIG. 11 is a block diagram of a key module of a system for remotely waking up the same LAN host using the MQTT protocol according to an embodiment of the present application.
FIG. 12 is a circuit diagram of a serial download module of an embodiment of a system for remotely waking up the same LAN host using the MQTT protocol.
Reference numerals illustrate:
1. A power module; 2. a respiratory light module; 3. a key module; 4. a main control module; 5. a serial port downloading module; 51. downloading a chip unit through a serial port; 52. a serial port voltage stabilizing unit; 53. an automatic download unit; 54. an indicator light unit; 6. and an interface module.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be described in further detail with reference to fig. 1 to 10.
In one embodiment, as shown in fig. 1, the application discloses a method for remotely waking up the same lan host by using MQTT protocol, which specifically comprises the following steps:
s10: and receiving a remote wake-up signal of the main control machine sent by the MQTT server in real time.
Specifically, the main control machine sends a remote wake-up signal, in the application, the remote wake-up signal sent by the main control machine is a wake-up instruction sent by a small program, the remote wake-up signal is transmitted to the MQTT server, the MQTT server sends the remote wake-up signal to the local router, and the local router receives the remote wake-up signal of the main control machine sent by the MQTT server.
S20: the remote wakeup signal is converted into a MAGIC PACKET-format wakeup packet.
Specifically, the wake-up command (i.e., the remote wake-up signal) sent by the applet is of a string type, and the local router is limited to inhibit IP DIRECTED b roadcast, so that it is difficult for the local router to directly broadcast the string to a plurality of different controlled computers in the lan, and the wake-up data packet in MAGIC PACKET format can be broadcast to the different controlled computers by the local router.
S30: and sending a wake-up data packet to all the controlled computers in the local area network so as to wake up all the controlled computers.
Specifically, the converted MAGIC PACKET-format wake-up data packet is sent to the controlled machine, and the controlled machine is waken up after receiving the wake-up data packet, so as to realize the function of waking up a plurality of controlled machines in the local area network at the same time in a remote wake-up mode.
In one embodiment, as shown in fig. 2, before the step S10, before the step of receiving the remote wake-up signal of the host computer sent by the MQTT server in real time, a method for remotely waking up the same lan host computer by using the MQTT protocol further includes:
s101: all the controlled computers in the local area network subscribe to the main control computer through the MQTT protocol.
Specifically, the controlled machine is provided with a power supply, a main board and a network card, the power supply of the controlled machine is an ATX power supply conforming to the ATX2.03 standard, the network card of the controlled machine is provided with a chip supporting WOL, the main board of the controlled machine supports WOL function, the main board of the controlled machine starts WOL function in a power management menu in BIOS, and the controlled machine subscribes to the main control machine through an MQTT protocol to receive a remote wake-up signal sent by the main control machine.
S102: and automatically sending Wake On Lan for ASP an installation package to the controlled machine of the subscribed main control machine in the local area network.
Specifically, a Wake On Lan for ASP installation packet is sent to the controlled machine, so that the controlled machine has the function of receiving the MQTT instant messaging protocol.
In one embodiment, as shown in fig. 3, in step S30, that is, in the step of sending a wake-up packet to all the controlled computers in the lan to wake up all the controlled computers, specifically includes:
s31: the wake-up data packet comprises identification characters and identification code characters;
specifically, in this embodiment, the wake-on-network packet is MAGIC PACKET, which is in the format of: 60 xffs plus 16 destination network card MAC addresses, so the MAGIC PACKET total length is 6+16×6=102 bytes.
S32: when receiving a remote wake-up signal, identifying identification characters of the network wake-up data packet in real time;
Specifically, in this embodiment, the identification character content is: FF-FF-FF-FF-FF, when the identification character is read, the data packet is confirmed to be a network wake-up data packet.
S33: after the identification characters of the network wake-up data packet are identified, the identification code characters are read, and the identification code characters are matched with the unique identification codes of the controlled computers.
Specifically, after the identification character confirms that the data packet is a network awakening data packet, reading a subsequent identification code character, wherein 1-6 bytes of the network awakening data packet are identification characters, each 6 subsequent continuous bytes are identification codes, and the identification codes correspond to the MAC address of the controlled computer.
S34: and matching the identification code in the remote wake-up signal sent by the main control machine with the identification code of the controlled machine, so as to judge the controlled machine in the same local area network pointed by the remote wake-up signal.
Specifically, every 6 subsequent continuous bytes in the remote wake-up signal are matched with the identification code of the controlled machine, so that the controlled machine in the same local area network pointed by the remote wake-up signal is judged.
In one embodiment, as shown in fig. 4, after step S20, that is, after the step of converting the remote wake-up signal into a wake-up packet in MAGIC PACKET format, a method for remotely waking up the same lan host using the MQTT protocol further includes:
s201: and sending the wake-up data packet to the local area network router through the UDP protocol.
Specifically, the remote wake-up signal is converted into a wake-up data packet in MAGIC PACKET format, and the wake-up data packet is sent to the lan router through the UDP protocol.
S202: the lan router receives the wake-up packet.
S203: the local area network router broadcasts a wake-up data packet to all the controlled computers in the local area network.
Specifically, the router broadcasts the converted wake-up data packet to the controlled computers in the local area network, so that the control signals sent by the main control computer are sent to all the controlled computers in the local area network.
In an embodiment, the application also discloses a system for remotely waking up the same lan host by using the MQTT protocol, where the system for remotely waking up the same lan host by using the MQTT protocol corresponds to a method for remotely waking up the same lan host by using the MQTT protocol in the above embodiment, as shown in fig. 5 and 6: a system for remotely waking up the same lan host using MQTT protocol comprising: the breathing lamp comprises a power module 1, a main control module 4, an interface module 6, a serial port downloading module 5, a breathing lamp module 2 and a key module 3, wherein the output end of the power module 1 is coupled with the power input end of the main control module 4, a first signal end A of the main control module 4 is coupled with a first signal end A of the serial port downloading module 5, a second signal end B of the main control module 4 is coupled with the key module 3, a third signal end C of the main control module 4 is coupled with the breathing lamp module 2, and a second signal end B of the serial port downloading module 5 is coupled with a first signal end of the interface module 6.
As shown in fig. 7 and 8, in this embodiment, the main control module 4 is an ESP32WIFI chip, the ESP32WIFI chip includes 38 pins, the 1 pin of the ESP32WIFI chip is grounded, the 2 pin of the ESP32WIFI chip is used for accessing a 3.3V power supply, that is, the 2 pin of the ESP32WIFI chip is a power supply input end of the main control module 4, and the 30 pin, 31 pin, 34 pin and 35 pin of the ESP32WIFI chip are first signal ends a of the main control module 4, that is, the 30 pin, 31 pin, 34 pin and 35 pin of the ESP32WIFI chip are all coupled with the serial port download module 5.
As shown IN fig. 7, the power module 1 includes a voltage stabilizer U1, a capacitor C2, a capacitor C3, and a polarity capacitor C4, IN this embodiment of the present application, the model of the voltage stabilizer U1 is ASM1117—3.3, the voltage stabilizer U1 includes 4 pins, pin 1 of the voltage stabilizer U1 is an ADJ pin for grounding, pin 3 of the voltage stabilizer U1 is an IN pin, pin 2 and pin 4 of the voltage stabilizer U1 are both output ends, pin IN of the voltage stabilizer U1 is used for accessing 5V voltage, pin IN of the voltage stabilizer U1 is coupled with one end of the capacitor C2, and the other end of the capacitor C2 is grounded; the pin 2 and the pin 4 of the voltage stabilizer U1 are both coupled with one end of a capacitor C3, and the other end of the capacitor C3 is grounded; the pin 2 and the pin 4 of the voltage stabilizer U1 are also coupled with the positive electrode of the polar capacitor C4, and the other end of the polar capacitor C4 is grounded; the output end of the voltage stabilizer U1 is coupled with the power input end of the main control module 4, namely, the 2 pin and the 4 pin of the voltage stabilizer U1 are both coupled with the 1 pin of the ESP32WIFI chip.
As shown in fig. 6 and 7, the serial port download module 5 includes a serial port download chip unit 51 for converting UART devices into USB interfaces, an automatic download unit 53, an indicator light unit 54, and a serial port voltage stabilizing unit 52, a first signal end a of the serial port download chip unit 51 is a first signal end a of the serial port download module 5, a second signal end B of the serial port download chip unit 51 is coupled to the first signal end a of the automatic download unit 53, a second signal end B of the automatic download unit 53 is a second signal end of the serial port download unit, and a third signal end of the serial port download chip unit 51 is coupled to a signal end of the serial port voltage stabilizing unit 52.
As shown in fig. 7 and 12, the serial port download chip unit 51 includes a chip U2 for converting an existing UART device into a USB interface; the automatic download unit 53 includes a resistor R1, a resistor R4, a transistor Q1, and a transistor Q2; the serial port indicator lamp unit 54 includes a resistor R5, a resistor R6, a light emitting diode LED3, and a light emitting diode LED4, and the serial port voltage stabilizing unit 52 includes a crystal voltage stabilizer X2; in the embodiment of the application, the chip U2 is a CH340G chip, the CH340G chip comprises 16 pins, the 13 pin of the chip U2 is coupled with one end of a resistor R4, the other end of the resistor R4 is coupled with the base electrode of a triode Q2, the 14 pin of the chip U2 is coupled with one end of a resistor R1, the 14 pin of the chip U2 is also coupled with the emitter electrode of the triode Q2, the other end of the resistor R1 is coupled with the base electrode of the triode Q1, the emitter electrode of the triode Q1 is coupled with the 13 pin of the chip U2, the 1 pin of the chip U2 is grounded, the 2 pin of the chip U2 is coupled with one end of a resistor R6, the other end of the resistor R6 is used for being connected with a power supply, the LED4 is coupled between the chip U2 and the resistor R6, the 3 pin of the chip U2 is coupled with one end of a resistor R5, the other end of the resistor R5 is used for being connected with the power supply, the LED3 is coupled between the resistor R5 and the 3 pin of the chip U2, the 7 pin of the chip U2 is coupled with the LED3 pin of the crystal oscillator X2, the pin of the chip U2 is coupled with the base electrode of the triode Q1, the 2 pin of the chip U2 is coupled with the LED 2 and the first pin of the chip U2 is connected with the carrier pin of the chip U2, the chip 2 is connected with the first pin of the chip 2, the chip 2 is connected with the chip 2, and the second pin of the chip 2 is connected with the carrier chip 2, and the chip is connected with the chip 2.
As shown in fig. 7 and 10, the interface module 6 includes an interface TYPE-C, a resistor R2 and a resistor R3, the A1 pin and the B1 pin of the interface TYPE-C are grounded, the A8 pin of the interface TYPE-C is coupled with the resistor R2, the other end of the resistor R2 is grounded, the B8 pin of the interface TYPE-C is coupled with the resistor R3, the other end of the resistor R3 is grounded, the B6 pin of the interface TYPE-C is coupled with the 5 pin of the chip U2, and the B7 pin of the interface TYPE-C is coupled with the 6 pin of the chip U2.
As shown in fig. 7 and 9, the breathing lamp module 2 includes a lamp LED1, a lamp LED2 and a light emitting diode LED5, the lamp LED1 and the lamp LED2 each include 4 pins, the 4 pins of the lamp LED1 and the lamp LED2 are coupled with the output end of the voltage stabilizer U1, the 2 pins of the lamp LED1 and the lamp LED2 are grounded, the 3 pin of the lamp LED1 is coupled with the 25 pin of the ESP32WIFI chip, and the 1 pin of the lamp LED1 is coupled with the 3 pin of the lamp LED 2.
As shown in fig. 7 and 11, the key module 3 includes a restart key unit and a start key unit, the restart key unit includes a key EN, a resistor R9 and a resistor R11, pin 1 of the EN key is grounded, pin 2 of the EN key is coupled with one end of the resistor R9, the other end of the resistor R9 is coupled with one end of the resistor R11, the other end of the resistor R11 is coupled with the output end of the voltage stabilizer U1, an EN wiring port is coupled between the resistor R9 and the resistor R11, and the EN wiring port is coupled with pin 3 of the ESP32WIFI chip; the starting key unit comprises a key BOOT, a resistor R8 and a resistor R10, wherein a 1 pin of the BOOT key is grounded, a 2 pin of the BOOT key is coupled with one end of the resistor R8, the other end of the resistor R8 is coupled with one end of the resistor R10, the other end of the resistor R10 is coupled with the output end of the voltage regulator U1, a GPOI wiring port is coupled between the resistor R8 and the resistor R10, and a 25 pin of the GPIO9 wiring port is coupled with the ESP32WIFI chip.
The implementation principle of the system for remotely waking up the same LAN host by utilizing the MQTT protocol in the embodiment of the application is as follows: the CH340G chip converts UART equipment into a USB interface, the USB interface is connected with a router through a TYPE-C interface, an installation packet is sent to a controlled machine connected with the router, each controlled machine is connected with the router to form a local area network, when the main control machine sends a remote wake-up signal to the router through a program, the router sends the remote wake-up signal to an ESP32WIFI chip of the singlechip after receiving the remote wake-up signal, the ESP32WIFI chip converts the remote wake-up signal into a wake-up data packet in a Magic packet format, the wake-up data packet is sent to the router through a UDP protocol, the router broadcasts the wake-up data packet to each controlled machine, the controlled machine in the local area network broadcasts the wake-up data packet, after receiving the wake-up data packet, the controlled machine matches the MAC address in the wake-up data packet with the MAC address of the controlled machine (namely, the identification code character in the data packet is matched with the identification code of the controlled machine, and if the two are matched, the controlled machine receives a remote wake-up instruction to start; if the two data packets are not matched, the controlled machine discards the awakening data packet, so that the function of remotely awakening the controlled machine across the network by the main control machine is realized, and the main control machine can awaken all the hosts in the same local area network.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional units and modules is illustrated, and in practical application, the above-described functional distribution may be performed by different functional units and modules according to needs, i.e. the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-described functions.
The above embodiments are only for illustrating the technical solution of the present application, and not for limiting the same; although the application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the embodiments of the application, and are intended to be included within the scope of the application.

Claims (4)

1. A system for remotely waking up the same LAN host by utilizing MQTT protocol is characterized in that: the device comprises a power supply module (1), a main control module (4), an interface module (6) and a serial port downloading module (5), wherein the output end of the power supply module (1) is coupled with the main control module (4), a first signal end A of the main control module (4) is coupled with a first signal end A of the serial port downloading module (5), a second signal end B of the main control module (4) is used for being externally connected with a computer, a second signal end B of the serial port downloading module (5) is coupled with a first signal end of the interface module (6), and the interface module (6) is used for being externally connected with the computer;
Specifically, the main control module (4) is an ESP32WIFI chip, the ESP32WIFI chip includes 38 pins, the 1 pin of the ESP32WIFI chip is grounded, the 2 pin of the ESP32WIFI chip is a power input end of the main control module (4) and is used for accessing a 3.3V power supply, and the 30 pin, the 31 pin, the 34 pin and the 35 pin of the ESP32WIFI chip are all coupled with the serial port downloading module (5) and are a first signal end a of the main control module (4); the serial port downloading module (5) comprises a serial port downloading chip unit (51), an automatic downloading unit (53) and a serial port voltage stabilizing unit (52) which are used for converting UART equipment into a USB interface, wherein a first signal end A of the serial port downloading chip unit (51) is the first signal end A of the serial port downloading module (5), a second signal end B of the serial port downloading chip unit (51) is coupled with the first signal end A of the automatic downloading unit (53), a second signal end B of the automatic downloading unit (53) is the second signal end of the serial port downloading chip unit (51), a third signal end of the serial port downloading chip unit (51) is coupled with the signal end of the serial port voltage stabilizing unit (52), and the serial port downloading chip unit comprises a chip U2 which is used for converting the existing UART equipment into the USB interface; the automatic downloading unit comprises a resistor R1, a resistor R4, a triode Q1 and a triode Q2; the serial port indicator lamp unit comprises a resistor R5, a resistor R6, a Light Emitting Diode (LED) 3 and a Light Emitting Diode (LED) 4, and the serial port voltage stabilizing unit 52 comprises a crystal voltage stabilizer X2; the U2 type is CH340G chip, CH340G chip includes 16 pins, 13 pin of chip U2 couples with one end of resistance R4, another end of resistance R4 couples with base electrode of triode Q2, 14 pin of chip U2 couples with one end of resistance R1, and 14 pin of chip U2 couples with emitter electrode of triode Q2, another end of resistance R1 couples with base electrode of triode Q1, emitter electrode of triode Q1 couples with 13 pin of chip U2, 1 pin of chip U2 is grounded, 2 pin of chip U2 couples with one end of resistance R6, another end of resistance R6 is used for switching on the power, couple LED4 between chip U2 and resistance R6, 3 pin of chip U2 couples with one end of resistance R5, another end of resistance R5 is used for switching on the power, couple LED3 between 3 pins of resistance R5 and chip U2, 7 pins of chip U2 couple with 3 pins of crystal oscillator X2, 8 pins of chip U2 couple with crystal oscillator X2 pins of chip U2, the second end of chip U2 and the signal serial port of chip U2 and the second end of chip U2, the signal port of the chip U2 is connected with the second end of the chip B5 (the end of the chip B2 is the end of the chip is connected with the signal port of the chip B5);
The system for remotely waking up the same LAN host by utilizing the MQTT protocol is used for realizing the following method:
All controlled computers in the local area network subscribe to the main control computer through an MQTT protocol;
Automatically sending Wake On Lan for ASP an installation package to the controlled machine of the subscribed main control machine in the local area network;
receiving a remote wake-up signal of a main control machine sent by an MQTT server in real time;
Converting the remote wake-up signal into a MAGIC PACKET-format wake-up data packet;
Transmitting a wake-up data packet to all the controlled computers in the local area network to wake up all the controlled computers, wherein the remote wake-up signal comprises a network wake-up data packet, and the network wake-up data packet comprises identification characters and identification code characters; when the controlled machine receives the wake-up data packet, identifying identification characters in the wake-up data packet in real time; after the controlled computer identifies the identification character of the wake-up data packet, reading the identification code character; the controlled machine judges whether the identification code character is matched with the unique identification code of the controlled machine; if yes, the controlled machine is started.
2. The system for remotely waking up the same lan host according to claim 1, further comprising a breathing light module (2), wherein the breathing light module (2) is coupled to the second signal end of the main control module (4), and the breathing light module (2) is configured to prompt the working state of the main control module (4).
3. The system for remotely waking up the same lan host according to claim 1, wherein the serial port download module (5) further includes a serial port indicator light unit (54), one end of the serial port indicator light unit (54) is used for being connected to power, and the other end of the serial port indicator light unit (54) is coupled to the fourth signal end of the serial port download chip unit (51).
4. The system for remotely waking up the same lan host according to claim 1, further comprising a key module (3) for controlling on/off, wherein a signal terminal of the key module (3) is coupled to the third signal terminal C of the main control module (4).
CN202310225631.2A 2023-03-09 2023-03-09 Method and system for remotely waking up same local area network host by utilizing MQTT protocol Active CN116260869B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310225631.2A CN116260869B (en) 2023-03-09 2023-03-09 Method and system for remotely waking up same local area network host by utilizing MQTT protocol

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310225631.2A CN116260869B (en) 2023-03-09 2023-03-09 Method and system for remotely waking up same local area network host by utilizing MQTT protocol

Publications (2)

Publication Number Publication Date
CN116260869A CN116260869A (en) 2023-06-13
CN116260869B true CN116260869B (en) 2024-06-21

Family

ID=86679156

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310225631.2A Active CN116260869B (en) 2023-03-09 2023-03-09 Method and system for remotely waking up same local area network host by utilizing MQTT protocol

Country Status (1)

Country Link
CN (1) CN116260869B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103414575A (en) * 2013-08-01 2013-11-27 广州杰赛科技股份有限公司 Method, system and device for network wakeup
CN107659414A (en) * 2017-10-13 2018-02-02 深圳市尚云互联技术有限公司 Remote wakening system and method based on P2P
CN215006627U (en) * 2021-06-24 2021-12-03 广东辰奕智能科技股份有限公司 Serial port downloading circuit
CN215599680U (en) * 2021-07-22 2022-01-21 广州市多边形部落科技有限公司 Programmable integrated circuit

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100454817C (en) * 2006-07-05 2009-01-21 刘文斌 Computer remote wakeup method and device based on network
CN212113216U (en) * 2020-04-14 2020-12-08 邢台职业技术学院 Computer capable of waking up work by voice
CN115378989B (en) * 2022-08-10 2023-08-15 深圳华芯信息技术股份有限公司 MQTT theme subscription system, method, terminal and medium based on wake-up channel

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103414575A (en) * 2013-08-01 2013-11-27 广州杰赛科技股份有限公司 Method, system and device for network wakeup
CN107659414A (en) * 2017-10-13 2018-02-02 深圳市尚云互联技术有限公司 Remote wakening system and method based on P2P
CN215006627U (en) * 2021-06-24 2021-12-03 广东辰奕智能科技股份有限公司 Serial port downloading circuit
CN215599680U (en) * 2021-07-22 2022-01-21 广州市多边形部落科技有限公司 Programmable integrated circuit

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
互联网上远程终端唤醒技术与实现;林徐;张继山;;湖南城市学院学报(自然科学版)(05);第1节 *

Also Published As

Publication number Publication date
CN116260869A (en) 2023-06-13

Similar Documents

Publication Publication Date Title
RU2698708C2 (en) Apparatus, method and system for controlling load device through power line using power matching protocol
CN101069146B (en) Improved power delivery over Ethernet cables
US7483966B2 (en) Systems, methods, and media for remote wake-up and management of systems in a network
CN103138972B (en) Server cabinet system
JP2017527231A (en) Power saving mode for USB power carrier sourcing device
CN105045599A (en) Television and computer integrated machine and method for realizing remote startup and shutdown control of same
CN116260869B (en) Method and system for remotely waking up same local area network host by utilizing MQTT protocol
TW201433121A (en) Computer system and remote control method for computer device
CN204633817U (en) A kind of remote desktop control system
US11057227B2 (en) Network management using wake on LAN
CN103941617A (en) Remote control device and equipment through network
CN113193970A (en) Ethernet power supply architecture
CN104348645A (en) Server and data transmission method of server
CN211403175U (en) Computer remote control start-up system
WO2024113767A1 (en) Power-on method and power-on apparatus for smart network interface cards
US11177977B2 (en) Method and system for GRE tunnel control based on client activity detection
CN202475778U (en) Industrial grade 3rd generation (3G) wireless router
Foster Xbee cookbook issue 1.4 for series 1 (freescale) with 802.15. 4 firmware
CN109753472B (en) Data processing method and device
CN210467279U (en) LED display screen measurement and control system based on Internet of things
CN104346209A (en) Updating method of substrate management controller
US20210157384A1 (en) Assigning power sources
CN206099992U (en) Low -power dissipation optical module
CN110112622A (en) A kind of intelligent socket based on IPV6 networking
CN106817149B (en) Signal control method based on power line communication and server thereof

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant