balena-labs-research / python-wifi-connect

An API for controlling Wi-Fi connections on balena devices.
MIT License
15 stars 7 forks source link

Hotspot start up error 802-11-wireless-security.psk: property is invalid #7

Closed jcklerk closed 1 year ago

jcklerk commented 1 year ago

So iset up this up with balena-starter-interface but I'm running in to this isse.

Setup: OpenBalena generic-amd64-2.115.1-v14.11.1.img

[2023-05-24T12:57:04.234Z] [2023-05-24 12:57:04] - [INFO] - Checking for previously configured Wi-Fi connections...
[2023-05-24T12:57:19.546Z] [2023-05-24 12:57:19] - [INFO] - Adding connection of type HOTSPOT
[2023-05-24T12:57:19.587Z] [2023-05-24 12:57:19] - [ERROR] - Connection failed.
[2023-05-24T12:57:19.588Z] Traceback (most recent call last):
[2023-05-24T12:57:19.588Z] File "/app/common/wifi.py", line 126, in connect
[2023-05-24T12:57:19.588Z] Pnm.Settings.AddConnection(conn_dict)
[2023-05-24T12:57:19.589Z] File "", line 4, in AddConnection
[2023-05-24T12:57:19.589Z] File "/root/.local/lib/python3.8/site-packages/dbus/proxies.py", line 141, in __call__
[2023-05-24T12:57:19.589Z] return self._connection.call_blocking(self._named_service,
[2023-05-24T12:57:19.590Z] File "/root/.local/lib/python3.8/site-packages/dbus/connection.py", line 652, in call_blocking
[2023-05-24T12:57:19.590Z] reply_message = self.send_message_with_reply_and_block(
[2023-05-24T12:57:19.590Z] dbus.exceptions.DBusException: org.freedesktop.NetworkManager.Settings.Connection.InvalidProperty: 802-11-wireless-security.psk: property is invalid
[2023-05-24T12:57:19.591Z] Traceback (most recent call last):
[2023-05-24T12:57:19.591Z] File "/app/common/wifi.py", line 126, in connect
[2023-05-24T12:57:19.591Z] Pnm.Settings.AddConnection(conn_dict)
[2023-05-24T12:57:19.591Z] File "", line 4, in AddConnection
[2023-05-24T12:57:19.592Z] File "/root/.local/lib/python3.8/site-packages/dbus/proxies.py", line 141, in __call__
[2023-05-24T12:57:19.592Z] return self._connection.call_blocking(self._named_service,
[2023-05-24T12:57:19.592Z] File "/root/.local/lib/python3.8/site-packages/dbus/connection.py", line 652, in call_blocking
[2023-05-24T12:57:19.592Z] reply_message = self.send_message_with_reply_and_block(
[2023-05-24T12:57:19.592Z] dbus.exceptions.DBusException: org.freedesktop.NetworkManager.Settings.Connection.InvalidProperty: 802-11-wireless-security.psk: property is invalid
[2023-05-24T12:57:19.593Z]
[2023-05-24T12:57:19.593Z] During handling of the above exception, another exception occurred:
[2023-05-24T12:57:19.593Z]
[2023-05-24T12:57:19.593Z] Traceback (most recent call last):
[2023-05-24T12:57:19.594Z] File "run.py", line 68, in
[2023-05-24T12:57:19.594Z] connect()
[2023-05-24T12:57:19.594Z] File "/app/common/wifi.py", line 166, in connect
[2023-05-24T12:57:19.594Z] raise WifiHotspotStartFailed
[2023-05-24T12:57:19.594Z] common.errors.WifiHotspotStartFailed
jcklerk commented 1 year ago

make sure your password is 8 characters or more. This fixed the issue