描述 中断 WiFi Shield 目前的连线。 语法 WiFi.disconnect(); 参数 无参数 函式库参考主页面 The text of the 86Duino reference is a modification of the Arduino reference, and is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.
描述 WiFi.config() 用来设定 IP 位址、 DNS、闸道(gateway)、子网路遮罩(subnet)。 不像是 WiFi.begin() 会自动设定这些资讯,WiFi.config() 让使用者可以手动的设定。 在呼叫 WiFi.begin() 之前呼叫 WiFi.config(),使得 begin() 使用 config() 的设定值去设定网路。 如果是先呼叫 WiFi.begin() 再呼叫 WiFi.config(),在 begin() 执行时预设使用 DHCP 连线,一旦呼叫 config() 后,会使用输入的参数重新设定网路。 语法 WiFi.config(ip); WiFi.config(ip, dns); WiFi.config(ip, dns, gateway); WiFi.config(ip, dns, gateway, subnet); 参数 ip:IP 位址,型态为 4 个位元组的阵列 dns:DNS 伺服端的 IP 位址 gateway:闸道的 IP 位址,型态为 4 个位元组的阵列。可以不填这个参数,预设的位址前三个数值会与 IP 位址相同,而最后一个数值会设为 […]
描述 WiFi.setDNS() 用来设定 DNS(Domain Name System) 伺服器。 语法 WiFi.setDNS(dns_server1) WiFi.setDNS(dns_server1, dns_server2) 参数 dns_server1:主要的 DNS 伺服器 dns_server2:备用的 DNS 伺服器 回传 无回传值 范例 示范如何把 DNS 设定为 Google 提供的 DNS(8.8.8.8) 函式库参考主页面 The text of the 86Duino reference is a modification of the Arduino reference, and is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the […]
描述 取得目前无线网路的 SSID。 语法 WiFi.SSID(); WiFi.SSID(wifiAccessPoint) 参数 wifiAccessPoint:指定要取得资讯的无线网路 回传 string:无线网路的 SSID 范例 函式库参考主页面 The text of the 86Duino reference is a modification of the Arduino reference, and is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.
描述 取得连线到的路由器的 MAC 位址。 语法 WiFi.BSSID(bssid); 参数 bssid:bssid 是一个大小为 6 位元组的阵列,BSSID 执行完后,会把路由器的 MAC 位址放到 bssid 裡 回传 无回传值 范例 函式库参考主页面 The text of the 86Duino reference is a modification of the Arduino reference, and is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.
描述 取得连线至路由器的讯号强度。 语法 WiFi.RSSI(); WiFi.RSSI(wifiAccessPoint); 参数 wifiAccessPoint:指明要取得讯号强度的无线网路 回传 long:信号强度(RSSI),单位为 dBm 范例 函式库参考主页面 The text of the 86Duino reference is a modification of the Arduino reference, and is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.
描述 取得无线网路的加密方法。 语法 WiFi.encryptionType(); WiFi.encryptionType(wifiAccessPoint); 参数 wifiAccessPoint:指定要取得资讯的无线网路 回传 byte:不同的值代表不同的加密方法,详见下述 TKIP (WPA) = 2 WEP = 5 CCMP (WPA) = 4 NONE = 7 AUTO = 8 范例 函式库参考主页面 The text of the 86Duino reference is a modification of the Arduino reference, and is licensed under a Creative Commons Attribution-ShareAlike 3.0 […]
描述 取得可用的插座(socket)。 语法 WiFi.getSocket(); 参数 无参数 回传 int:插座编号 函式库参考主页面 The text of the 86Duino reference is a modification of the Arduino reference, and is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.
描述 搜寻邻近的无线网路。 语法 WiFi.scanNetworks(); 参数 无参数 回传 byte:搜寻到的无线网路数量 范例 函式库参考主页面 The text of the 86Duino reference is a modification of the Arduino reference, and is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.
描述 取得 WiFi Shield 的 MAC 位址。 语法 WiFi.macAddress(mac); 参数 mac:mac 是一个大小为 6 位元组的阵列,macAddress() 执行完后,会把 WiFi Shield 的 MAC 位址放到 mac 裡 回传 无回传值 范例 函式库参考主页面 The text of the 86Duino reference is a modification of the Arduino reference, and is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are […]