Community discussions

MikroTik App
 
n21roadie
Forum Guru
Forum Guru
Topic Author
Posts: 1949
Joined: Fri Aug 07, 2009 10:36 pm
Location: Limerick,Ireland

Wireless Scan - help needed

Sun Nov 22, 2020 4:11 pm

I have a wireless script which is scheduled to run overnight but I need to add traffic detection script to prevent the wireless scan from running, In other words if a customer is streaming or downloading
the wireless scan will not run !

:local sub1
:set sub1 ([/system identity get name])
/interface wireless scan 0 duration=180 save-file="$sub1 wiscan.txt"
 
r00t
Long time Member
Long time Member
Posts: 672
Joined: Tue Nov 28, 2017 2:14 am

Re: Wireless Scan - help needed

Mon Nov 23, 2020 3:06 pm

You can try something like this:
1) read number of packets/bytes from interface stats
2) wait 10 s
3) read it again, compute difference
4) If lower than X (some threshold you will have to choose) run the scan

But if your hardware can do it, use background scan. It can run in the background without affecting the traffic.
 
n21roadie
Forum Guru
Forum Guru
Topic Author
Posts: 1949
Joined: Fri Aug 07, 2009 10:36 pm
Location: Limerick,Ireland

Re: Wireless Scan - help needed

Tue Nov 24, 2020 1:21 pm

It would be nice if RouterBOARD LHG 5nD CPE could conduct a background scan?
"Couldn't start - background scan not supported in this state (6) "
 
n21roadie
Forum Guru
Forum Guru
Topic Author
Posts: 1949
Joined: Fri Aug 07, 2009 10:36 pm
Location: Limerick,Ireland

Re: Wireless Scan - help needed

Wed Nov 25, 2020 6:44 pm

I need help to create a script to monitor wlan interface traffic data and if above a threshold level say 1MB in one minute, the wireless scan does NOT run?
 
n21roadie
Forum Guru
Forum Guru
Topic Author
Posts: 1949
Joined: Fri Aug 07, 2009 10:36 pm
Location: Limerick,Ireland

Re: Wireless Scan - help needed

Wed Nov 25, 2020 10:16 pm

Ok work in progress ! ( I assume someone will say there is a easier method, If so please let me know!)
Just testing one possible solution,
Here is the workflow
(1) 04:07:04 will enable the disabled Traffic_Monitor
(2) if traffic flow is below 10kb - run wireless scan
(3) 30 seconds into wireless scan - disable traffic-monitor ( to prevent scan loops! )
(4) 5mins after scheduler task started - scheduler disables traffic-monitor (this to ensure max time traffic monitor can remain active is 5mins - once again preventing scan loops!)
You do not have the required permissions to view the files attached to this post.

Who is online

Users browsing this forum: No registered users and 23 guests