This prerequisite takes ESP32-Ethernet-Kit as an example. If you use other modules or development boards, please refer to corresponding datasheets for RX/TX pins.
Change AT UART pins (because default AT UART pins are in conflict with the Ethernet function pins):
Open factory_param_data.csv file.
In the row of module WROVER-32, change uart_tx_pin from GPIO22 to GPIO2, uart_rx_pin from GPIO19 to GPIO4, uart_cts_pin from GPIO15 to GPIO1, and uart_rts_pin from GPIO14 to GPIO1 (flow control is optional and is not used here). See How to Set AT Port Pins for more information.
Enable AT ethernet support. See How to enable ESP-AT Ethernet for more information.
Compile and flash the project onto ESP32-Ethernet-Kit.
Connect your hardware:
Connect Host MCU (PC with USB to serial converter) to GPIO2 (TX) and GPIO4 (RX) of ESP32-Ethernet-Kit when the flow control function is not enabled.
Connect ESP32-Ethernet-Kit with Ethernet network.
Function:
Query the MAC address of the ESP Ethernet.
Command:
AT+CIPETHMAC?
Response:
+CIPETHMAC:<"mac"> OK
Function:
Set the MAC address of the ESP Ethernet.
Command:
AT+CIPETHMAC=<"mac">
Response:
OK
<”mac”> : string parameter showing the MAC address of the Ethernet interface.
The default firmware does not support Ethernet AT commands (see >How to understand the differences of each type of module ), but you can enable it by ./build.py menuconfig > Component config > AT > AT ethernet support and compile the project (see >Build Your Own ESP-AT Project ).
The configuration changes will be saved in the NVS area if AT+SYSSTORE=1 .
Please make sure the MAC address of Ethernet interface you set is different from those of other interfaces.
Bit0 of the ESP MAC address CANNOT be 1. For example, a MAC address can be “1a:…” but not “15:…”.
FF:FF:FF:FF:FF:FF and 00:00:00:00:00:00 are invalid MAC addresses and cannot be set.
AT+CIPETHMAC="1a:fe:35:98:d4:7b"
Function:
Query the IP address of the ESP Ethernet.
Command:
AT+CIPETH?
Response:
+CIPETH:ip:<ip> +CIPETH:gateway:<gateway> +CIPETH:netmask:<netmask> OK
Function:
Set the IP address of the ESP Ethernet.
Command:
AT+CIPETH=<ip>[,<gateway>,<netmask>]
Response:
OK
<ip> : string parameter showing the IP address of the ESP Ethernet.
[<gateway>] : gateway.
[<netmask>] : netmask.
The default firmware does not support Ethernet AT commands (see >How to understand the differences of each type of module">understand diffs ), but you can enable it by menuconfig > Component config > AT > AT ethernet support and compile the project (see Build Your Own ESP-AT Project ).
The configuration changes will be saved in the NVS area if AT+SYSSTORE=1 .
This Set Command correlates with DHCP commands, such as AT+CWDHCP :
If static IP is enabled, DHCP will be disabled.
If DHCP is enabled, static IP will be disabled.
The last configuration overwrites the previous configuration.
AT+CIPETH="192.168.6.100","192.168.6.1","255.255.255.0"