installing Kiwirecorder on Ubuntu 16.04?

Hi,

I am new here and I have begun to do a lot of monitoring of the various SDR's from all over the world. I have tried using KiwiSDR's built in recorder, but I am often returning to find interruptions and complete loss of recording sessions.

Since I am on Ubuntu 16.04, I recently came across KiwiRecorder that can supposedly do a much better task, but I am at a loss as to how to install it. I tried following the only instructions I could find here, but I am unable to get very far due to many missing dependencies and I don't know how to proceed from there.

If anyone could lend some assistance, either to maybe more complete instructions and/or maybe a different recorder (more GUI based?) that is up to the task, please share. I just tried recording with Audacity, which is my audio editor on Ubuntu, but if the KiwiSDR goes down or gets interrupted, I still come back to minutes or hours of data lost. Just looking for a better way, and a way I can understand.

Thanks in advance for any help or pointers,
Jon
«1

Comments

  • Although it is getting to be a bit dated - and is catered mostly toward use for WSPR decoding, there is this:

    http://ka7oei.blogspot.com/2018/10/a-quick-and-probably-incomplete-guide.html

    This may help you install Kiwirecorder, but not much about using it.

    73,
    Clint
    KA7OEI
    WA2ZKD
  • Hi Clint,

    That's the same link I posted in my question, but it looks like you are the author, is that correct? I got down to the part about installing wsjtx. I tried first the commands you posted, but then had to go to the site (princeton.edu) to get the one for my system. I ended up with a bunch of errors, similar to the part you mention about libgfortran3, but many other missing dependencies as well. I tried finding instructions to auto install the missing dependencies, but I still wasn't able to correctly install wsjtx. By the way, I think I had to go with libgfortran4 instead of 3, not sure.

    Although I've been a Linux user for several years now, I still don't get into the depth others do and quickly lose a task if instructions/ commands don't go exactly as implemented.

    BTW, I am interested in only recording the 16 bit wave audio files like the KiwiSDR offers, but there are so many interruptions and cut offs, stalling, etc that I haven't been able to use it reliably.

    Thanks,
    Jon
  • edited May 2019
    ignore
  • jksjks
    edited May 2019
    He just wants to record files (incrementally so as not to lose anything during an interruption).

    Don't need to install any of the WSPR/wsjtx stuff.
  • jks, what would I need to install? I'm with you, I just don't know what I can use.
  • jksjks
    edited May 2019
    Okay, I just did this on a Ubuntu 17.10 distro and it seemed to work:
    sudo apt install python
    python --version (confirms python 2.7, not 3.x, was installed)
    sudo apt install python-numpy
    sudo apt install git
    git clone https://github.com/jks-prv/kiwiclient.git
    cd kiwiclient
    make help
    (kiwirecorder.py help will print)
    ping kiwi-ip-address (make sure Ubuntu can see your Kiwi)
    ^C (to stop ping)
    export KIWI_HOST=kiwi-ip-address (for Bash, different for other shells)
    make real (record a real mode [i.e. non-IQ] file)
    ^C (to stop recording)
    ls -lt (recorded .wav file should be at top of list)
    
    Look at the "Makefile" file to see examples of how kiwirecorder.py is invoked to do different things.
    VR2BG
  • edited May 2019
    jks, thanks, but when I get down to checking ping kiwi-ip-address, I get: ping: unknown host kiwi-ip-address. When googling this, it looks like I need to have an actual receiver? I don't. I just use the software provided by KiwiSDR in my browser (Firefox) to access stations from the SDR map. I don't own any receivers currently, just what I can access at sdr.hu.
  • Sorry Jon, I saw you "got down to the part about wsjt-x"... so thought you were trying for that (too)
  • If you don't own your own Kiwi then replace "kiwi-ip-address" with the hostname part of the URL that appears in the address field of your browser when you connect to any Kiwi. So if the URL is: "www.websdr.at:8073/" then use a command of "export KIWI_HOST=www.websdr.at"
  • jks, that seems to be doing the job, thanks! Currently doing a test recording just to see how things go. It looks like I'll be getting 32 bit, 12 Khz wave files which is right on target. Just out of curiosity, it doesn't look like I could record at different sample rates on the fly like at 16 bit, 44 Khz? I think I could resample later when I look over the help file, but not record that way live.

    I have one final question for now. A week ago, I recorded an IQ wave file using just using just the red record button embedded in the KiwiSDR software. I find it nearly impossible to edit correctly in an audio editor in its current form, so is there a way I can convert this to a standard wave file like I am recording now?

    Thanks again!
  • Ok, for at least one of the IQ files I had from an KiwiSDR receiver, I was able to open and also could actually record (or re-record I guess) as 16 or 32 bit wave. For the other, SDRSharp, the program I'm using, crashes.

    I have an update on what I thought earlier: Kiwirecorder is capturing at 16 and not 32 bit, which is fine, but my editor's default is set at 32 bit which threw me off.

    I'm trying out the squelch threshold feature for a couple of SDR's. I am assuming it works like a standard S meter, so if I set it at 36 dB, for example, it would take at least an S6 to start recording. Please correct me if I'm wrong.

    Finally, those who have more knowledge about scripting and such, I wonder if it would be possible to create a script so I can just click on the script to start recording the stations; also, even more challenging, is there any way to set up kiwirecorder to start auto recording at a specified time?

    Thanks again,
    Jon
  • @Jon5 , you can setup a cron job in Ubuntu to start and stop your scripts:
    ron@linux-4cdz:~> crontab -e

    # .---------------- minute (0 - 59)
    # | .------------- hour (0 - 23)
    # | | .---------- day of month (1 - 31)
    # | | | .------- month (1 - 12) OR jan,feb,mar,apr ...
    # | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
    # | | | | |
    # * * * * * command to be executed
    # * * * * * command --arg1 --arg2 file1 file2 2>&1
    00 17 * 6 thu python ~/kiwiclient/kiwirecorder.py -s ka7u.no-ip.org -p 8073 -f 7490.00 -m iq -L -5000 -H 5000 &
    30 17 * 6 thu for pid in $(ps -ef | awk '/python/ {print $2}'); do kill -9 $pid; done

    After you make your changes to the crontab, you save it with:
    :wq

    You can create bash scripts that will auto run:
    #! /bin/bash
    #
    python ~/kiwiclient-jks-v0.1/kiwirecorder.py -s southwest.ddns.net -p 8073 -f 3965.00 -m iq -L -5000 -H 5000

    After you save this type of file, make it executable:
    chmod +x test

    ron@linux-4cdz:~> ls -lt test
    -rw-r--r-- 1 ron users 0 May 3 14:53 test
    ron@linux-4cdz:~> chmod +x test
    ron@linux-4cdz:~> ls -lt test
    -rwxr-xr-x 1 ron users 0 May 3 14:53 test

    So this file can be clicked on from the GUI and run, or it can be run from the command line:
    ./test
    or if not in the directory it resides, by specifying the full path to the file.
    Ron
    KA7U
  • Hi Ron,

    I wish I knew how to work with that script; can you give me an example, perhaps if I wanted to record a specific site, say yours, at 10 AM today and then stop at 1 PM? The problem with scripts for me is that it takes me forever to get the punctuation correct. This was the problem I had with the kiwirecorder. When I would look at the help file, it would seem to show, at least in my mind, at least two or more ways per command to implement it, when only one way would be right. If you could give me an example script, I'll be able to go from there I think. I wasn't even aware of "cron" until I brought it up in Ubuntu. Pretty elementary my Linux knowledge when it gets technical, although I do really like it for the net.

    By the way, I did come across your site. Am most impressed by the DIY loop and I was surprised that the preamp wasn't that expensive at all. Since my space is severely limited, should I re-enter the SDR hobby with my own receiver, I'll almost have to go with a compact loop.

    I pretty much understand kiwirecorder now thanks to, at least in part, the group's help. I'm still not quite sure how to figure out the squelch threshold. I would pick an S unit, say 6 S units, then set it for 36 db but it doesn't seem to work that way, so would appreciate any thoughts. One thing that is somewhat annoying is that one of the sites I've been trying to record seems to switch their site at least twice weekly so an IP I set up for Monday won't work on Tuesday; sometimes I don't seem to be able to record at all and kiwirecorder just hangs.... perhaps there is a time limit per day?

    Anyway, thanks for the group's help. I wouldn't have gotten this far had I not joined up to get more specifics. It's interesting to be able to open an IQ file in SDR Sharp and have most functions available as if it had been live. If anyone can suggest something better than SDR Sharp and still free, please share. I do run SDR Sharp on Win as a portable file so I didn't have to install it.

    Thanks once again in advance,
    Jon
  • Jon... without knowing what your endgame is.... I never use SDR#... I take the I/Q stuff either live or recorded and feed it to program like Sodira or SpecLab which you can run with wine
  • WA2ZKD, I wanted to have the ability to adjust each side of the passband independently like offered in the KiwiSDR online software. SDRSharp allows adjustment of both sides simultaneously, but not each independently; nor does Sodira seem to offer it. I don't have to stay in Linux for IQ viewing/ recording later as I have spare Win machines if needed. I'll have to check out SpecLab. Thanks.
  • Kiwirecorder allows you to adjust the passband independently just like the Kiwi browser UI.
    See the -L/-H or --lp-cutoff/--hp-cutoff parameters and examples in the "Makefile" file.

    Also the --tlimit/--time-limit parameters to limit the length of a recording. There currently is no option to schedule the recording start time.

    Kiwi sites using dynamic ip addresses that change frequently as their URL is bad practice. Much better to use one of the free DDNS/DUC providers so their Kiwi can have a fixed domain name as the URL.
  • jks, yes I saw and tried setting the passbands in kiwirecorder. Unfortunately, they didn't seem to work and an offending signal off to the side of the main was still present, even though I had calculated with the KiwiDSR where they should be.

    I'm not sure what's going on with the sites I was talking about. I don't think they're changing IP's as I thought; it seems there are two or more separate receivers. So, sometimes I get the one when clicking from the map, but sometimes the other... but only one spot appears on the SDR map. I'm pretty new to all this, so it's probably something I don't know about yet.
  • Jon, there's a redirect function a kiwi owner can set up that might cause you getting an alternate kiwi

  • edited May 2019
    Jon, make sure you are using the minus sign on your passband, eg: /kiwiclient/kiwirecorder.py -s 192.168.1.6 -p 8073 -f 3330 -m iq -L -5000 -H +5000 --log-level=info --dt-sec=360 --station=CHU

    I missed that the first time
  • FWIW, I just took an IQ file I recorded on me Kiwi & played it in SDR#... both with SDR#'s "IQ file" mode, as well as with the IQ File Player plug-in written by Vasili (from rtl-sdr.ru).

    73, VR2BG.
    WA2ZKD
  • Note that passbands are specified in a way that might not seem obvious for LSB reception. While you would say "-L 300 -H 3300" for a 3000 Hz wide USB passband the equivalent for LSB is "-L -3300 -H -300". The easiest way to understand this is to zoom in and mouse over the yellow passband graphic in the Kiwi UI and look at the values displayed for passband low, high, center frequency, bandwidth and carrier point as you mouse over different parts of the passband. The passband low/high points are always read left-to-right.

    Of course the passband can be whatever you want. So you could have an asymmetrical AM passband where the low side was -5000 and high side 2500.

    In fact it is a fiction to have the modes USB, LSB and CW. Internally to the Kiwi it is really only mode SSB with USB/LSB/CW defined only by the passband shape. For example, you can get DSB simply by setting a passband that resembles an AM passband while in any of the SSB modes.
    WA2ZKD
  • @Jon5
    I wish I knew how to work with that script; can you give me an example, perhaps if I wanted to record a specific site, say yours, at 10 AM today and then stop at 1 PM? The problem with scripts for me is that it takes me forever to get the punctuation correct. This was the problem I had with the kiwirecorder. When I would look at the help file, it would seem to show, at least in my mind, at least two or more ways per command to implement it, when only one way would be right. If you could give me an example script, I'll be able to go from there I think. I wasn't even aware of "cron" until I brought it up in Ubuntu. Pretty elementary my Linux knowledge when it gets technical, although I do really like it for the net.


    I'm on the road this weekend and will be home tomorrow, but for now I'll explain the crontab file in more detail. My notes will be in line with the file and will follow after a # sign. The # sign in a bash script and many other scripts is used as a note holder. The sign and the text following won't be executed with the script. An exception is the line: #!bin bash . This line starts a bash interpreter, but no need to get into that here and besides, I might be in deeper water than I'm qualified. LOL

    Now the crontab file:

    ron@linux-4cdz:~> crontab -e # This command opens the crontab file in an editor, usually the VI editor. You will need to review the use of the VI editor.

    # .---------------- minute (0 - 59) # This string of notes shows where the time and date statements are placed on each line of the executable crontab file.
    # | .------------- hour (0 - 23)
    # | | .---------- day of month (1 - 31)
    # | | | .------- month (1 - 12) OR jan,feb,mar,apr ...
    # | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
    # | | | | |
    # * * * * * command to be executed These two lines attempt to show in general terms where the command arguments are placed on a line.
    # * * * * * command --arg1 --arg2 file1 file2 2>&1

    # the following line says "at 00 minutes, 10 hours, * day of month not specified, the 5th month May, on Sunday, do the commands
    00 10 * 5 sun python ~/kiwiclient/kiwirecorder.py -s ka7u.no-ip.org -p 8073 -f 7490.00 -m iq -L -5000 -H 5000 & #This command starts the recorder.
    00 13 * 5 sun for pid in $(ps -ef | awk '/python/ {print $2}'); do kill -9 $pid; done #This command stops the recorder.

    #After you make your changes to the crontab, you save it by pressing the esc key and then type:
    :wq


    Ron
    KA7U
  • Thanks, all. Been a little busy to reply. Well, Ron, thanks a lot, but I don't think I'm going to be able to use much scripting as I'm about finished with what I have been trying to accomplish. Thanks for taking the extra step. Just for learning purposes, I may try fashioning a script similar to what you shared above.

    jks, it's possible that I may have had the passband setting wrong in the config. I'll have to try it again to be sure. It's fairly easy to get +/- mixed up or even deleted if not careful.

    Kiwirecorder, although when it works, it's working well, I'm finding that I'm not able to record all of the SDR's I come across for some reason. I've been trying to get one recording from an SDR with "no-ip" as part of the name. I put that into Kiwirecorder and it just hangs. I even took the no-ip and did an IP look up and tried that: still hangs. However, I do see plenty of WSPR daemon going on incessantly it seems, so much be something I'm lacking.
  • did you intend to run wsprdaemon? If not, that shouldn't be running.
  • @WA2ZKD without looking it up, I'm not even sure what wsprdaemon is, but I assume another recording software. Anyway, it doesn't matter as I found out the reason for the lagging of Kiwirecorder. Nothing to do with Kiwirecorder.
  • @VR2BG for the IQ files, I find I really like SDRSharp so far. It still lacks independent right or left passband settings (although I can adjust both sides simultaneously), but it seems to offer a lot of audio filtering options and even anti-fading, something which I've never come across before.
  • @KA7U I finally came back to try and figure out how to make a cron job, but still not successful. I get the part about the format now, at least I think I do, but I'm still having trouble. For one thing, when I try and save with :wq, it's writing that in the job and I can't save. I try and shut down terminal and it asks to save, but it isn't. Let me tell you what I want to do and see if maybe you can fashion a sample line for me, maybe that will help. Basically, I want to start the job only when I'm online and I want to start it manually, so I assume that I will just make the cron executable and click on it whenever I want it to run.

    Here's what I want: Whenever I start up the job, I would like Kiwirecorder (which is located in cd kiwiclient/kiwirecorder if that's relevant) to record an IQ file for one minute starting at 15 minutes past every hour and recording for only one minute.... at 5 Mhz and I'll keep the station private for now. Then, 30 minutes past, same thing, another minute recorded from 30-31 minutes, 45-46 minutes, and then at the top of the hour also for one minute. When I go offline or want to stop, I just shut it down. Nothing automatic. However, there should be four one minute files in the kiwiclient directory for every hour that I had the job active.

    Maybe you can help me with this. I wasn't sure how to stop the recording for the end of every minute and was going to add the 60 sec time limit into the kiwirecorder string itself.

    Thanks in advance for any help. I think I'll try and give this another go today if possible.
  • @KA7U I finally got the cron job working! I hate to say it, but the problem turned out to be that I had incorrect information in the kiwirecorder path, so it was a link problem and not a cron time format problem (I have always struggled with file paths and such in Ubuntu) .

    I do have a question now though that I hope you or someone else could answer. I don't really want to keep a job set up this way and would prefer to be able to manually start and stop it. I tried creating a shell script with the cron info and got an error when I tried to execute it on the desktop as test.sh (I assume because shell does not recognize the cron time format). So, does anyone know how I could set up the cron to have more control in the way I describe?

    Thanks in advance!
  • a crude but effective way would be to rename the script to something else and let cron fail when it tries to find the missing script. Name it back when you want it to run.
  • Thanks, I may try that, but I'm still hoping to come up with a shell script that will do the cron (or equivalent thereof) when I start it up. For now, it continues to record one min every half hour. Another thing I'm trying to do it record the same frequency at the same time, but with two different passbands. I tried setting up another cron job underneath the first, putting ; after the first job to add the second, etc, but either the second job is ignored or starts the minute after the first one is done. I'd like them both to start at the same time.
Sign In or Register to comment.