I'm trying to configure linux (in this case CentOS) to automatically connect to the nearest WiFi via "push-button-connect". This micro computer has no keyboard or display, so the goal is to hit the "push-button-connect" then boot the device, so at init it'll search for the nearest router and auto connect.
My next option is doing a wifi-direct set up like chromecast to set the network credentials.
1/5/15 -- Update
After a bit of digging I've just about hit what I'm trying to do. I've appended wpa_supplicant into /network/interfaces. At pre-up it launches wpa_supplicant into the background. After init, it then runs wpa_cli wps_pbc any which then runs through the available networks and attempts "push-button-connect". Prior this is when you should trigger PBC on the router.
My new issue now is: after PBC, dhclient isn't able to generate an IP. I can see the MAC in the network, but it doesn't generate correctly. After restarting the device it is able to connect (since it's now stored via wpa_supplicant).
Next pieces to figure out are: If the connection exists it should skip PBC and connect immediately.
Aucun commentaire:
Enregistrer un commentaire