wifi-connect icon indicating copy to clipboard operation
wifi-connect copied to clipboard

NetworkManager connection id

Open marclennox opened this issue 4 years ago • 6 comments

I've noticed that the connection ID for the NM connection that wifi-connect creates is the SSID. Would it be possible to have a CLI option that would allow us to specify the ID of the wifi-connect connection, so that it would always be the same regardless of the connected SSID?

marclennox avatar Jan 21 '20 17:01 marclennox

Currently this would be a bit tough to add. Currently in the works is a transition to another NetworkManager library that we created bindings for and it will be much more easier to add this functionality with.

If this is blocking you however, please let me know, I can provide you with some code that you may run immediately after WiFi Connect that will ensure this is so.

majorz avatar Jan 22 '20 20:01 majorz

Thanks @majorz . I would not call this a "show stopper" for the immediate. It will be more critical in ~ 2 months time likely. What is your timeline for the transition to the new library?

marclennox avatar Jan 22 '20 22:01 marclennox

A month or two, I have been regularly moving the needle lately towards the update, but there are still a lot of small details to be covered like updating the CI toolchains.

majorz avatar Jan 23 '20 18:01 majorz

Sounds good. In case I need to hack something earlier than this, can you provide the "code I can run immediately after Wifi Connect" to make this happen? I'm assuming you're referring to using nmcli to rename the connection. Do you always use the same UUID for the connection?

marclennox avatar Jan 23 '20 18:01 marclennox

I was thinking of a Python snippet that uses libnm (the library that nmcli uses). The UUID itself is generated by NetworkManager - it will be different each time.

majorz avatar Jan 24 '20 16:01 majorz

OK, I will wait for your new release that incorporates the new library. For now I've created a script that I run after wifi-connect, using nmcli, which reliably does what I need it to do.

marclennox avatar Jan 24 '20 17:01 marclennox