Skip to content

Commit 7fb47fe

Browse files
committed
smart_config: fix ESPTOUCH NACK problem
1 parent fb670e1 commit 7fb47fe

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

main/src/user/smart_config.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,14 @@ void smart_config_callback(smartconfig_status_t status, void *pdata)
5858
break;
5959
case SC_STATUS_LINK_OVER:
6060
ESP_LOGI(TAG, "link over");
61+
if (pdata != NULL) {
62+
uint8_t phone_ip[4] = {0};
63+
memcpy(phone_ip, (uint8_t *)pdata, 4);
64+
ESP_LOGI(TAG, "phone ip is %d.%d.%d.%d", phone_ip[0], phone_ip[1], phone_ip[2], phone_ip[3]);
65+
}
66+
esp_smartconfig_stop();
67+
xEventGroupClearBits(system_event_group, WIFI_CONFIG_BIT);
68+
xEventGroupSetBits(daemon_event_group, KEY_DAEMON_READY_BIT);
6169
break;
6270
default:
6371
break;

0 commit comments

Comments
 (0)