NetBurner 3.5.6
PDF Version
Wifi

NetBurner WiFi API. More...

Topics

 BSS Options
 Option list BSS type values.
 
 Cipher Options
 
 Configuration Errors
 
 Connect Request Errors
 
 Save Config Record Errors
 
 Scan Request Errors
 
 Security Options
 

Classes

struct  wifi_init
 

Functions

nbWifiScanResult * WifiInitScan_SPI (int irqNum=-1, int moduleNum=-1, int csNum=-1, int connectorNum=-1, int gpioPinNum=-1, int resetPinNum=-1)
 Initializes the WiFi hardware, initializes the driver over the SPI bus, and performs an AP scan.
 
int WifiInitScanAndShow_SPI (int irqNum=-1, int moduleNum=-1, int csNum=-1, int connectorNum=-1, int gpioPinNum=-1, int resetPinNum=-1)
 Initializes the WiFi hardware, initializes the driver using the SPI bus, performs an AP scan, and prints the scan results via serial output.
 
int InitWifi_SPI (const char *SSID="", const char *password="", int irqNum=-1, int moduleNum=-1, int csNum=-1, int connectorNum=-1, int gpioPinNum=-1, int resetPinNum=-1)
 Initializes the WiFi hardware, initializes the driver using the SPI bus, and attempts to establish the specified connection.
 
int InitAP_SPI (const char *SSID="", const char *password="", uint8_t channel=NBWIFI_DEFAULT_WIFICHANNEL, int irqNum=-1, int moduleNum=-1, int csNum=-1, int connectorNum=-1, int gpioPinNum=-1, int resetPinNum=-1)
 Initializes the WiFi hardware, initializes the driver using the SPI bus, and attempts to establish the specified access point.
 
nbWifiScanResult * WifiInitScan_Serial (int portNum=-1, int resetPinNum=-1, int connectorNum=-1)
 Initializes the WiFi hardware, initializes the driver using the UART interface, performs an AP scan, and prints the scan results via serial output.
 
int WifiInitScanAndShow_Serial (int portNum=-1, int resetPinNum=-1, int connectorNum=-1)
 Initializes the WiFi hardware, initializes the driver using the UART interface, performs an AP scan, and prints the scan results via serial output.
 
int InitWifi_Serial (const char *SSID="", const char *password="", int portNum=-1, int resetPinNum=-1, int connectorNum=-1)
 Initializes the WiFi hardware, initializes the driver using the UART interface, and attempts to establish the specified access point.
 
void SetWifiSPISpeed (int busSpeed)
 Set SPI bus speed.
 
void ScanAndShowNetworks ()
 Scan for surrounding access points and print the results via iprintf.
 
nbWifiScanResult * ScanForNetworks ()
 Scan for surrounding access points.
 

Detailed Description

NetBurner WiFi API.

#include< nbWifiConstants.h>

Initialize and use a NetBurner WiFi module via SPI or Serial in either Client or AP mode.
#include< wifi.h>

See also
WiFi Examples

Function Documentation

◆ InitAP_SPI()

int InitAP_SPI ( const char * SSID = "",
const char * password = "",
uint8_t channel = NBWIFI_DEFAULT_WIFICHANNEL,
int irqNum = -1,
int moduleNum = -1,
int csNum = -1,
int connectorNum = -1,
int gpioPinNum = -1,
int resetPinNum = -1 )

#include <wifi.h>

Initializes the WiFi hardware, initializes the driver using the SPI bus, and attempts to establish the specified access point.

Parameters
[in]SSIDService Set Identity (SSID), nullptr uses SSID stored in the configuration record.
[in]passwordkey shared with access point/peer; nullptr uses the key stored in the configuration record.
[in]channel802.11 channel to establish an access point on.
[in]irqNumIRQ signal used to communicate with the WiFi module.
[in]moduleNumSPI module number used to communicate with the WiFi module.
[in]csNumChip Select signal used for SPI communication.
[in]connectorNumphysical header number of the NetBurner module used.
[in]gpioPinNumGPIO pin number to use for the SPI chip select if not using the SPI module's native chip select signal.
[in]resetPinNumpin number to use as an reset signal output to the wifi module.
Returns
returns the Wifi interface number, if successful. Otherwise, returns NB::Error::GeneralErrors or NB::Error::Init::InitializationErrors

◆ InitWifi_Serial()

int InitWifi_Serial ( const char * SSID = "",
const char * password = "",
int portNum = -1,
int resetPinNum = -1,
int connectorNum = -1 )

#include <wifi.h>

Initializes the WiFi hardware, initializes the driver using the UART interface, and attempts to establish the specified access point.

NOTE: Serial functions pertaining to WiFi are only available for the NBWIFIIN.

Parameters
[in]SSIDService Set Identity (SSID), nullptr uses SSID stored in the configuration record.
[in]passwordkey shared with access point/peer; nullptr uses the key stored in the configuration record.
[in]portNumUART number
[in]resetPinNumpin number to use as an reset signal output to the wifi module.
[in]connectorNumphysical header number of the NetBurner module used.
Returns
returns zero if successful, otherwise returns NB::Error::GeneralErrors or NB::Error::Init::InitializationErrors

◆ InitWifi_SPI()

