XtGem Forum catalog

Command Write Configure - Control WIFI and Ethernet module connect to router

 

‘T’

‘I’

PL2

Control WIFI and Ethernet module connect to router

6

 

‘0’

I_Start_WIFI_and_Connect_to_Router

 

‘1’

I_WIFI_Disconnect_to_Router

 

‘2’

I_Start_Ethernet_ENC28j60_and_Connect_to_Router

 

‘3’

I_Ethernet_ENC28j60_Disconnect_to_Router

 

 

‘4’

I_Start_Ethernet_W5XX_and_Connect_to_Router

 

 

‘5’

I_Ethernet_W5XX_Disconnect_to_Router

 

 

 

 

HOST send Control I_Start_WIFI_and_Connect_to_Router

 

<Header> +

<Payload_length>

<Payload>

PL0

PL1

PL2

PL3

PL4

PL5

$ESP_OK|xx|

‘T’

‘I’

‘0’

Infor 1

Infor 2

Infor 3

...

 

Payload

Index

 

Type value

Min

Value

Max

Value

Min Length

Max Length

Describe

Unit

PL2

‘0’

STRING

-

-

1

1

ID Control : I_Start_WIFI_and_Connect_to_Router

 

 

ESPrtk Respond

Payload

Index

 

Type value

Min

Value

Max

Value

Min Length

Max Length

Describe

Unit

PL2

‘0’

 

ID Control : I_Start_WIFI_and_Connect_to_Router

 

 

PL3

INTEGER

-1

2

-

-

Status Control

 

-1

NACK: Invalid input /wrong format / out of range …?

0

Error: No data SSID-PASS in Profile

1

WiFi Connecting... please wait in 5 second

2

WiFi Connected to router

 

Example

Message :

HOST Send

$ESP_OK|6|T|I|0|*7A26

ACK Respond

$ESP_OK|72|T|I|0|1|WiFi Connecting... please wait in 5 second . List:[TEWM_B31B6B]|*4C32

>> Error timeout - Wifi cannot connect to router after 10s

>> Wifi Connected to TEWM_B31B6B

NACK Respond

 

Other NACK

$ESP_ER|… or $ESS_ER|… or $AES_ER|…

 

Tip: To change SSID-PASS , see UART_Configure → INTERNET configure.

 

HOST send Control I_WIFI_Disconnect_to_Router

 

<Header> +

<Payload_length>

<Payload>

PL0

PL1

PL2

PL3

PL4

PL5

$ESP_OK|xx|

‘T’

‘1’

‘1’

Infor 1

Infor 2

Infor 3

...

 

Payload

Index

 

Type value

Min

Value

Max

Value

Min Length

Max Length

Describe

Unit

PL2

‘1’

STRING

-

-

1

1

ID Control : I_WIFI_Disconnect_to_Router

 

 

ESPrtk Respond

Payload

Index

 

Type value

Min

Value

Max

Value

Min Length

Max Length

Describe

Unit

PL2

‘1’

 

ID Control : I_WIFI_Disconnect_to_Router

 

 

PL3

INTEGER

-1

1

-

-

Status Control

 

-1

NACK: Invalid input /wrong format / out of range …?

0

Disconnecting WiFi...Please wait in 3 seconds

1

WiFi Disconnected success

 

Example

Message :

HOST Send

$ESP_OK|6|T|I|1|*7B26

ACK Respond

$ESP_OK|26|T|I|1|1|WiFi Disconnected|*6845

NACK Respond

 

Other NACK

$ESP_ER|… or $ESS_ER|… or $AES_ER|…

 

HOST send Control I_Start_Ethernet_ENC28j60_and_Connect_to_Router

 

<Header> +

<Payload_length>

<Payload>

PL0

PL1

PL2

PL3

PL4

PL5

$ESP_OK|xx|

‘T’

‘I’

‘2’

Infor 1

Infor 2

Infor 3

...

 

Payload

Index

 

Type value

Min

Value

Max

Value

Min Length

Max Length

Describe

Unit

PL2

