User Tools

Site Tools


digix:tutorials:wifi:library-functions

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
digix:tutorials:wifi:library-functions [2013/09/11 22:15]
Eje_G created - still needs some serious formatting and extra text info
digix:tutorials:wifi:library-functions [2013/09/15 12:09] (current)
Eje_G added more links to subpages
Line 1: Line 1:
 ===== Initialization functions ===== ===== Initialization functions =====
  
-''​void ​begin(int aBaud)''​ +The WiFi Initialization class initializes the WiFi library and enables network configuration settings. 
-         + 
-''​bool ​ready()''​+ 
 +[[digix:​tutorials:​wifi:​library-functions:​begin|begin()]]  
 +       
 +[[digix:​tutorials:​wifi:​library-functions:​ready|ready()]] 
  
-''​void ​startATMode()''​+[[digix:​tutorials:​wifi:​library-functions:​startATMode|startATMode()]] 
  
-''​void ​endATMode()''​+[[digix:​tutorials:​wifi:​library-functions:​endATMode|endATMode()]] 
  
-''​void ​close()''​+[[digix:​tutorials:​wifi:​library-functions:​close|close()]]
  
  
-''​String ​AT(char *cmd, char *params)''​+[[digix:​tutorials:​wifi:​library-functions:​AT|AT()]] 
                         ​                         ​
-''​bool ​connect(char *aHost)''​+[[digix:​tutorials:​wifi:​library-functions:​connect|connect()]] 
         ​         ​
 ===== Web page data functions =====        ​ ===== Web page data functions =====        ​
-''​bool get(char *aHost, char *aPath)''​+[[digix:​tutorials:​wifi:​library-functions:​get|get()]] ​''​bool get(char *aHost, char *aPath)''​
         ​         ​
-''​bool post(char *aHost, char *aPath, String postData)''​+[[digix:​tutorials:​wifi:​library-functions:​post|post()]] ​''​bool post(char *aHost, char *aPath, String postData)''​
         ​         ​
-''​String URLEncode(char *smsg)''​+[[digix:​tutorials:​wifi:​library-functions:​URLEncode|URLEncode()]] ​''​String URLEncode(char *smsg)''​
                 ​                 ​
-''​String header()''​+[[digix:​tutorials:​wifi:​library-functions:​header|header()]] ​''​String header()''​
  
-''​String body()''​+[[digix:​tutorials:​wifi:​library-functions:​body|body()]] ​''​String body()''​
         ​         ​
 ===== Debug functions ===== ===== Debug functions =====
         ​         ​
-''​int lastError()''​+[[digix:​tutorials:​wifi:​library-functions:​lastError|lastError()]] ​''​int lastError()''​
         ​         ​
-''​void debug(String output)''​+[[digix:​tutorials:​wifi:​library-functions:​debug|debug()]] ​''​void debug(String output)''​
         ​         ​
-''​void debugWrite(char output)''​+[[digix:​tutorials:​wifi:​library-functions:​debugWrite|debugWrite()]] ​''​void debugWrite(char output)''​
  
         ​         ​
 ===== Managment Instruction Set ====== ​       ​ ===== Managment Instruction Set ====== ​       ​
 +
 +E - toggle AT command result Echo on/off
 +
 ''​void toggleEcho()''​ E ''​void toggleEcho()''​ E
  
 +WMODE AP STA APSTA 
  
-''​String getWifiMode()'' ​WMODE AP STA APSTA+''​String getWifiMode()'' ​
         ​         ​
 ''​void setWifiMode(char *mode)''​ ''​void setWifiMode(char *mode)''​
         ​         ​
-''​void setTransparent()'' ​ENTM+ENTM 
 + 
 +''​void setTransparent()'' ​
         ​         ​
-''​String getTMode()'' ​TMODE throughput cmd+TMODE throughput cmd 
 + 
 +''​String getTMode()'' ​
         ​         ​
 ''​void setTMode(char *mode)''​ ''​void setTMode(char *mode)''​
         ​         ​
