sanchescom / php-wifi

Cross-platform PHP library for scan, connect and disconnect Wi-Fi networks.
GNU General Public License v3.0
51 stars 14 forks source link

Error: Device 'en1' is not a Wi-Fi device. #19

Closed bmasmhj closed 2 years ago

bmasmhj commented 2 years ago

Command "LANG=C nmcli -w 10 device wifi connect "wifi-name" password "123456789" ifname "en1" 2>&1" exited with code 1: Error: Device 'en1' is not a Wi-Fi device.

$example = new Example(); try { $example->device = 'en1'; // What does this device [ 'en1' ] means. ? $example->getAllNetworks(); $example->connect('wifi-name', '123456789'); $example->disconnect(); } catch (Exception $e) { // }

bmasmhj commented 2 years ago

solution ; I used wlp3s0 and worked for me