UBNT AirFiber CLI Commands (AF-5x)
Here are all of the commands that you can issue on an Ubiquiti AirFiber Radio from an ssh terminal connection. I found myself always googling and digging through the ubiquiti forum to try and find the command I needed. I compiled all the known AirFiber commands here in one place. Enjoy!
WIP: This article is a work in progress. The contents of this page will continue to evolve over time, consider bookmarking it or make a suggestion in the comments below!
af status
– Prints AirFiber radio operational status.
Possible statuses are master-syncing, master-beaconing, master-operational, slave-syncing, slave-registering, slave-operational.
AF06.v4.0.3# af status slave-operational
af af
– desc
AF06.v4.0.3# af af ******* Local Data: ******* status: slave-operational rxpower0: -64 rxpower1: -64 rxcapacity: 57835520 txmodrate: 6x gpspulse: detected dpstat: 100Mbps-Full miles: 8.412 feet: 44418 rssi0: 71 rssi1: 72 temp0: 22 temp1: 22 ******* Remote Data: ******** rrxpower0: -64 rrxpower1: -64 txcapacity: 66801920 rtxmodrate: 6x rpowerout: 47 ******* Local Config: ******** powerout: 47 curpowerout: 47 conductedpower: 24 txantennagain: 23 rxantennagain: 23 cableloss: 0 dfsdom: None rxgain: high txfrequency: 5.820000GHz rxfrequency: 5.820000GHz txchannelbandwidth: 20MHz rxchannelbandwidth: 20MHz duplex: half framelength: 2.0ms dutycycle: 50 modcontrol: automatic speed: 8x gps: on linkname: MYLINKNAME.................. key: 76c5:####:####:####:####:####:####:#### ******* link Data: ******** baseline: 0 fade: 0 AF06.v4.0.3#
af signal
– Prints radio output power, radio RX power, RSSI, and radio temperature in Celsius
AF06.v4.0.3# af signal powerout: 47 rxpower: -64 rssi: 71 temp0: 21 temp1: 21 AF06.v4.0.3#
af log
– Print RF link events
AF06.v4.0.3# af log 0 01/26/18 16:25:03 Ma:Mode Ev:TMASTER So:reset Sn:master 1 01/26/18 16:25:03 Ma:Master Ev:START So:reset Sn:syncing 2 01/26/18 16:25:03 Ma:DCXO Ev:START So:RESET Sn:WAITCENTER 3 01/26/18 16:25:05 Ma:DCXO Ev:TDCXO So:WAITCENTER Sn:TRAINED 4 02/13/18 09:34:51 Ma:Master Ev:TRAINED So:syncing Sn:getfreq 5 02/13/18 09:34:51 GPSINS 6 02/13/18 09:34:52 Ma:Master Ev:DFSFREQ So:getfreq Sn:gpssync 7 02/13/18 09:34:59 Ma:Master Ev:TKEEPALIVE So:gpssync Sn:beaconing 8 02/13/18 09:35:10 Ma:Master Ev:REGREQ So:beaconing Sn:registering 9 02/13/18 09:35:10 Ma:Master Ev:ENABLEREQ So:registering Sn:operational 10 02/13/18 09:35:10 output_gige: 0x1 (1) AF06.v4.0.3#
af emac
– Print radio counters, statistics
AF06.v4.0.3# af emac mac_0: 0 mac_1: 0 TxFramesOK: 67977 RxFramesOK: 91317 RxFrameCrcErr: 0 RxAlignErr: 0 TxOctetsOK: 14208490 RxOctetsOK: 10407483 TxPauseFrames: 2 RxPauseFrames: 0 RxErroredFrames: 0 TxErroredFrames: 0 RxValidUnicastFrames: 88083 RxValidMulticastFrames: 3017 RxValidBroadcastFrames: 220 TxValidUnicastFrames: 67345 TxValidMulticastFrames: 563 TxValidBroadcastFrames: 70 RxDroppedMacErrFrames: 0 RxTotalOctets: 12056097 RxTotalFrames: 91322 RxLess64ByteFrames: 0 RxOverLengthFrames: 0 Rx64BytePackets: 10678 Rx65_127BytePackets: 43234 Rx128_255BytePackets: 33515 Rx256_511BytePackets: 3525 Rx512_1023BytePackets: 370 Rx1024_1518BytesPackets: 2 Rx1519PlusBytePackets: 0 RxTooLongFrameCrcErr: 0 RxTooShortFrameCrcErr: 0 AF06.v4.0.3#
af get getlist
– Print list of variables that can be used with af get|set
AF06.v4.0.3# af get getlist remconfigure,rxfrequency,txfrequency,rx1frequency,rx2frequency,rx3frequency,rx4frequency,rx5frequency,rx6frequ ency,rx7frequency,rx8frequency,rx9frequency,rx10frequency,tx1frequency,tx2frequency,tx3frequency,cp,cpsel,fram elength,adical,rxgain,txmodrate,duplex,dpstat,dpcntl,flowcntl,mcastfilter,gpspulse,gpsfix,gpslat,gpslong,gpsal t,gpsviewcnt,gpsusedcnt,gpshdop,rssi,rssi0,rssi1,rxpower,rxpower0,rxpower1,rxfpower,rxfpower0,rxfpower1,barran ge,rbarrange,minbarpwr,led,rtemp0,rtemp1,temp0,temp1,getlist,setlist,speed,modcontrol,gps,powerout,curpowerout ,mode,oldmode,state,status,mastertxstart,mastertxlength,masterrxstart,masterrxlength,slavetxstart,slavetxlengt h,slaverxstart,slaverxlength,txsymbols,rxsymbols,txscramblekey,rxscramblekey,tdelay,feet,miles,meters,kilomete rs,linkname,linkuptime,key,capacity,rxcapacity,txcapacity,rrxpower0,rrxpower1,rrxgain,rtxmodrate,rpowerout,rma c,ripaddr,linktest,caldcoff,caltcxo,caltxiq,calrxiq,caltxtc,calrxtc,caltxpower,calrxpower,calpodc,mac_0,mac_1, TxFramesOK,RxFramesOK,RxFrameCrcErr,RxAlignErr,TxOctetsOK,RxOctetsOK,TxPauseFrames,RxPauseFrames,RxErroredFram es,TxErroredFrames,RxValidUnicastFrames,RxValidMulticastFrames,RxValidBroadcastFrames,TxValidUnicastFrames,TxV alidMulticastFrames,TxValidBroadcastFrames,RxDroppedMacErrFrames,RxTotalOctets,RxTotalFrames,RxLess64ByteFrame s,RxOverLengthFrames,Rx64BytePackets,Rx65_127BytePackets,Rx128_255BytePackets,Rx256_511BytePackets,Rx512_1023B ytePackets,Rx1024_1518BytesPackets,Rx1519PlusBytePackets,RxTooLongFrameCrcErr,RxTooShortFrameCrcErr,phy00,phy0 1,phy02,phy03,phy04,phy05,phy06,phy07,phy08,phy09,phy0a,phy0b,phy0c,phy0d,phy0e,phy0f,phy10,phy11,phy12,phy13, phy14,phy15,phy16,phy17,phy18,phy19,phy1a,phy1b,phy1c,phy1d,phy1e,phy1f,txqosoct0,txqosoct1,txqosoct2,txqosoct 3,txqosoct4,txqosoct5,txqosoct6,txqosoct7,txqosoct8,txqosoct9,txqosocta,txqosoctb,txqosoctc,txqosoctd,txqosoct e,txqosoctf,txqosoctusr,txqospkt0,txqospkt1,txqospkt2,txqospkt3,txqospkt4,txqospkt5,txqospkt6,txqospkt7,txqosp AF06.v4.0.3#
airfiberbox stat_main
AF06.v4.0.3# airfiberbox stat_main Invictus Version 0 date: 5/3/2017 00 1C 23 17 4A CB MacRead = 00-1c-23-17-4A-CB mii reg dump reg 00:1000 reg 01:7969 reg 02:004D reg 03:D072 reg 04:11E1 reg 05:5541 reg 06:0005 reg 07:2801 reg 08:0000 reg 09:0200 reg 0A:0000 reg 0B:0000 reg 0C:0000 reg 0D:4003 reg 0E:C038 reg 0F:A000 reg 10:0862 reg 11:7C50 reg 12:2C00 reg 13:0000 reg 14:082C reg 15:0000 reg 16:07E8 reg 17:0000 reg 18:3200 reg 19:3000 reg 1A:0000 reg 1B:060D reg 1C:0000 reg 1D:0000 reg 1E:82EE reg 1D:0005 reg 1E:3D47 reg 1D:0010 reg 1E:0000 reg 1D:0011 reg 1E:7552 reg 1D:0012 reg 1E:4C0C *** EMAC Statistics Counters *** RxFramesOK 47851 RxFrameCrcErr 0 RxAlignErr 0 RxOctetsOK 6112995 RxPauseFrames 0 RxErroredFrames 0 RxValidUnicastFrames 47352 RxValidMulticastFrames 433 RxValidBroadcastFrames 66 RxDroppedMacErrFrames 0 RxTotalOctets 6974313 RxTotalFrames 47851 RxLess64ByteFrames 0 RxOverLengthFrames 0 Rx64BytePackets 3033 Rx65_127BytePackets 31063 Rx128_255BytePackets 9756 Rx256_511BytePackets 3862 Rx512_1023BytePackets 10 Rx1024_1518BytesPackets 127 Rx1519PlusBytePackets 0 RxTooLongFrameCrcErr 0 RxTooShortFrameCrcErr 0 TxFramesOK 74326 TxOctetsOK 9707009 TxPauseFrames 0 TxErroredFrames 0 TxValidUnicastFrames 72142 TxValidMulticastFrames 2084 TxValidBroadcastFrames 100 Bit Error Rates QPSK PortA 77204 7.188030e-04 QAM16 PortA 0 0.000000e+00 QAM64 PortA 0 0.000000e+00 QAM256 PortA 0 0.000000e+00 QPSK PortA 0 0.000000e+00 QAM16 PortB 0 0.000000e+00 QAM64 PortB 0 0.000000e+00 QAM256 PortA 51 4.748323e-07 BER PktCount 104889 AF06.v4.0.3#
ifconfig
– Print interface info including IP address
route print
– Print Route Table
cat /var/log/messages
– Print the Log
AF06.v4.0.3# cat /var/log/messages Jan 26 16:24:15 system: Start Jan 26 16:24:15 syslogd started: BusyBox v1.11.2 Jan 26 16:24:15 init: starting pid 1064, tty '/dev/null': '/sbin/ntpclient -n -s -c 0 -l -h 0.ubnt.pool.ntp.or g' Jan 26 16:24:15 init: starting pid 1065, tty '/dev/null': '/bin/lighttpd -D -f /etc/lighttpd.conf' Jan 26 16:24:15 init: starting pid 1066, tty '/dev/null': '/bin/tinysnmpd /etc/snmp.conf /lib/tinysnmp' Jan 26 16:24:15 init: starting pid 1067, tty '/dev/null': '/bin/dropbear -F -d /etc/persistent/dropbear_dss_ho st_key -r /etc/persistent/dropbear_rs Jan 26 16:24:16 init: starting pid 1068, tty '/dev/null': '/bin/airfiberbox gpsd' Jan 26 16:24:17 dropbear[1067]: Not backgrounding Feb 13 08:37:15 dropbear[1088]: Child connection from 10.X.X.XXX:52170 Feb 13 08:37:22 dropbear[1088]: Password auth succeeded for 'ubnt' from 10.X.X.XXX:52170 AF06.v4.0.3#
uname
– Print linux kernel version information and hostname
AF06.v4.0.3# uname -a Linux AF5XRADIONAME 2.6.33 #1 Fri Jan 26 16:24:47 CST 2018 armv5tejl unknown
AF06.v4.0.3# uname -n AF5XRADIONAME
8 Replies to “UBNT AirFiber CLI Commands (AF-5x)”
Great list. I’m looking to factory default a unit, but I don’t yet have access to it. I’m assuming af reset will factory default the unit?
Kevin,
The default configuration file is located at /etc/default.cfg
Commands to restore default configuration from an ssh console
Çok teşekkür ederim. İşime yaradı
Thank you so much. It worked for me
Thanks a lot
I need a script on mikrotik that ssh login to an AF and get me the txcapacity for example and print on log or send it to telegram
any ideas?
Hi,
I found your commands for AirFiber. I have installed a licensed 11 Gig link and wonder if the commands are the same? I am opening the SSH port 22 and the reply is SSH-2.0-dropbear_0.51
If I send a command, say “af status” there is no reply. I have password authentication turned off.
I’m not sure, I do not have an AF11 to test on.
I have established a connection using Winsock…If this were the equipment you use, would it be correct to just send the command in plain text as af status….
I see my error, I must use Putty or similar program. However, by connecting to the TelNet server in the AF the commands you provided work for AF-11 although I only tried several of them. thanks for the information