Tried to get WiFi list from Net Uno application using nmcli manager.
In debugging mode from VS Code program gives an exception. Looks like file “nmcli” not available to launch from docker container. Please refer to the piece of code below. Exception provided on nmcli.Start();
Is it any way to include nmcli into container or access it from the container ?
Thanks.
public List List()
{
using (var nmcli = new Process())
{
nmcli.StartInfo.FileName = “nmcli”;
nmcli.StartInfo.Arguments = “-t -f in-use,ssid,rate,signal,bars,security d wifi list”;
nmcli.StartInfo.UseShellExecute = false;
nmcli.StartInfo.RedirectStandardOutput = true;
nmcli.StartInfo.RedirectStandardError = true;
nmcli.Start();
var networks = new List();
while (!nmcli.StandardOutput.EndOfStream)
{
networks.Add(ParseNetworkString(nmcli.StandardOutput.ReadLine()));
}
nmcli.WaitForExit();
return networks;
}
}
First of all have you actually installed nmcli inside your container? Just because the binary is on the host OS does not mean it’s available inside the container environment.
I added the following buildcommands “RUN apt-get update && apt-get install network-manager”. Now process starts and nmcli.Start() returns “true”.
But no WiFi detected. Is it something else I need to add?