安信可 http_client_socket示例 ====== .. raw:: html Http client socket Example -------------- Configure WiFi Connected ::::::::: Please configure the ssid and password that need to be connected to WiFi in advance,in `main.c`. .. code-block:: c #define ROUTER_SSID "your ssid" #define ROUTER_PWD "your password" Compile and download ::::::::: Compile command ::::::::: make -j16 `-j16`is the number of cores in the system. download ::::::::: make flash p=/dev/ttyUSBx b=921600 `/dev/ttyUSBx`is the port number of the Ai-WB2 connection, usually ttyUSB0 Example Output ::::::::: successfully request web url ::::::::: :: INFO (11611)[demo.c: 68] ... connected INFO (11614)[demo.c: 78] ... socket send success INFO (11618)[demo.c: 91] ... set socket receiving timeout success HTTP/1.0 200 OK Age: 316063 Cache-Control: max-age=604800 Content-Type: text/html; charset=UTF-8 Date: Fri, 21 Oct 2022 07:50:25 GMT Etag: "3147526947+ident" Expires: Fri, 28 Oct 2022 07:50:25 GMT Last-Modified: Thu, 17 Oct 2019 07:18:26 GMT Server: ECS (sab/56CE) Vary: Accept-Encoding X-Cache: HIT Content-Length: 1256 Connection: close Example Domain

Example Domain

This domain is for use in illustrative examples in documents. You may use this domain in literature without prior coordination or asking for permission.

More information...

INFO (11922)[demo.c: 107] ... done reading from socket. Last read return=0 errno=107 INFO (11932)[demo.c: 111] 10... INFO (12934)[demo.c: 111] 9... INFO (13935)[demo.c: 111] 8... Troubleshooting ::::::::::::: For any technical queries, please open an [issue](https://github.com/Ai-Thinker-Open/Ai-Thinker-WB2/issues) on GitHub. We will get back to you soon.