Microchip® Advanced Software Framework

ap.c File Reference

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(&quot;location.href='index.html'&quot;,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(&quot;location.href='index.html'&quot;,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.

References ERR_OK, HTTP_PORT, http_request(), NULL, osprintf(), UNUSED, vTaskDelay(), vTaskDelete(), and webSHORT_DELAY.

Referenced by main().

static void http_request ( struct netconn *  conn)
static

char cwebpage_hit[11]
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
char webpage[1024]
static

Webpage to send to connected STA.

Referenced by http_request().

uint32_t webpage_hit = 0
static

Webpage hit counter.

Referenced by http_request().