The KiwiSDR 2 online store is open for orders! Please visit kiwisdr.nz

WSPR autorun control

I have 1 channel of autorun on my main kiwi and 4 channels on a 2nd kiwi.  I am currently manually changing the bands on the second unit depending on TOD. Are the band assignments kept in a file? If so, perhaps I can run a cron script to swap config files and restart the unit to do it automatically.


Comments

  • jksjks
    edited April 2018
    The JSON variables in kiwi.config/kiwi.json called WSPR.autorun[0-3] are set to the following numeric values to select the band:
       0:'regular use', 1:'LF', 2:'MF', 3:'160m', 4:'80m_JA', 5:'80m', 6:'60m', 7:'60m_EU',
       8:'40m', 9:'30m', 10:'20m', 11:'17m', 12:'15m', 13:'12m', 14:'10m'
    So yes, you could move around files with different values. You should really only do that while the server is stopped because you don't want to have changed files then have the server come along and update the file with a new configuration parameter value (for whatever reason) and clobber your changes.

    Look at the mst and msa command aliases, and their corresponding Makefile rules, for hints how to stop and start the server correctly.

  • edited April 2018
    thanks...

    sample of what I'll use

    #!/bin/bash

    # switch wspr autorun bands

    systemctl stop kiwid.service

    cp /root/kiwi.config/band.json /root/kiwi.config/kiwi.json

    systemctl start kiwid.service
  • I have this all working and it is doing well. Currently I only have 2 periods, day and nite. Here is the way I did it.  I use one kiwi with all the channels allocated to autorun.

    Step 1: pick which four bands toy want for each period and using the admin page, set 4 up and let it run. 
    Step 2: login via ssh and go to /root/kiwi.config and copy kiwi.json using the cp command: "cp kiwi.json day"  or nite or what day you use for that period
    Step 3: repeat 1 and 2 for the other periods
    Step 4: create a shell script in /usr/local/bin called wsprctl:

    #!/bin/bash

    # switch wspr autorun bands

    systemctl stop kiwid.service

    cp /root/kiwi.config/$1 /root/kiwi.config/kiwi.json

    systemctl start kiwid.service

    step 5: chmod that file so it can execute:  "chmod +x wsprctl"
    step 6: add these lines to /etc/crontab (note you you'll likey want different times
    11 12   * * *   root    /usr/local/bin/wsprctl day
    11 23   * * *   root    /usr/local/bin/wsprctl nite 


  • I don't understand this line in the script.
    cp /root/kiwi.config/$1 /root/kiwi.config/kiwi.json

    Please tell me what is going on with the $1 variable.
    Ron
    KA7U
  • Ron...

    Look in the crontab entries...    day and nite get passed to wsprctl as $1 

    date and nite are the previously saved file names
  • OK, now I see what you have. $1 is assigned the file name following the call to wsprctl in the crontab. Haven't used that feature.
    Ron
    KA7U
  • one scipt can call... day, nite, late, and many files    day.json if you wish

    KA7U
  • This scheme is running very well. I created another .json file for catching  476 KHz and low end stuff at 0800Z.  I need to let those run a few days then review my loggings on wsprnet.org and get the  switchover times refined to for changing propagation.

     
  • By scheduling the 4-channels on my dedicated wspr kiwi, I have been able to log stations on every band, 137 KHz through 15M in less < 1 week.

    LX1DQ
  • edited May 2018
    revised script

    #!/bin/bash

    # switch wspr autorun bands

    systemctl restart kiwid.service

    cp /root/kiwi.config/$1 /root/kiwi.config/kiwi.json


Sign In or Register to comment.