I want to operate a WiFi dongle with RaspberryPi, (it's like a CPU without built-in WiFi). I need to write a python script which automatically scan for WiFi networks and a connection need to be automatically established with known SSID and password.
This mean that I need to provide the password for the WiFi network from a file, and the remaining thing is to do the scanning and connecting automatically.
I read a file from the Web which contains WiFi SSID name and password.
I need to write a script which scan and list current networds and match it to the SSID from the file and further to automatically create the connection to this known network.
RaspberryPi OS: Rasbian