Ethernet AT Commands

Note

  • This command set is automatically activated when Ethernet functionality is enabled, requiring no additional configuration.

AT+ETHSTART

Functional Description

Starts the Ethernet interface and brings up the network with the specified addressing mode.

Command Format

AT+ETHSTART=<mode>

Response Format

Success response:

OK

Error response:

ERROR:<error_no>

Parameters

<mode>:

Addressing mode

  • 0: DHCP Client, obtain IP address from a DHCP server

  • 1: DHCP Server, act as a DHCP server (requires a static IP configured via AT+ETHIP)

  • 2: Static IP, use the static IP configured via AT+ETHIP

Error Codes

  • 1: Parameter error

  • 2: Static IP not configured (run AT+ETHIP=1,<ip>[,<gateway>,<netmask>] first)

  • 3: CONFIG_LWIP_LAYER is not enabled

Note

  • When <mode> is 1 or 2, a static IP must be configured with AT+ETHIP beforehand.

  • If the Ethernet interface has already been started, the new mode takes effect on the next link-up event.

AT+ETHIP

Functional Description

Configures static IPv4 address and related network parameters for the Ethernet interface.

Command Format

AT+ETHIP=<store_flag>,<ip>[,<gateway>,<netmask>]

Response Format

Success response:

OK

Error response:

ERROR:<error_no>

Parameters

<store_flag>:

Configuration storage flag

  • 0: Configuration takes effect only in current session (not saved to flash)

  • 1: Save configuration to flash (persists after reboot)

  • 2: Delete stored configuration in flash

<ip>:

IPv4 address string (e.g., 192.168.1.100)

<gateway>:

Gateway address

  • Default behavior: Automatically derived from IP address when unspecified

<netmask>:

Subnet mask

  • Default value: 255.255.255.0 (standard Class C subnet mask)

Error Codes

  • 1: Parameter error

Note

  • When store_flag=0 or 1, configuration takes effect immediately after command execution.

  • store_flag=2 only clears flash storage without affecting current runtime configuration.

  • Configuration results can be verified using the AT+WLSTATE command.