The KiwiSDR 2 online store is open for orders! Please visit kiwisdr.nz
Please visit kiwisdr.com (documentation) and kiwisdr.nz (online store)
Possible to pass arguments to an extension using kiwirecorder?
Is there any (undocumented ?) way to pass arguements to kiwi extensions using kiwrecorder?
Glenn n6gn
Glenn n6gn
Comments
The only other scenario I could imagine was an existing connection from a browser, running an extension, having its extension parameters modified by a subsequent, unrelated kiwirecorder connection. Is that what you meant? There is no provision for this. It would be a huge security problem if there were.
I think this is essentially how the 3 degree cosmic background gets measured since antenna temperatures, even at microwave, aren't usually that low. Rapid switching is an advantage since it minimizes the effect of any systemic gain drift errors that might be present. This is why I was looking for a way to do it more easily/quickly than the full-on heavy-weight browser approach, but now that I understand the problem I'll proceed along that avenue.
The only other way I can think of to do it is to write an extension designed to do the whole thing which may not be worth the return, though perhaps if I started with the ant_switch extension and modified it, it would easier.
Thanks for letting me know.
Glenn n6gn
Shell scripts are not the easiest thing to understand. But basically what you want to do is the "echo V > /sys/class/gpio/gpioNN/value" where V is 0 or 1 and NN is one of the SAFEGPIOS values. On Linux use the rsh command to send it to the Kiwi. I don't know what you have to do on Windows.
rsh root@[kiwi IP address] "/root/extensions/ant_switch/frontend/ant-switch-frontend N;" 2>/dev/null
where N is the Antenna N selection desired and 2>/dev/null throws away the return text from the BB resulting from the remote shell call. I expect using this method requires compiling the ant_switch extension into the Kiwi but that is well documented and only takes a few minutes.
This seems to work precisely as hoped and allows setting the GPIO lines of the ant_extension one-at-a-time. I measured 600 ms/setting across my local network.
If someone simply wants a few control lines to use to programatically control an external device on a kiwi - whether an antenna switch or something else - this seems to be a quick, easy and effective way to do it remotely.
I've only tested from a remote computer running Ubuntu Linux but perhaps someone more familiar with Windows can provide an equivalent method for that OS.
See https://github.com/OH1KK/KiwiSDR-antenna-switch-extension/blob/master/docs/antenna-schedules-using-crontab.txt
for automating this with crontab from the kiwi itself.