CN110134033A - A kind of LAN control system and method based on single-chip microcontroller stm32 and chip esp8266 - Google Patents
A kind of LAN control system and method based on single-chip microcontroller stm32 and chip esp8266 Download PDFInfo
- Publication number
- CN110134033A CN110134033A CN201910232041.6A CN201910232041A CN110134033A CN 110134033 A CN110134033 A CN 110134033A CN 201910232041 A CN201910232041 A CN 201910232041A CN 110134033 A CN110134033 A CN 110134033A
- Authority
- CN
- China
- Prior art keywords
- chip
- esp8266
- stm32
- singlechip
- chip esp8266
- 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.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B19/00—Programme-control systems
- G05B19/02—Programme-control systems electric
- G05B19/04—Programme control other than numerical control, i.e. in sequence controllers or logic controllers
- G05B19/042—Programme control other than numerical control, i.e. in sequence controllers or logic controllers using digital processors
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/02—Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
- H04L67/025—Protocols based on web technology, e.g. hypertext transfer protocol [HTTP] for remote control or remote monitoring of applications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/14—Session management
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/16—Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
- H04L69/163—In-band adaptation of TCP data exchange; In-band control procedures
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Automation & Control Theory (AREA)
- Small-Scale Networks (AREA)
Abstract
The invention discloses a kind of LAN control system based on single-chip microcontroller stm32 and chip esp8266, including server-side and client;Server-side includes host computer, first singlechip stm32 and the first chip esp8266 for opening server-side mode;Client includes the second chip esp8266 and several second singlechips stm32 that several open client mode;Host computer is connect with first singlechip stm32, and first singlechip stm32 is connect with the first chip esp8266;First chip esp8266 is connect using one-to-many connection type with several second chips esp8266;Second chip esp8266 and single-chip microcontroller stm32 connects one to one.For the present invention compared to traditional wireless radio frequency mode, the present invention is effectively reduced the generation of packet loss, and reduces mutual interference.Using esp8266 to establish local area network makes transmission more stable, and transmission range is also bigger.
Description
Technical field
The present invention relates to MAS control fields, specifically give a kind of based on single-chip microcontroller stm32's and chip esp8266
LAN control system and implementation method.
Background technique
In recent years, the quantity rapid growth of robot, and be gradually dissolved into human society.The building ring of robot
Border constantly changes, and individual machine people is difficult to undertake corresponding work.This requires communicated between multiple intelligent bodies.Multiple machines
Device people establishes local area network, can efficiently quick transmission and reception data.In this way can quick cooperative cooperating, to increase group
Team's efficiency.
Therefore, it is necessary to a kind of LAN control system and implementation method based on single-chip microcontroller stm32 and chip esp8266.
Summary of the invention
For the demand of the prior art, the present invention is provided.It is an object of the invention to establish local area network using esp8266,
So that control information and data information can be mutually obtained between stm32, so that more convenient stm32 is executed.
The technical solution of the present invention is as follows: a kind of LAN control system based on single-chip microcontroller stm32 and chip esp8266,
Including server-side and client;Server-side includes host computer, first singlechip stm32 and the first core for opening server-side mode
Piece esp8266;Client includes the second chip esp8266 and several second singlechips that several open client mode
stm32;
The host computer is connect with first singlechip stm32, and first singlechip stm32 is connect with the first chip esp8266;
First chip esp8266 is connect using one-to-many connection type with several second chips esp8266;Second chip
Esp8266 connects one to one with single-chip microcontroller stm32.
Further, the host computer turns TTL data line by USB and connect with first singlechip stm32, the first single machine
Piece stm32 is connect with the first chip esp8266 serial ports.
Further, pin PA2, PA3,3.3V and GND of first singlechip stm32 respectively with the first chip
Pin TXD, RXD, VCC and GND of esp8266 is correspondingly connected with.
Further, the first chip esp8266 establishes wireless user name, password and cipher mode, as hotspot;The
The IP address of two chip esp8266 the first chip of connection esp8266, and connect the hotspot of the first chip esp8266.
Further, the first chip esp8266 of server-side and the second chip esp8266 of client establishes TCP company
It connects, constructs local area network;Second chip esp8266 receives the data and order that the first chip esp8266 is sent;Second chip
Esp8266 sends a command to the first chip esp8266.
Further, the first single machine piece stm32 and second singlechip stm32 is the list for having downloaded control program
Piece machine, the control program include: that the encapsulation function of esp8266, the driving initialization of esp8266, initialization of (a) serial ports, system are fixed
When initialize and interrupt and interrupt function.
A kind of local network control method based on single-chip microcontroller stm32 and chip esp8266, comprising:
Step (1), host computer transmission data command to first singlechip stm32, first singlechip stm32 pass through serial ports and send out
Send function USART_SendData () that data are sent to the first chip esp8266;
Step (2), the first chip esp8266 are instructed by AT, and data are sent to the second chip esp8266;
Step (3), the second chip esp8266 are received by receive_data () function comes from the first chip esp8266
The data command of transmission, and in data storage to the caching of each second singlechip stm32 of client;
Step (4), the second singlechip stm32 for receiving data realize direction and speed control by output PWM wave.
Beneficial effect
1, compared to traditional wireless radio frequency mode, the present invention is effectively reduced the generation of packet loss, and reduces phase
Interference between mutually.
2, using esp8266 to establish local area network makes transmission more stable, and transmission range is also bigger.
Detailed description of the invention
Fig. 1 is the LAN control system structural schematic diagram based on single-chip microcontroller stm32 and chip esp8266.
Specific embodiment
The present invention is the LAN control system based on single-chip microcontroller stm32 and chip esp8266, including server-side and client
End;Server-side includes host computer, first singlechip stm32 and the first chip esp8266 for opening server-side mode;Client
The the second chip esp8266 and several second singlechips stm32 of client mode are opened including several.
Host computer is connect with first singlechip stm32, and first singlechip stm32 is connect with the first chip esp8266;First
Chip esp8266 is connect using one-to-many connection type with several second chips esp8266;Second chip esp8266 with
Single-chip microcontroller stm32 connects one to one.
Host computer turns TTL data line by USB and connect with first singlechip stm32, the first single machine piece stm32 and the first core
The connection of piece esp8266 serial ports.
Pin PA2, PA3,3.3V and GND of first singlechip stm32 respectively with the pin TXD of the first chip esp8266,
RXD, VCC and GND are correspondingly connected with.
First chip esp8266 establishes wireless user name, password and cipher mode, as hotspot;Second chip
The IP address of esp8266 the first chip of connection esp8266, and connect the hotspot of the first chip esp8266.
First chip esp8266 of server-side and the second chip esp8266 of client establishes TCP connection, constructs local
Net;Second chip esp8266 receives the data and order that the first chip esp8266 is sent;Second chip esp8266 sends instruction
To the first chip esp8266.
First single machine piece stm32 and second singlechip stm32 is the single-chip microcontroller for having downloaded control program, controls journey
Sequence includes: encapsulation function, the driving initialization of esp8266, initialization of (a) serial ports, timing initialization and the interruption of esp8266
And interrupt function.
A kind of local area network control method based on single-chip microcontroller stm32 and chip esp8266, comprising:
Step (1), host computer transmission data command to first singlechip stm32, first singlechip stm32 pass through serial ports and send out
Send function USART_SendData () that data are sent to the first chip esp8266;
Step (2), the first chip esp8266 are instructed by AT, and data are sent to the second chip esp8266;
Step (3), the second chip esp8266 are received by receive_data () function comes from the first chip esp8266
The data command of transmission, and store the data in the caching of each second singlechip stm32 of client;
Step (4), the second singlechip stm32 for receiving data realize direction and speed control by output PWM wave.
The esp8266B initial code of client are as follows:
The esp8266A initial code of server-side are as follows:
For the present invention compared to traditional wireless radio frequency mode, the present invention is effectively reduced the generation of packet loss, and reduces
Mutual interference.The present invention uses esp8266 to establish local area network to make transmission more stable, and transmission range is also bigger.
Claims (7)
1. a kind of LAN control system based on single-chip microcontroller stm32 and chip esp8266, it is characterised in that: including server-side
And client;Server-side includes host computer, first singlechip stm32 and the first chip esp8266 for opening server-side mode;
Client includes the second chip esp8266 and several second singlechips stm32 that several open client mode;On described
Position machine is connect with first singlechip stm32, and first singlechip stm32 is connect with the first chip esp8266;First chip
Esp8266 is connect using one-to-many connection type with several second chips esp8266;Several second chips esp8266
It connects one to one with several single-chip microcontrollers stm32.
2. the LAN control system according to claim 1 based on single-chip microcontroller stm32 and chip esp8266, feature
Be: the host computer turns TTL data line by USB and connect with first singlechip stm32;The first singlechip stm32 with
The connection of first chip esp8266 serial ports.
3. the LAN control system according to claim 1 based on single-chip microcontroller stm32 and chip esp8266, feature
Be: pin PA2, PA3,3.3V and GND of first singlechip stm32 respectively with the pin TXD of the first chip esp8266,
RXD, VCC and GND are correspondingly connected with.
4. the LAN control system according to claim 1 based on single-chip microcontroller stm32 and chip esp8266, feature
Be: the first chip esp8266 establishes wireless user name, password and cipher mode, as hotspot;Second chip esp8266
The IP address of the first chip esp8266 is connected, and connects the hotspot of the first chip esp8266.
5. the LAN control system according to claim 1 based on single-chip microcontroller stm32 and chip esp8266, feature
Be: the first chip esp8266 of server-side and the second chip esp8266 of client establishes TCP connection, constructs local area network;
Second chip esp8266 receives the data and order that the first chip esp8266 is sent;Second chip esp8266 is sent a command to
First chip esp8266.
6. the LAN control system according to claim 1 based on single-chip microcontroller stm32 and chip esp8266, feature
Be: the first single machine piece stm32 and second singlechip stm32 is the single-chip microcontroller for having downloaded control program, the control
Program include: the encapsulation function of esp8266, the driving initialization of esp8266, initialization of (a) serial ports, timing initialization and in
Disconnected and interrupt function.
7. a kind of local area network control method based on single-chip microcontroller stm32 and chip esp8266, it is characterised in that: include:
Step (1), host computer transmission data command to first singlechip stm32, first singlechip stm32 send letter by serial ports
Data are sent to the first chip esp8266 by number USART_SendData ();
Step (2), the first chip esp8266 are instructed by AT, and data are sent to the second chip esp8266;
Step (3), the second chip esp8266 are received by receive_data () function and are sent from the first chip esp8266
Data command, and data storage in the caching of each second singlechip stm32 of client;
Step (4), the second singlechip stm32 for receiving data realize direction and speed control by output PWM wave.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910232041.6A CN110134033A (en) | 2019-03-26 | 2019-03-26 | A kind of LAN control system and method based on single-chip microcontroller stm32 and chip esp8266 |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910232041.6A CN110134033A (en) | 2019-03-26 | 2019-03-26 | A kind of LAN control system and method based on single-chip microcontroller stm32 and chip esp8266 |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110134033A true CN110134033A (en) | 2019-08-16 |
Family
ID=67568590
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910232041.6A Pending CN110134033A (en) | 2019-03-26 | 2019-03-26 | A kind of LAN control system and method based on single-chip microcontroller stm32 and chip esp8266 |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110134033A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111163483A (en) * | 2020-02-10 | 2020-05-15 | 苏州大学 | WiFi communication system and using method |
-
2019
- 2019-03-26 CN CN201910232041.6A patent/CN110134033A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111163483A (en) * | 2020-02-10 | 2020-05-15 | 苏州大学 | WiFi communication system and using method |
CN111163483B (en) * | 2020-02-10 | 2023-10-24 | 苏州大学 | WiFi communication system and use method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN201303348Y (en) | Universal multi-serial bus converter | |
CN103441939B (en) | Multi-functional border router based on IPv6 wireless sensor network | |
CN109981422A (en) | Method, multi-robot system and the mobile terminal of mobile terminal control robot | |
CN102196601A (en) | Wireless data transmission device based on WSN (wireless sensor network), GPRS (general packet radio service) and GPS (global position system) | |
CN102393702A (en) | Method and system for expanding motion control terminal | |
CN201039395Y (en) | A radio network router | |
CN202617367U (en) | Wireless transmission module | |
US20230140769A1 (en) | REMOTE RECONFIGURATION SYSTEM FOR INTERNET OF THINGS (IoT) INTELLIGENT SENSING TERMINAL | |
CN109713871A (en) | A kind of sliding door linear motor | |
CN110134033A (en) | A kind of LAN control system and method based on single-chip microcontroller stm32 and chip esp8266 | |
CN101753406B (en) | Device for realizing the twice route of automatic tunnel and massage transmitting method | |
CN110209473A (en) | Interrupt processing apparatus, Cloud Server, interruption processing method and method for processing business | |
CN101657043B (en) | Wireless access gateway | |
CN205681443U (en) | Data integrated system based on multiple Virtual network operators | |
CN202918326U (en) | Intelligent multi-serial switch | |
CN107911288A (en) | Train Communication Adapter and Train Control management system | |
CN110248394A (en) | A kind of quick networking method of WiFi equipment based on Bluetooth | |
CN104702669B (en) | Information processing method and electronic equipment | |
CN104883306A (en) | Router expansion intelligent antenna | |
CN110943896B (en) | PPPoE data message transmission method, device, equipment and storage medium | |
CN208210323U (en) | intelligent gateway | |
CN117880860B (en) | Method and equipment for compatible wired and wireless network card based on LwIP | |
WO2013185535A1 (en) | Apparatus, method, and system for convergence and compatibility of protocol stack | |
CN203015129U (en) | Wireless local area network gateway | |
CN107612971A (en) | The wireless control system and its method of family formula photovoltaic microgrid |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20190816 |
|
WD01 | Invention patent application deemed withdrawn after publication |