Page 1 of 1
spectral-scan saved file format?
Posted: Mon Apr 28, 2014 12:27 am
by Arash2011
Hi,
Is there anybody who can tell me what's the format of output file resulted from running spectral-scan ?
I wrote a command like this in winbox terminal:
spectral-scan range=5ghz duration=20 save-file-name=xxx
After 20sec it creates a file named xxx in files window, but I don't know what's the format of resulted file
Obviously it is not a text file.
Tnx for any help
Re: spectral-scan saved file format?
Posted: Mon Apr 28, 2014 1:12 pm
by Arash2011
Nobody knows ??

Re: spectral-scan saved file format?
Posted: Mon Apr 28, 2014 1:20 pm
by Lupin
I did the same question almost exactly 2 years ago... no news after all this time
See here:
http://forum.mikrotik.com/viewtopic.php?f=7&t=61388
Re: spectral-scan saved file format?
Posted: Mon Apr 28, 2014 2:23 pm
by normis
it is proprietary. we intended to make a viewer for it, but it never has been finished.
Re: spectral-scan saved file format?
Posted: Mon Apr 28, 2014 2:52 pm
by Arash2011
it is proprietary. we intended to make a viewer for it, but it never has been finished.
Thanks and good news!
Hey normis could you please tell me how could I save the result of spectral-scan on remote radio? by means of duration parameter I can limit the running time of this command but when I login back to that radio, everything is cleared and I have no idea how to scan the remote environment.
Re: spectral-scan saved file format?
Posted: Sun Sep 28, 2014 9:04 pm
by pukkita
it is proprietary. we intended to make a viewer for it, but it never has been finished.
Being able to read it would be great to diagnose remote PTP stations... No need for an external viewer though! Why not make routeros itself to be able to "replay" or read that file? i.e. a spectral-scan is ran on the remote end and saved to a file, then after it ends and we are able to login in again, and view or replay that file. CLI mode would be more than fine...
That way it would be a win-win situation: It would be more practical for admins (much better than having to transfer the file and open it in a PC), and better for Mikrotik as everything would be self-contained in routeros so no worries for the proprietary format/coding.
I guess also it would be faster and simpler to program as all the functions are already developed in RouterOS...
Re: spectral-scan saved file format?
Posted: Sat Nov 26, 2016 6:52 pm
by networkfudge
it is proprietary. we intended to make a viewer for it, but it never has been finished.
Hi Normis, can you let us know if someone will be working on finishing the viewer soon?
As suggested this could be as simple as having routeros "play back" the saved file.
Thanks for your reply.
Re: spectral-scan saved file format?
Posted: Wed Dec 07, 2016 11:13 am
by flameproof
So I have emailed Mikrotik asking for the file format, with the aim of creating a tool to automate the collection and parsing of spectral scans from our AP deployment. We are having bad noise issues so we want to see if there are patterns, wether it's constrained to certain locations, etc.
Our topology doesn't allow us to use Dude for this, so we are limited to save file & collect. I have even offered to give the tool I create back to Mikrotik so they can scratch the "Develop tool when we get around to it eventually sometime" from their backlog - this has been asked about for the last few years - but the reply has been "we cannot give any info".
Thus, I've started to attempt reverse-engineering, and have already identified the RSSI readings, but how they map out to frequencies I'm stuck on.
Re: spectral-scan saved file format?
Posted: Tue Dec 13, 2016 6:50 am
by networkfudge
So I have emailed Mikrotik asking for the file format, with the aim of creating a tool to automate the collection and parsing of spectral scans from our AP deployment. We are having bad noise issues so we want to see if there are patterns, wether it's constrained to certain locations, etc.
Our topology doesn't allow us to use Dude for this, so we are limited to save file & collect. I have even offered to give the tool I create back to Mikrotik so they can scratch the "Develop tool when we get around to it eventually sometime" from their backlog - this has been asked about for the last few years - but the reply has been "we cannot give any info".
Thus, I've started to attempt reverse-engineering, and have already identified the RSSI readings, but how they map out to frequencies I'm stuck on.
Seems like forum member merlinthemagic7 has already beaten you to it.
http://publictools.merlindynamics.com/M ... ectrumScan
Re: spectral-scan saved file format?
Posted: Tue Dec 13, 2016 8:00 am
by flameproof
I was fully aware of that URL and the posts pointing to it. However, after asking said forum member, I was told I could get 5 API calls per day and anything higher it would be paid-for. I need to process hourly readings from 55 APs, so it was going to get expensive fast. It became cheaper for me to dig into the binary file.
My offer to Mikrotik to write a tool for it & release it back the community was free, no strings attached. I will publish my findings on the file format in case anyone wants to extend them - they are limited to my bare needs, so I just mapped readings to file byte positions, there is no decoding of frequency bands, wether there is a mapping table of reading/frequency pairs, etc.
Re: spectral-scan saved file format?
Posted: Thu Jan 12, 2017 2:35 pm
by flameproof
So, I finally managed to reverse-engineer the file format, to the extent that I can consistently read and interpret the results of spectral scans. I've now deployed on our network via a custom-made tool, which connects to each AP once an hour, runs the scan for 5 seconds, downloads the file, and processes & stores the result.
The tool then allows us to see the individual scan results, and a time-based waterfall of all results in a heatmap fashion.
This has allowed us to see things like:
- APs with high levels of background noise across the 11 WiFi channels will fail to re-select quieter frequencies, and remain "stuck" on higher-noise channels that may be available.
- APs with failed antennas systems are easy to spot - the background noise is almost gone!
Screenshots below
RF scan.png
Failed antenna.png
No reselection.png
Re: spectral-scan saved file format?
Posted: Thu Jan 12, 2017 2:36 pm
by flameproof
And a couple more screenshots, one showing a noisy scan, the other an AP doing somewhat intelligent reselection.
RF scan noisy.png
Reselection OK.png
Re: spectral-scan saved file format?
Posted: Thu Jan 12, 2017 10:52 pm
by networkfudge
Wow. Excellent work!
Sent from my MotoG3 using Tapatalk
Re: spectral-scan saved file format?
Posted: Fri Jan 13, 2017 6:06 am
by changeip
can you send format of file to me?
Re: spectral-scan saved file format?
Posted: Fri Jan 13, 2017 9:32 am
by blingblouw
nice! anychance we see some of this on github?
Re: spectral-scan saved file format?
Posted: Fri Jan 13, 2017 3:04 pm
by pukkita
nice! anychance we see some of this on github?
Ditto...
Have you emailed support regarding the reselection issue?
Re: spectral-scan saved file format?
Posted: Wed Jan 18, 2017 7:41 am
by flameproof
On the tool itself, not likely to go on Github as it's internal to our company, but I can post a file format description & and example on how to read it. The file itself is not completely reverse-engineered, I was only interested in reading the RSSI samples, so anything such as frequency mapping of readings, timestamps, device info, etc. is not done. To be clear, I just took scans of the whole 2.4GHz spectrum, and decoded the readings out of the resulting files - same work would be needed for 5GHz for example, which I have not done.
On the reselection issue, I'm preparing an email to support, I just wanted to have more historical data to see if the pattern is clear.
Re: spectral-scan saved file format?
Posted: Wed Jan 18, 2017 9:10 am
by blingblouw
That's understandable, would you mind sharing? I'm willing to take a stab at something more standalone, maybe we will finally get the tool we've been waiting years for
Re: spectral-scan saved file format?
Posted: Thu Mar 16, 2017 11:30 pm
by espacioint
This is a really good job.
It is something really interesting that mikrotik should pay attention about it.
This kind of features cant be left away without any kind of explanation.
-1 to mikrotik.
If u can share any kind of information about it I (and a lot of people I guess) will be really gracefully.
Thanks my friend and good job again.
Re: spectral-scan saved file format?
Posted: Fri Jul 19, 2019 12:43 pm
by selit
On the tool itself, not likely to go on Github as it's internal to our company, but I can post a file format description & and example on how to read it. The file itself is not completely reverse-engineered, I was only interested in reading the RSSI samples, so anything such as frequency mapping of readings, timestamps, device info, etc. is not done. To be clear, I just took scans of the whole 2.4GHz spectrum, and decoded the readings out of the resulting files - same work would be needed for 5GHz for example, which I have not done.
On the reselection issue, I'm preparing an email to support, I just wanted to have more historical data to see if the pattern is clear.
Hi flameproof,
I'm analyzing the file generated by spectral-scan
This is a block:
00 0001 254d 3210 0000 8800 000f
0000 8800 000e 0000 8800 000d 0000 8800
0005 0000 08
a0 1400 0006 0000 08
c8 1400
0001 00fe 0918 0b00 0031 70
b8 bbbd c7c2
c6c4 c4c2 c4c7 c2c9 c3c2 c4c3 c2c3 c1c2
c1c0 bfbe bdba b6b5 b7bb bdbe c8c9 cbce
cacc cac5 c4c9 c5c6 c9c8 c5ca cac9 cacb
cac7 c5c5 c6c6 c9c8 cbcc cccd d1d0 cecd
d1ce cecc cdcd cdcf cace c9c5 c5c7 c8c4
c5c6 c6c8 c6c8 c9c9 cac9 cbc8 c9c9 c6ca
cace cccc ccce c9ca c6c3 c30a 0000 3170
a9ab acb1 b0b3 b2b3 b3b5 b4b4 b5b5 b5b6
b6b5 b5b3 b4b4 b2b1 b0b0 aeaa a6a6 a8a9
acb1 b2b3 b3b2 b4b3 b3b3 b4b3 b5b5 b5b4
b6b6 b5b5 b6b5 b5b4 b4b5 b4b7 b7b9 b9b9
babc bcba b9bb bbba b9b9 b9b8 bab8 b9b5
b3b2 b1b2 b4b4 b4b5 b5b5 b6b7 b7b7 b8b7
b6b7 b5b4 b5b4 b6b4 b5b5 b5b3 b3b1 b0b0
0c00 0010 f7ac e9f4 7500 0000
The range frequency is beetween 140a (= 5130) and 14c8 (=5320).
I don't understand how to interpret the values in blue.
I ask for help.
Can you share your information?
Thanks,
Fabio