API examples

Power level

AdvanSafe-200 uses 4 logical antennas in the Primary unit and 4 other antennas in the Secondary unit.

Each antenna uses its own power level. By default

Primary:

    • Antenna 1:1 -> 28 dBm

    • Antenna 1:2 -> 25 dBm

    • Antenna 1:3 -> 25 dBm

    • Antenna 1:4 -> 28 dBm

Secondary:

    • Antenna 1:1 -> 30 dBm

    • Antenna 1:2 -> 27 dBm

    • Antenna 1:3 -> 27 dBm

    • Antenna 1:4 -> 30 dBm

Change power level

Adding or reducing power means adding or reducing the power level by the same factor on all antennas.

For example adding one dB means

Primary:

    • Antenna 1:1 -> 29 dBm

    • Antenna 1:2 -> 26 dBm

    • Antenna 1:3 -> 26 dBm

    • Antenna 1:4 -> 29 dBm

Secondary:

    • Antenna 1:1 -> 31 dBm

    • Antenna 1:2 -> 28 dBm

    • Antenna 1:3 -> 28 dBm

    • Antenna 1:4 -> 31 dBm

API Use

In order to change power levels through the API use an HTTP PUT to

http://$DEVICE_IP/devices/$DEVICE_ID/antennas

<?xml version="1.0" encoding="UTF-8"?>

<request>

<entries>

<entry>

<class>ANTENNA_DEFINITION</class>

<def>$DEVICE_ID,1,1,0,0,,0,0,0</def>

<conf>

<class>ANTENNA_CONF</class>

<power>28</power>

</conf>

</entry>

<entry>

<class>ANTENNA_DEFINITION</class>

<def>$DEVICE_ID,1,2,0,0,,0,0,0</def>

<conf>

<class>ANTENNA_CONF</class>

<power>25</power>

</conf>

</entry>

<entry>

<class>ANTENNA_DEFINITION</class>

<def>$DEVICE_ID,1,3,0,0,,0,0,0</def>

<conf>

<class>ANTENNA_CONF</class>

<power>25</power>

</conf>

</entry>

<entry>

<class>ANTENNA_DEFINITION</class>

<def>$DEVICE_ID,1,4,0,0,,0,0,0</def>

<conf>

<class>ANTENNA_CONF</class>

<power>28</power>

</conf>

</entry>

</entries>

</request>

In case Primary/Secondary were configured, issue an HTTP PUT to:

http://$DEVICE_IP/devices/$DEVICE_ID/antennas

<?xml version="1.0" encoding="UTF-8"?>

<request>

<entries>

<entry>

<class>ANTENNA_DEFINITION</class>

<def>DEVICE_IP,1,1,0,0,,0,0,0</def>

<conf>

<class>ANTENNA_CONF</class>

<power>28</power>

</conf>

</entry>

<entry>

<class>ANTENNA_DEFINITION</class>

<def>DEVICE_IP,1,2,0,0,,0,0,0</def>

<conf>

<class>ANTENNA_CONF</class>

<power>25</power>

</conf>

</entry>

<entry>

<class>ANTENNA_DEFINITION</class>

<def>DEVICE_IP,1,3,0,0,,0,0,0</def>

<conf>

<class>ANTENNA_CONF</class>

<power>25</power>

</conf>

</entry>

<entry>

<class>ANTENNA_DEFINITION</class>

<def>DEVICE_IP,1,4,0,0,,0,0,0</def>

<conf>

<class>ANTENNA_CONF</class>

<power>28</power>

</conf>

</entry>

<entry>

<class>ANTENNA_DEFINITION</class>

<def>DEVICE_IP,2,1,0,0,,0,0,0</def>

<conf>

<class>ANTENNA_CONF</class>

<power>30</power>

</conf>

</entry>

<entry>

<class>ANTENNA_DEFINITION</class>

<def>DEVICE_IP,2,2,0,0,,0,0,0</def>

<conf>

<class>ANTENNA_CONF</class>

<power>27</power>

</conf>

</entry>

<entry>

<class>ANTENNA_DEFINITION</class>

<def>DEVICE_IP,2,3,0,0,,0,0,0</def>

<conf>

<class>ANTENNA_CONF</class>

<power>27</power>

</conf>

</entry>

<entry>

<class>ANTENNA_DEFINITION</class>

<def>DEVICE_IP,2,4,0,0,,0,0,0</def>

<conf>

<class>ANTENNA_CONF</class>

<power>30</power>

</conf>

</entry>

</entries>

</request>