In the Internet age, do you know where your WiFi comes from? See the four working modes of WiFi module

In the Internet age, do you know where your WiFi comes from? See the four working modes of WiFi module

The four common working modes of WIFI modules: transparent transmission mode, serial port command mode, HTTPD Client mode, and GPIO mode, enable the WIFI module to work in different environments.

  • Transparent transmission mode: In this mode, the module realizes transparent transmission between the serial port and the network, and realizes data transmission between general serial port devices and network devices.
  • Serial command mode: In this mode, users can send data to the server according to our protocol and send data to different servers without restarting.
  • GPIO mode: In this mode, the user can send instructions of our protocol to control the six pins of the module, namely TXD, RXD, CTS, RTS, nReady, and nLink.

[[246541]]

1. Transparent transmission mode

The USR-WIFI232-A/B/C module supports serial port transparent transmission mode, which can realize serial port plug-and-play, thereby reducing the complexity of user use to the greatest extent. In this mode, all data that needs to be sent and received are transparently transmitted between the serial port and the WiFi interface without any analysis.

In transparent transmission mode, it is fully compatible with the user's original software platform. The user's device can support wireless data transmission without making any software changes.

Transparent transmission mode is the least complex data transmission. The user also turns on the hardware flow control (CTS/RTS) function of the serial port, which can reduce the bit error rate to the minimum. If the user does not need the hardware flow control function of the serial port, just leave the corresponding pin (CTS/RTS) floating.

2. Serial port command mode

In this mode, users can send serial port data to different server addresses. In this mode, UDP or TCP client can be used to send data to the server.

The client MCU sends a data packet in the following format. After the module has completed parsing, it only sends n bytes of data to the target address. When there is data returned, it is directly output from the serial port without parsing.

3. GPIO mode

High-performance WIFI module, supports GPIO mode. In GPIO mode, the 4 pins of UART are defined as GPIO, nReady, and nLink are also defined as GPIO.

When the module works in GPIO mode, PC or other network devices can establish a connection with the module via WIFI (TCP/UDP), and then control GPIO or read GPIO status through commands. The commands are as follows:

  • GPIO n IN: Set GPIOn as input and return GPIO OK or GPIO NOK
  • GPIO n OUT 0: Set GPIOn to output low level, return command OK or command NOK
  • GPIO n OUT 1: Set GPIOn to output high level, return command OK or command NOK
  • GPIO n SW: Set GPIOn to output and change the original high and low level state, return GPIO OK or GPIO NOK
  • GPIO n PWM m1 m2: Set GPIOn to output a high-low changing level, m1 is the high level time, m2 is the low level time (time unit ms, minimum 10 ms), return GPIO OK or GPIO NOK
  • GPIO n GET: Read GPIOn status and return I0, I1, O0, O1, which represent input low, input high, output low, and output high respectively.

Note: n can be 3, 4, 5, 6, 8, 9, corresponding to the module pins. GPIO 4 can only be used as input, and GPIO 3 can only be used as output.

GPIO READ returns the current status of all IOs, which is consistent with the representation method of GPIO n GET. For example, I1I1I0I0I0I0O1, where I represents input and O represents output. 0 represents low and 1 represents high.

The 4 pin is inverted. If it reads 1, it is actually 0, and if it reads 0, it is actually 1.

4. HTTPD Client mode

This mode is used to request data from an HTTP server or submit data to a server.

After the user sets the specific content of the HTTP header using the at command or the web page, each time data is sent, the module will automatically encapsulate the sent data into HTTP protocol data and send it to the specified HTTP server, making it convenient for users to directly read or submit data from the HTTP server.

<<:  Data center opening, electrical testers answer all your questions

>>:  How fast is 6G? You really should know in advance

Recommend

Are you a left-brained or right-brained person? (Test included)

【51CTO.com Quick Translation】 The success of a co...

KhanWebHost: $1/month KVM-2GB/10GB SSD/1TB/Dallas Data Center

Need to practice VPS hosting? You can take a look...

Don't understand the network I/O model? How to get started with Netty

Netty is a network application framework, so from...

The successful commercialization of NB-IoT is not achieved overnight

According to media reports, the Ministry of Indus...

Voice message application series——Unlimited message listening assistant

who I am Hello everyone, my name is NGCSS (Next G...

Five-minute K8S practice - Istio gateway

In the previous issue of k8s-Service Mesh Practic...

Dubbo3.0 Alibaba Large-Scale Practice Analysis—URL Reconstruction

1. Introduction to URL Before we discuss the spec...

Smart Manufacturing under 5G: A New Model of Smart Factory Automation

[[286782]] As a new generation of mobile communic...

Do you know two common communication methods of Vue?

Vue component development is a very wonderful pro...

Chrome DevTools: Modify User-Agent and customize personalized UA

[[442534]] This article is reprinted from the WeC...