ST / X_NUCLEO_IDW01M1

Dependents:   SpwfInterface_NSAPI_Tests HelloWorld_IDW01M1

Fork of X_NUCLEO_IDW01M1 by ST Expansion SW Team

Embed: (wiki syntax)

« Back to documentation index

wifi_interface.c File Reference

wifi_interface.c File Reference

User APIs implementation for X-CUBE-WIFI1. More...

Go to the source code of this file.

Functions

void callSpwfSADevice_wakeup (void *object, int wake)
 Wrapper function to CPP Calls SpwfSADevice wakeup.
void callSpwfSADevice_debug (void *object, const char *string)
 Wrapper function to CPP Calls SpwfSADevice debug.
WiFi_Status_t wifi_init (wifi_config *config)
 Changed/introduced functions for MBED implementation:
WiFi_Status_t wifi_socket_client_security (uint8_t *tls_mode, uint8_t *root_ca_server, uint8_t *client_cert, uint8_t *client_key, uint8_t *client_domain, uint32_t tls_epoch_time)
 wifi_socket_client_security Set the security certificates and key for secure socket (TLS)
WiFi_Status_t wifi_socket_client_open (uint8_t *hostname, uint32_t port_number, uint8_t *protocol, uint8_t *sock_id)
 wifi_socket_client_open Open a network socket
WiFi_Status_t Open_Serial_Port ()
 Open_Serial_Port Open a network socket.
int wifi_socket_client_write (uint8_t sock_id, uint16_t DataLength, char *pData)
 wifi_socket_client_write Write len bytes of data to socket
WiFi_Status_t Socket_Read (uint16_t DataLength)
 Socket_Read Return len bytes of data from socket.
WiFi_Status_t wifi_socket_client_close (uint8_t sock_close_id)
 wifi_socket_client_close The SOCKC command allows to close socket
void Socket_Pending_Data ()
 Socket_Pending_Data Query pending data.It will returns the number of bytes of data waiting on socket.
WiFi_Status_t wifi_socket_server_open (uint32_t port_number, uint8_t *protocol)
 wifi_socket_server_open Open a Server socket
WiFi_Status_t wifi_socket_server_close ()
 Server Socket Close Close a Server socket.
void wait_for_command_mode (void)
 wait_for_command_mode Waits till we are in command mode
WiFi_Status_t wifi_file_delete (char *pFileName)
 wifi_file_delete Delete a file
WiFi_Status_t wifi_file_list ()
 wifi_file_list List existing filename
WiFi_Status_t wifi_file_show (uint8_t *pFileName)
 wifi_file_show Print the contents of an existing file
WiFi_Status_t wifi_file_create (char *pFileName, uint16_t alength, char *pUserFileBuff)
 wifi_file_create Create file for HTTP server
WiFi_Status_t wifi_http_get (uint8_t *hostname, uint8_t *path, uint32_t port_number)
 wifi_http_get Issue an HTTP GET of the given path to the specified host
WiFi_Status_t wifi_http_post (uint8_t *pURL_path)
 wifi_http_post Issue an HTTP GET of the given path to the specified host
WiFi_Status_t wifi_file_image_create (uint8_t *pHostName, uint8_t *pFileName, uint32_t port_number)
 wifi_file_image_create Downloads an updated file system via a single HTTP GET request to the named host and path.
WiFi_Status_t wifi_file_erase_external_flash ()
 wifi_file_erase_external_flash This API allows to erase the content of the external flash
WiFi_Status_t wifi_fw_update (uint8_t *hostname, uint8_t *filename_path, uint32_t port_number)
 wifi_fw_update Issue an HTTP GET of the given path to the specified host and get the firmware updated
WiFi_Status_t wifi_network_scan (wifi_scan *scan_result, uint16_t max_scan_number)
 wifi_network_scan Performs an immediate scan for available network
WiFi_Status_t wifi_ap_start (uint8_t *ssid, uint8_t channel_num)
 Set_MiniAP_Mode Configure Wi-Fi module in AP mode.
WiFi_Status_t wifi_connect (char *ssid, char *sec_key, WiFi_Priv_Mode priv_mode)
 SET_WiFi_STA_Mode Configure Wi-Fi module in STA mode.
WiFi_Status_t wifi_adhoc_create (uint8_t *ssid, WiFi_Priv_Mode priv_mode)
 SET_WiFi_IBSS_Mode Configure Wi-Fi module in IBSS mode.
WiFi_Status_t wifi_standby (uint8_t arg_standby_time)
 wifi_standby Configured WiFi module to enter standby
WiFi_Status_t wifi_wakeup (wifi_bool wakeup)
 wifi_wakeup wakeup the module from sleep by setting the GPIO6 through PC13 or allow it to go to sleep Jumper needed on JP4
WiFi_Status_t wifi_disconnect (void)
 wifi_disconnect disconnect the module from any AP
WiFi_Status_t wifi_enable (wifi_bool enable)
 wifi_enable Enable/Disable the Wi-Fi interface
WiFi_Status_t wifi_restore ()
 wifi_restore Restore the Wi-Fi with default values.
uint8_t wifi_gpio_init (GpioPin pin, char *dir, char irq)
 wifi_gpio_init Configure a GPIO pin as in or out with IRQ setting
uint8_t wifi_gpio_read (GpioPin pin, uint8_t *val, uint8_t *dir)
 wifi_gpio_read Read the configuration of a GPIO pin
uint8_t wifi_gpio_write (GpioPin pin, GpioWriteValue value)
 wifi_gpio_write Read the value of a GPIO pin

Detailed Description

User APIs implementation for X-CUBE-WIFI1.

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_interface.c.