Using Buster OS version I was able to configure Wi-Fi connection from Python code:
- Select Wi-Fi network from the list returned by the command 'sudo iwlist wlan0 scan'
- Update the file /etc/wpa_supplicant/wpa_supplicant.conf with selected SSID and encrypted password.
- Run two commands:After these steps a Wi-Fi connection became active/functional.
The same steps don't work on OS Lite Bookworm. I can list connections with 'iwlist' command but I cannot run two last commands:How can I fix that? Is there a better way to configure Wi-Fi connection programmatically from Python code?
Thanks!
- Select Wi-Fi network from the list returned by the command 'sudo iwlist wlan0 scan'
- Update the file /etc/wpa_supplicant/wpa_supplicant.conf with selected SSID and encrypted password.
- Run two commands:
Code:
sudo wpa_cli -i wlan0 reconfiguresudo systemctl restart dhcpcd
The same steps don't work on OS Lite Bookworm. I can list connections with 'iwlist' command but I cannot run two last commands:
Code:
$ sudo wpa_cli -i wlan0 reconfigureFAIL$ sudo systemctl restart dhcpcdFailed to restart dhcpcd.service: Unit dhcpcd.service not found.
Thanks!
Statistics: Posted by peppy.player — Mon Jan 29, 2024 8:03 am