Steve Sims / X_NUCLEO_IDW01M1_AP

Dependents:   X_NUCLEO_IDW01M1_AP_Test

Fork of X_NUCLEO_IDW01M1 by ST

Embed: (wiki syntax)

« Back to documentation index

wifi_module.c File Reference

wifi_module.c File Reference

Enable Wi-Fi functionality using AT cmd set. More...

Go to the source code of this file.

Functions

void callSpwfSADevice_debug (void *object, const char *string)
 Wrapper function to CPP Calls SpwfSADevice debug.
void callSpwfSADevice_attach (wifi_bool attach)
 Wrapper function to CPP Calls SpwfSADevice attach.
void WiFi_Module_Init (void)
 Changed/introduced functions for MBED implementation:
void initialize_status_flags ()
 initialize_status_flags Default Wifi status values
void Wifi_TIM_Handler (void)
 Period elapsed callback in non blocking mode This timer is used for calling back User registered functions with information.
void Start_Timer ()
 Start_Timer Start Timer.
void Stop_Timer ()
 Stop_Timer Stop Timer request.
void Stop_Dequeue ()
 Stop_Dequeue Stop dequeuing data from the ring buffer.
void Resume_Dequeue ()
 Resume_Dequeue Resume dequeuing data from the ring buffer.
void Wifi_SysTick_Isr ()
 Wifi_SysTick_Isr Function called every SysTick to process buffer.
WiFi_Status_t USART_Receive_AT_Resp (WiFi_AT_CMD_Response_t state)
 USART_Receive_AT_Resp Receive and check AT cmd response.
void Process_WiFi (void)
 Process_WiFi Pop a byte from the circular buffer and send the byte for processing This function should be called from main or should be run with a periodic timer.
void Process_Buffer (uint8_t *ptr)
 Process_Buffer Process and construct a Wind Line buffer.
void Process_Wind_Indication (uint8_t *process_buff_ptr)
 Process_Wind_Indication_Cmd Process Wind indication command.
void Process_WiFi_Indication_Cmd (event_s_TypeDef *event_pop_s1)
 Process_Dequeued_Wind_Indication Process Wind Indication after popping from Queue.
void Queue_Http_Event (uint8_t *hostname, uint8_t *path, uint32_t port_number, uint8_t *pURL_path)
 Queue_Http_Get_ Event Queue an HTTP-Request Event (GET/POST)
void Queue_Client_Write_Event (uint8_t sock_id, uint16_t DataLength, char *pData)
 Queue_Client_Write_Event Queues a Client Socket write event.
void Queue_Wifi_File_Event (uint8_t *pHostName, uint8_t *pFileName, uint32_t port_number)
 Queue_Wifi_File_Image_Create_Event Queue a File Image Create Event.
void Queue_Wifi_FW_Update_Event (uint8_t *hostname, uint8_t *filename_path, uint32_t port_number)
 Queue_Wifi_FW_Update_Event Queue a Firmware update Event.
void Wait_For_Sock_Read_To_Complete (void)
 Wait_For_Sock_Read_To_Complete Wait till sock is over and the OK of read arrives.
void Reset_AT_CMD_Buffer ()
 Reset_AT_CMD_Buffer Clear USART2 Rx buffer and Wi-Fi AT cmd buffer.
void assert_failed (uint8_t *file, uint32_t line)
 Reports the name of the source file and the source line number where the assert_param error has occurred.
char * search_buffer (char *pSourceBuff, uint16_t sourceBuffLen, char *pSearchStringBuff, uint16_t seartchStringLen)
 search_buffer search for substring in a buffer that contains null
char * Delete_Colon (char *input)
 Delete_Colon delete colon from input buffer.
WiFi_Status_t Read_WiFi_SSID (char *string)
 Read_WiFi_SSID Read SSID of WiFi module store in flash.
WiFi_Status_t Read_WiFi_SecKey (char *string)
 Read_WiFi_SecKey Read Security key of WiFi module store in flash.
WiFi_Status_t Read_WiFi_Mode (char *string)
 Read_WiFi_Mode Read Wi-Fi mode 0: idle,1 =STA,2 =IBSS,3 =MiniAP.
WiFi_Status_t Write_WiFi_SSID (char *string)
 Write_WiFi_SSID Store SSID in flash memory of WiFi module.
WiFi_Status_t Write_WiFi_SecKey (char *string)
 Write_WiFi_SecKey Store security key in flash memory of WiFi module.
void PrintErrorMsg (void)
 PrintErrorMsg Print error message on UART terminal.
void Print_Msg (char *msgBuff, uint8_t length)
 Print_Msg Print messages on UART terminal.
void Error_Handler (void)
 Error_Handler This function is executed in case of error occurrence.
void Start_DeepSleep_Timer (void)
 Start_DeepSleep_Timer start the deep sleep timer.
void Stop_DeepSleep_Timer ()
 Stop_DeepSleep_Timer stop the deep sleep timer.
void configure_to_exti ()
 configure_to_exti Configured the USART Rx pin to EXTI pin to capture standby wakeup interrupt
void WiFi_switch_to_command_mode (void)
 WiFi_switch_to_command_mode switch to command mode from data mode.
void WiFi_switch_to_data_mode (void)
 WiFi_switch_to_data_mode switch to data mode from command mode.
WiFi_Status_t Attention_Cmd ()
 Attention_Cmd Attention command.
WiFi_Status_t SET_Power_State (WiFi_Power_State_t state)
 SET_Power_State SET power mode of wifi module.
WiFi_Status_t Display_Help_Text ()
 Display_Help_Text this function will print a list of all commands supported with a brief help text for each cmd.
WiFi_Status_t WiFi_Get_IP_Address (uint8_t *ip_addr)
 WiFi_Get_IP_address Get the ip address.
WiFi_Status_t WiFi_Get_MAC_Address (uint8_t *mac_addr)
 WiFi_Get_MAC_address Get the MAC address.
WiFi_Status_t GET_Configuration_Value (char *sVar_name, uint32_t *aValue)
 GET_Configuration_Value Get a wifi configuration value from the module.
WiFi_Status_t SET_Configuration_Addr (char *sVar_name, char *addr)
 SET_Configuration_Addr Get a wifi configuration address from the module.
WiFi_Status_t SET_Configuration_Value (char *sVar_name, uint32_t aValue)
 SET_Configuration_Value SET the value of configuration variable.
WiFi_Status_t SET_SSID (char *ssid)
 SET_SSID SET SSID in flash memory of Wi-Fi module.
WiFi_Status_t SET_WiFi_SecKey (char *seckey)
 SET_WiFi_SecKey SET wifi security key.
WiFi_Status_t Restore_Default_Setting ()
 Restore_Default_Setting Restore the factory default values of the configuration variables and writes them to non volatile storage.
WiFi_Status_t Save_Current_Setting ()
 Save_Current_Setting Store the current RAM-based setting to non-volatile storage.
void ResetBuffer ()
 ResetBuffer Reset receive data/indication msg buffer.
WiFi_Status_t config_init_value (char *sVar_name, uint8_t aValue)
 config_init_value initalize config values before reset
WiFi_Status_t config_init_addr (char *sVar_name, char *addr)
 config_init_addr initalize config strings/addresses before reset
WiFi_Status_t WaitForResponse (uint16_t alength)
 WaitForResponse Wait for OK response.

Detailed Description

Enable Wi-Fi functionality using AT cmd set.

Author:
Central LAB
Version:
V2.0.0
Date:
10-February-2016
Attention:

© COPYRIGHT(c) 2015 STMicroelectronics

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of STMicroelectronics nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Definition in file wifi_module.c.