Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Diff: 2021fork3/wifi.cpp
- Revision:
- 2:4603eae79fb6
- Parent:
- 1:eac9f7a0488f
--- a/2021fork3/wifi.cpp Wed Mar 10 21:09:24 2021 +0000 +++ b/2021fork3/wifi.cpp Thu Jun 23 19:33:33 2022 +0000 @@ -36,7 +36,7 @@ #define WIFI_EXIT_CMD_MODE_RESPONCE "OK" #define WIFI_NORMAL_CMD_RESPONSE "OK" -#define WIFI_MESSAGE_BUF_LENGTH 256 +#define WIFI_MESSAGE_BUF_LENGTH 1024 #define OK 0 #define NOK 1 @@ -160,6 +160,7 @@ char* charIt; char* new_var1; char* new_var2; + char* rf_payload_bytes; /* * Two step of configuration needed, since some parameters @@ -267,8 +268,8 @@ new_var2 = (char*) malloc (strlen(message_temp)+1); memcpy ( new_var2, message_temp, strlen(message_temp)+1 ); INFO("Wifi's module MAC address:{%s%s}", new_var1, new_var2); - - + + //message_temp[charWriteIx] = 0; //INFO("Wifi's module MAC address:{%s}", message_temp); @@ -283,8 +284,15 @@ // Set the ip addressing mode to DHCP //wifiSendString("ATMA 0\r"); //wait(WIFI_CMD_DELAY); - //wifiCheckResponse(WIFI_NORMAL_CMD_RESPONSE); - + //wifiCheckResponse(WIFI_NORMAL_CMD_RESPONSE); + + //get rf payload buffer size in hex + wifiSendString("ATNP\r"); + wait(WIFI_CMD_DELAY); + rf_payload_bytes = wifiGetStringMessage(); + INFO("Wifi's RF payload bytes:{%s}", rf_payload_bytes); + + wifiSendString("ATAC\r"); wait(WIFI_CMD_DELAY); wifiCheckResponse(WIFI_NORMAL_CMD_RESPONSE);