le_wifiAp_interface.h File Reference
Go to the source code of this file.
Typedefs | |
typedef struct le_wifiAp_NewEventHandler * | le_wifiAp_NewEventHandlerRef_t |
typedef void(* | le_wifiAp_EventHandlerFunc_t) (le_wifiAp_Event_t event, void *contextPtr) |
Enumerations | |
enum | le_wifiAp_Event_t { LE_WIFIAP_EVENT_CLIENT_CONNECTED = 0, LE_WIFIAP_EVENT_CLIENT_DISCONNECTED = 1 } |
enum | le_wifiAp_SecurityProtocol_t { LE_WIFIAP_SECURITY_NONE = 0, LE_WIFIAP_SECURITY_WPA2 = 1 } |
Functions | |
void | le_wifiAp_ConnectService (void) |
le_result_t | le_wifiAp_TryConnectService (void) |
void | le_wifiAp_DisconnectService (void) |
le_wifiAp_NewEventHandlerRef_t | le_wifiAp_AddNewEventHandler (le_wifiAp_EventHandlerFunc_t handlerPtr, void *contextPtr) |
void | le_wifiAp_RemoveNewEventHandler (le_wifiAp_NewEventHandlerRef_t addHandlerRef) |
le_result_t | le_wifiAp_Start (void) |
le_result_t | le_wifiAp_Stop (void) |
le_result_t | le_wifiAp_SetSsid (const uint8_t *ssidPtr, size_t ssidNumElements) |
le_result_t | le_wifiAp_SetSecurityProtocol (le_wifiAp_SecurityProtocol_t securityProtocol) |
le_result_t | le_wifiAp_SetPassPhrase (const char *passPhrase) |
le_result_t | le_wifiAp_SetPreSharedKey (const char *preSharedKey) |
le_result_t | le_wifiAp_SetDiscoverable (bool discoverable) |
le_result_t | le_wifiAp_SetChannel (int8_t channelNumber) |
le_result_t | le_wifiAp_SetMaxNumberOfClients (int8_t maxNumberOfClient) |
le_result_t | le_wifiAp_SetIpRange (const char *ipAp, const char *ipStart, const char *ipStop) |
Detailed Description
Legato c_le_wifiAp include file.
Copyright (C) Sierra Wireless Inc. Use of this work is subject to license.
Typedef Documentation
typedef void(* le_wifiAp_EventHandlerFunc_t) (le_wifiAp_Event_t event, void *contextPtr) |
Handler for WiFi Access Point changes
- Parameters
-
event Handles the wifi events contextPtr
typedef struct le_wifiAp_NewEventHandler* le_wifiAp_NewEventHandlerRef_t |
Reference type used by Add/Remove functions for EVENT 'le_wifiAp_NewEvent'
Enumeration Type Documentation
enum le_wifiAp_Event_t |
Function Documentation
le_wifiAp_NewEventHandlerRef_t le_wifiAp_AddNewEventHandler | ( | le_wifiAp_EventHandlerFunc_t | handlerPtr, |
void * | contextPtr | ||
) |
Add handler function for EVENT 'le_wifiAp_NewEvent'
These events provide information on WiFi Access Point
- Parameters
-
[in] handlerPtr [in] contextPtr
void le_wifiAp_ConnectService | ( | void | ) |
Connect the current client thread to the service providing this API. Block until the service is available.
For each thread that wants to use this API, either ConnectService or TryConnectService must be called before any other functions in this API. Normally, ConnectService is automatically called for the main thread, but not for any other thread. For details, see Client-specific Functions.
This function is created automatically.
void le_wifiAp_DisconnectService | ( | void | ) |
Disconnect the current client thread from the service providing this API.
Normally, this function doesn't need to be called. After this function is called, there's no longer a connection to the service, and the functions in this API can't be used. For details, see Client-specific Functions.
This function is created automatically.
void le_wifiAp_RemoveNewEventHandler | ( | le_wifiAp_NewEventHandlerRef_t | addHandlerRef | ) |
Remove handler function for EVENT 'le_wifiAp_NewEvent'
- Parameters
-
[in] addHandlerRef
le_result_t le_wifiAp_SetChannel | ( | int8_t | channelNumber | ) |
Set which WiFi Channel to use. Default value is 1. Some legal restrictions for values 12 - 14 might apply for your region.
- Returns
- LE_OUT_OF_RANGE if requested channel number is out of range.
- LE_OK if the function succeeded.
- Parameters
-
[in] channelNumber the channel number must be between 1 and 14.
le_result_t le_wifiAp_SetDiscoverable | ( | bool | discoverable | ) |
Set if the Access Point should announce its presence. Default value is TRUE. If the value is set to FALSE, the Access Point will be hidden.
- Returns
- LE_OK if the function succeeded.
- Parameters
-
[in] discoverable If TRUE the Access Point shows up on scans, else it is hidden.
le_result_t le_wifiAp_SetIpRange | ( | const char * | ipAp, |
const char * | ipStart, | ||
const char * | ipStop | ||
) |
Defines the IP adresses range for the host AP.
- Returns
- LE_BAD_PARAMETER if at least one of the given IP addresses is invalid.
- LE_FAULT if a system call failed.
- LE_OK if the function succeeded.
- Parameters
-
[in] ipAp the IP address of the Access Point. [in] ipStart the start IP address of the Access Point. [in] ipStop the stop IP address of the Access Point.
le_result_t le_wifiAp_SetMaxNumberOfClients | ( | int8_t | maxNumberOfClient | ) |
Set number of maximally allowed clients to connect to the Access Point at the same time.
- Returns
- LE_OUT_OF_RANGE if requested number of users exceeds the capabilities of the Access Point.
- LE_OK if the function succeeded.
- Parameters
-
[in] maxNumberOfClient the maximum number of clients
le_result_t le_wifiAp_SetPassPhrase | ( | const char * | passPhrase | ) |
Set the passphrase used to generate the PSK. Default value is "ChangeThisPassword".
- Note
- If the PSK is to be set directly, please use le_wifiAp_SetPreSharedKey()
- Returns
- LE_BAD_PARAMETER if parameter is invalid.
- LE_OK if the function succeeded.
- Parameters
-
[in] passPhrase pass-phrase for PSK
le_result_t le_wifiAp_SetPreSharedKey | ( | const char * | preSharedKey | ) |
Set the Pre Shared Key, PSK. There is no default value, since le_wifiAp_SetPassPhrase is used as default.
- Note
- the difference between le_wifiAp_SetPassPhrase() and this function
- Returns
- LE_BAD_PARAMETER if parameter is invalid.
- LE_OK if the function succeeded.
- Parameters
-
[in] preSharedKey PSK. Note the difference between PSK and Pass Phrase.
le_result_t le_wifiAp_SetSecurityProtocol | ( | le_wifiAp_SecurityProtocol_t | securityProtocol | ) |
Set the Security protocol to use. Default value is SECURITY_WPA2.
- Note
- that the SSID does not have to be human readable ASCII values, but often has.
- Returns
- LE_BAD_PARAMETER if some parameter is invalid.
- LE_OK if the function succeeded.
- Parameters
-
[in] securityProtocol The security protocol to use.
le_result_t le_wifiAp_SetSsid | ( | const uint8_t * | ssidPtr, |
size_t | ssidNumElements | ||
) |
Set the Service set identification (SSID) of the AccessPoint Default value is "LEGATO Access Point"
- Note
- that the SSID does not have to be human readable ASCII values, but often has.
- Returns
- LE_BAD_PARAMETER if some parameter is invalid.
- LE_OK if the function succeeded.
- Parameters
-
[in] ssidPtr The SSID to set as a octet array. [in] ssidNumElements
le_result_t le_wifiAp_Start | ( | void | ) |
This function starts the WIFI Access Point.
- Note
- that all settings, if to be used, such as security, username, password must set prior to starting the Access Point.
- Returns
- LE_FAULT if the function failed.
- LE_OK if the function succeeded.
le_result_t le_wifiAp_Stop | ( | void | ) |
This function stops the WIFI Access Point.
- Returns
- LE_FAULT if the function failed.
- LE_OK if the function succeeded.
le_result_t le_wifiAp_TryConnectService | ( | void | ) |
Try to connect the current client thread to the service providing this API. Return with an error if the service is not available.
For each thread that wants to use this API, either ConnectService or TryConnectService must be called before any other functions in this API. Normally, ConnectService is automatically called for the main thread, but not for any other thread. For details, see Client-specific Functions.
This function is created automatically.
- Returns
- LE_OK if the client connected successfully to the service.
- LE_UNAVAILABLE if the server is not currently offering the service to which the client is bound.
- LE_NOT_PERMITTED if the client interface is not bound to any service (doesn't have a binding).
- LE_COMM_ERROR if the Service Directory cannot be reached.