Code Monkey home page Code Monkey logo

kiwisdr-antenna-switch-extension's Introduction

This extension repository is obsolete and retired. Antenna switch extension will be part of next KiwiSDR version. See KiwiSDR official webpage for newer versions of antenna switch extension.

KiwiSDR-antenna-switch-extension

This is an antenna switch extension for the KiwiSDR software defined radio.

The antenna switch can control out-of-stock antenna switches and utilize Beaglebone GPIO-pins. You can also write your own backend for third party antenna switches.

MS-S7-WEB kit

Features

  • Basic antenna switching.
  • Antenna mixing. In antenna mix mode multiple antennas can be selected simultaneously.
  • Admin can lock/unlock antenna switching from admin panel.
  • Admin can enable/disable antenna mixing from admin panel.
  • Admin can deny antenna switching if more than one user is online.
  • Antenna switching can be time scheluded using Beaglebone's crontab.
    • Look at docs/antenna-schedules-using-crontab.txt
  • Switching back to default antennas when no users are online.
    • Look at docs/reset-to-default-antennas-when-no-users-online.txt
  • Thunderstorm mode. In thunderstorm mode all antennas are forced to ground and switching is denied.
  • Telnet daemon (optional). You can switch antennas using telnet commands.
    • Usage scenarios: Arduino based hardware antenna control box, automating antenna grounding based lightning strikes information.
    • Look at docs/ant-switch-daemon-wrapper.txt
  • The Kiwi frequency scale offset can be set for each antenna selection. Supports transverters or downconverters that are switched together with the antenna.
  • Antenna switching can be made from the http url with a parameter,
    e.g. my_kiwi:8073/?ext=ant,6 would select antenna #6 and
    my_kiwi:8073/?ext=ant,6,3 would select antennas #6 and #3. Instead of an antenna number a sub-string of the antenna description can be specified. See the extension help button for details.

Required hardware

You will need the KiwiSDR software-defined radio (SDR) kit.

You will need antenna switch hardware.

Available backends for hardware

  • ms-s7-web for controlling LZ2RR's MS-S7-WEB antenna switch
  • ms-s4a-web for controlling LZ2RR's MS-S4A-WEB antenna switch
  • beagle-gpio for controlling up to ten Beaglebone Green/Black/AI/AI-64 GPIO pins
  • snaptekk for controlling Snaptekk Wifi ham radio 8 antenna switch
  • kmtronic for controlling KMTronic LAN Ethernet IP 8 channels WEB Relay
  • kmtronic-udp for controlling KMTronic LAN Ethernet IP 8 channels UDP Relay
  • arduino-netshield for Arduino Nano V3.0 GPIO pins. ENC28J60 Ethernet Shield needed.
  • example-backend is an example script for your own backend development

Version compability

  • This version 0.5 (16 Jun 2023) requires KiwiSDR version v1.608 or later
  • Tested to work with MS-S7-WEB firmware v1.01
  • Tested to work with MS-S4A-WEB
  • Tested to work with Snaptekk WiFi wireless 8 antenna switch
  • Tested to work with KMTronic LAN Ethernet IP 8 channels WEB Relay
  • Tested to work with KMTronic LAN Ethernet IP 8 channels UDP Relay
  • Tested to work with Beaglebone Green/Black/AI/AI-64 GPIO pins

Installation

Open ssh connection to your KiwiSDR as root user and type the commands below. Do not install from the "console" tab of the Kiwi admin page. This is because the install script rebuilds and restarts the Kiwi software and this cannot be done while connected to the Kiwi using the console tab.

cd /root
git clone https://github.com/OH1KK/KiwiSDR-antenna-switch-extension.git
cd KiwiSDR-antenna-switch-extension
bash ./ant-switch-extension-installer

The installer copies the files to the correct place, creates a configuration file and recompiles the KiwiSDR server. This will take several minutes. After the compile is finished, the KiwiSDR will be restarted. After restart the antenna switch extension is installed on the KiwiSDR.

