Skip to content

Commit

Permalink
Add wifi disable test
Browse files Browse the repository at this point in the history
  • Loading branch information
MaJerle committed Jun 23, 2023
1 parent 8f21ea5 commit ac3824c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 0 additions & 1 deletion TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
- Implement BT feature
- Transfer Cayenne MQTT app to be based on non-blocking API instead
- Add DNS for IPv6 support (Optional)
- Add support for WIFI GOT IP to parse IPv6
- Add `AT+CWJEAP` for WPA2 connections
- Implement single callback when station is connected and IP is received (so far STA_GOT_IP may be called several times in a row, when IP v4 and v6 are received)
- Implement new type of event instead, that is called only once per connection
Expand Down
8 changes: 5 additions & 3 deletions dev/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ static const cmd_t cmd_commands[] = {
{0, "ciupdate", "", "Run ciupdate command"},
{0, "dhcpenable", "", "Enable DHCP"},
{0, "dhcpdisable", "", "Disable DHCP"},
};
{0, "wifidisable", "", "Disable WIFI mode completely"}};

/**
* \brief Program entry point
Expand Down Expand Up @@ -181,8 +181,8 @@ main_thread(void* arg) {
//lwesp_sys_thread_create(NULL, "netconn_client", (lwesp_sys_thread_fn)netconn_client_thread, NULL, 0, LWESP_SYS_THREAD_PRIO);

/* Netconn client in separate thread */
//lwesp_sys_thread_create(NULL, "netconn_client_ssl", (lwesp_sys_thread_fn)netconn_client_ssl_thread, NULL, 0,
// LWESP_SYS_THREAD_PRIO);
lwesp_sys_thread_create(NULL, "netconn_client_ssl", (lwesp_sys_thread_fn)netconn_client_ssl_thread, NULL, 0,
LWESP_SYS_THREAD_PRIO);

/* Netconn server with multiple threads */
//lwesp_sys_thread_create(NULL, "netconn_server", (lwesp_sys_thread_fn)netconn_server_thread, NULL, 0, LWESP_SYS_THREAD_PRIO);
Expand Down Expand Up @@ -313,6 +313,8 @@ input_thread(void* arg) {
lwesp_ap_set_config("ESP8266_SSID", "its private", 13, LWESP_ECN_WPA2_PSK, 5, 0, NULL, NULL, 1);
} else if (IS_LINE("apdisable")) {
lwesp_set_wifi_mode(LWESP_MODE_STA, NULL, NULL, 1);
} else if (IS_LINE("wifidisable")) {
lwesp_set_wifi_mode(LWESP_MODE_NONE, NULL, NULL, 1);
} else if (IS_LINE("apliststa")) {
lwesp_sta_t stas[10];
size_t stat;
Expand Down

0 comments on commit ac3824c

Please sign in to comment.