28 #include <sys/types.h>
31 #include <arpa/inet.h>
34 #include <sys/socket.h>
35 #include <netinet/in.h>
46 #define WIFI_PERSISTENT_PATH vmSETTINGS_DIR // FileSys guidance ;-)
47 #define WIFI_PERSISTENT_FILENAME "WiFiConnections.dat" // Persistent storage for KNOWN connections
49 #define MAC_ADDRESS_LENGTH 18 // xx:xx:xx:xx:xx:xx + /0x00
50 #define FREQUENCY_LENGTH 5
51 #define SIGNAL_LEVEL_LENGTH 4
52 #define SECURITY_LENGTH 129 //33
53 #define FRIENDLY_NAME_LENGTH 33
55 #define PSK_LENGTH 65 // 32 bytes = 256 bit + /0x00
56 #define KEY_MGMT_LENGTH 33
57 #define PAIRWISE_LENGTH 33
58 #define GROUP_LENGTH 33
59 #define PROTO_LENGTH 33
61 #define WIFI_INIT_TIMEOUT 10 //60
62 #define WIFI_INIT_DELAY 10
64 #define BROADCAST_IP_LOW "255" // "192.168.0.255"
65 #define BROADCAST_PORT 3015 // UDP
67 #define BEACON_TIME 5 // 5 sec's between BEACONs
69 #define TIME_FOR_WIFI_DONGLE_CHECK 10
71 #define BLUETOOTH_SER_LENGTH 13 // No "white" space separators
72 #define BRICK_HOSTNAME_LENGTH (NAME_LENGTH + 1)
144 #define AP_FLAG_ADJUST_FOR_STORAGE ((unsigned char)(~(VISIBLE + CONNECTED + UNKNOWN))) // Set/reset for persistent storage
208 RESULT
cWiFiGetName(
char *ApName,
int Index,
char Length);
232 RESULT
cWiFiMakePsk(
char *ApSsid,
char *PassPhrase,
int Index);
238 RESULT
cWiFiAddHidden(
char *HiddenApName,
char *Security,
char *PassWord);
RESULT cWiFiTcpConnected(void)
RESULT cWiFiTxingBeacons(void)
RESULT cWiFiGetStatus(void)
#define MAC_ADDRESS_LENGTH
void cWiFiSetBrickName(void)
RESULT cWiFiGetOnStatus(void)
#define FRIENDLY_NAME_LENGTH
RESULT cWiFiSetKeyManagToWpa2(void)
void cWiFiDeleteAsKnown(int LocalIndex)
RESULT cWiFiGetIpAddr(char *IpAddress)
RESULT cWiFiGetApMacAddr(char *MacAddr, int Index)
RESULT cWiFiAddHidden(char *HiddenApName, char *Security, char *PassWord)
RESULT cWiFiConnectToAp(int Index)
void cWiFiSetKnown(int Index)
RESULT cWiFiGetName(char *ApName, int Index, char Length)
void cWiFiMoveDownInList(int Index)
RESULT cWiFiGetIndexFromName(char *Name, UBYTE *Index)
RESULT cWiFiTurnOff(void)
void cWiFiSetBtSerialNo(void)
int cWiFiGetApListSize(void)
unsigned char UBYTE
Basic Type used to symbolise 8 bit unsigned values.
void cWiFiDeleteInList(int Index)
#define SIGNAL_LEVEL_LENGTH
RESULT cWiFiKnownDongleAttached(void)
unsigned short UWORD
Basic Type used to symbolise 16 bit unsigned values.
void cWiFiUdpClientClose(void)
RESULT cWiFiScanForAPs(void)
RESULT cWiFiSetKeyManagToNone(void)
unsigned char cWiFiGetFlags(int Index)
RESULT cWiFiGetHiddenMacAddr(char *MacAddr, int Index)
RESULT cWiFiSetName(char *ApName, int Index)
void cWiFiSetEncryptToNone(int Index)
RESULT cWiFiGetMyMacAddr(char *MacAddress)
RESULT cWiFiMakePsk(char *ApSsid, char *PassPhrase, int Index)
void cWiFiMoveUpInList(int Index)
RESULT cWiFiSetSsid(char *Ssid)
UWORD cWiFiReadTcp(UBYTE *Buffer, UWORD Length)
void cWiFiSetEncryptToWpa2(int Index)
void cWiFiIncApListSize(void)
UWORD cWiFiWriteTcp(UBYTE *Buffer, UWORD Length)