AP Task.
Copyright (c) 2016-2018 Microchip Technology Inc. and its subsidiaries.
#include "asf.h"
#include "FreeRTOS.h"
#include "lwip/api.h"
#include "lwip/tcpip.h"
#include "osprintf.h"
#include "ap.h"
#include "sta.h"
#include "driver/include/m2m_types.h"
#include <string.h>
#include <stdio.h>
Macros | |
#define | HTTP_PORT (80) |
Using broadcast address for simplicity. More... | |
#define | webHTML_END "\r\n</pre>\\r\n</font></BODY></html>" |
#define | webHTML_START "<html><head></head><BODY onLoad=\"window.setTimeout("location.href='index.html'",3000)\" bgcolor=\"#FFFFFF\" text=\"#2477E6\">\\r\n - Atmel WILC3000 STA/AP and BT Weather Demo - <p><pre><br>System Information:<br>Page Hits = " |
#define | webHTTP_OK "HTTP/1.0 200 OK\r\nContent-type: text/html\r\n\r\n" |
#define | webSHORT_DELAY (10) |
Delay on close error. More... | |
Functions | |
void | ap_task (void *argument) |
AP task main function. More... | |
static void | http_request (struct netconn *conn) |
Core HTTP server function processing the request. More... | |
Variables | |
static char | cwebpage_hit [11] |
Placeholder to convert from int to ASCII. More... | |
char | report [] |
Built up report to display on HTML page for connected STA. More... | |
uint32_t | sta_connected |
Number of STA connected. More... | |
tstrM2MAPAssocInfo | strApAssocInfo |
static char | webpage [1024] |
Webpage to send to connected STA. More... | |
static uint32_t | webpage_hit = 0 |
Webpage hit counter. More... | |
#define HTTP_PORT (80) |
Using broadcast address for simplicity.
Referenced by ap_task().
#define webHTML_END "\r\n</pre>\\r\n</font></BODY></html>" |
Referenced by http_request().
#define webHTML_START "<html><head></head><BODY onLoad=\"window.setTimeout("location.href='index.html'",3000)\" bgcolor=\"#FFFFFF\" text=\"#2477E6\">\\r\n - Atmel WILC3000 STA/AP and BT Weather Demo - <p><pre><br>System Information:<br>Page Hits = " |
Format of the dynamic page that is returned on each connection.
Referenced by http_request().
#define webHTTP_OK "HTTP/1.0 200 OK\r\nContent-type: text/html\r\n\r\n" |
Standard GET response.
Referenced by http_request().
#define webSHORT_DELAY (10) |
Delay on close error.
Referenced by ap_task(), and http_request().
void ap_task | ( | void * | argument | ) |
AP task main function.
Referenced by main().
|
static |
Core HTTP server function processing the request.
pvParameters | Netconn socket to use. |
References tstrM2MAPAssocInfo::astrM2MAssocEntryInfo, tstrM2MAssocEntryInfo::BSSID, cwebpage_hit, ERR_OK, netbuf_data(), netbuf_delete(), NULL, osprint(), report, rx_buf, tstrM2MAssocEntryInfo::s8RSSI, STA_WLAN_SSID, tstrM2MAPAssocInfo::u8NoConnSta, vTaskDelay(), vTaskList(), webHTML_END, webHTML_START, webHTTP_OK, webpage, webpage_hit, and webSHORT_DELAY.
Referenced by ap_task().
|
static |
Placeholder to convert from int to ASCII.
Referenced by http_request().
char report[] |
Built up report to display on HTML page for connected STA.
Referenced by http_request(), and parse_response().
uint32_t sta_connected |
Number of STA connected.
Referenced by wifi_cb().
tstrM2MAPAssocInfo strApAssocInfo |
|
static |
Webpage to send to connected STA.
Referenced by http_request().
|
static |
Webpage hit counter.
Referenced by http_request().