question

xzv avatar image
xzv asked

[connman] Setup Wifi with provisioning files and Remote Control?

I have been struggling for some time now to manually create an entry for connman. My aim is to store the settings for a specific Wifi so that the Wifi is known to connman and it can connect.


This is what I have tried:

I created a new directory in /data/var/lib/connman with the name

wifi_<hash>_managed_psk (hash for example 5cc56XXXXXXX_4261XXXXXXX)

and created a file called settings in it. The following content is written into the file settings:

[service_wifi_5cc56XXXXXXX_4261XXXXXXX_managed_psk]
Type=wifi
Name=MyWifi
Passphrase=MyPassword


Actually, connman should now recognize the Wifi without rebooting.


Unfortunately, this does not result in the check mark appearing in front of the Wifi in the Remote Console. Also via SSH, when running connmanctl scan wifi and then connmanctl services, no asterisk appears in front of the (should-know) Wifi.


The situation is different when I connect to the Wifi manually via the Remote Console. A file with the same name and the same content is created (plus some more lines like IPv4.method=dhcp).


What is the reason that connman ignores my information about the Wifi and still says that it does not know the Wifi?

bug reportwifilinuxssh
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

4 Answers
nickdb avatar image
nickdb answered ·

Moved to modifications.

Modifying venus OS, is not like tweaking a standard linux install, it will behave differently. Many posts on this available in this section.

Some searching should find you what you need.

2 comments
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

xzv avatar image xzv commented ·
Thanks. But search revealed no solution or hint to my problem.
0 Likes 0 ·
nickdb avatar image nickdb ♦♦ xzv commented ·
Its more about modifying the os, than your specific setting. Might help.
0 Likes 0 ·
xzv avatar image
xzv answered ·

I have found other details:

The connman manual links to a detailed description of how the provisioning files should look. It states:

ConnMan's services are configured with so called "provisioning files" which reside under /var/lib/connman/. The files can be named anything, as long as they end in .config.

I am aware that the Venus directory is customized so that it survives a firmware update. The Wifi configurations are located under /data/var/lib/connman/.

When using only the Remote Console, however, no .config files are created, but directories, which in turn contain a file with the name setting.


Does anyone have an explanation as to why Victron deviates from the specifications and standard of connman here?


Back to my problem:

I found out that it works wonderfully if I follow the instructions and put .config files in /data/var/lib/connman/. In the Remote Console, the checkmark immediately appears in front of the respective Wifi name. If I delete the file again, the checkmark also disappears immediately.

The only problem: If I create the .config file manually, it can no longer be deleted by the user via the Remote Console, the checkmark and the connection information remain permanently and can only be deleted via SSH.


Any background information or hint is appreciated how I can solve this, so I can provision the Wifi via SSH but still users are able to add and delete them via the Remote Console.

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

xzv avatar image
xzv answered ·

Can anyone help me with how to create configurations manually and manage them via the Remote Console at the same time?

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

xzv avatar image
xzv answered ·

I now see this as a (reproducable) bug, because the behavior of connman works according to the documentation, but Victron's implementation and handling is different and working with the Remote Console and connman in parallel no longer works.

@mvader (Victron Energy) can someone from Victron comment on this, please? :)

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

Related Resources

Additional resources still need to be added for this topic

Click here for information about enabling SSH