Closed tslater closed 5 years ago
Please give your version of debian.
nmcli
seemed to be good cli interface a priori but it is quite mis configured in some distributions.
Does this work on some distros? Which ones? I am in an embedded environment, but I might be able to just switch. I'm on Debian 8.3
Distributor ID: Debian
Description: Debian GNU/Linux 8.3 (jessie)
Release: 8.3
Codename: jessie
It works in Ubuntu but not on debian nor raspbian. It is a issue to resolve but I would like to resolve it with keeping nmcli instead of using another command line tool. I already tried a quite long time but nmcli
is not well configured in few distributions.
If you have any idea how to manage it on debian, I will integrate in the project without a doubt.
I've been looking into it and haven't found a way with nmcli. I'll keep looking and let you know if I find anything!
On Tue, Feb 14, 2017 at 2:30 AM, Thibault Friedrich < notifications@github.com> wrote:
If you have any idea how to manage it on debian, I will integrate in the project without a doubt.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/elqui-app/node-wifi/issues/7#issuecomment-279654101, or mute the thread https://github.com/notifications/unsubscribe-auth/AAbbLlIWEWVu0UXZgWHmuhOUW8bWlLR7ks5rcXQkgaJpZM4L-BXS .
I have an update here. nmcli works if I do:
nmcli dev wifi con "MY_SSID" password 'MY_PASSWORD'
instead of nmcli dev wifi con "MY_SSID" password "MY_PASSWORD"
. I have a dollar sign in my password. I wonder if that is related?
It also works if I add a \$, must be bash thinking that $ is a variable name? Maybe we need something like this across the commands: http://stackoverflow.com/a/7685469/1629323. What do you think @thibaultfriedrich ?
Calling the escape function on my string before connecting fixes it. Is that something we'd want to add to the code itself?
Sorry for the absence, do not hesitate to propose a pull request, if it works for you, I will test on our machines before merging it.
In fact, I will to it today.
The following function doesn't work at all for me. May you be more accurate of which function works for you.
var escapeShell = function(cmd) {
return '"'+cmd.replace(/(["\s'$`\\])/g,'\\$1')+'"';
};
Moreover, I already use ' instead of " for password and ssid.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
I get an error
Error: Failed to add/activate new connection: (32) 802-11-wireless-security.psk: property is invalid
, which is the same error I get if I try and connect vianmcli dev wifi con "MY_SSID" password "MY_PASSWORD".