Networkmanager kovan wifi

From Studio Kousagi Wiki
Jump to: navigation, search

From http://newton.cx/~peter/work/?p=409 :

You want to create a file in /etc/NetworkManager/system-connections/, named whatever you like. It should be owner root:root and mode 600. The contents should look like:

[connection]
id=Argh
uuid=11111111-1111-1111-1111-111111111111
type=802-11-wireless
timestamp=0

[802-11-wireless]
ssid=SEE BELOW
mode=infrastructure
security=802-11-wireless-security

[802-11-wireless-security]
key-mgmt=wpa-psk
psk=YOUR-NETWORKS-PASSWORD-IN-PLAINTEXT

[ipv4]
method=auto

The SSID is specified as a byte string. If your SSID is expressible in ASCII you can generate this with a Python snippet like: ';'.join(str(ord(c)) for c in 'SSID')+';'. For instance, the network ‘Sample’ is expressed as “83;97;109;112;108;101;“. No quotation marks are used in the config file.

NetworkManager appears to monitor the system-connections directory, and may initially reject your file if it doesn’t have the restrictive permissions it wants. Editing the file after the permissions have been changed causes that to be reloaded. The command “nmcli con up id Argh” should activate the connection.