Driver for CC3000 Wi-Fi module
Dependencies: NVIC_set_all_priorities
Dependents: CC3000_Simple_Socket Wi-Go_IOT_Demo
Information
The current code has been reworked to a full object oriented application and contains an mbed socket compatible API.
CC3000 Wi-Fi module library
Info
This is the low level driver for TI's SimpleLink CC3000 device.
Port from Avnet's Wi-Go KEIL code (based on TI's CC3000 code).
Special thanks to Jim Carver from Avnet for providing the Wi-Go board and for his assistance.
Differences with TI's original code
The code functionality stays exactly the same.
In order to make it easier to use the code, following changes were made :
- Addition of a tool to shift all IRQ priorities to a lower level since it is very important to keep the SPI handler at the highest system priority, the WLAN interrupt the second highest and all other system interrupts at a lower priority, so their handlers can be preempted by the CC3000 interrupts.
- Addition of low level I/O controls and conditional compiler controls in cc3000_common.h.
- CC3000 initialisation, pin declarations, SPI and WLAN irq priorities are set in
Init_HostDriver
, we need to call this function at the start of the main function. - The SPI and HCI code are joined into one file.
- The include list has been rearranged - Only
#include "wlan.h"
is needed in the user API.
- Part of the CC3000's user eeprom memory is used to store additional info (52 bytes in NVMEM_USER_FILE_1):
# bytes | Description | Info |
1 | First time config parameter | Useful when connecting |
2 | Firmware updater version | used with the Firmware update tool |
2 | Service Pack version | used with the Firmware update tool |
3 | Driver Version | used with the Firmware update tool |
3 | Firmware Version | used with the Firmware update tool |
1 | CIK validation (Client Interface Key) | |
40 | CIK data (Client Interface Key) | used with the exosite |
Using the Library
A user API is needed to access the CC3000 functions.
Examples:
- Internet Of Things full WiGo demo (SmartConfig - WebServer - Exosite - Android sensor Fusion App)
- CC3000_Simple_Socket
Using the library with other processors
cc3000_common.cpp
loads the irq tool for all targets:
All current mbed targets are supported by this library.
#include "NVIC_set_all_priorities.h"
All low level settings that need to change are available in cc3000_common.h
//***************************************************************************** // PIN CONTROLS & COMPILE CONTROLS //***************************************************************************** // Compiler control #define CC3000_UNENCRYPTED_SMART_CONFIG // No encryption //#define CC3000_TINY_DRIVER // Driver for small memory model CPUs //Interrupt controls #define NVIC_ALL_IRQ NVIC_set_all_irq_priorities(3); // Set ALL interrupt priorities to level 3 #define NVIC_SPI_IRQ NVIC_SetPriority(SPI0_IRQn, 0x0); // Wi-Fi SPI interrupt must be higher priority than SysTick #define NVIC_PORT_IRQ NVIC_SetPriority(PORTA_IRQn, 0x1); #define NVIC_SYSTICK_IRQ NVIC_SetPriority(SysTick_IRQn, 0x2); // SysTick set to lower priority than Wi-Fi SPI bus interrupt //#define NVIC_ADC_IRQ NVIC_SetPriority(ADC0_IRQn, 0x3); // ADC is the lowest of all // Wlan controls #define WLAN_ISF_PCR PORTA->PCR[16] #define WLAN_ISF_ISFR PORTA->ISFR #define WLAN_ISF_MASK (1<<16) #define WLAN_ASSERT_CS wlan_cs = 0; //CS : active low #define WLAN_DEASSERT_CS wlan_cs = 1; #define WLAN_ASSERT_EN wlan_en = 1; //EN : active high #define WLAN_DEASSERT_EN wlan_en = 0; #define WLAN_READ_IRQ wlan_int #define WLAN_ENABLE_IRQ wlan_int.fall(&WLAN_IRQHandler); #define WLAN_DISABLE_IRQ wlan_int.fall(NULL); #define WLAN_IRQ_PIN_CREATE InterruptIn wlan_int (PTA16); #define WLAN_EN_PIN_CREATE DigitalOut wlan_en (PTA13); #define WLAN_CS_PIN_CREATE DigitalOut wlan_cs (PTD0); #define WLAN_SPI_PORT_CREATE SPI wlan(PTD2, PTD3, PTC5); // mosi, miso, sclk #define WLAN_SPI_PORT_INIT wlan.format(8,1); #define WLAN_SPI_SET_FREQ wlan.frequency(12000000); #define WLAN_SPI_SET_IRQ_HANDLER wlan_int.fall(&WLAN_IRQHandler); #define WLAN_SPI_WRITE wlan.write(*data++); #define WLAN_SPI_READ wlan.write(0x03); // !! DO NOT MODIFY the 0x03 parameter (CC3000 will not respond).
API documentation
Due to a little problem with the links on the mbed site, the API documentation is not directly accessible (will be solved in a next release).
Currently, it is only accessible by adding modules.html
to the API doc link: http://mbed.org/users/frankvnk/code/CC3000_Hostdriver/docs/tip/modules.html
wlan.h@8:b48bb4df9319, 2013-08-09 (annotated)
- Committer:
- frankvnk
- Date:
- Fri Aug 09 12:23:24 2013 +0000
- Revision:
- 8:b48bb4df9319
- Parent:
- 6:d733efcc2c56
- Child:
- 9:8db50def96e5
issue with enable/disable IRQ through wlan_int.fall - replaced with NVIC_... code.
; Additional code improvements
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
frankvnk | 0:c44f0314d6ec | 1 | /***************************************************************************** |
frankvnk | 0:c44f0314d6ec | 2 | * |
frankvnk | 0:c44f0314d6ec | 3 | * wlan.h - CC3000 Host Driver Implementation. |
frankvnk | 0:c44f0314d6ec | 4 | * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/ |
frankvnk | 0:c44f0314d6ec | 5 | * |
frankvnk | 0:c44f0314d6ec | 6 | * Redistribution and use in source and binary forms, with or without |
frankvnk | 0:c44f0314d6ec | 7 | * modification, are permitted provided that the following conditions |
frankvnk | 0:c44f0314d6ec | 8 | * are met: |
frankvnk | 0:c44f0314d6ec | 9 | * |
frankvnk | 0:c44f0314d6ec | 10 | * Redistributions of source code must retain the above copyright |
frankvnk | 0:c44f0314d6ec | 11 | * notice, this list of conditions and the following disclaimer. |
frankvnk | 0:c44f0314d6ec | 12 | * |
frankvnk | 0:c44f0314d6ec | 13 | * Redistributions in binary form must reproduce the above copyright |
frankvnk | 0:c44f0314d6ec | 14 | * notice, this list of conditions and the following disclaimer in the |
frankvnk | 0:c44f0314d6ec | 15 | * documentation and/or other materials provided with the |
frankvnk | 0:c44f0314d6ec | 16 | * distribution. |
frankvnk | 0:c44f0314d6ec | 17 | * |
frankvnk | 0:c44f0314d6ec | 18 | * Neither the name of Texas Instruments Incorporated nor the names of |
frankvnk | 0:c44f0314d6ec | 19 | * its contributors may be used to endorse or promote products derived |
frankvnk | 0:c44f0314d6ec | 20 | * from this software without specific prior written permission. |
frankvnk | 0:c44f0314d6ec | 21 | * |
frankvnk | 0:c44f0314d6ec | 22 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
frankvnk | 0:c44f0314d6ec | 23 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
frankvnk | 0:c44f0314d6ec | 24 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
frankvnk | 0:c44f0314d6ec | 25 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
frankvnk | 0:c44f0314d6ec | 26 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
frankvnk | 0:c44f0314d6ec | 27 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
frankvnk | 0:c44f0314d6ec | 28 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
frankvnk | 0:c44f0314d6ec | 29 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
frankvnk | 0:c44f0314d6ec | 30 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
frankvnk | 0:c44f0314d6ec | 31 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
frankvnk | 0:c44f0314d6ec | 32 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
frankvnk | 0:c44f0314d6ec | 33 | * |
frankvnk | 0:c44f0314d6ec | 34 | *****************************************************************************/ |
frankvnk | 0:c44f0314d6ec | 35 | #ifndef __WLAN_H__ |
frankvnk | 0:c44f0314d6ec | 36 | #define __WLAN_H__ |
frankvnk | 0:c44f0314d6ec | 37 | |
frankvnk | 0:c44f0314d6ec | 38 | #include "security.h" |
frankvnk | 0:c44f0314d6ec | 39 | |
frankvnk | 5:854f9b13a0f9 | 40 | //***************************************************************************** |
frankvnk | 5:854f9b13a0f9 | 41 | // |
frankvnk | 5:854f9b13a0f9 | 42 | //! \addtogroup wlan |
frankvnk | 5:854f9b13a0f9 | 43 | //! @{ |
frankvnk | 5:854f9b13a0f9 | 44 | // |
frankvnk | 5:854f9b13a0f9 | 45 | //***************************************************************************** |
frankvnk | 5:854f9b13a0f9 | 46 | |
frankvnk | 0:c44f0314d6ec | 47 | /** CC3000 Host driver - WLAN |
frankvnk | 0:c44f0314d6ec | 48 | * |
frankvnk | 0:c44f0314d6ec | 49 | */ |
frankvnk | 4:d8255a5aad46 | 50 | |
frankvnk | 0:c44f0314d6ec | 51 | #ifdef __cplusplus |
frankvnk | 0:c44f0314d6ec | 52 | extern "C" { |
frankvnk | 0:c44f0314d6ec | 53 | #endif |
frankvnk | 0:c44f0314d6ec | 54 | |
frankvnk | 4:d8255a5aad46 | 55 | #define SMART_CONFIG_PROFILE_SIZE 67 // 67 = 32 (max ssid) + 32 (max key) + 1 (SSID length) + 1 (security type) + 1 (key length) |
frankvnk | 4:d8255a5aad46 | 56 | |
frankvnk | 4:d8255a5aad46 | 57 | /* patches type */ |
frankvnk | 4:d8255a5aad46 | 58 | #define PATCHES_HOST_TYPE_WLAN_DRIVER 0x01 |
frankvnk | 4:d8255a5aad46 | 59 | #define PATCHES_HOST_TYPE_WLAN_FW 0x02 |
frankvnk | 4:d8255a5aad46 | 60 | #define PATCHES_HOST_TYPE_BOOTLOADER 0x03 |
frankvnk | 4:d8255a5aad46 | 61 | |
frankvnk | 4:d8255a5aad46 | 62 | #define SL_SET_SCAN_PARAMS_INTERVAL_LIST_SIZE (16) |
frankvnk | 4:d8255a5aad46 | 63 | #define SL_SIMPLE_CONFIG_PREFIX_LENGTH (3) |
frankvnk | 4:d8255a5aad46 | 64 | #define ETH_ALEN (6) |
frankvnk | 4:d8255a5aad46 | 65 | #define MAXIMAL_SSID_LENGTH (32) |
frankvnk | 4:d8255a5aad46 | 66 | |
frankvnk | 4:d8255a5aad46 | 67 | #define SL_PATCHES_REQUEST_DEFAULT (0) |
frankvnk | 4:d8255a5aad46 | 68 | #define SL_PATCHES_REQUEST_FORCE_HOST (1) |
frankvnk | 4:d8255a5aad46 | 69 | #define SL_PATCHES_REQUEST_FORCE_NONE (2) |
frankvnk | 4:d8255a5aad46 | 70 | |
frankvnk | 4:d8255a5aad46 | 71 | |
frankvnk | 4:d8255a5aad46 | 72 | #define WLAN_SEC_UNSEC (0) |
frankvnk | 4:d8255a5aad46 | 73 | #define WLAN_SEC_WEP (1) |
frankvnk | 4:d8255a5aad46 | 74 | #define WLAN_SEC_WPA (2) |
frankvnk | 4:d8255a5aad46 | 75 | #define WLAN_SEC_WPA2 (3) |
frankvnk | 4:d8255a5aad46 | 76 | |
frankvnk | 4:d8255a5aad46 | 77 | |
frankvnk | 4:d8255a5aad46 | 78 | #define WLAN_SL_INIT_START_PARAMS_LEN (1) |
frankvnk | 4:d8255a5aad46 | 79 | #define WLAN_PATCH_PARAMS_LENGTH (8) |
frankvnk | 4:d8255a5aad46 | 80 | #define WLAN_SET_CONNECTION_POLICY_PARAMS_LEN (12) |
frankvnk | 4:d8255a5aad46 | 81 | #define WLAN_DEL_PROFILE_PARAMS_LEN (4) |
frankvnk | 4:d8255a5aad46 | 82 | #define WLAN_SET_MASK_PARAMS_LEN (4) |
frankvnk | 4:d8255a5aad46 | 83 | #define WLAN_SET_SCAN_PARAMS_LEN (100) |
frankvnk | 4:d8255a5aad46 | 84 | #define WLAN_GET_SCAN_RESULTS_PARAMS_LEN (4) |
frankvnk | 4:d8255a5aad46 | 85 | #define WLAN_ADD_PROFILE_NOSEC_PARAM_LEN (24) |
frankvnk | 4:d8255a5aad46 | 86 | #define WLAN_ADD_PROFILE_WEP_PARAM_LEN (36) |
frankvnk | 4:d8255a5aad46 | 87 | #define WLAN_ADD_PROFILE_WPA_PARAM_LEN (44) |
frankvnk | 4:d8255a5aad46 | 88 | #define WLAN_CONNECT_PARAM_LEN (29) |
frankvnk | 4:d8255a5aad46 | 89 | #define WLAN_SMART_CONFIG_START_PARAMS_LEN (4) |
frankvnk | 4:d8255a5aad46 | 90 | |
frankvnk | 4:d8255a5aad46 | 91 | |
frankvnk | 4:d8255a5aad46 | 92 | /** |
frankvnk | 4:d8255a5aad46 | 93 | * Send HCI_CMND_SIMPLE_LINK_START to CC3000 |
frankvnk | 5:854f9b13a0f9 | 94 | * @param usPatchesAvailableAtHost flag to indicate if patches available\n |
frankvnk | 5:854f9b13a0f9 | 95 | * from host or from EEPROM. Due to the \n |
frankvnk | 5:854f9b13a0f9 | 96 | * fact the patches are burn to the EEPROM\n |
frankvnk | 5:854f9b13a0f9 | 97 | * using the patch programmer utility, the \n |
frankvnk | 5:854f9b13a0f9 | 98 | * patches will be available from the EEPROM\n |
frankvnk | 5:854f9b13a0f9 | 99 | * and not from the host.\n |
frankvnk | 4:d8255a5aad46 | 100 | * @return none |
frankvnk | 4:d8255a5aad46 | 101 | */ |
frankvnk | 4:d8255a5aad46 | 102 | static void SimpleLink_Init_Start(unsigned short usPatchesAvailableAtHost); |
frankvnk | 0:c44f0314d6ec | 103 | |
frankvnk | 4:d8255a5aad46 | 104 | /** |
frankvnk | 4:d8255a5aad46 | 105 | * Initialize wlan driver |
frankvnk | 5:854f9b13a0f9 | 106 | * @param sWlanCB Asynchronous events callback. \n |
frankvnk | 5:854f9b13a0f9 | 107 | * 0 no event call back.\n |
frankvnk | 5:854f9b13a0f9 | 108 | * -call back parameters:\n |
frankvnk | 5:854f9b13a0f9 | 109 | * 1) event_type: HCI_EVNT_WLAN_UNSOL_CONNECT connect event,\n |
frankvnk | 5:854f9b13a0f9 | 110 | * HCI_EVNT_WLAN_UNSOL_DISCONNECT disconnect event,\n |
frankvnk | 5:854f9b13a0f9 | 111 | * HCI_EVNT_WLAN_ASYNC_SIMPLE_CONFIG_DONE config done,\n |
frankvnk | 5:854f9b13a0f9 | 112 | * HCI_EVNT_WLAN_UNSOL_DHCP dhcp report, \n |
frankvnk | 5:854f9b13a0f9 | 113 | * HCI_EVNT_WLAN_ASYNC_PING_REPORT ping report OR \n |
frankvnk | 5:854f9b13a0f9 | 114 | * HCI_EVNT_WLAN_KEEPALIVE keepalive.\n |
frankvnk | 5:854f9b13a0f9 | 115 | * 2) data: pointer to extra data that received by the event\n |
frankvnk | 5:854f9b13a0f9 | 116 | * (NULL no data).\n |
frankvnk | 5:854f9b13a0f9 | 117 | * 3) length: data length.\n |
frankvnk | 5:854f9b13a0f9 | 118 | * -Events with extra data:\n |
frankvnk | 5:854f9b13a0f9 | 119 | * HCI_EVNT_WLAN_UNSOL_DHCP: 4 bytes IP, 4 bytes Mask,\n |
frankvnk | 5:854f9b13a0f9 | 120 | * 4 bytes default gateway, 4 bytes DHCP server and 4 bytes\n |
frankvnk | 5:854f9b13a0f9 | 121 | * for DNS server.\n |
frankvnk | 5:854f9b13a0f9 | 122 | * HCI_EVNT_WLAN_ASYNC_PING_REPORT: 4 bytes Packets sent,\n |
frankvnk | 5:854f9b13a0f9 | 123 | * 4 bytes Packets received, 4 bytes Min round time, \n |
frankvnk | 5:854f9b13a0f9 | 124 | * 4 bytes Max round time and 4 bytes for Avg round time.\n |
frankvnk | 4:d8255a5aad46 | 125 | * @param sFWPatches 0 no patch or pointer to FW patches |
frankvnk | 4:d8255a5aad46 | 126 | * @param sDriverPatches 0 no patch or pointer to driver patches |
frankvnk | 4:d8255a5aad46 | 127 | * @param sBootLoaderPatches 0 no patch or pointer to bootloader patches |
frankvnk | 4:d8255a5aad46 | 128 | * @param sReadWlanInterruptPin init callback. the callback read wlan interrupt status. |
frankvnk | 4:d8255a5aad46 | 129 | * @param sWlanInterruptEnable init callback. the callback enable wlan interrupt. |
frankvnk | 4:d8255a5aad46 | 130 | * @param sWlanInterruptDisable init callback. the callback disable wlan interrupt. |
frankvnk | 4:d8255a5aad46 | 131 | * @param sWriteWlanPin init callback. the callback write value to device pin. |
frankvnk | 4:d8255a5aad46 | 132 | * @return none |
frankvnk | 4:d8255a5aad46 | 133 | * @sa wlan_set_event_mask , wlan_start , wlan_stop |
frankvnk | 4:d8255a5aad46 | 134 | * @warning This function must be called before ANY other wlan driver function |
frankvnk | 4:d8255a5aad46 | 135 | */ |
frankvnk | 0:c44f0314d6ec | 136 | extern void wlan_init(tWlanCB sWlanCB, |
frankvnk | 0:c44f0314d6ec | 137 | tFWPatches sFWPatches, |
frankvnk | 0:c44f0314d6ec | 138 | tDriverPatches sDriverPatches, |
frankvnk | 0:c44f0314d6ec | 139 | tBootLoaderPatches sBootLoaderPatches, |
frankvnk | 0:c44f0314d6ec | 140 | tWlanReadInteruptPin sReadWlanInterruptPin, |
frankvnk | 0:c44f0314d6ec | 141 | tWlanInterruptEnable sWlanInterruptEnable, |
frankvnk | 0:c44f0314d6ec | 142 | tWlanInterruptDisable sWlanInterruptDisable, |
frankvnk | 0:c44f0314d6ec | 143 | tWriteWlanPin sWriteWlanPin); |
frankvnk | 0:c44f0314d6ec | 144 | |
frankvnk | 4:d8255a5aad46 | 145 | /** |
frankvnk | 4:d8255a5aad46 | 146 | * Trigger Received event/data processing - called from the SPI library to receive the data |
frankvnk | 5:854f9b13a0f9 | 147 | * @param pvBuffer - pointer to the received data buffer\n |
frankvnk | 5:854f9b13a0f9 | 148 | * The function triggers Received event/data processing\n |
frankvnk | 4:d8255a5aad46 | 149 | * @param Pointer to the received data |
frankvnk | 4:d8255a5aad46 | 150 | * @return none |
frankvnk | 4:d8255a5aad46 | 151 | */ |
frankvnk | 4:d8255a5aad46 | 152 | void SpiReceiveHandler(void *pvBuffer); |
frankvnk | 0:c44f0314d6ec | 153 | |
frankvnk | 0:c44f0314d6ec | 154 | |
frankvnk | 4:d8255a5aad46 | 155 | /** |
frankvnk | 5:854f9b13a0f9 | 156 | * Start WLAN device. |
frankvnk | 5:854f9b13a0f9 | 157 | * This function asserts the enable pin of \n |
frankvnk | 5:854f9b13a0f9 | 158 | * the device (WLAN_EN), starting the HW initialization process.\n |
frankvnk | 5:854f9b13a0f9 | 159 | * The function blocked until device Initialization is completed.\n |
frankvnk | 5:854f9b13a0f9 | 160 | * Function also configure patches (FW, driver or bootloader) \n |
frankvnk | 5:854f9b13a0f9 | 161 | * and calls appropriate device callbacks.\n |
frankvnk | 5:854f9b13a0f9 | 162 | * @param usPatchesAvailableAtHost - flag to indicate if patches available\n |
frankvnk | 5:854f9b13a0f9 | 163 | * from host or from EEPROM. Due to the\n |
frankvnk | 5:854f9b13a0f9 | 164 | * fact the patches are burn to the EEPROM\n |
frankvnk | 5:854f9b13a0f9 | 165 | * using the patch programmer utility, the \n |
frankvnk | 5:854f9b13a0f9 | 166 | * patches will be available from the EEPROM\n |
frankvnk | 5:854f9b13a0f9 | 167 | * and not from the host.\n |
frankvnk | 4:d8255a5aad46 | 168 | * @return none |
frankvnk | 4:d8255a5aad46 | 169 | * @Note Prior calling the function wlan_init shall be called. |
frankvnk | 5:854f9b13a0f9 | 170 | * @Warning This function must be called after wlan_init and before any other wlan API |
frankvnk | 4:d8255a5aad46 | 171 | * @sa wlan_init , wlan_stop |
frankvnk | 4:d8255a5aad46 | 172 | */ |
frankvnk | 0:c44f0314d6ec | 173 | extern void wlan_start(unsigned short usPatchesAvailableAtHost); |
frankvnk | 0:c44f0314d6ec | 174 | |
frankvnk | 4:d8255a5aad46 | 175 | /** |
frankvnk | 4:d8255a5aad46 | 176 | * Stop WLAN device by putting it into reset state. |
frankvnk | 4:d8255a5aad46 | 177 | * @param none |
frankvnk | 4:d8255a5aad46 | 178 | * @return none |
frankvnk | 4:d8255a5aad46 | 179 | * @sa wlan_start |
frankvnk | 4:d8255a5aad46 | 180 | */ |
frankvnk | 0:c44f0314d6ec | 181 | extern void wlan_stop(void); |
frankvnk | 0:c44f0314d6ec | 182 | |
frankvnk | 4:d8255a5aad46 | 183 | /** |
frankvnk | 4:d8255a5aad46 | 184 | * Connect to AP |
frankvnk | 5:854f9b13a0f9 | 185 | * @param sec_type security options:\n |
frankvnk | 5:854f9b13a0f9 | 186 | * WLAN_SEC_UNSEC, \n |
frankvnk | 5:854f9b13a0f9 | 187 | * WLAN_SEC_WEP (ASCII support only),\n |
frankvnk | 5:854f9b13a0f9 | 188 | * WLAN_SEC_WPA or WLAN_SEC_WPA2\n |
frankvnk | 4:d8255a5aad46 | 189 | * @param ssid up to 32 bytes and is ASCII SSID of the AP |
frankvnk | 4:d8255a5aad46 | 190 | * @param ssid_len length of the SSID |
frankvnk | 4:d8255a5aad46 | 191 | * @param bssid 6 bytes specified the AP bssid |
frankvnk | 4:d8255a5aad46 | 192 | * @param key up to 16 bytes specified the AP security key |
frankvnk | 4:d8255a5aad46 | 193 | * @param key_len key length |
frankvnk | 5:854f9b13a0f9 | 194 | * @return On success, zero is returned. On error, negative is returned.\n |
frankvnk | 5:854f9b13a0f9 | 195 | * Note that even though a zero is returned on success to trigger\n |
frankvnk | 5:854f9b13a0f9 | 196 | * connection operation, it does not mean that CCC3000 is already\n |
frankvnk | 5:854f9b13a0f9 | 197 | * connected. An asynchronous "Connected" event is generated when \n |
frankvnk | 5:854f9b13a0f9 | 198 | * actual association process finishes and CC3000 is connected to\n |
frankvnk | 5:854f9b13a0f9 | 199 | * the AP. If DHCP is set, An asynchronous "DHCP" event is \n |
frankvnk | 5:854f9b13a0f9 | 200 | * generated when DHCP process is finish.\n |
frankvnk | 5:854f9b13a0f9 | 201 | * @warning Please Note that when connection to AP configured with security\n |
frankvnk | 5:854f9b13a0f9 | 202 | * type WEP, please confirm that the key is set as ASCII and not as HEX.\n |
frankvnk | 4:d8255a5aad46 | 203 | * @sa wlan_disconnect |
frankvnk | 4:d8255a5aad46 | 204 | */ |
frankvnk | 0:c44f0314d6ec | 205 | #ifndef CC3000_TINY_DRIVER |
frankvnk | 0:c44f0314d6ec | 206 | extern long wlan_connect(unsigned long ulSecType, |
frankvnk | 0:c44f0314d6ec | 207 | char *ssid, |
frankvnk | 0:c44f0314d6ec | 208 | long ssid_len, |
frankvnk | 0:c44f0314d6ec | 209 | unsigned char *bssid, |
frankvnk | 0:c44f0314d6ec | 210 | unsigned char *key, |
frankvnk | 0:c44f0314d6ec | 211 | long key_len); |
frankvnk | 0:c44f0314d6ec | 212 | #else |
frankvnk | 0:c44f0314d6ec | 213 | extern long wlan_connect(char *ssid, long ssid_len); |
frankvnk | 0:c44f0314d6ec | 214 | |
frankvnk | 0:c44f0314d6ec | 215 | #endif |
frankvnk | 0:c44f0314d6ec | 216 | |
frankvnk | 4:d8255a5aad46 | 217 | /** |
frankvnk | 4:d8255a5aad46 | 218 | * Disconnect connection from AP. |
frankvnk | 4:d8255a5aad46 | 219 | * @return 0 disconnected done, other CC3000 already disconnected |
frankvnk | 4:d8255a5aad46 | 220 | * @sa wlan_connect |
frankvnk | 4:d8255a5aad46 | 221 | */ |
frankvnk | 0:c44f0314d6ec | 222 | extern long wlan_disconnect(void); |
frankvnk | 0:c44f0314d6ec | 223 | |
frankvnk | 4:d8255a5aad46 | 224 | /** |
frankvnk | 5:854f9b13a0f9 | 225 | * Add profile. |
frankvnk | 5:854f9b13a0f9 | 226 | * When auto start is enabled, the device connects to\n |
frankvnk | 5:854f9b13a0f9 | 227 | * station from the profiles table. Up to 7 profiles are supported. \n |
frankvnk | 5:854f9b13a0f9 | 228 | * If several profiles configured the device choose the highest \n |
frankvnk | 5:854f9b13a0f9 | 229 | * priority profile, within each priority group, device will choose \n |
frankvnk | 5:854f9b13a0f9 | 230 | * profile based on security policy, signal strength, etc \n |
frankvnk | 5:854f9b13a0f9 | 231 | * parameters. All the profiles are stored in CC3000 NVMEM.\n |
frankvnk | 4:d8255a5aad46 | 232 | * |
frankvnk | 4:d8255a5aad46 | 233 | * @param ulSecType WLAN_SEC_UNSEC,WLAN_SEC_WEP,WLAN_SEC_WPA,WLAN_SEC_WPA2 |
frankvnk | 4:d8255a5aad46 | 234 | * @param ucSsid ssid SSID up to 32 bytes |
frankvnk | 4:d8255a5aad46 | 235 | * @param ulSsidLen ssid length |
frankvnk | 4:d8255a5aad46 | 236 | * @param ucBssid bssid 6 bytes |
frankvnk | 4:d8255a5aad46 | 237 | * @param ulPriority ulPriority profile priority. Lowest priority:0. |
frankvnk | 4:d8255a5aad46 | 238 | * @param ulPairwiseCipher_Or_TxKeyLen key length for WEP security |
frankvnk | 4:d8255a5aad46 | 239 | * @param ulGroupCipher_TxKeyIndex key index |
frankvnk | 4:d8255a5aad46 | 240 | * @param ulKeyMgmt KEY management |
frankvnk | 4:d8255a5aad46 | 241 | * @param ucPf_OrKey security key |
frankvnk | 4:d8255a5aad46 | 242 | * @param ulPassPhraseLen security key length for WPA\WPA2 |
frankvnk | 4:d8255a5aad46 | 243 | * @return On success, zero is returned. On error, -1 is returned |
frankvnk | 4:d8255a5aad46 | 244 | * @sa wlan_ioctl_del_profile |
frankvnk | 4:d8255a5aad46 | 245 | */ |
frankvnk | 0:c44f0314d6ec | 246 | extern long wlan_add_profile(unsigned long ulSecType, |
frankvnk | 0:c44f0314d6ec | 247 | unsigned char* ucSsid, |
frankvnk | 0:c44f0314d6ec | 248 | unsigned long ulSsidLen, |
frankvnk | 0:c44f0314d6ec | 249 | unsigned char *ucBssid, |
frankvnk | 0:c44f0314d6ec | 250 | unsigned long ulPriority, |
frankvnk | 0:c44f0314d6ec | 251 | unsigned long ulPairwiseCipher_Or_Key, |
frankvnk | 0:c44f0314d6ec | 252 | unsigned long ulGroupCipher_TxKeyLen, |
frankvnk | 0:c44f0314d6ec | 253 | unsigned long ulKeyMgmt, |
frankvnk | 0:c44f0314d6ec | 254 | unsigned char* ucPf_OrKey, |
frankvnk | 0:c44f0314d6ec | 255 | unsigned long ulPassPhraseLen); |
frankvnk | 0:c44f0314d6ec | 256 | |
frankvnk | 4:d8255a5aad46 | 257 | /** |
frankvnk | 5:854f9b13a0f9 | 258 | * Delete WLAN profile. |
frankvnk | 4:d8255a5aad46 | 259 | * @param index number of profile to delete |
frankvnk | 4:d8255a5aad46 | 260 | * @return On success, zero is returned. On error, -1 is returned |
frankvnk | 4:d8255a5aad46 | 261 | * @Note In order to delete all stored profile, set index to 255. |
frankvnk | 4:d8255a5aad46 | 262 | * @sa wlan_add_profile |
frankvnk | 4:d8255a5aad46 | 263 | */ |
frankvnk | 0:c44f0314d6ec | 264 | extern long wlan_ioctl_del_profile(unsigned long ulIndex); |
frankvnk | 0:c44f0314d6ec | 265 | |
frankvnk | 4:d8255a5aad46 | 266 | /** |
frankvnk | 5:854f9b13a0f9 | 267 | * Mask event according to bit mask. |
frankvnk | 5:854f9b13a0f9 | 268 | * In case that event is masked (1), the device will not send the masked event to host. |
frankvnk | 5:854f9b13a0f9 | 269 | * @param mask mask option:\n |
frankvnk | 5:854f9b13a0f9 | 270 | * HCI_EVNT_WLAN_UNSOL_CONNECT connect event\n |
frankvnk | 5:854f9b13a0f9 | 271 | * HCI_EVNT_WLAN_UNSOL_DISCONNECT disconnect event\n |
frankvnk | 5:854f9b13a0f9 | 272 | * HCI_EVNT_WLAN_ASYNC_SIMPLE_CONFIG_DONE smart config done\n |
frankvnk | 5:854f9b13a0f9 | 273 | * HCI_EVNT_WLAN_UNSOL_INIT init done\n |
frankvnk | 5:854f9b13a0f9 | 274 | * HCI_EVNT_WLAN_UNSOL_DHCP dhcp event report\n |
frankvnk | 5:854f9b13a0f9 | 275 | * HCI_EVNT_WLAN_ASYNC_PING_REPORT ping report\n |
frankvnk | 5:854f9b13a0f9 | 276 | * HCI_EVNT_WLAN_KEEPALIVE keepalive\n |
frankvnk | 5:854f9b13a0f9 | 277 | * HCI_EVNT_WLAN_TX_COMPLETE - disable information on end of transmission\n |
frankvnk | 4:d8255a5aad46 | 278 | * Saved: no. |
frankvnk | 4:d8255a5aad46 | 279 | * @return On success, zero is returned. On error, -1 is returned |
frankvnk | 4:d8255a5aad46 | 280 | */ |
frankvnk | 0:c44f0314d6ec | 281 | extern long wlan_set_event_mask(unsigned long ulMask); |
frankvnk | 0:c44f0314d6ec | 282 | |
frankvnk | 4:d8255a5aad46 | 283 | /** |
frankvnk | 4:d8255a5aad46 | 284 | * Get wlan status: disconnected, scanning, connecting or connected |
frankvnk | 4:d8255a5aad46 | 285 | * @param none |
frankvnk | 5:854f9b13a0f9 | 286 | * @return WLAN_STATUS_DISCONNECTED, WLAN_STATUS_SCANING,\n |
frankvnk | 5:854f9b13a0f9 | 287 | * STATUS_CONNECTING or WLAN_STATUS_CONNECTED \n |
frankvnk | 4:d8255a5aad46 | 288 | */ |
frankvnk | 0:c44f0314d6ec | 289 | extern long wlan_ioctl_statusget(void); |
frankvnk | 0:c44f0314d6ec | 290 | |
frankvnk | 0:c44f0314d6ec | 291 | |
frankvnk | 4:d8255a5aad46 | 292 | /** |
frankvnk | 5:854f9b13a0f9 | 293 | * Set connection policy. |
frankvnk | 5:854f9b13a0f9 | 294 | * When auto is enabled, the device tries to connect according the following policy:\n |
frankvnk | 5:854f9b13a0f9 | 295 | * 1) If fast connect is enabled and last connection is valid, \n |
frankvnk | 5:854f9b13a0f9 | 296 | * the device will try to connect to it without the scanning \n |
frankvnk | 5:854f9b13a0f9 | 297 | * procedure (fast). The last connection will be marked as\n |
frankvnk | 5:854f9b13a0f9 | 298 | * invalid, due to adding/removing profile. \n |
frankvnk | 5:854f9b13a0f9 | 299 | * 2) If profile exists, the device will try to connect it \n |
frankvnk | 5:854f9b13a0f9 | 300 | * (Up to seven profiles).\n |
frankvnk | 5:854f9b13a0f9 | 301 | * 3) If fast and profiles are not found, and open mode is\n |
frankvnk | 5:854f9b13a0f9 | 302 | * enabled, the device will try to connect to any AP.\n |
frankvnk | 5:854f9b13a0f9 | 303 | * Note that the policy settings are stored in the CC3000 NVMEM.\n |
frankvnk | 5:854f9b13a0f9 | 304 | * @param should_connect_to_open_ap enable(1), disable(0) connect to any \n |
frankvnk | 5:854f9b13a0f9 | 305 | * available AP. This parameter corresponds to the configuration of \n |
frankvnk | 5:854f9b13a0f9 | 306 | * item # 3 in the brief description.\n |
frankvnk | 5:854f9b13a0f9 | 307 | * @param should_use_fast_connect enable(1), disable(0). if enabled, tries \n |
frankvnk | 5:854f9b13a0f9 | 308 | * to connect to the last connected AP. This parameter corresponds \n |
frankvnk | 5:854f9b13a0f9 | 309 | * to the configuration of item # 1 in the brief description.\n |
frankvnk | 5:854f9b13a0f9 | 310 | * @param auto_start enable(1), disable(0) auto connect \n |
frankvnk | 5:854f9b13a0f9 | 311 | * after reset and periodically reconnect if needed. This \n |
frankvnk | 5:854f9b13a0f9 | 312 | * configuration configures option 2 in the above description.\n |
frankvnk | 5:854f9b13a0f9 | 313 | * @return On success, zero is returned.\n |
frankvnk | 5:854f9b13a0f9 | 314 | * On error, -1 is returned \n |
frankvnk | 4:d8255a5aad46 | 315 | * @sa wlan_add_profile , wlan_ioctl_del_profile |
frankvnk | 4:d8255a5aad46 | 316 | */ |
frankvnk | 0:c44f0314d6ec | 317 | extern long wlan_ioctl_set_connection_policy(unsigned long should_connect_to_open_ap, |
frankvnk | 0:c44f0314d6ec | 318 | unsigned long should_use_fast_connect, |
frankvnk | 0:c44f0314d6ec | 319 | unsigned long ulUseProfiles); |
frankvnk | 0:c44f0314d6ec | 320 | |
frankvnk | 4:d8255a5aad46 | 321 | /** |
frankvnk | 5:854f9b13a0f9 | 322 | * Get entry from scan result table. |
frankvnk | 5:854f9b13a0f9 | 323 | * The scan results are returned one by one, and each entry represents a single AP found in the area.\n |
frankvnk | 5:854f9b13a0f9 | 324 | * The following is a format of the scan result: \n |
frankvnk | 5:854f9b13a0f9 | 325 | * - 4 Bytes: number of networks found\n |
frankvnk | 5:854f9b13a0f9 | 326 | * - 4 Bytes: The status of the scan: 0 - aged results, 1 - results valid, 2 - no results\n |
frankvnk | 5:854f9b13a0f9 | 327 | * - 42 bytes: Result entry, where the bytes are arranged as follows:\n |
frankvnk | 5:854f9b13a0f9 | 328 | * - 1 bit isValid - is result valid or not\n |
frankvnk | 5:854f9b13a0f9 | 329 | * - 7 bits rssi - RSSI value \n |
frankvnk | 5:854f9b13a0f9 | 330 | * - 2 bits securityMode - security mode of the AP: 0 - Open, 1 - WEP, 2 WPA, 3 WPA2\n |
frankvnk | 5:854f9b13a0f9 | 331 | * - 6 bits SSID name length\n |
frankvnk | 5:854f9b13a0f9 | 332 | * - 2 bytes the time at which the entry has entered into scans result table\n |
frankvnk | 5:854f9b13a0f9 | 333 | * - 32 bytes SSID name\n |
frankvnk | 5:854f9b13a0f9 | 334 | * - 6 bytes BSSID \n |
frankvnk | 4:d8255a5aad46 | 335 | * @param[in] scan_timeout parameter not supported |
frankvnk | 4:d8255a5aad46 | 336 | * @param[out] ucResults scan result (_wlan_full_scan_results_args_t) |
frankvnk | 4:d8255a5aad46 | 337 | * @return On success, zero is returned. On error, -1 is returned |
frankvnk | 4:d8255a5aad46 | 338 | * @Note scan_timeout, is not supported on this version. |
frankvnk | 4:d8255a5aad46 | 339 | * @sa wlan_ioctl_set_scan_params |
frankvnk | 4:d8255a5aad46 | 340 | */ |
frankvnk | 0:c44f0314d6ec | 341 | extern long wlan_ioctl_get_scan_results(unsigned long ulScanTimeout, |
frankvnk | 0:c44f0314d6ec | 342 | unsigned char *ucResults); |
frankvnk | 0:c44f0314d6ec | 343 | |
frankvnk | 4:d8255a5aad46 | 344 | /** |
frankvnk | 4:d8255a5aad46 | 345 | * start and stop scan procedure. Set scan parameters. |
frankvnk | 5:854f9b13a0f9 | 346 | * @param uiEnable start/stop application scan: \n |
frankvnk | 5:854f9b13a0f9 | 347 | * 1 = start scan with default interval value of 10 min. \n |
frankvnk | 5:854f9b13a0f9 | 348 | * To set a different scan interval value, apply the value in milliseconds.\n |
frankvnk | 5:854f9b13a0f9 | 349 | * minimum = 1 second. 0=stop.\n |
frankvnk | 5:854f9b13a0f9 | 350 | * Wlan reset (wlan_stop() wlan_start()) is needed when changing scan interval value.\n |
frankvnk | 5:854f9b13a0f9 | 351 | * Saved: No\n |
frankvnk | 5:854f9b13a0f9 | 352 | * @param uiMinDwellTime minimum dwell time value to be used for each channel, in milliseconds.\n |
frankvnk | 5:854f9b13a0f9 | 353 | * Saved: yes\n |
frankvnk | 5:854f9b13a0f9 | 354 | * Recommended Value: 100\n |
frankvnk | 5:854f9b13a0f9 | 355 | * Default: 20\n |
frankvnk | 5:854f9b13a0f9 | 356 | * @param uiMaxDwellTime maximum dwell time value to be used for each channel, in milliseconds.\n |
frankvnk | 5:854f9b13a0f9 | 357 | * Saved: yes\n |
frankvnk | 5:854f9b13a0f9 | 358 | * Recommended Value: 100\n |
frankvnk | 5:854f9b13a0f9 | 359 | * Default: 30\n |
frankvnk | 5:854f9b13a0f9 | 360 | * @param uiNumOfProbeRequests max probe request between dwell time. \n |
frankvnk | 5:854f9b13a0f9 | 361 | * Saved: yes.\n |
frankvnk | 5:854f9b13a0f9 | 362 | * Recommended Value: 5\n |
frankvnk | 5:854f9b13a0f9 | 363 | * Default:2\n |
frankvnk | 5:854f9b13a0f9 | 364 | * @param uiChannelMask bitwise, up to 13 channels (0x1fff). \n |
frankvnk | 5:854f9b13a0f9 | 365 | * Saved: yes.\n |
frankvnk | 5:854f9b13a0f9 | 366 | * Default: 0x7ff\n |
frankvnk | 5:854f9b13a0f9 | 367 | * @param uiRSSIThreshold RSSI threshold.\n |
frankvnk | 5:854f9b13a0f9 | 368 | * Saved: yes\n |
frankvnk | 5:854f9b13a0f9 | 369 | * Default: -80\n |
frankvnk | 5:854f9b13a0f9 | 370 | * @param uiSNRThreshold NSR threshold.\n |
frankvnk | 5:854f9b13a0f9 | 371 | * Saved: yes\n |
frankvnk | 5:854f9b13a0f9 | 372 | * Default: 0\n |
frankvnk | 5:854f9b13a0f9 | 373 | * @param uiDefaultTxPower probe Tx power.\n |
frankvnk | 5:854f9b13a0f9 | 374 | * Saved: yes\n |
frankvnk | 5:854f9b13a0f9 | 375 | * Default: 205\n |
frankvnk | 5:854f9b13a0f9 | 376 | * @param aiIntervalList pointer to array with 16 entries (16 channels) \n |
frankvnk | 5:854f9b13a0f9 | 377 | * Each entry (unsigned long) holds timeout between periodic scan \n |
frankvnk | 5:854f9b13a0f9 | 378 | * and connection scan - in milliseconds.\n |
frankvnk | 5:854f9b13a0f9 | 379 | * Saved: yes.\n |
frankvnk | 5:854f9b13a0f9 | 380 | * Default 2000ms.\n |
frankvnk | 4:d8255a5aad46 | 381 | * @return On success, zero is returned. On error, -1 is returned |
frankvnk | 4:d8255a5aad46 | 382 | * @Note uiDefaultTxPower, is not supported on this version. |
frankvnk | 4:d8255a5aad46 | 383 | * @sa wlan_ioctl_get_scan_results |
frankvnk | 4:d8255a5aad46 | 384 | */ |
frankvnk | 0:c44f0314d6ec | 385 | extern long wlan_ioctl_set_scan_params(unsigned long uiEnable, |
frankvnk | 0:c44f0314d6ec | 386 | unsigned long uiMinDwellTime, |
frankvnk | 0:c44f0314d6ec | 387 | unsigned long uiMaxDwellTime, |
frankvnk | 0:c44f0314d6ec | 388 | unsigned long uiNumOfProbeRequests, |
frankvnk | 0:c44f0314d6ec | 389 | unsigned long uiChannelMask, |
frankvnk | 0:c44f0314d6ec | 390 | long iRSSIThreshold, |
frankvnk | 0:c44f0314d6ec | 391 | unsigned long uiSNRThreshold, |
frankvnk | 0:c44f0314d6ec | 392 | unsigned long uiDefaultTxPower, |
frankvnk | 0:c44f0314d6ec | 393 | unsigned long *aiIntervalList); |
frankvnk | 0:c44f0314d6ec | 394 | |
frankvnk | 0:c44f0314d6ec | 395 | |
frankvnk | 4:d8255a5aad46 | 396 | /** |
frankvnk | 5:854f9b13a0f9 | 397 | * Start to acquire device profile. |
frankvnk | 5:854f9b13a0f9 | 398 | * The device will acquires its own profile if a profile message is found.\n |
frankvnk | 5:854f9b13a0f9 | 399 | * The acquired AP information is stored in CC3000 EEPROM only when AES128 encryption is used.\n |
frankvnk | 5:854f9b13a0f9 | 400 | * When AES128 encryption is not used, a profile is internally created by the device.\n |
frankvnk | 4:d8255a5aad46 | 401 | * @param algoEncryptedFlag indicates whether the information is encrypted |
frankvnk | 4:d8255a5aad46 | 402 | * @return On success, zero is returned. On error, -1 is returned |
frankvnk | 5:854f9b13a0f9 | 403 | * @Note An asynchronous event - Smart Config Done will be generated as soon\n |
frankvnk | 5:854f9b13a0f9 | 404 | * as the process finishes successfully.\n |
frankvnk | 4:d8255a5aad46 | 405 | * @sa wlan_smart_config_set_prefix , wlan_smart_config_stop |
frankvnk | 4:d8255a5aad46 | 406 | */ |
frankvnk | 0:c44f0314d6ec | 407 | extern long wlan_smart_config_start(unsigned long algoEncryptedFlag); |
frankvnk | 0:c44f0314d6ec | 408 | |
frankvnk | 4:d8255a5aad46 | 409 | /** |
frankvnk | 4:d8255a5aad46 | 410 | * Stop the acquire profile procedure |
frankvnk | 4:d8255a5aad46 | 411 | * @param algoEncryptedFlag indicates whether the information is encrypted |
frankvnk | 4:d8255a5aad46 | 412 | * @return On success, zero is returned. On error, -1 is returned |
frankvnk | 4:d8255a5aad46 | 413 | * @sa wlan_smart_config_start , wlan_smart_config_set_prefix |
frankvnk | 4:d8255a5aad46 | 414 | */ |
frankvnk | 0:c44f0314d6ec | 415 | extern long wlan_smart_config_stop(void); |
frankvnk | 0:c44f0314d6ec | 416 | |
frankvnk | 4:d8255a5aad46 | 417 | /** |
frankvnk | 5:854f9b13a0f9 | 418 | * Configure station ssid prefix. |
frankvnk | 5:854f9b13a0f9 | 419 | * The prefix is used internally in CC3000. It should always be TTT.\n |
frankvnk | 4:d8255a5aad46 | 420 | * @param newPrefix 3 bytes identify the SSID prefix for the Smart Config. |
frankvnk | 4:d8255a5aad46 | 421 | * @return On success, zero is returned. On error, -1 is returned |
frankvnk | 4:d8255a5aad46 | 422 | * @Note The prefix is stored in CC3000 NVMEM |
frankvnk | 4:d8255a5aad46 | 423 | * @sa wlan_smart_config_start , wlan_smart_config_stop |
frankvnk | 4:d8255a5aad46 | 424 | */ |
frankvnk | 0:c44f0314d6ec | 425 | extern long wlan_smart_config_set_prefix(char* cNewPrefix); |
frankvnk | 0:c44f0314d6ec | 426 | |
frankvnk | 4:d8255a5aad46 | 427 | /** |
frankvnk | 4:d8255a5aad46 | 428 | * Process the acquired data and store it as a profile. |
frankvnk | 4:d8255a5aad46 | 429 | * The acquired AP information is stored in CC3000 EEPROM encrypted. |
frankvnk | 5:854f9b13a0f9 | 430 | * The encrypted data is decrypted and stored as a profile.\n |
frankvnk | 5:854f9b13a0f9 | 431 | * behavior is as defined by connection policy.\n |
frankvnk | 4:d8255a5aad46 | 432 | * @param none |
frankvnk | 4:d8255a5aad46 | 433 | * @return On success, zero is returned. On error, -1 is returned |
frankvnk | 4:d8255a5aad46 | 434 | */ |
frankvnk | 0:c44f0314d6ec | 435 | extern long wlan_smart_config_process(void); |
frankvnk | 0:c44f0314d6ec | 436 | |
frankvnk | 0:c44f0314d6ec | 437 | #ifdef __cplusplus |
frankvnk | 0:c44f0314d6ec | 438 | } |
frankvnk | 0:c44f0314d6ec | 439 | #endif // __cplusplus |
frankvnk | 0:c44f0314d6ec | 440 | |
frankvnk | 5:854f9b13a0f9 | 441 | //***************************************************************************** |
frankvnk | 5:854f9b13a0f9 | 442 | // |
frankvnk | 5:854f9b13a0f9 | 443 | // Close the Doxygen group. |
frankvnk | 5:854f9b13a0f9 | 444 | //! @} |
frankvnk | 5:854f9b13a0f9 | 445 | // |
frankvnk | 5:854f9b13a0f9 | 446 | //***************************************************************************** |
frankvnk | 5:854f9b13a0f9 | 447 | |
frankvnk | 0:c44f0314d6ec | 448 | #endif // __WLAN_H__ |