‘2’

STRING

-

-

1

1

ID Control : I_Start_Ethernet_ENC28j60_and_Connect_to_Router

 

 

ESPrtk Respond

 

Payload

Index

 

Type value

Min

Value

Max

Value

Min Length

Max Length

Describe

Unit

PL2

‘2’

 

ID Control : I_Start_Ethernet_ENC28j60_and_Connect_to_Router

 

 

PL3

INTEGER

-1

2

-

-

Status Control

 

-1

NACK: Invalid input /wrong format / out of range …?

0

Error : Not found ENC28J60 on SPI port

1

Ethernet Connecting... please wait in 10 seconds

2

Ethernet Connected to Router

 

Example

Message :

HOST Send

$ESP_OK|6|T|I|2|*7826

ACK Respond

$ESP_OK|46|T|I|2|0|Error- Not found Ethernet on SPI port|*4962

$ESP_OK|57|T|I|2|1|Ethernet Connecting... please wait in 10 seconds|*3C4C

$ESP_OK|27|T|I|2|2|Ethernet Connected|*376D

NACK Respond

 

Other NACK

$ESP_ER|… or $ESS_ER|… or $AES_ER|…

 

HOST send Control I_Ethernet_ENC28j60_Disconnect_to_Router

 

<Header> +

<Payload_length>

<Payload>

PL0

PL1

PL2

PL3

PL4

PL5

$ESP_OK|xx|

‘T’

‘I’

‘3’

Infor 1

Infor 2

Infor 3

...

 

Payload

Index

 

Type value

Min

Value

Max

Value

Min Length

Max Length

Describe

Unit

PL2

‘3’

STRING

-

-

1

1

ID Control : I_Ethernet_ENC28j60_Disconnect_to_Router

 

 

ESPrtk Respond

 

Payload

Index

 

Type value

Min

Value

Max

Value

Min Length

Max Length

Describe

Unit

PL2

‘3’

 

ID Control : I_Ethernet_ENC28j60_Disconnect_to_Router

 

 

PL3

INTEGER

-1

1

-

-

Status Control

 

-1

NACK: Invalid input /wrong format / out of range …?

0

Disconnecting Ethernet ...Please wait in 10 seconds

1

Ethernet Disconnected to router

 

Example

 

Message :

HOST Send

$ESP_OK|6|T|I|3|*7926

ACK Respond

$ESP_OK|60|T|I|3|0|Disconnecting Ethernet ...Please wait in 10 seconds|*6606

….

$ESP_OK|30|T|I|3|1|Ethernet Disconnected|*4D4F

NACK Respond

 

Other NACK

$ESP_ER|… or $ESS_ER|… or $AES_ER|…

 

 

 

 

 

HOST send Control I_Start_Ethernet_W5XX_and_Connect_to_Router

 

<Header> +

<Payload_length>

<Payload>

PL0

PL1

PL2

PL3

PL4

PL5

$ESP_OK|xx|

‘T’

‘I’

‘4’

Infor 1

Infor 2

Infor 3

...

 

 

Payload

Index

 

Type value

Min

Value

Max

Value

Min Length

Max Length

Describe

Unit

PL2

‘4’

STRING

-

-

1

1

ID Control : I_Start_Ethernet_W5XX_and_Connect_to_Router

 

 

ESPrtk Respond

 

Payload

Index

 

Type value

Min

Value

Max

Value

Min Length

Max Length

Describe

Unit

PL2

‘4’

 

ID Control : I_Start_Ethernet_W5XX_and_Connect_to_Router

 

 

PL3

INTEGER

-1

2

-

-

Status Control

 

-1

NACK: Invalid input /wrong format / out of range …?

0

Error : Not found W5XX module on SPI port

1

Ethernet Connecting... please wait in 10 seconds

2

Ethernet Connected to Router

 

Example

 

Message :

HOST Send

$ESP_OK|6|T|I|4|*7E26

ACK Respond

$ESP_OK|46|T|I|4|0|Error- Not found Ethernet on SPI port|*4F62

