Antenna Switch - snaptekk type [fixed in v1.673]

edited April 24 in Problems Now Fixed

Hi,

I've running home brewed snaptekk-like antenna switche on my Kiwi (ESP8266 based), it worked for years until the antenna switch integration happened. I tried to debug it on my side, but first of all it seems that the IP address shown on the admin tab is not really used to change the antenna switch IP address within the Kiwi. Is that right?

The Kiwi shows the selected antenna after a while when I switch using the Web-interface of the antenna switch (it build-in in parallel to the TCP interface), so query is somehow delayed. I never could set a antenna from within the Kiwi interface, that is somehow totally broken.

Could you please have a look at this?


Thank you very much!

Eckhard

Comments

  • jksjks
    edited April 20

    So you have your own custom backend script derived from the snaptekk switch script?

    It looks like the integrated snaptekk script has a typo. So check if this typo carried over to your script or not:

        echo "SNAPTEKK_URL=\"$url\""

    should be

        echo "SNAPTEKK_URL=\"$url\"" >$ADDR_FILE

    There are significant changes coming to all backend scripts. So if you'd like me to include your script in the release (and make the required changes) I'd be happy to do that. Just tell me what to call it and email to support@kiwisdr.com

    Thank you

  • Hi,

    thank you very much for your explanations!

    You did not respond to my question, if the IP address entry on the admin/extensions/antennaswitch-tab is meant to be used for changing the IP address the Kiwi expects to connect to the switch. It seems to me that any entry on this field is not getting effective, just reloading the tab returns it to the previous IP address. It really would be great for troubleshooting to be able to change the IP address here. Could you please have a look at this?

    My HW is not commercial, I took a D1 Mini Module (ESP8266MOD 12-F) some, added some driver ICs and put it into a 'commercial' antenna switch box from box73. However, the SW I wrote uses the snaptekk syntax (and added some more commands to be more flexible, and also a tiny webserver to change antennas from within any browser), at least I think I did correctly, and it worked all the time.

    So, the full command syntax to read out the current switch status is: GET /status HTTP/1.1 , and the reply from antenna switch is 'Status':[0,1,0,0,0,0,0,0,0] and of course some HTML handshake / HTTP/1.1 200 OK .

    For example, when I execute curl --http0.9 -S -v -m 2 $SERVERNAME/status (with SERVERNAME being an IP adress followed by :5333), then the answer is:

    For selecting an antenna, it is /switch/1 or also +1 for selecting the first antenna. I do not differentiate there, because I only have active antennas on the switch, only one is allowed to be selected at one time.

    If you want, I can setup a test switch (just the D1 mini without any switch HW on it and share the address and full command set. Then, you could try to switch from within the Kiwi extension and in parallel watch the webpage if the commend was executed. Interested? Where to send the details to?


    Eckhard

  • Hi,

    I brought my switch to the house and connected it to my MAC to debug. I think I found one problem. Here is a copy from the serial output of the D1 module I use for debugging when selecting antenna 1 from Kiwi GUI:

    Message complete:
    --> Lines: 3
    --> Message:
    GET /switch/t1 HTTP/1.1
    Host: 192.168.2.111:5333
    User-Agent: curl/7.64.0
    >>> Command detected: /switch/t1
    

    You use the t1 command instead of just /1 or /+1 to select antenna 1. That wasn't done before that way.

    No problem, I just add the /t in my interpreter to be handled the same way as /1 or /+1 - just as /1 ... that way it works.

    I also noticed that you do not request the status without selecting an antenna, only right after a new antenna was selected to confirm the switch being successfully executed. That might be confusing in multi-user environment, where user 1 is switching the antenna and user 2 is just wondering about a change in reception while its antenna switch display doesn't show the recently selected antenna but the previous selection. Maybe you could add a frequent status request? Once every second would be enough and not produce any network load.

    Now, I'm going to reinstall the switch outside and do final testing; and I have to update my second switch.

    Thanks!


    Eckhard

  • ... installed & works again: erserver.ddns.net:8074

    Now grab the second switch and update ...


    Eckhard

  • ...ok, second Kiwi (Kiwi1) running again erserver.ddns.net:8073


    Eckhard

  • jksjks
    edited April 21

    You did not respond to my question, if the IP address entry on the admin/extensions/antennaswitch-tab is meant to be used for changing the IP address the Kiwi expects to connect to the switch. It seems to me that any entry on this field is not getting effective, just reloading the tab returns it to the previous IP address. It really would be great for troubleshooting to be able to change the IP address here.

    Sorry, I assumed it might be obvious from the "typo" I showed in my original message. Yes, when you change the IP/URL field it is supposed to change the current IP/URL address used by the backend script. And also store it in the configuration file for future use by the script. And the typo fix is what makes this possible.

    I don't recall making any change to use the toggle command ('t') instead of add/remove ('+', '-') commands when antenna mixing is enabled. I believe it has always worked that way. Yes, I checked the old antenna switch extension code just now: It only ever used the toggle command. Never '+' and '-'.

    I also noticed that you do not request the status without selecting an antenna, only right after a new antenna was selected to confirm the switch being successfully executed. That might be confusing in multi-user environment, where user 1 is switching the antenna and user 2 is just wondering about a change in reception while its antenna switch display doesn't show the recently selected antenna but the previous selection. Maybe you could add a frequent status request? Once every second would be enough and not produce any network load.

    But this is not how it works. With the integrated extension there is only one process doing all the control. Not one per receiver channel as before. So there are not multiple, simultaneous requests for antenna status that might get inconsistent results while an antenna switch is in progress.

    But as I mentioned in my previous post, this is all changing. Due to the slow response time observed with the MS switches all of the scripts are being changed. The current antenna status will be returned after each antenna change without any additional polling to eliminate the extra switch commands and speed up the process.

    So unless you want to send me your script and have it included in the source code you'll have to look at the modified Snaptekk script in the next release and make similar changes to your script.

  • Hi,

    ah, I did not connect the pieces on the typo, sorry.

    What do you mean with ˋyour scriptˋ? I just listen and react to commands via TCP using snaptekk syntax. I’m fine with any other syntax as long it can be connected via network.

    Thanks!

    Eckhard

  • Okay, so to use your custom device you are just using the standard Snaptekk script. I somehow had the impression you were using a modified one based on the Snaptekk script that would require the changes I am making now.

    I hope to have a Kiwi release, maybe today, with the latest antenna switch fixes.

Sign In or Register to comment.