Hello all,
I'm kind of a begginer in this MikroTik scripting world but i would like to be able to replicate Winbox's functionality, that is:
Wireless Scanner -> get a list of SSIDs, select one and click Connect and the SSID is set for wlan1.
I've tried using this:
var commands = new List<string>() {
"/interface/wireless/set",
"=.id=wlan1",
"=address=" + ap.Address,
"=ssid=" + ap.SSID,
"=channel=" + ap.Channel,
"=radio-name=" + ap.RadioName
};
if(ap.SNR.HasValue)
{
commands.Add("=snr=" + ap.SNR.ToString());
}
if (ap.Signal.HasValue)
{
commands.Add("=sig=" + ap.Signal.ToString());
}
if (ap.NF.HasValue)
{
commands.Add("=nf=" + ap.NF.ToString());
}
//if(!string.IsNullOrWhiteSpace(ap.Section))
//{
// commands.Add("=.section=" + ap.Section);
//}
// End sentence
But i don't see it doing anything. Not sure if it this is even valid code or api commands.
Does it have something to do with connect-list?
I'm sorry if this question has been asked and answered before, i've tried searching but couldn't find anything.
Thank you!