antenna port

Hi,

I need help writing a script that upon startup, will set the antenna to “antenna a” and then wait 30 seconds for a connection. If it gets a connection, then the script is done. If no wireless connection, then it switches to “antenna b” and then is done.

Travis

Something like this:

{
   :local iFace "wlan1"
   /interface wireless set $iFace antenna-mode=ant-a;
   :delay 30s;

   :if ( [/interface wireless get $iFace running] = false ) do={
      /interface wireless set $iFace antenna-mode=ant-b;
   } 
}