22 #define HTTP_URL "http://ack.me"
36 #include "target_config.h"
38 #include "Wiconnect.h"
49 static Serial consoleSerial(STDIO_UART_TX, STDIO_UART_RX);
56 int main(
int argc,
char **argv)
58 consoleSerial.baud(115200);
67 SerialConfig serialConfig(WICONNECT_RX_PIN, WICONNECT_TX_PIN, 256, NULL);
72 Wiconnect wiconnect(serialConfig, 256, NULL, WICONNECT_RESET_PIN);
75 wiconnect.setCommandDefaultTimeout(15000);
81 printf(
"Initializing WiConnect Library...\r\n");
88 printf(
"The WiFi firmware is not supported. Run the ota example to update the firmware:\r\n");
89 printf(
"https://developer.mbed.org/teams/ACKme/code/wiconnect-ota_example");
93 printf(
"Failed to initialize communication with WiFi module!\r\n"
94 "Make sure the wires are connected correctly\r\n");
109 printf(
"Issuing HTTP Request: %s\r\n", HTTP_URL);
115 printf(
"Failed to issue HTTP request. Does the module have valid network credentials?\r\n");
129 fwrite(dataPtr, 1, dataLength, stdout);
136 printf(
"HTTP GET example has completed!\r\n");
Host<->Wiconnect Module serial configuration.
The WiFi module's firmware is out-dated. See updateFirmware() to update the firmware.
Connection object to remote server.
Command successfully completed.
The root WiConnect library class. This class inheriets all WiConnect functionality.