ESP8266 設定

 

取得版本
AT+GMR
AT version:0.60.0.0(Jan 29 2016 15:10:17)
SDK version:1.5.2(7eee54f4)
Ai-Thinker Technology Co. Ltd.
May 5 2016 17:30:30
OK

 
取得網路模式

AT+CWMODE?
+CWMODE:2

OK

 

設定網路模式,1是Client, 2 是Server, 3是二者都有
AT+CWMODE=3

OK
1,CLOSED
找現在的Wifi名稱

AT+CWLAP
+CWLAP:(3,"KoPrivateHomeAirPort",-73,"0c:51:01:ec:fb:xx",6,0,0)
+CWLAP:(4,"10-1",-77,"68:b6:fc:84:3c:f8",7,-56,0)
+CWLAP:(4,"11-1_2GH1NG0",-85,"58:87:e2:f3:76:b2",10,-29,0)
+CWLAP:(3,"royhome",-88,"f0:b4:29:f3:00:76",11,-9,0)

OK

把現有的網路連線斷線

AT+CWLAP

OK
WIFI DISCONNECT

連接到現有的Wifi網路

AT+CWJAP="你的wifi名稱","密碼"
WIFI DISCONNECT
WIFI CONNECTED
WIFI GOT IP

OK
AT+CIPMUX=1

OK

設定TCP 的Port 為8888

AT+CIPSERVER=1,8888
no change

OK

取得IP 位置

AT+CIFSR
+CIFSR:APIP,"192.168.4.1"
+CIFSR:APMAC,"5e:cf:7f:c2:2f:6e"
+CIFSR:STAIP,"192.168.0.143"
+CIFSR:STAMAC,"5c:cf:7f:c2:2f:6e"

OK

請透過瀏覽器連線到http://192.168.4.1:8888

0,CONNECT

+IPD,0,360:GET / HTTP/1.1
Host: 192.168.0.143:8888
Upgrade-Insecure-Requests: 1
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1) AppleWebKit/602.2.14 (KHTML, like Gecko) Version/10.0.1 Safari/602.2.14
Accept-Language: en-us
Accept-Encoding: gzip, deflate
Connection: keep-alive

arduino
CH00 前言CH01 簡介篇CH02 Arduino 硬體介紹CH03 Arduino 開發環境介紹CH04 我的第一個ArduinoCH05 Digital 數位輸入與輸出CH06 專案CH07 感應器CH16 Android 和 iOS 手機與 Arduino 連接CH99 問題集