-''​String getModId()'' ​MID+MID 
 + 
 +''​String getModId()'' ​
         ​         ​
-''​String version()'' ​VER+VER 
 + 
 +''​String version()'' ​
         ​         ​
-''​void factoryRestore()'' ​RELD rebooting...+RELD rebooting... 
 + 
 +''​void factoryRestore()'' ​
         ​         ​
-''​void reset()'' ​Z (No return)+Z (No return) 
 + 
 +''​void reset()'' ​
         ​         ​
-''​String help()''​H+
 + 
 +''​String help()''​
        
 ===== Configure Parameters Instruction Set =====      ===== Configure Parameters Instruction Set =====     
  
-''​int readConfig(byte* buffer)'' ​CFGRD+CFGRD 
 + 
 +''​int readConfig(byte* buffer)'' ​
         ​         ​
-''​void writeConfig(byte* config, int len)'' ​CFGWR+CFGWR 
 + 
 +''​void writeConfig(byte* config, int len)'' ​
         ​         ​
-''​int readFactoryDef(byte* buffer)''​CFGFR+CFGFR
  
-''​void makeFactory()'' ​CFGTF+''​int readFactoryDef(byte* buffer)''​ 
 + 
 +CFGTF 
 + 
 +''​void makeFactory()'' ​
  
 ===== UART Instruction Set =====        ​ ===== UART Instruction Set =====        ​
-''​String getUart()'' ​UART baudrate,​data_bits,​stop_bit,​parity+UART baudrate,​data_bits,​stop_bit,​parity 
 + 
 +''​String getUart()'' ​
         ​         ​
 ''​void setUart(int baudrate,​int data_bits,​int stop_bit,​char *parity)''​ ''​void setUart(int baudrate,​int data_bits,​int stop_bit,​char *parity)''​
         ​         ​
 These are commented out as I'm unsure how they should be named These are commented out as I'm unsure how they should be named
-''​String getAutoFrame()'' ​UARTF+ 
 +UARTF 
 + 
 +''​String getAutoFrame()'' ​
  
 ''​void setAutoFrame(char *para)''​ ''​void setAutoFrame(char *para)''​
  
-''​int getAutoFrmTrigTime()'' ​UARTFT+UARTFT 
 + 
 +''​int getAutoFrmTrigTime()'' ​
  
 ''​void setAutoFrmTrigTime(int ms)''​ ''​void setAutoFrmTrigTime(int ms)''​
  
-''​int getAutoFrmTrigLength()'' ​UARTFL+UARTFL 
 + 
 +''​int getAutoFrmTrigLength()'' ​
  
 ''​void setAutoFrmTrigLength(int v)''​ ''​void setAutoFrmTrigLength(int v)''​
Line 90: Line 128:
 ===== Command Mode Set ===== ===== Command Mode Set =====
 SEND SEND
 +
 ''​void sendData(int len, char *data)''​ ''​void sendData(int len, char *data)''​
  
 RECV len,data (+ok=0 if timeout (3sec)) RECV len,data (+ok=0 if timeout (3sec))
 +
 ''​String recvData(int len)''​ ''​String recvData(int len)''​
  
Line 98: Line 138:
 ===== Network Instruction Set =====          ​ ===== Network Instruction Set =====          ​
 PING Success Timeout Unknown host PING Success Timeout Unknown host
 +
 ''​String ping(char *ip)''​ ''​String ping(char *ip)''​
  
-NETP (TCP|UDP),​(SERVER|CLIENT),​port,​IP ​         +NETP (TCP|UDP),​(SERVER|CLIENT),​port,​IP ​  
 +        ​
  ''​String getNetParams()''​  ''​String getNetParams()''​
                        
