NuMaker WiFi TCP Example

Committer:
ccli8
Date:
Thu Nov 12 15:16:02 2020 +0800
Revision:
31:fa146660b113
Parent:
2:36adde8ca1b9
Update to mbed-os 5.15.6 to support NuMaker-M2354 Ver 1.1 (MP chip)

NuMaker-M2354 Ver 1.1 (MP chip) must match mbed-os 5.15.6 and afterwards.
NuMaker-M2354 Ver 1.0 (test chip) must match mbed-os 5.15.5 and gets drprecated.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
cyliang 2:36adde8ca1b9 1 # Getting started with WiFi on mbed OS
cyliang 2:36adde8ca1b9 2
cyliang 2:36adde8ca1b9 3
cyliang 2:36adde8ca1b9 4 ### Import NuMaker-mbed-wifi-tcp from on-line IDE
cyliang 2:36adde8ca1b9 5 1. Please choose Nuvoton NuMaker-PFM-XXX as your target platform.
cyliang 2:36adde8ca1b9 6 2. Please press the left-up icon "New", then choose "WiFi TCP Example" from the template list.
cyliang 2:36adde8ca1b9 7 3. After new your WiFi program, please also import ESP8266 lib by pressing the left-up icon "Import".
cyliang 2:36adde8ca1b9 8 4. Import from URL "https://github.com/ARMmbed/esp8266-driver/"
cyliang 2:36adde8ca1b9 9 5. If the last version of ESP8266 can't work well, please switch to ver. 6:450cc12 .
cyliang 2:36adde8ca1b9 10
cyliang 2:36adde8ca1b9 11 ### Adjust Your WiFi Setting in mbed_app.json
cyliang 2:36adde8ca1b9 12 1. wifi-ssid: fill your WiFi AP SSID
cyliang 2:36adde8ca1b9 13 2. wifi-password: fill the WiFi password
cyliang 2:36adde8ca1b9 14
cyliang 2:36adde8ca1b9 15 #### Now compile
cyliang 2:36adde8ca1b9 16 Please press compile icon.
cyliang 2:36adde8ca1b9 17
cyliang 2:36adde8ca1b9 18 #### Burn Code & Execute
cyliang 2:36adde8ca1b9 19 1. Connect NuMaker-PFM-XXX with your PC by USB cable, then there will be one "mbed" disk.
cyliang 2:36adde8ca1b9 20 2. Drag & drop the built binary into "mbed" disk on you PC.
cyliang 2:36adde8ca1b9 21 3. Press device's reset button and you could get the below log by uart console.
cyliang 2:36adde8ca1b9 22 -------------------------------------------------------------------------------
cyliang 2:36adde8ca1b9 23 Start WiFi test
cyliang 2:36adde8ca1b9 24 Start Connection ...
cyliang 2:36adde8ca1b9 25
cyliang 2:36adde8ca1b9 26 Using WiFi
cyliang 2:36adde8ca1b9 27
cyliang 2:36adde8ca1b9 28 Connecting to WiFi..
cyliang 2:36adde8ca1b9 29
cyliang 2:36adde8ca1b9 30 Connected to Network successfully
cyliang 2:36adde8ca1b9 31 TCP client IP Address is 192.168.43.68
cyliang 2:36adde8ca1b9 32 HTTP Connection ...
cyliang 2:36adde8ca1b9 33 HTTP: Connected to developer.mbed.org:80
cyliang 2:36adde8ca1b9 34 HTTP: Received 461 chars from server
cyliang 2:36adde8ca1b9 35 HTTP: Received 200 OK status ... [OK]
cyliang 2:36adde8ca1b9 36 HTTP: Received 'Hello world!' status ... [OK]
cyliang 2:36adde8ca1b9 37 HTTP: Received massage:
cyliang 2:36adde8ca1b9 38
cyliang 2:36adde8ca1b9 39 HTTP/1.1 200 OK
cyliang 2:36adde8ca1b9 40 Server: nginx/1.7.10
cyliang 2:36adde8ca1b9 41 Date: Thu, 29 Sep 2016 05:55:06 GMT
cyliang 2:36adde8ca1b9 42 Content-Type: text/plain
cyliang 2:36adde8ca1b9 43 Content-Length: 14
cyliang 2:36adde8ca1b9 44 Connection: close
cyliang 2:36adde8ca1b9 45 Last-Modified: Fri, 27 Jul 2012 13:30:34 GMT
cyliang 2:36adde8ca1b9 46 Accept-Ranges: bytes
cyliang 2:36adde8ca1b9 47 Cache-Control: max-age=36000
cyliang 2:36adde8ca1b9 48 Expires: Thu, 29 Sep 2016 15:55:06 GMT
cyliang 2:36adde8ca1b9 49 X-Upstream-L3: 172.17.0.4:80
cyliang 2:36adde8ca1b9 50 X-Upstream-L2: developer-sjc-cyan-1-nginx
cyliang 2:36adde8ca1b9 51 X-Upstream-L1-next-hop: 217.140.101.22:8001
cyliang 2:36adde8ca1b9 52 X-Upstream-L1: developer-sjc-cyan-border-nginx
cyliang 2:36adde8ca1b9 53
cyliang 2:36adde8ca1b9 54 Hello world!
cyliang 2:36adde8ca1b9 55 Close socket & disconnect ...
cyliang 2:36adde8ca1b9 56 End
cyliang 2:36adde8ca1b9 57 --------------------------------------------------------------------------