Arduino backend antenna switch and attenuator option for Kiwi v1 [added in v1.801]
Hi,
I have a relay board controlled by arduino backend (bit modified for my needs and running on a esp32) for switching antennas. Initially I've installed a fixed 10dB attenuator which I can put in line using 2 relays and one antenna selection button on the kiwi is for the att. Noticed that in some occasions there would be a need for more or less attenuation.
Now I'm playing with a digital variable attenuator F1956NBGI I've got from Farnell for abt. 8 Eur. It can be set from 0 to 32dB by SPI bus. To set its attenuation for now I'm using the option to send additional CURL command available in the ant extension setup (great feature for controlling external added stuff). For example <ESP32 IP ADDRESS>/?cmd=a10 and MCU sets the att to 10dB.
For me having access to the admin console is not a problem to change the att value to any I want but other users cannot. In the future would be possible to implement the use of the attenuator slider for Kiwi1 which would send CURL commands for external attenuator? The slider is already there but of course can be used only with Kiwi2 with onboard att.
For the Kiwi to know what attenuation is set is not a problem that arduino replays with att setting as its reports which antennas are set.
Controlling the attenuator trough CURL commands and arduino can be replicated also by others. Just by adapting arduino code can be used with other att ICs. Mostly they use SPI or parallel bus to set required attenuation.
73 Andrej - s57rw
Comments
@jks
Tnx a lot for implementing the option for controlling an external attenuator in v1.801 using curl commands. Have tested it today and works great. In the case of multiple clients connected if att setting changed by a certain client the update on other connected browsers is immediate. Hopefully I won't have a slider war game among clients 🤣🤣🤣 Good to have options which were added to limit use to local users or with password.
There is only one particular I've noted. As it works on connection of a new client Kiwi sends automaticaly the curl command with value of the last setting from previous client's connection. Belive it is saved in a cookie together with last used frequency, mode, volume etc. If a certain browser is connecting for the 1st time than will set the att to 0dB on connection.
In the case a certain Kiwi is popular and clients are constantly connecting the slider would be jumping all over the place. Maybe would be better on connection to get the att setting which is currently in use or set. Later the client can change the slider if he thinks required.
My Kiwi is in use only by our local club members so don't have many frequent connections and the above could well stay as it is.
Maybe others on the forum can tell which way would prefer.
73 Andrej - s57rw