-        ​''​void setNetParams(char *proto, char *cs, int port, char *ip)''​ +''​void setNetParams(char *proto, char *cs, int port, char *ip)''​ 
-        ''​String getTCPLnk()''​ + 
-          TCPLK on|off  +TCPLK on|off  
-        ''​int getTCPTimeout()''​ + 
-          TCPTO 0 <= int <= 600 (Def 300) +''​String getTCPLnk()''​ 
-           + 
-        ''​String getTCPConn()''​ +TCPTO 0 <= int <= 600 (Def 300) 
-          TCPDIS On|off+ 
 +''​int getTCPTimeout()''​ 
 + 
 +TCPDIS On|off 
 + 
 +''​String getTCPConn()''​
           ​           ​
-        ​''​void setTCPConn(char *sta)''​+''​void setTCPConn(char *sta)''​
         ​         ​
 ===== Wi-Fi STA Instruction Set =====        ​ ===== Wi-Fi STA Instruction Set =====        ​
 Effective when module works as STA (station) Effective when module works as STA (station)
  
-        ​''​String getWSSSID()''​ +WSSSID 
-          ​WSSSID + 
-        ''​void setWSSSID(char *ssid)''​ +''​String getWSSSID()''​ 
-         +           
-        ''​String getSTAKey()''​ +''​void setWSSSID(char *ssid)''​ 
-          ​WSKEY (OPEN|SHARED|WPAPSK|WPA2PSK),​(NONE|WEP|TKIP|AES),​key + 
-        void setSTAKey(char* auth,char *encry,char *key); +WSKEY (OPEN|SHARED|WPAPSK|WPA2PSK),​(NONE|WEP|TKIP|AES),​key  
-        ​String getSTANetwork();//​WANN (static|DHCP),​ip,​subnet,​gateway +        
-        void setSTANetwork(char *mode, char *ip, char *subnet, char *gateway); +''​String getSTAKey()''​ 
-        ​String getSTAMac();//​WSMAC returns MAC +           
-        void setSTAMac(int code, char *mac);//Code default is 8888, no idea what its for +''​void setSTAKey(char* auth,char *encry,char *key)''​ 
-        ​String STALinkStatus();//WSLK (Disconnected|AP SSID (AP MAC)|RF Off) + 
-        String ​STASignalStrength();//WSLQ (Disconnected|Value) +WANN (static|DHCP),​ip,​subnet,​gateway 
-        String ​scan();//WSCAN returns list + 
-        String ​getSTADNS() +''​String getSTANetwork()''​ 
-          WSDNS address + 
-        void setSTADNS(char *dns);+''​void setSTANetwork(char *mode, char *ip, char *subnet, char *gateway)''​ 
 + 
 +WSMAC returns MAC 
 + 
 +''​String getSTAMac()''​ 
 + 
 +Code default is 8888, no idea what its for 
 + 
 +''​void setSTAMac(int code, char *mac)''​ 
 + 
 +WSLK (Disconnected|AP SSID (AP MAC)|RF Off) 
 + 
 +''​String ​STALinkStatus()''​ 
 + 
 +WSLQ (Disconnected|Value) 
 + 
 +''​String ​STASignalStrength()''​ 
 + 
 +WSCAN returns list 
 + 
 +''​String ​scan()''​ 
 + 
 +WSDNS address 
 + 
 +''​String getSTADNS()''​ 
 +           
 +''​void setSTADNS(char *dns)''​
         ​         ​
 ===== Wi-Fi AP Instruction Set ===== ===== Wi-Fi AP Instruction Set =====
 Effective when module works as AP (access point) Effective when module works as AP (access point)
  
