Difference: WiFi (3 vs. 4)

Revision 42022-09-04 - UliRaich

Line: 1 to 1
 
META TOPICPARENT name="Exercises"

Connecting to WiFi

Exercise 1:

Line: 24 to 24
 Here is a screen dump of the solution:

solution_ex2.png

Added:
>
>
This is what you will see if you try to ping the ESP32:

sta_ping.png

You can try ping also on the ESP32:

from uping import ping  
ping("the machine_to_be-checked")
 

Exercise 3:

Write a module: wifi.py which encapsulates the functionality of exercise 2. Upload the module to the /lib folder on the ESP32.

Line: 39 to 47
 Add a function returning the ESP32's IP address.

Read the current UTC time from the network using NTP. Set the real time clock on the ESP32. Provide a function that converts UTC into your local time.

Added:
>
>

Exercise 5 :

Write a TCP server and a client program running both on the PC. The server waits for a connection request from the client on port 5000, accepts it and sends a message to the client. After that, a prompt appears on the client and the user can type a message to be sent to the server. The server prints this message and creates a prompt on its side, where a message can be entered, to be sent to the client. A ping-pong communication is started. Typing the message "bye" on the client side terminates the connection.

client-server.png

Exercise 6 :

Move the server to the ESP32. In this case, the WiFi initialization is needed before starting the server part. Test the communication as you did in exercise 5.

  -- Uli Raich - 2022-08-29
Line: 47 to 63
 
<--/commentPlugin-->

META FILEATTACHMENT attachment="ap_ping.png" attr="" comment="" date="1661760590" name="ap_ping.png" path="ap_ping.png" size="62592" user="UliRaich" version="1"
Changed:
<
<
META FILEATTACHMENT attachment="sta_ping.png" attr="" comment="" date="1661760591" name="sta_ping.png" path="sta_ping.png" size="60626" user="UliRaich" version="1"
>
>
META FILEATTACHMENT attachment="sta_ping.png" attr="" comment="" date="1662281306" name="sta_ping.png" path="sta_ping.png" size="53942" user="UliRaich" version="2"
 
META FILEATTACHMENT attachment="withESP32_AP.png" attr="" comment="" date="1661760591" name="withESP32_AP.png" path="withESP32_AP.png" size="22511" user="UliRaich" version="1"
META FILEATTACHMENT attachment="noESP32_AP.png" attr="" comment="" date="1661760591" name="noESP32_AP.png" path="noESP32_AP.png" size="20877" user="UliRaich" version="1"
META FILEATTACHMENT attachment="solution_ex2.png" attr="" comment="" date="1662234773" name="solution_ex2.png" path="solution_ex2.png" size="72697" user="UliRaich" version="2"
META FILEATTACHMENT attachment="wifi_connect.py.png" attr="" comment="" date="1661761728" name="wifi_connect.py.png" path="wifi_connect.py.png" size="21352" user="UliRaich" version="1"
Added:
>
>
META FILEATTACHMENT attachment="client-server.png" attr="" comment="" date="1662279423" name="client-server.png" path="client-server.png" size="203943" user="UliRaich" version="1"
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback