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

Wi-Fi7 is here, should the access method of smart home appliances be unified?

In recent years, Wi-Fi specifications have been i...

Understanding Ethernet Switching Technology in One Article

Labs Guide Currently, most campus networks are ne...

PacificRack VPS, 5-253 IPs per year starting from $50

PacificRack is a site under QN Data Center, mainl...

Huawei's approach to building smart cities under four major constraints

[51CTO.com original article] The rapid developmen...

Wi-Fi 7 is on the way, how powerful is it?

In 2019, Samsung and Apple were the first to intr...

Cutover failure leads to major communication failure

[[429302]] Japan has once again experienced a maj...

CloudCone: $16.5/year - 1GB/50GB/3TB monthly traffic/Los Angeles data center

CloudCone has released a new promotional package,...

UK: Infrastructure cannot keep up, 5G application progress is slow

According to reports, 5G deployment in the UK is ...

Perhaps it is easier to understand HTTPS this way

We won’t talk about HTTP and HTTPS first. Let’s s...

5G development requires a long process

In terms of network construction scale, the numbe...