$ESPLOG|58|2|INFO|SPI Scan Success : Connected to Ethernet over SPI.|*5C31

>> Ethernet Connected

$ESP_OK|27|T|I|4|2|Ethernet Connected|*316B

NACK Respond

 

Other NACK

$ESP_ER|… or $ESS_ER|… or $AES_ER|…

 

HOST send Control I_Ethernet_W5XX_Disconnect_to_Router

 

<Header> +

<Payload_length>

<Payload>

PL0

PL1

PL2

PL3

PL4

PL5

$ESP_OK|xx|

‘T’

‘I’

‘5’

Infor 1

Infor 2

Infor 3

...

 

 

Payload

Index

 

Type value

Min

Value

Max

Value

Min Length

Max Length

Describe

Unit

PL2

‘5’

STRING

-

-

1

1

ID Control : I_Ethernet_W5XX_Disconnect_to_Router

 

 

ESPrtk Respond

 

Payload

Index

 

Type value

Min

Value

Max

Value

Min Length

Max Length

Describe

Unit

PL2

‘5’

 

ID Control : I_Ethernet_W5XX_Disconnect_to_Router

 

 

PL3

INTEGER

-1

1

-

-

Status Control

 

-1

NACK: Invalid input /wrong format / out of range …?

0

Disconnecting Ethernet ...Please wait in 10 seconds

1

Ethernet Disconnected to router

 

Example

 

Message :

HOST Send

$ESP_OK|6|T|I|5|*7F26

ACK Respond

$ESP_OK|60|T|I|3|0|Disconnecting Ethernet ...Please wait in 10 seconds|*6606

….

$ESP_OK|30|T|I|5|1|Ethernet Disconnected|*4B4F

NACK Respond

 

Other NACK

$ESP_ER|… or $ESS_ER|… or $AES_ER|…

 

 

 

 

 

Command Write Configure - Control WIFI and Ethernet module (ENC28J60) connect to router

 

‘T’

‘I’

PL2

Control WIFI and Ethernet module (ENC28J60) connect to router

4

 

‘0’

I_Start_WIFI_and_Connect_to_Router

 

‘1’

I_WIFI_Disconnect_to_Router

 

‘2’

I_Start_Ethernet_and_Connect_to_Router

 

‘3’

I_Ethernet_Disconnect_to_Router

 

 

HOST send Control I_Start_WIFI_and_Connect_to_Router

<Header> +

<Payload_length>

<Payload>

PL0

PL1

PL2

PL3

PL4

PL5

$ESP_OK|xx|

‘T’

‘I’

‘0’

Infor 1

Infor 2

Infor 3

...

 

Payload

Index

 

Type value

Min

Value

Max

Value

Min Length

Max Length

Describe

Unit

PL2

‘0’

STRING

-

-

1

1

ID Control : I_Start_WIFI_and_Connect_to_Router

 

 

ESPrtk Respond

Payload

Index

 

Type value

Min

Value

Max

Value

Min Length

Max Length

Describe

Unit

PL2

‘0’

 

ID Control : I_Start_WIFI_and_Connect_to_Router

 

 

PL3

INTEGER

-1

2

-

-

Status Control

 

-1

NACK: Invalid input /wrong format / out of range …?

0

Error: No data SSID-PASS in Profile

1

WiFi Connecting... please wait in 5 second

2

WiFi Connected to router

 

Example

Message :

HOST Send

$ESP_OK|6|T|I|0|*7A26

ACK Respond

$ESP_OK|72|T|I|0|1|WiFi Connecting... please wait in 5 second . List:[TEWM_B31B6B]|*4C32

>> Error timeout - Wifi cannot connect to router after 10s

>> Wifi Connected to TEWM_B31B6B

NACK Respond

 

Other NACK

$ESP_ER|… or $ESS_ER|… or $AES_ER|…

 

Tip: To change SSID-PASS , see UART_Configure → INTERNET configure.

 

HOST send Control I_WIFI_Disconnect_to_Router

 

<Header> +

<Payload_length>

