helisat
1
Hello,
I am trying to retrieve information about all wireless connections:
$API->write('/interface/wireless/registration-table/getall');
This command only returns the mac-address, ap, wds, comments. If you run the same command in terminal, more information is returned:
**/interface wireless registration-table> pr
INTERFACE RADIO-NAME MAC-ADDRESS AP SIGNAL-STRENGTH TX-RATE UPTIME**
Is it possible to get all this information from the API? (most importantly the signal-strength)
Best Regards,
Luke
chronos
2
There is not only PHP API interface but direct SSH command execution from PHP too.
Refer to wiki:
http://wiki.mikrotik.com/wiki/Use_SSH_to_execute_commands_(DSA_key_login)
and
http://wiki.mikrotik.com/wiki/Traffic-flow
Example command:
[admin@mikrotik] /interface wireless registration-table> /interface wireless registration-table {:foreach i in=[find] do={:put (“signal-strenght=”.[get $i signal-strength]." radio-name=“.[get $i radio-name].” tx-rate=".[get $i tx-rate]);}}
signal-strenght=-60dBm@6Mbps radio-name=001D0FB0EE4D tx-rate=48Mbps
signal-strenght=-65dBm@6Mbps radio-name=001D0FB0ECE4 tx-rate=36Mbps
signal-strenght=-58dBm@6Mbps radio-name=0019E08B7D35 tx-rate=54Mbps
signal-strenght=-74dBm@6Mbps radio-name=000B6BDAFFF7 tx-rate=48Mbps
Output si very well suited for parsing via PHP explode function.
And you can get much more informations:
802.1x-port-enabled client-tx-limit frames hw-frames p-throughput rx-ccq tx-frames-timed-out
ack-timeout comment framing-current-size interface packed-bytes rx-rate tx-rate
ap compression framing-limit last-activity packed-frames signal-strength tx-signal-strength
ap-tx-limit distance framing-mode last-ip packets signal-to-noise uptime
authentication-type encryption group-encryption mac-address radio-name strength-at-rates wds
bytes frame-bytes hw-frame-bytes nstreme routeros-version tx-ccq wmm-enabled
mrz
3
$API->write(‘/interface/wireless/registration-table/print’);
matmor
4
With the php API you can also to that
$API->write('/interface/wireless/registration-table/print',false);
$API->write('=stats=');
I use it to output All info of eatch registered client for our support team !
It output many more thing that only the print command !!
I put info on the wiki
http://wiki.mikrotik.com/wiki/API_PHP_class