rohbotics / pifi

A headless wifi provisioning system.
46 stars 12 forks source link

pifi_startup fails to load pifi.conf and default_ap.em #10

Closed shoemakerlevy9 closed 6 years ago

shoemakerlevy9 commented 6 years ago

pifi_startup fails to load pifi.conf and default_ap.em. I suspect that the ubiquityrobot user doesn't have access to the /etc folder. Here is the log file. If I recall correctly I am using the 2018-01-13-ubiquity-xenial-lxde image.

var/log/syslog.1:Feb 11 16:28:54 ubiquityrobot NetworkManager[645]: [1455208134.7764] keyfile: add connection in-memory (3079b2bd-bfa7-4cbe-80df-f4473b73899e,"Pifi AP Mode") var/log/syslog.1:Feb 11 16:28:54 ubiquityrobot NetworkManager[645]: [1455208134.7849] device (wlan0): Activation: starting connection 'Pifi AP Mode' (3079b2bd-bfa7-4cbe-80df-f4473b73899e) var/log/syslog.1:Feb 11 16:28:54 ubiquityrobot NetworkManager[645]: [1455208134.7889] keyfile: update /etc/NetworkManager/system-connections/Pifi AP Mode (3079b2bd-bfa7-4cbe-80df-f4473b73899e,"Pifi AP Mode") and persist connection var/log/syslog.1:Feb 11 16:28:54 ubiquityrobot NetworkManager[645]: [1455208134.7896] audit: op="connection-add-activate" uuid="3079b2bd-bfa7-4cbe-80df-f4473b73899e" name="Pifi AP Mode" pid=751 uid=0 result="success" var/log/syslog.1:Feb 11 16:28:54 ubiquityrobot NetworkManager[645]: [1455208134.8013] device (wlan0): state change: disconnected -> prepare (reason 'none') [30 40 0] var/log/syslog.1:Feb 11 16:28:54 ubiquityrobot NetworkManager[645]: [1455208134.8022] manager: NetworkManager state is now CONNECTING var/log/syslog.1:Feb 11 16:28:54 ubiquityrobot NetworkManager[645]: [1455208134.8310] device (wlan0): state change: prepare -> config (reason 'none') [40 50 0] var/log/syslog.1:Feb 11 16:28:54 ubiquityrobot NetworkManager[645]: [1455208134.8320] device (wlan0): Activation: (wifi) access point 'Pifi AP Mode' has security, but secrets are required. var/log/syslog.1:Feb 11 16:28:54 ubiquityrobot NetworkManager[645]: [1455208134.8320] device (wlan0): state change: config -> need-auth (reason 'none') [50 60 0] var/log/syslog.1:Feb 11 16:28:54 ubiquityrobot pifi_startup[751]: WARN /etc/pifi/pifi.conf doesn't exist, using default configuration var/log/syslog.1:Feb 11 16:28:54 ubiquityrobot pifi_startup[751]: Using wlan0 for AP mode support var/log/syslog.1:Feb 11 16:28:54 ubiquityrobot pifi_startup[751]: Using wlan0 for wifi client mode var/log/syslog.1:Feb 11 16:28:54 ubiquityrobot pifi_startup[751]: Device is not connected to any network, Looking for pending connections var/log/syslog.1:Feb 11 16:28:54 ubiquityrobot pifi_startup[751]: No SSIDs from pending connections found, Starting AP mode var/log/syslog.1:Feb 11 16:28:54 ubiquityrobot pifi_startup[751]: No existing AP mode connections found var/log/syslog.1:Feb 11 16:28:54 ubiquityrobot pifi_startup[751]: Creating new default AP mode connection with config: var/log/syslog.1:Feb 11 16:28:54 ubiquityrobot pifi_startup[751]: WARN /etc/pifi/default_ap.em doesn't exist, using fallback configuration var/log/syslog.1:Feb 11 16:28:54 ubiquityrobot pifi_startup[751]: { var/log/syslog.1:Feb 11 16:28:54 ubiquityrobot pifi_startup[751]: "connection": { var/log/syslog.1:Feb 11 16:28:54 ubiquityrobot pifi_startup[751]: "type": "802-11-wireless", var/log/syslog.1:Feb 11 16:28:54 ubiquityrobot pifi_startup[751]: "autoconnect": false, var/log/syslog.1:Feb 11 16:28:54 ubiquityrobot pifi_startup[751]: "id": "Pifi AP Mode", var/log/syslog.1:Feb 11 16:28:54 ubiquityrobot pifi_startup[751]: "uuid": "3079b2bd-bfa7-4cbe-80df-f4473b73899e" var/log/syslog.1:Feb 11 16:28:54 ubiquityrobot pifi_startup[751]: }, var/log/syslog.1:Feb 11 16:28:54 ubiquityrobot pifi_startup[751]: "ipv4": { var/log/syslog.1:Feb 11 16:28:54 ubiquityrobot pifi_startup[751]: "method": "shared" var/log/syslog.1:Feb 11 16:28:54 ubiquityrobot pifi_startup[751]: }, var/log/syslog.1:Feb 11 16:28:54 ubiquityrobot pifi_startup[751]: "ipv6": { var/log/syslog.1:Feb 11 16:28:54 ubiquityrobot pifi_startup[751]: "method": "ignore" var/log/syslog.1:Feb 11 16:28:54 ubiquityrobot pifi_startup[751]: }, var/log/syslog.1:Feb 11 16:28:54 ubiquityrobot pifi_startup[751]: "802-11-wireless": { var/log/syslog.1:Feb 11 16:28:54 ubiquityrobot pifi_startup[751]: "mode": "ap", var/log/syslog.1:Feb 11 16:28:54 ubiquityrobot pifi_startup[751]: "ssid": "ubiquityrobot844C", var/log/syslog.1:Feb 11 16:28:54 ubiquityrobot pifi_startup[751]: "security": "802-11-wireless-security" var/log/syslog.1:Feb 11 16:28:54 ubiquityrobot pifi_startup[751]: }, var/log/syslog.1:Feb 11 16:28:54 ubiquityrobot pifi_startup[751]: "802-11-wireless-security": { var/log/syslog.1:Feb 11 16:28:54 ubiquityrobot pifi_startup[751]: "psk": "robotseverywhere", var/log/syslog.1:Feb 11 16:28:54 ubiquityrobot pifi_startup[751]: "key-mgmt": "wpa-psk" var/log/syslog.1:Feb 11 16:28:54 ubiquityrobot pifi_startup[751]: } var/log/syslog.1:Feb 11 16:28:54 ubiquityrobot pifi_startup[751]: } var/log/syslog.1:Feb 11 16:28:54 ubiquityrobot pifi_startup[751]: Initializing AP Mode

rohbotics commented 6 years ago

Dumb question, do the files exist? ls -al /etc/pifi/pifi.conf

shoemakerlevy9 commented 6 years ago

Yes, that file exists and is owned by root

$ ls -al /etc/pifi/pifi.conf

-rw-r--r-- 1 root root 555 Dec 19 2017 /etc/pifi/pifi.conf

rohbotics commented 6 years ago

Yes it should be owned by root, and world readable (which it is).

If you are on the January image, you are probably being hit by this bug https://github.com/rohbotics/pifi/issues/5

shoemakerlevy9 commented 6 years ago

Great, thanks! We will update to the newer image.

rohbotics commented 6 years ago

Sounds good, closing this.