<Payload>

PL0

PL1

PL2

PL3

PL4

PL5

$ESP_OK|xx|

‘T’

‘1’

‘1’

Infor 1

Infor 2

Infor 3

...

 

 

Payload

Index

 

Type value

Min

Value

Max

Value

Min Length

Max Length

Describe

Unit

PL2

‘1’

STRING

-

-

1

1

ID Control : I_WIFI_Disconnect_to_Router

 

 

ESPrtk Respond

 

Payload

Index

 

Type value

Min

Value

Max

Value

Min Length

Max Length

Describe

Unit

PL2

‘1’

 

ID Control : I_WIFI_Disconnect_to_Router

 

 

PL3

INTEGER

-1

1

-

-

Status Control

 

-1

NACK: Invalid input /wrong format / out of range …?

0

Disconnecting WiFi...Please wait in 3 seconds

1

WiFi Disconnected success

 

Example

 

Message :

HOST Send

$ESP_OK|6|T|I|1|*7B26

ACK Respond

$ESP_OK|26|T|I|1|1|WiFi Disconnected|*6845

NACK Respond

 

Other NACK

$ESP_ER|… or $ESS_ER|… or $AES_ER|…

 

 

 

HOST send Control I_Start_Ethernet_and_Connect_to_Router

<Header> +

<Payload_length>

<Payload>

PL0

PL1

PL2

PL3

PL4

PL5

$ESP_OK|xx|

‘T’

‘I’

‘2’

Infor 1

Infor 2

Infor 3

...

 

Payload

Index

 

Type value

Min

Value

Max

Value

Min Length

Max Length

Describe

Unit

PL2

‘2’

STRING

-

-

1

1

ID Control : I_Start_Ethernet_and_Connect_to_Router

 

 

ESPrtk Respond

Payload

Index

 

Type value

Min

Value

Max

Value

Min Length

Max Length

Describe

Unit

PL2

‘2’

 

ID Control : I_Start_Ethernet_and_Connect_to_Router

 

 

PL3

INTEGER

-1

2

-

-

Status Control

 

-1

NACK: Invalid input /wrong format / out of range …?

0

Error : Not found ENC28J60 on SPI port

1

Ethernet Connecting... please wait in 10 seconds

2

Ethernet Connected to Router


Example

Message :

HOST Send

$ESP_OK|6|T|I|2|*7826

ACK Respond

$ESP_OK|57|T|I|2|1|Ethernet Connecting... please wait in 10 seconds|*3C4C

NACK Respond

 

Other NACK

$ESP_ER|… or $ESS_ER|… or $AES_ER|…

 

 

HOST send Control I_Ethernet_Disconnect_to_Router

 

<Header> +

<Payload_length>

<Payload>

PL0

PL1

PL2

PL3

PL4

PL5

$ESP_OK|xx|

‘T’

‘I’

‘3’

Infor 1

Infor 2

Infor 3

...


 

Payload

Index

 

Type value

Min

Value

Max

Value

Min Length

Max Length

Describe

Unit

PL2

‘3’

STRING

-

-

1

1

ID Control : I_Ethernet_Disconnect_to_Router

 


ESPrtk Respond

 

Payload

Index

 

Type value

Min

Value

Max

Value

Min Length

Max Length

Describe

Unit

PL2

‘3’

 

ID Control : I_Ethernet_Disconnect_to_Router

 

 

PL3

INTEGER

-1

1

-

-

Status Control

 

-1

NACK: Invalid input /wrong format / out of range …?

0

Disconnecting Ethernet ...Please wait in 10 seconds

1

Ethernet Disconnected to router


Example

 

Message :

HOST Send

$ESP_OK|6|T|I|3|*7926

ACK Respond

$ESP_OK|60|T|I|3|0|Disconnecting Ethernet ...Please wait in 10 seconds|*6606

….

$ESP_OK|30|T|I|3|1|Ethernet Disconnected|*4D4F

NACK Respond

 

Other NACK

$ESP_ER|… or $ESS_ER|… or $AES_ER|…