Configuration

Open your KiwiSDR admin panel. Then Extensions -> Antenna Switch.

ant switch extenstion admin interface

By default users can switch antennas and select multiple simultaneous antennas.

Describe your antennas 1-8. If you leave antenna description empty, antenna button won't be visible to users.

Antenna switch failure or unknown status decription will be show to users if antenna switch is unreachable or malfunctioning.

Usage

Open your KiwiSDR as user. Enable ant_switch extension from extension drop down menu. Antenna switch will show.

ant switch extension user interface launch ant_switch_extension_user_interface

Single antenna mode: Click to select antenna.

Antenna mixing mode: you can select multiple antennas simultaneously. Click antennas on/off.

If admin has disable antenna switching, buttons are grey and you cannot click them.

Uninstalling extension

Open an ssh connection to your KiwiSDR as the root user and type:

cd /root/KiwiSDR-antenna-switch-extension
bash ./ant-switch-extension-uninstaller
cd /root
rm -rf KiwiSDR-antenna-switch-extension

Demo site

KiwiSDR Kaustinen http://sdr.vy.fi

Donate

If you want to support this project, you can send a donation via PayPal.

License

The MIT License (MIT)

Copyright (c) 2019-2023 Kari Karvonen

kiwisdr-antenna-switch-extension's People

Contributors

jks-prv avatar oh1kk avatar tarlepp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kiwisdr-antenna-switch-extension's Issues

Thunderstorm mode

when reset-to-default-antennas-when-no-users-online is activated you can activate thunderstorm mode but after a while it switches the default antenna on

Remote hardware box to read antenna switch status and switch antennas

Improvement idea based on Kenneth / SM0OHC feedback.

The kiwi extension though don't allow for antenna switching
when another extension is active.

Of course you could open another browser-window and send the commands.

However, how difficult is it to make the arduino code for controlling
instead of receiving commands ?
That is 8 pushbuttons and 8 led's for status and the 28J60.

Who can make antenna switches and when?

Currently antenna switching is open to everyone at any time. Should there be restrictions.

If there are several users online, is it OK to change antenna then. Switching affects to all listeners. Should switching be limited only if there is only one listener online?

Should antenna switching make available only to admin user? and if so, move controls to admin page?

Should there been option to lock antenna from admin panel so switching is not possible to regular users.

KiwiSDR antenna switch extension init after restart failed

I found one issue with this extension.

After restart of the Kiwi server (for example after FW update) the extension isn't working.
You have to reboot the beagle bone to get it working.

In the web interface the buttons can be clicked, but they stay white and no change on the GPIO pins.

Running v1.128

Backend for MS-S4A-Web

My MS-S4A-Web antenna switch arrived today - controller just got up-/down-buttons to select the antenna port. Same goes for the web interface which works nicely over wifi.

Wrote a backend for it: https://gist.github.com/RipperFox/79a0bfa16ff49c5a3c84fbdf6f1fc6dd

Number of ports has to be configured on the controller and in the backend (lz2rr sells this type of controllers also for MS-S7 switches - so 2-7 ports are possible).

I felt a bit too smart and implemented a simple port count detection in the initialization routine (just switches through and notices the highest port number returned from the controller) , but it looks like this routine is called all the time :)

Is is normal that every switch goes through ground?

73, Sascha

all inputs are switched

when the kiwi was restarted all inputs form the switch are activated
when the ant_switch extension is opened in the Browser all antennas going to off
i use the switch over the gpio pins

thank you for your great work ๐Ÿ‘
Stefan

Some minor issues with the antenna switch extension

I have noticed some minor issues with the antenna switch extension:

  1. With 8 antennas defined, the description for the 8th antenna is located partly outside the extension area. Perhaps the layout could be changed slightly to accommodate also antenna 8 within the extension area.
  2. When all four Rx are in use and the last user activates the antenna switch extension, the extension shows selected antenna: unknown and permissions: unknown. Also the current antenna is not shown. I think it is still possible to select antennas but no feedback is given.

