Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The commits depend on a version of Legato newer than the stable release (16.01.2) and thus they should have been performed on a Legato_16.04 branch. This reverts commit 8e16a6a. This reverts commit 0c8d73f. This reverts commit 8d014d8.
- Loading branch information
Showing
12 changed files
with
880 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,6 @@ requires: | |
{ | ||
api: | ||
{ | ||
${LEGATO_ROOT}/interfaces/wifi/le_wifiAp.api | ||
${MANGOH_WIFI_ROOT}/le_wifiAp.api | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,6 @@ requires: | |
{ | ||
api: | ||
{ | ||
${LEGATO_ROOT}/interfaces/wifi/le_wifiClient.api | ||
${MANGOH_WIFI_ROOT}/le_wifiClient.api | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ requires: | |
{ | ||
api: | ||
{ | ||
${LEGATO_ROOT}/interfaces/wifi/le_wifiAp.api | ||
${MANGOH_WIFI_ROOT}/le_wifiAp.api | ||
} | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,282 @@ | ||
//-------------------------------------------------------------------------------------------------- | ||
/** | ||
* @page c_le_wifi_ap Wifi Access Point Service | ||
* | ||
* @ref le_wifiAp_interface.h "API Reference" | ||
* | ||
* <HR> | ||
* | ||
* This Wifi Service API provides Wifi Access Point setup. | ||
* Please note that if there is only one wifi hardware the Wifi Access Point | ||
* cannot be used at the same time as the Wifi Client service. | ||
* | ||
* @section le_wifi_binding IPC interfaces binding | ||
* | ||
* | ||
* Here's a code sample binding to Wifi service: | ||
* @verbatim | ||
bindings: | ||
{ | ||
clientExe.clientComponent.le_wifiAp -> wifiService.le_wifiAp | ||
} | ||
@endverbatim | ||
* | ||
* | ||
* | ||
* @section le_wifiAp_connect_to_ap Setting parameters for the Access Point. | ||
* Note that these parameters must be set before the access point is started. | ||
* See each function for its default value. | ||
* | ||
* To set the SSID for the Access Point use the following function: | ||
* - le_wifiAp_SetSsid() | ||
* | ||
* To set the pass phrase prior for the Access Point use the function: | ||
* Also see le_wifiAp_SetPreSharedKey(). | ||
* - le_wifiAp_SetPassPhrase() | ||
* | ||
* Instead of setting the pass phrase, the Pre Shared Key (PSK), can be set explicitly. | ||
* To set the Pre Shared Key prior for the Access Point start use the function: | ||
* - le_wifiAp_SetPreSharedKey() | ||
* | ||
* Sets the security protocol to use. | ||
* - le_wifiAp_SetSecurityProtocol() | ||
* | ||
* Sets is the Access Point should show up in network scans or not. | ||
* - le_wifiAp_SetDiscoverable() | ||
* | ||
* Sets which channel to use. | ||
* - le_wifiAp_SetChannel() | ||
* | ||
* | ||
* @snippet "apps/sample/wifiApTest/wifiApTestComponent/wifiApTest.c" SetCred | ||
* | ||
* @section le_wifiAp_Start Starting the Wifi Access Point | ||
* | ||
* The Wifi Access Point is started with the function le_wifiAp_Start(). Unless values have been changed, default values will be used: | ||
* - le_wifiAp_Start(): | ||
* | ||
* To subscribe to wifi events le_wifiAp_AddEventHandler() is to be called. | ||
* - le_wifiAp_AddEventHandler() | ||
* | ||
* | ||
* @snippet "apps/sample/wifiApTest/wifiApTestComponent/wifiApTest.c" Subscribe | ||
* | ||
* <HR> | ||
* | ||
* Copyright (C) Sierra Wireless Inc. Use of this work is subject to license. | ||
*/ | ||
//-------------------------------------------------------------------------------------------------- | ||
|
||
//-------------------------------------------------------------------------------------------------- | ||
/** | ||
* @file le_wifiAp_interface.h | ||
* | ||
* Legato @ref c_le_wifiAp include file. | ||
* | ||
* Copyright (C) Sierra Wireless Inc. Use of this work is subject to license. | ||
*/ | ||
//-------------------------------------------------------------------------------------------------- | ||
|
||
USETYPES le_wifiDefs.api; | ||
|
||
//-------------------------------------------------------------------------------------------------- | ||
/** | ||
* Wifi Access Point Events. | ||
*/ | ||
//-------------------------------------------------------------------------------------------------- | ||
ENUM Event | ||
{ | ||
EVENT_CLIENT_CONNECTED, ///< Client connected to Wifi Access Point. | ||
EVENT_CLIENT_DISCONNECTED, ///< Client disconnected from Wifi Access Point. | ||
}; | ||
|
||
//-------------------------------------------------------------------------------------------------- | ||
/** | ||
* Wifi Access Point Security levels. | ||
*/ | ||
//-------------------------------------------------------------------------------------------------- | ||
ENUM SecurityProtocol | ||
{ | ||
SECURITY_NONE, ///< Wifi Access Point is open and has no password. | ||
SECURITY_WPA2 ///< Wifi Access Point has WPA2 activated. | ||
}; | ||
|
||
|
||
//-------------------------------------------------------------------------------------------------- | ||
/** | ||
* Handler for Wifi Access Point changes | ||
*/ | ||
//-------------------------------------------------------------------------------------------------- | ||
HANDLER EventHandler | ||
( | ||
Event event IN ///< Handles the wifi events | ||
); | ||
|
||
//-------------------------------------------------------------------------------------------------- | ||
/** | ||
* These events provide information on Wifi Access Point | ||
* | ||
*/ | ||
//-------------------------------------------------------------------------------------------------- | ||
EVENT NewEvent | ||
( | ||
handler EventHandler | ||
); | ||
|
||
|
||
//-------------------------------------------------------------------------------------------------- | ||
/** | ||
* 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. | ||
* | ||
* @return LE_FAULT The function failed. | ||
* @return LE_OK The function succeeded. | ||
* | ||
*/ | ||
//-------------------------------------------------------------------------------------------------- | ||
FUNCTION le_result_t Start | ||
( | ||
); | ||
|
||
//-------------------------------------------------------------------------------------------------- | ||
/** | ||
* This function stops the WIFI Access Point. | ||
* | ||
* @return LE_FAULT The function failed. | ||
* @return LE_OK The function succeeded. | ||
* | ||
*/ | ||
//-------------------------------------------------------------------------------------------------- | ||
FUNCTION le_result_t Stop | ||
( | ||
); | ||
|
||
//-------------------------------------------------------------------------------------------------- | ||
/** | ||
* 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. | ||
* | ||
* @return LE_BAD_PARAMETER Some parameter is invalid. | ||
* @return LE_OK Function succeeded. | ||
*/ | ||
//-------------------------------------------------------------------------------------------------- | ||
FUNCTION le_result_t SetSsid | ||
( | ||
uint8 ssid[le_wifiDefs.MAX_SSID_BYTES] IN ///< The SSID to set as a octet array. | ||
); | ||
|
||
//-------------------------------------------------------------------------------------------------- | ||
/** | ||
* 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. | ||
* | ||
* @return LE_BAD_PARAMETER Some parameter is invalid. | ||
* @return LE_OK Function succeeded. | ||
*/ | ||
//-------------------------------------------------------------------------------------------------- | ||
FUNCTION le_result_t SetSecurityProtocol | ||
( | ||
SecurityProtocol securityProtocol IN ///< The security protocol to use. | ||
); | ||
|
||
|
||
|
||
|
||
//-------------------------------------------------------------------------------------------------- | ||
/** | ||
* 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() | ||
* | ||
* @return LE_BAD_PARAMETER Parameter is invalid. | ||
* @return LE_OK Function succeeded. | ||
* | ||
*/ | ||
//-------------------------------------------------------------------------------------------------- | ||
FUNCTION le_result_t SetPassPhrase | ||
( | ||
string passPhrase[le_wifiDefs.MAX_PASSPHRASE_BYTES] IN ///< pass-phrase for PSK | ||
); | ||
|
||
//-------------------------------------------------------------------------------------------------- | ||
/** | ||
* 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 | ||
* | ||
* @return LE_BAD_PARAMETER Parameter is invalid. | ||
* @return LE_OK Function succeeded. | ||
* | ||
*/ | ||
//-------------------------------------------------------------------------------------------------- | ||
FUNCTION le_result_t SetPreSharedKey | ||
( | ||
string preSharedKey[le_wifiDefs.MAX_PSK_BYTES] IN ///< PSK. Note the difference between PSK and Pass Phrase. | ||
); | ||
|
||
|
||
//-------------------------------------------------------------------------------------------------- | ||
/** | ||
* 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. | ||
* | ||
* @return LE_OK Function succeeded. | ||
* | ||
*/ | ||
//-------------------------------------------------------------------------------------------------- | ||
FUNCTION le_result_t SetDiscoverable | ||
( | ||
bool discoverable IN ///< If TRUE the Access Point shows up on scans, else it is hidden. | ||
); | ||
|
||
//-------------------------------------------------------------------------------------------------- | ||
/** | ||
* Set which Wifi Channel to use. | ||
* Default value is 1. | ||
* Some legal restrictions for values 12 - 14 might apply for your region. | ||
* | ||
* @return LE_OUT_OF_RANGE Requested channel number is out of range. | ||
* @return LE_OK Function succeeded. | ||
* | ||
*/ | ||
//-------------------------------------------------------------------------------------------------- | ||
FUNCTION le_result_t SetChannel | ||
( | ||
int8 channelNumber IN ///< the channel number must be between 1 and 14. | ||
); | ||
|
||
//-------------------------------------------------------------------------------------------------- | ||
/** | ||
* Set number of maximally allowed clients to connect to the Access Point at the same time. | ||
* | ||
* @return LE_OUT_OF_RANGE Requested number of users exceeds the capabilities of the Access Point. | ||
* @return LE_OK Function succeeded. | ||
* | ||
*/ | ||
//-------------------------------------------------------------------------------------------------- | ||
FUNCTION le_result_t SetMaxNumberOfClients | ||
( | ||
int8 maxNumberOfClient IN ///< the maximum number of clients | ||
); | ||
|
||
//-------------------------------------------------------------------------------------------------- | ||
/** | ||
* Defines the IP adresses range for the host AP. | ||
* | ||
* @return LE_BAD_PARAMETER At least, one of the given IP addresses is invalid. | ||
* @return LE_FAULT A system call has failed. | ||
* @return LE_OK Function succeeded. | ||
* | ||
*/ | ||
//-------------------------------------------------------------------------------------------------- | ||
FUNCTION le_result_t SetIpRange | ||
( | ||
string ipAp[64] IN, ///< the IP address of the Access Point. | ||
string ipStart[64] IN, ///< the start IP address of the Access Point. | ||
string ipStop[64] IN ///< the stop IP address of the Access Point. | ||
); |
Oops, something went wrong.