NetBurner 3.5.6
PDF Version |
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. | |
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>
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.
[in] | SSID | Service Set Identity (SSID), nullptr uses SSID stored in the configuration record. |
[in] | password | key shared with access point/peer; nullptr uses the key stored in the configuration record. |
[in] | channel | 802.11 channel to establish an access point on. |
[in] | irqNum | IRQ signal used to communicate with the WiFi module. |
[in] | moduleNum | SPI module number used to communicate with the WiFi module. |
[in] | csNum | Chip Select signal used for SPI communication. |
[in] | connectorNum | physical header number of the NetBurner module used. |
[in] | gpioPinNum | GPIO pin number to use for the SPI chip select if not using the SPI module's native chip select signal. |
[in] | resetPinNum | pin number to use as an reset signal output to the wifi module. |
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.
[in] | SSID | Service Set Identity (SSID), nullptr uses SSID stored in the configuration record. |
[in] | password | key shared with access point/peer; nullptr uses the key stored in the configuration record. |
[in] | portNum | UART number |
[in] | resetPinNum | pin number to use as an reset signal output to the wifi module. |
[in] | connectorNum | physical header number of the NetBurner module used. |
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.
[in] | SSID | Service Set Identity (SSID), nullptr uses SSID stored in the configuration record. |
[in] | password | key shared with access point/peer; nullptr uses the key stored in the configuration record. |
[in] | irqNum | IRQ signal used to communicate with the WiFi module. |
[in] | moduleNum | SPI module number used to communicate with the WiFi module. |
[in] | csNum | Chip Select signal used for SPI communication. |
[in] | connectorNum | physical header number of the NetBurner module used. |
[in] | gpioPinNum | GPIO pin number to use for the SPI chip select, if not using the SPI's native chip select signal. |
[in] | resetPinNum | pin number to use as an reset signal output to the wifi module. |
void ScanAndShowNetworks | ( | ) |
#include <wifi.h>
Scan for surrounding access points and print the results via iprintf.
This function is bus interface agnostic.
nbWifiScanResult * ScanForNetworks | ( | ) |
#include <wifi.h>
Scan for surrounding access points.
This function is bus interface agnostic.
void SetWifiSPISpeed | ( | int | busSpeed | ) |
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.
[in] | portNum | UART number |
[in] | resetPinNum | pin number to use as an reset signal output to the wifi module. |
[in] | connectorNum | physical header number of the NetBurner module used. |
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.
[in] | irqNum | IRQ signal used to communicate with the WiFi module. |
[in] | moduleNum | SPI module number used to communicate with the WiFi module. |
[in] | csNum | Chip Select signal used for SPI communication. |
[in] | connectorNum | physical header number of the NetBurner module used. |
[in] | gpioPinNum | GPIO pin number to use for the SPI chip select if not using the SPI's native chip select signal. |
[in] | resetPinNum | pin number to use as an reset signal output to the wifi module. |
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.
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.
[in] | portNum | UART number |
[in] | resetPinNum | pin number to use as an reset signal output to the wifi module. |
[in] | connectorNum | physical header number of the NetBurner module used. |
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.
[in] | irqNum | IRQ signal used to communicate with the WiFi module. |
[in] | moduleNum | SPI module number used to communicate with the WiFi module. |
[in] | csNum | Chip Select signal used for SPI communication. |
[in] | connectorNum | physical header number of the NetBurner module used. |
[in] | gpioPinNum | GPIO pin number to use for the SPI chip select if not using the SPI's native chip select signal. |
[in] | resetPinNum | pin number to use as an reset signal output to the wifi module. |