screenshot_2019-02-07 kiwisdr

  1. As the antenna switch extension is very popular, the log is often filled with "GET Antenna" entries. Would it be possible to suppress these messages from the log? The "SET Antenna" entries are however of interest as they show which antennas are most popular.

screenshot_2019-02-06 admin kiwisdr

Regards

Mauritz / SM2BYC

Antenna mixing

There can be antenna which is good on VLF and other which performs better on 11m band.

What happens if you select both antennas at same time?

Need testing.

Update loop on kiwi version 1.95

Today i found that my KiwiSDR was caught in an update loop. After removing the antenna switch extension and a rebuild of de KiWi server updating works fine.
Then i tried to reinstall the server and it worked to some degree. The extension doesn't show up within the KiWi web environment but the antenna does switch when i use the shell command. I took a look at the demo-site and found it updating too. Not sure it is the same loop problem.

regards Huub

Select antenna by band

Automatic antenna selection by band.

Not sure if this is this possible at least in multiple simultaniuous listener cases.

Switching antenna from http url with a parameter in mixed mode

Current implementation on antenna switching on url parameter allow you to select antenna.

http://sdr.vy.fi/?ext=ant,3

This works fine and is logical if you use just one antenna. If you are using antenna switch extensions in mixing mode where selecting multiple antenna simultaneously is allowed, this does antenna toggling instead of selecting single antenna.

Should there are +3, -3 commands for toggling and 3 just to select single antenna 3. If so, how multiple selection should be handled (something like ext=ant,1,3,7). Should there be mechanism to restrict antenna switching from url parameter.

Leaving this open until got idea what is way to go.

Increase maximum antennas

Direction finding arrays and things like that might require more than 7 antenna outputs.

Increase maximum number of antennas.

Antenna switch installation failed

Helo!

I have a KiwiSDR with a BeagleBone Green labeled BBG217021635.
Got it from Seedstudio.com in January 2018.

The kit is connected to my LAN (192.168.0.110:8073) and works
just fine. Now I want to use Kari's "KiwiSDR-antenna-switch-extension"
with the Beagle-gpio-backend. I intend to use my own solution of interface
with opto-coupled relays etc.

+++++++++++++++++++++++++++++++++++++

I have tried to install the software 5 times but haven't succeded
to get this extension functioning.

1:st try: -------------------------------

I followed this instruction...

cd /root
git clone https://github.com/OH1KK/KiwiSDR-antenna-switch-extension.git
cd KiwiSDR-antenna-switch-extension
bash ./ant-switch-extension-installer

On the question:

"which backend you would like to use ?"

I just hit Return and got the "ms-s7-web" backend version, and
got the message:

"Rebuilding KiwiSDR. This will take about 13 minutes."

Then nothing happend, I had to switch off and on the Kiwi but
no Antenna switching was installed.

2:nd try: -------------------------------

I followed the above instruction chain but chose the

beagle-gpio alternative.

I got the same negative result, ie:

nothing happend, I had to switch off and on the Kiwi but
no Antenna switching was installed.

3:d try: -------------------------------

I reloaded the original BBG software from the SD-card
and went through the above procedure, but negative...

4 and 5:th try: -------------------------------

I did slight variations on the above procedures, and
again...negative !


During the tries there was no hardware attached to the
gpio-pins, does that prevent the switch-extension from
being installed ?
In such a case is there a collission between the use of
gpio-pins? gpio-pins #70-71 and #78-86 are dedicated to
other functions in certain modes!

As I see are:
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85
checked in the "ant-switch-backend-beagle-gpio" ?!

("Error. GPIO pin $GPIOPIN failed to initialize.")

What can be done ???

Wkr / Lou-lovo

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.