Community discussions

MikroTik App
 
David1234
Forum Guru
Forum Guru
Topic Author
Posts: 1424
Joined: Sun Sep 18, 2011 7:00 pm

Script not running OK - geting MAC from wireless registration?

Wed Jun 13, 2018 2:31 pm

Hello ,
I'm using RB912UAG with v 6.40.1
and I have a this simple script
  name="GetWirelessMac" owner="admin" 
     policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon 
     last-started=jun/13/2018 14:28:35 run-count=14733 
     source=
       :global MAC;
       :if ([/interface wireless registration-table print count-only ] != 0) do={:
set MAC [/interface wireless registration-table get number=0 mac-address]} 
else={:set MAC 0};
       
       :put $MAC;
       :log warning "$MAC";

that run once every 30 seconds

the thing is that very often I get in the log an empty line when a device is connected\not connected - I'm not gettting MAC or 0 .....

but if I run the script in terminal - it's working , what could it be ?

Thanks ,

Who is online

Users browsing this forum: No registered users and 67 guests