Skip to content

Latest commit

 

History

History
179 lines (109 loc) · 5.31 KB

Ethernet_AT_Commands.rst

File metadata and controls

179 lines (109 loc) · 5.31 KB

{IDF_TARGET_ETH_BOARD_NAME: default="/", esp32="ESP32-Ethernet-Kit"}

{IDF_TARGET_NAME} Ethernet AT Commands

:link_to_translation:`zh_CN:[中文]`

Introduction

Important

The default AT firmware does not support the AT commands listed on this page. If you need {IDF_TARGET_NAME} to support Ethernet commands, please refer to :doc:`../Compile_and_Develop/How_to_enable_ESP_AT_Ethernet` documentation and :doc:`Compile ESP-AT Project Locally <../Compile_and_Develop/How_to_clone_project_and_compile_it>`.

Before you run any Ethernet AT Commands, please make the following preparations:

Note

This prerequisite takes {IDF_TARGET_ETH_BOARD_NAME} as an example. If you use other modules or development boards, please refer to corresponding datasheets for RX/TX pins.

:ref:`AT+CIPETHMAC <ETH-AT>`: Query/Set the MAC Address of the {IDF_TARGET_NAME} Ethernet

Query Command

Function:

Query the MAC address of the {IDF_TARGET_NAME} Ethernet.

Command:

AT+CIPETHMAC?

Response:

+CIPETHMAC:<"mac">
OK

Set Command

Function:

Set the MAC address of the {IDF_TARGET_NAME} Ethernet.

Command:

AT+CIPETHMAC=<"mac">

Response:

OK

Parameter

  • <"mac">: string parameter showing the MAC address of the Ethernet interface.

Notes

Example

AT+CIPETHMAC="1a:fe:35:98:d4:7b"

:ref:`AT+CIPETH <ETH-AT>`: Query/Set the IP Address of the the {IDF_TARGET_NAME} Ethernet

Query Command

Function:

Query the IP address of the {IDF_TARGET_NAME} Ethernet.

Command:

AT+CIPETH?

Response:

+CIPETH:ip:<ip>
+CIPETH:gateway:<gateway>
+CIPETH:netmask:<netmask>
OK

Set Command

Function:

Set the IP address of the {IDF_TARGET_NAME} Ethernet.

Command:

AT+CIPETH=<ip>[,<gateway>,<netmask>]

Response:

OK

Parameters

  • <ip>: string parameter showing the IP address of the {IDF_TARGET_NAME} Ethernet.
  • [<gateway>]: gateway.
  • [<netmask>]: netmask.

Notes

Example

AT+CIPETH="192.168.6.100","192.168.6.1","255.255.255.0"