sdr.hu listing?

Hello,

I installed sdr-spectrum-monitor and running OpenWebRX. I can see my dns site outside mynetwork but It is not listed in SDR.HU. Does sdr-spectrum-monitor sends a POST request to sdr.hu/update?

Thanks!

Hi,

Thanks for the question but I’m not sure if it’s related to balenaOS or other balena services, can you please elaborate?

It is a service called “sdr-spectrum-monitor-master” running on balena cloud. I moved it to the correct category.
@alanb128 might be able to help.

Hi,

Could I ask, why do you think it should show on their website – I don’t see any references to it doing that in the blog/docs. Is this a feature of the software that is just missing in our implementation?

Hi,
It is in the config file the option to be listed in their website.

==== sdr.hu listing ====
If you want your ham receiver to be listed publicly on sdr.hu, then take the following steps:

  1. Register at: http://sdr.hu/register
  2. You will get an unique key by email. Copy it and paste here:
    sdrhu_key="**************************"
  3. Set this setting to True to enable listing:
    sdrhu_public_listing=True

Have you done as it instructs in the listing, and confirmed it doesn’t work? This seems like an issue with OpenWebRx software, rather than something lacking in the repo we provided. I would suggest you give the recommendation a shot and it should work; change the file on your local copy, then push to balena to make a new build and have the device pull it down :+1:

Thanks for your answer, my question was if your implemetation is sending a POST request to sdr.hu/update.

Arethe bolow included?

import config_webrx as cfg, time, subprocess

def run(continuously=True):
    if not cfg.sdrhu_key: return 
    firsttime="(Your receiver is soon getting listed on sdr.hu!)"
    while True:
        cmd = "wget --timeout=15 -4qO- https://sdr.hu/update --post-data \"url=http://"+cfg.server_hostname+":"+str(cfg.web_port)+"&apikey="+cfg.sdrhu_key+"\" 2>&1"
        print "[openwebrx-sdrhu]", cmd
        returned=subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE).communicate()
        returned=returned[0]
        #print returned
        if "UPDATE:" in returned:
            retrytime_mins = 20
            value=returned.split("UPDATE:")[1].split("\n",1)[0]
            if value.startswith("SUCCESS"):
                print "[openwebrx-sdrhu] Update succeeded! "+firsttime
                firsttime=""
            else:
                print "[openwebrx-sdrhu] Update failed, your receiver cannot be listed on sdr.hu! Reason:", value
        else:
            retrytime_mins = 2
            print "[openwebrx-sdrhu] wget failed while updating, your receiver cannot be listed on sdr.hu!"
        if not continuously: break
        time.sleep(60*retrytime_mins)

if __name__=="__main__":

The actual OpenWebRx code is pulled from their repo - it’s all in the Dockerfile :+1:

It not clear if you have done as the config expects; registered for a key, and then pushed the modified config containing the key to your application in balenaCloud. Do that, and then if the device doesn’t register after that then perhaps there is an issue :+1:

I did register a key, pushed it in balena cloud, the dyndns adress is visible outside my network, openwebrx is running, but still nothing is listed in SDR.HU.
I can see the following at the logs when the listing site tries to communicate:

24.03.20 09:30:45 (+0200) 64.20.60.14 - - [24/Mar/2020 07:30:45] code 501, message Unsupported method (‘POST’)
24.03.20 09:30:45 (+0200) 64.20.60.14 - - [24/Mar/2020 07:30:45] “POST /login.gch HTTP/1.1” 501 -
24.03.20 09:30:45 (+0200) 64.20.60.14 - - [24/Mar/2020 07:30:45] code 501, message Unsupported method (‘POST’)
24.03.20 09:30:45 (+0200) 64.20.60.14 - - [24/Mar/2020 07:30:45] “POST /manager_dev_ping_t.gch HTTP/1.1” 501 -
24.03.20 09:30:45 (+0200) 64.20.60.14 - - [24/Mar/2020 07:30:45] code 404, message Invalid path.
24.03.20 09:30:45 (+0200) 64.20.60.14 - - [24/Mar/2020 07:30:45] “GET /getpage.gch?pid=1001&logout=1 HTTP/1.1” 404 -

Since the code for posting to sdr.hu is being pulled “as-is” from the OpenWebRX repo, it looks like the line in sdrhu.py that actually does the post (begins with cmd = "wget --timeout=15 -4qO- https://sdr.hu/update) may be conflicting with the public URL of your device. You mentioned a “dyndns address” but are you using the balena public device URL? (*.balena-devices.com) I don’t have a callsign so I can’t register at sdr.hu to get a key myself and test, however I would try replacing "url=http://"+cfg.server_hostname+":"+str(cfg.web_port) with url=<your device URL> in the sdrhu.py post line. You would have to add this modified file to your local repository and then copy it over in the install.sh file when you re-push the application.

1 Like

Thank you Alan. Tell me when it wil be ready and I wiill try again.

Hi @sdoros,

I’m not sure there’s something that needs to be ready on our end. Have you tried Alan’s suggestion of replacing "url=http://"+cfg.server_hostname+":"+str(cfg.web_port) with url=<your device URL> in the sdrhu.py post line?

Cheers,
Nico.

I can’t find the sdrhu.py file, seems that my knowledge is not enough to continue.
Thanks all for your help and time.

Hello @sdoros,
I just made a change to the project so please clone or download the latest “sdr-spectrum-monitor” repository and push to your device. You can then add a device variable in the dashboard named ORX_SDRHU_KEY with your sdr.hu key as the value. Once the variable is added and the application restarts, it should attempt to register using that key. Since I don’t have a key I can’t fully test so let us know if this works for you.

Hello Alan, this worked.
Thanks again.