AT+CIPETHMAC: Query/Set the MAC address of the ESP32 Ethernet.
AT+CIPETH: Query/Set the IP address of the ESP32 Ethernet.
Before you run any Ethernet AT Commands, please make the following preparations:
Note
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 ESP32 Ethernet.
Command:
Response:
Set CommandïFunction:
Set the MAC address of the ESP32 Ethernet.
Command:
Response:
Parameterï<âmacâ>: string parameter showing the MAC address of the Ethernet interface.
The default firmware does not support Ethernet AT commands (see ESP-AT Firmware Differences), but you can enable it by ./build.py menuconfig
> Component config
> AT
> AT ethernet support
and compile the project (see Compile ESP-AT Project Locally).
The configuration changes will be saved in the NVS partition 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 ESP32 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"AT+CIPETH: Query/Set the IP Address of the the ESP32 Ethernetï Query Commandï
Function:
Query the IP address of the ESP32 Ethernet.
Command:
Response:
+CIPETH:ip:<"ip"> +CIPETH:gateway:<"gateway"> +CIPETH:netmask:<"netmask"> OKSet Commandï
Function:
Set the IP address of the ESP32 Ethernet.
Command:
AT+CIPETH=<"ip">[,<"gateway">,<"netmask">]
Response:
Parametersï<âipâ>: string parameter showing the IP address of the ESP32 Ethernet.
[<âgatewayâ>]: gateway.
[<ânetmaskâ>]: netmask.
The default firmware does not support Ethernet AT commands (see ESP-AT Firmware Differences), but you can enable it by ./build.py menuconfig
> Component config
> AT
> AT ethernet support
and compile the project (see Compile ESP-AT Project Locally).
The configuration changes will be saved in the NVS partition 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"
Provide feedback about this document
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4