-        ​String getAPNetwork() +LANN ip,subnet 
-         LANN ip,subnet + 
-        void setAPNetwork(char *ip, char *subnet) +''​String getAPNetwork()''​ 
-        ​String getAPParams();​ + 
-          WAP (11B|11BG|11BGN),​SSID,​(AUTO|C1...C11) +''​void setAPNetwork(char *ip, char *subnet)''​ 
-        void setAPParams(char *mode, char *ssid, char *channel) + 
-        ​String getAPKey();//​WAKEY (OPEN|WPA2PSK),​(NONE|AES),​key +WAP (11B|11BG|11BGN),​SSID,​(AUTO|C1...C11) 
-        void setAPKey(char* auth,char *encry,char *key) + 
-        ​String getAPMac();//​WAMAC returns MAC +''​String getAPParams()''​ 
-        String ​getAPDHCP();//WADHCP (on|off) + 
-        void setAPDHCP(char *status) +''​void setAPParams(char *mode, char *ssid, char *channel)''​ 
-        String getAPPageDomain();//WADMN domain + 
-        ​+WAKEY (OPEN|WPA2PSK),​(NONE|AES),​key 
 + 
 +''​String getAPKey()''​ 
 + 
 +''​void setAPKey(char* auth,char *encry,char *key)''​ 
 + 
 +WAMAC returns MAC 
 + 
 +''​String ​getAPMac()''​ 
 + 
 +WADHCP (on|off) 
 + 
 +''​String getAPDHCP()''​ 
 + 
 +''​void setAPDHCP(char *status)''​ 
 + 
 +WADMN domain 
 + 
 +''​String getAPPageDomain()''​
         ​         ​
-        ​void setAPPageDomain(char *domain)+''​void setAPPageDomain(char *domain)''​
         ​         ​
 ===== Webpage Management Instruction Set =====      ​ ===== Webpage Management Instruction Set =====      ​
   ​   ​
-        ​''​void setPageDisplayMode(char *mode)'' ​WEBSWITCH (iw|ew)+WEBSWITCH (iw|ew) 
 + 
 +''​void setPageDisplayMode(char *mode)'' ​
         ​         ​
-        ​''​void setPageLanguage(char *lang)'' ​PLANG CN|EN+PLANG CN|EN 
 + 
 +''​void setPageLanguage(char *lang)'' ​
         ​         ​
-        ​''​String getWebAuth()'' ​WEBU user,pass+WEBU user,pass 
 + 
 +''​String getWebAuth()'' ​
         ​         ​
-        ​''​void setWebAuth(char *user, char *pass)''​+''​void setWebAuth(char *user, char *pass)''​
         ​         ​
 ===== Remote Upgrade ===== ===== Remote Upgrade =====
Line 168: Line 265:
 !!!DANGEROUS!!! Make sure you know what you're doing, could brick your unit.  !!!DANGEROUS!!! Make sure you know what you're doing, could brick your unit. 
         ​         ​
-      ​* UPURL url Set/Query remote upgrade URL address ​  +* UPURL url Set/Query remote upgrade URL address 
-         ​String getUpgradeUrl() +   
-      * url,​filename (filename is optional, if provided upgrade is auto started) ​  +''​String getUpgradeUrl()''​ 
-         ​void setUpgradeUrl(char *url) + 
-      * UPFILE filename Set/Query remote upgrade configure filename !!!DANGEROUS!!! ​  +* url,​filename (filename is optional, if provided upgrade is auto started) 
-         ​String getUpgradeFile()+   
 +''​void setUpgradeUrl(char *url)''​ 
 + 
 +* UPFILE filename Set/Query remote upgrade configure filename !!!DANGEROUS!!!  
 +  
 +''​String getUpgradeFile()''​
                    
-         void setUpgradeFile(char *filename) +''​void setUpgradeFile(char *filename)''​ 
-      * UPST Start remote upgrade !!!DANGEROUS!!! ​  ​ + 
-         ​String startUpgrade()+* UPST Start remote upgrade !!!DANGEROUS!!! ​  
 +  
 +''​String startUpgrade()''​
         ​         ​
 ===== Power Management ===== ===== Power Management =====
digix/tutorials/wifi/library-functions.1378962918.txt.gz · Last modified: 2013/09/11 22:15 by Eje_G