21 #define WIFI_AUTH M2M_WIFI_SEC_WPA_PSK 22 #define MAIN_WIFI_M2M_PRODUCT_NAME "EVB-2" 53 #define WIFI_BUFFER_SIZE 1460 84 static void wifi_cb(uint8_t u8MsgType,
void *pvMsg)
151 if (pstrConnect && pstrConnect->
s8Error >= 0)
185 #if 0 // Send data to com task
NMI_API sint8 connect(SOCKET sock, struct sockaddr *pstrAddr, uint8 u8AddrLen)
NMI_API sint8 m2m_wifi_connect(char *pcSsid, uint8 u8SsidLen, uint8 u8SecType, void *pvAuthInfo, uint16 u16Ch)
Asynchronous API to request connection to a specified access point.
This module contains common APIs declarations.
bool param(const std::string ¶m_name, T ¶m_val, const T &default_val)
uint32_t cbf[EVB2_PORT_COUNT]
static void socket_cb(SOCKET sock, uint8_t u8Msg, void *pvMsg)
Callback to get the Data from socket.
NMI_API SOCKET socket(uint16 u16Domain, uint8 u8Type, uint8 u8Flags)
static struct sockaddr_in g_addr
int comWrite(int serialNum, const unsigned char *buf, int size, uint32_t ledPin)
NMI_API sint8 m2m_wifi_request_dhcp_client(void)
Legacy (deprecated) Asynchronous API for starting a DHCP client on the WINC IC.
NMI_API sint8 m2m_wifi_deinit(void *arg)
Synchronous API that de-initialises the WINC driver.
NMI_API sint16 recv(SOCKET sock, void *pvRecvBuf, uint16 u16BufLen, uint32 u32Timeoutmsec)
Structure, holding the Wi-fi configuration attributes such as the wi-fi callback , monitoring mode callback and Ethernet parameter initialization structure. Such configuration parameters are required to be set before calling the wi-fi initialization function m2m_wifi_init. pfAppWifiCb attribute must be set to handle the wi-fi callback operations. pfAppMonCb attribute, is optional based on whether the application requires the monitoring mode configuration, and can there not be set before the initialization. strEthInitParam structure, is another optional configuration based on whether the bypass mode is set.
size_t xStreamBufferReceive(StreamBufferHandle_t xStreamBuffer, void *pvRxData, size_t xBufferLengthBytes, TickType_t xTicksToWait) PRIVILEGED_FUNCTION
static t_msg_wifi_product msg_wifi_product
Socket address structure for IPV4 addresses. Used to specify socket address information to connect to...
rtos_task_t task[UINS_RTOS_NUM_TASKS]
static uint8_t socketTxBuffer[WIFI_BUFFER_SIZE]
char psk[WIFI_SSID_PSK_SIZE]
static int g_indicateWiFiRxMs
static void update_wifi_leds(rtos_task_t *task)
WINC3400 IoT Application Interface.
This struct contains the Wi-Fi connection state.
#define END_CRITICAL_SECTION
#define STREAM_BUFFER_SIZE
This module contains WINC3400 ASIC specific internal APIs.
StreamBufferHandle_t g_xStreamBufferWiFiTx
Generic socket address structure.
NMI_API void socketInit(void)
static void init_wifi(void)
StreamBufferHandle_t g_xStreamBufferWiFiRx
void wifi_enable(int enable)
NMI_API sint8 m2m_wifi_handle_events(void *arg)
Synchronous M2M event handler function.
static void step_wifi(rtos_task_t *task)
NMI_API void socketDeinit(void)
Socket Layer De-initialization.
static void deinit_tcp_socket(void)
int comRead(int serialNum, unsigned char *buf, int bufSize, uint32_t ledPin)
#define BEGIN_CRITICAL_SECTION
union evb_server_t::@40 ipAddr
evb_server_t server[NUM_WIFI_PRESETS]
static void init_tcp_socket(void)
char ssid[WIFI_SSID_PSK_SIZE]
#define EVB_CFG_BITS_IDX_SERVER(bits)
static void wifi_cb(uint8_t u8MsgType, void *pvMsg)
Callback to get the Wi-Fi status update.
#define MAIN_WIFI_M2M_PRODUCT_NAME
NMI_API sint8 close(SOCKET sock)
static uint8_t g_wifi_connected
static SOCKET tcp_client_socket
evb_flash_cfg_t * g_flashCfg
void vTaskWiFi(void *pvParameters)
struct s_msg_wifi_product t_msg_wifi_product
size_t xStreamBufferSend(StreamBufferHandle_t xStreamBuffer, const void *pvTxData, size_t xDataLengthBytes, TickType_t xTicksToWait) PRIVILEGED_FUNCTION
void * StreamBufferHandle_t
void vTaskDelay(const TickType_t xTicksToDelay) PRIVILEGED_FUNCTION
sint8 m2m_wifi_reinit(tstrWifiInitParam *param)
Deinitialize and reinitialize wifi. Resets the WINC. Parameter may be set to NULL, in which case there is no change to the parameters given at initialization.
Autogenerated API include file for the Atmel Software Framework (ASF)
static void deinit_wifi(void)
sint8 nm_bsp_deinit(void)
De-iInitialize BSP.
NMI_API sint16 send(SOCKET sock, void *pvSendBuffer, uint16 u16SendLength, uint16 u16Flags)
BSD compatible socket interface.
#define EVB_CFG_BITS_IDX_WIFI(bits)
evb_wifi_t wifi[NUM_WIFI_PRESETS]
sint8 SOCKET
Definition for socket handler data type. Socket ID,used with all socket operations to uniquely identi...
NMI_API void registerSocketCallback(tpfAppSocketCb socket_cb, tpfAppResolveCb resolve_cb)
static uint8_t socketRxBuffer[WIFI_BUFFER_SIZE]