int InitWifi_SPI ( const char * SSID = "",
const char * password = "",
int irqNum = -1,
int moduleNum = -1,
int csNum = -1,
int connectorNum = -1,
int gpioPinNum = -1,
int resetPinNum = -1 )

#include <wifi.h>

Initializes the WiFi hardware, initializes the driver using the SPI bus, and attempts to establish the specified connection.

Parameters
[in]SSIDService Set Identity (SSID), nullptr uses SSID stored in the configuration record.
[in]passwordkey shared with access point/peer; nullptr uses the key stored in the configuration record.
[in]irqNumIRQ signal used to communicate with the WiFi module.
[in]moduleNumSPI module number used to communicate with the WiFi module.
[in]csNumChip Select signal used for SPI communication.
[in]connectorNumphysical header number of the NetBurner module used.
[in]gpioPinNumGPIO pin number to use for the SPI chip select, if not using the SPI's native chip select signal.
[in]resetPinNumpin number to use as an reset signal output to the wifi module.
Returns
returns the Wifi interface number, if successful. Otherwise, returns NB::Error::GeneralErrors or NB::Error::Init::InitializationErrors

◆ ScanAndShowNetworks()

void ScanAndShowNetworks ( )

#include <wifi.h>

Scan for surrounding access points and print the results via iprintf.

This function is bus interface agnostic.

◆ ScanForNetworks()

nbWifiScanResult * ScanForNetworks ( )

#include <wifi.h>

Scan for surrounding access points.

Returns
nbWifiScanResult Head of linked list containing the AP scan results. nullptr if scan failed or no access points were found

This function is bus interface agnostic.

◆ SetWifiSPISpeed()

void SetWifiSPISpeed ( int busSpeed)

#include <wifi.h>

Set SPI bus speed.

Parameters
[in]busSpeedBus speed in Hz.

◆ WifiInitScan_Serial()

nbWifiScanResult * WifiInitScan_Serial ( int portNum = -1,
int resetPinNum = -1,
int connectorNum = -1 )

#include <wifi.h>

Initializes the WiFi hardware, initializes the driver using the UART interface, performs an AP scan, and prints the scan results via serial output.

NOTE: Serial functions pertaining to WiFi are only available for the NBWIFIIN.

Parameters
[in]portNumUART number
[in]resetPinNumpin number to use as an reset signal output to the wifi module.
[in]connectorNumphysical header number of the NetBurner module used.
Returns
nbWifiScanResult Head of linked list containing the AP scan results. nullptr if scan failed or no access points were found

◆ WifiInitScan_SPI()

nbWifiScanResult * WifiInitScan_SPI ( int irqNum = -1,
int moduleNum = -1,
int csNum = -1,
int connectorNum = -1,
int gpioPinNum = -1,
int resetPinNum = -1 )

#include <wifi.h>

Initializes the WiFi hardware, initializes the driver over the SPI bus, and performs an AP scan.

Parameters
[in]irqNumIRQ signal used to communicate with the WiFi module.
[in]moduleNumSPI module number used to communicate with the WiFi module.
[in]csNumChip Select signal used for SPI communication.
[in]connectorNumphysical header number of the NetBurner module used.
[in]gpioPinNumGPIO pin number to use for the SPI chip select if not using the SPI's native chip select signal.
[in]resetPinNumpin number to use as an reset signal output to the wifi module.
Returns
nbWifiScanResult Head of linked list containing the AP scan results. nullptr if scan failed or no access points were found

Initializes the WiFi Driver to communicate with the WiFi module over the SPI bus and performs a scan for surrounding access points (AP). The result of the scan is returned as the head of a linked list that contains the scan results. If the WiFi driver has already been initialized by a previous call to one of the WifiInit function variations, then only a scan will be performed.

◆ WifiInitScanAndShow_Serial()

int WifiInitScanAndShow_Serial ( int portNum = -1,
int resetPinNum = -1,
int connectorNum = -1 )

#include <wifi.h>

Initializes the WiFi hardware, initializes the driver using the UART interface, performs an AP scan, and prints the scan results via serial output.

NOTE: Serial functions pertaining to WiFi are only available for the NBWIFIIN.

Parameters
[in]portNumUART number
[in]resetPinNumpin number to use as an reset signal output to the wifi module.
[in]connectorNumphysical header number of the NetBurner module used.
Returns
the Wifi interface number if successful. Otherwise, returns NB::Error::GeneralErrors or NB::Error::Init::InitializationErrors

◆ WifiInitScanAndShow_SPI()

int WifiInitScanAndShow_SPI ( int irqNum = -1,
int moduleNum = -1,
int csNum = -1,
int connectorNum = -1,
int gpioPinNum = -1,
int resetPinNum = -1 )

#include <wifi.h>

Initializes the WiFi hardware, initializes the driver using the SPI bus, performs an AP scan, and prints the scan results via serial output.

Parameters
[in]irqNumIRQ signal used to communicate with the WiFi module.
[in]moduleNumSPI module number used to communicate with the WiFi module.
[in]csNumChip Select signal used for SPI communication.
[in]connectorNumphysical header number of the NetBurner module used.
[in]gpioPinNumGPIO pin number to use for the SPI chip select if not using the SPI's native chip select signal.
[in]resetPinNumpin number to use as an reset signal output to the wifi module.
Returns
returns the Wifi interface number, if successful. Otherwise, returns NB::Error::GeneralErrors or NB::Error::Init::InitializationErrors