Kiwirecorder 101

OK, I need pointing in the correct direction, Kiwirecorder.

I don't really understand what this does, so I searched the forum. Unfortunately, I found lots of posts with the keyword but was unable to find anything explaining how it's used and what it does.

Any help/links appreciated.



  • edited September 2018
    Perhaps this helps

    Usage: [options]

    -h, --help show this help message and exit
    --log-level=LOG_LEVEL, --log_level=LOG_LEVEL
    Log level: debug|info|warn|error|critical
    -q, --quiet Don't print progress messages
    -k SOCKET_TIMEOUT, --socket-timeout=SOCKET_TIMEOUT, --socket_timeout=SOCKET_TIMEOUT
    Timeout(sec) for sockets
    -s SERVER_HOST, --server-host=SERVER_HOST
    Server host (can be a comma-delimited list)
    -p SERVER_PORT, --server-port=SERVER_PORT
    Server port, default 8073 (can be a comma delimited
    --pw=PASSWORD, --password=PASSWORD
    Kiwi login password (if required, can be a comma
    delimited list)
    -u USER, --user=USER Kiwi connection user name
    --launch-delay=LAUNCH_DELAY, --launch_delay=LAUNCH_DELAY
    Delay (secs) in launching multiple connections
    Frequency to tune to, in kHz (can be a comma-separated
    -m MODULATION, --modulation=MODULATION
    Modulation; one of am, lsb, usb, cw, nbfm, iq
    --ncomp, --no_compression
    Don't use audio compression
    --dt-sec=DT Start a new file when mod(sec_of_day,dt) == 0
    -L LP_CUT, --lp-cutoff=LP_CUT
    Low-pass cutoff frequency, in Hz
    -H HP_CUT, --hp-cutoff=HP_CUT
    Low-pass cutoff frequency, in Hz
    --fn=FILENAME, --filename=FILENAME
    Use fixed filename instead of generated filenames
    (optional station ID(s) will apply)
    --station=STATION Station ID to be appended (can be a comma-separated
    -d DIR, --dir=DIR Optional destination directory for files
    -w, --kiwi-wav Use wav file format including KIWI header (GPS time-
    stamps) only for IQ mode
    --kiwi-tdoa Used when called by Kiwi TDoA extension
    --tlimit=TLIMIT, --time-limit=TLIMIT
    Record time limit in seconds
    -T THRESH, --threshold=THRESH
    Squelch threshold, in dB.
    -g AGC_GAIN, --agc-gain=AGC_GAIN
    AGC gain; if set, AGC is turned off (can be a comma-
    separated list)
    -z ZOOM, --zoom=ZOOM Zoom level 0-14
    --wf Process waterfall data instead of audio
    --snd Also process sound data when in waterfall mode
  • edited September 2018
    The program suite is called Kiwiclient.

    I use it to record when I'm not there, or to obtain an audio file for further uses. I was interested in DRM and would not stay up late or get up early to seek a DRM station. So I setup cron jobs to do the recordings and then listened to them later. Below is an example:

    Now for a cron job to start and stop the recorder. I think I might manage that... Is there a way to specify the recording length time on this recorder?

    So how to start and stop the using crontab (ie. cron job)
    add these commands in crontab:
    ron@linux-4cdz:~> crontab -e

    # DO NOT EDIT THIS FILE - edit the master and reinstall.

    # (/tmp/crontab.JBGmN4 installed on Thu Nov 23 10:37:32 2017)
    # (Cronie version 4.2)
    # .---------------- 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 12 * * * python ~/kiwiclient-jks-v0.1/ -s -p 8073 -f 5955.00 -m iq -L -5000 -H 5000
    30 12 * * * for pid in $(ps -ef | awk '/python/ {print $2}'); do kill -9 $pid; done

    I haven't used it for a while and have not checked for updates. So there may be new options or features not described in this limited example.

    Ron - KA7U
  • As Jim and Ron have pointed out is the correct version.
    There you will find a Makefile containing a bunch of use cases for the many arguments the program accepts.
  • Thanks, thats great should give me something to get stuck into TA
  • I am trying to run the I am getting the error import mumpy as np and ImportError: No module named numpy. Where do I find
  • I am now installing numpy. sudo apt-get install python-numpy
    That has solved that error :)
    Now for the next error ImportError: No module named mod_pywebsocket :/
  • edited September 2018
    apt-get install mod_pywebsocket <--- IGNORE, see next post
  • jksjks
    edited September 2018
    apt-get install mod_pywebsocket
    No, don't do that. The mod_pywebsocket you must use is right there in the sources. Figure out why your Python isn't using the current directory for imports.
  • How do I install mod_pywebsocket?
  • I have downloaded the zip file.
    I have followed the instructions in the readme file.
  • Now getting ImportError: No module named kiwiworker :(
    Help please.
  • where do you have this stuff installed? What directory? and what directory are you in when you invoke the command?
  • Hi, I have now found the file and added it to my directory. My directory is /Documents/KiwiSDR. I am running Ubuntu Desktop.
  • Now getting the error Failed to connect when I run ./kiwirecorder. Making progress. OK I see I may have installed the wrong mod_pywebsocket.
  • I would never have know about if you had now posted it here.
    Cannot seem to get to it from
  • OK, I should have downloaded the whole zip file and not just
    I am learning. Thanks
  • I now run ./ -h and get the help info :) Trying to work out how to connect to a kiwiSDR? Do you have a sample instruction line for me - just to do a 2 minutes audio recording?
  • The crontab file that KA7U listed above has a sample
  • The file "Makefile" has examples of how to combine the various program arguments to get desired results. Use the argument "--tlimit=120" or "--time-limit=120" to record for 2 minutes.

    Use the "-s" and "-p" arguments to specify the host (server) and port (almost always 8073). For example a Kiwi with the URL name "" would be specified to kiwiclient as "-s -p 8073".

    Note that argument names with a single character use only one dash ("-s") and multi-character use two dashes ("--tlimit"). This is standard Unix/GNU notation.

    Git and take a long time to understand. It fails the "simple things should be simple" principle. It's years after I started using it and I still struggle to figure things out sometimes, lol.
  • Has anyone tried using /dev/urandom and pacat to play the audio from kiwirecorder real-time?
  • I've been reading this tread with interest.

    I have a project that this may possibly help with.

    I'm trying to make noise floor measurements whilst driving around urban areas in order to assess the interference from broadband over copper VDSL services that are problematic in the UK.

    My initial attempts are shown on this webpage.

    What I would like to be able to do is monitor up to eight (or more) spot frequencies and log the signal level and location (GPS Lat Long) at regular intervals as I drive around. The data would be stored locally and analysed later in order to produce calibrated 'heat maps' showing the worst affected areas.

    I have asked a couple of SRD software authors if they would consider adding a GPS / signal strength logging option to their existing products, and although sympathetic to the suggestion it's not likely to be implemented anytime soon.

    I wondered if it would be possible (or practical) to add signal strength and GPS position 'stamping' options to KiwiClient so that I could use a KiWi as the mobile receiver for this project ? The ability to set a defined sample rate would be useful too.

    It would also be handy for other applications such as field strength monitoring, antenna pattern measurement, propagation monitoring and more.


    Martin - G8JNJ
  • The Kiwi sampling process in the TDoA extension is done with kiwiclient/kiwirecorder of course. Christoph added an option to save GPS timestamp information when an IQ file is saved. S-meter information comes across the network connection to kiwirecorder, but it is not stored in the file at present. The timestamps are stored in special RIFF chunk types of the .wav file. Some .wav players successfully ignore these chunks as per the RIFF spec. But with others it prevents the file from being played which is unfortunate.

    If necessary it should be relatively easy to create parallel files containing the timestamps and S-meter information without disturbing the playback ability of the .wav files. Changing the sampling mode is much more difficult as it requires a resampling process. If there is an audio library accessible from Python that does this that's one thing. But if it needs to be written from scratch that's another. There are a number of resamplers in the Kiwi code but they're always a problem to get working correctly.
  • Many thanks to jks and WA2ZKD. I now have Kiwirecorder working.
    I am sure there will be some more questions.
  • Martin, on the project, one idea (admittedly off-the-wall) came to me, flight controllers for small drones often have logging of GPS location and other parameters (like current derived from a shunt).
    Stick a stand alone flight controller in a small plastic box on your car, use the output of a RF detector to drive the current detection voltage and go for a "flight" locally at the end of the flight export the data and you'll have location and correlated "current" AKA RF field strength.
    I haven't used one for a bit but I used to export flights straight into Google earth, if you could trick the RF to appear as altitude it would be an easy single button export, not a heat map but if scaled properly would give a good 3D feel for the value.

    The Ardupilot is probably a well supported and inexpensive test item.
    E.G. Ardupilot APM 2.8 - Banggood ~£25 + GPS antenna, ~£15

    Also some have I2C or S-Bus inputs (may even be auxiliary A-D) so there should be quite a few ways to fool it into recording what you present.
    Nothing to stop you using telemetry to show the current location and values on a tablet/laptop as you drive (passenger use obviously ;-)).
  • Getting kiwirecorder to work on Windows 10. I hope these note may help someone.
    Sorry no pictures.
    The kiwirecorder is written in Python, so Python 2 must first be installed.

    Step 1
    Install the latest version of Python 2 on Windows 10.
    Go to and download Python 2.7.15 (May 2018) for Windows.
    Windows x86-64 MSI installer was the file I found and downloaded to install Python 2.
    This version comes with PIP which is needed later to install Python Modules.
    Python 2 does seem to give you the option to select adding it to the Windows OS PATHS.

    So, add your Python2 folder and the folder Python2\Scripts to the Environment Variables.
    In Windows 10 just search for Environment Variables and add c:\Python2 and c:\Python2\Scripts to the Path in user variables. And also to the System Variables Path

    Click on the Search area on Windows 10 and type cmd to get into the cmd line.
    Type cd .. and cd .. to get to c:\

    Type: python --version
    - just to check that python is working. You should get:
    Python 2.7.15

    Install (module for python - this does all the big number crunching like Fast Fourier stuff)

    On the windows command line:
    pip install numpy

    Type: pip freeze
    - just to check what modules are installed You should get:

    Step 2
    Now to get the KiwiSDR API called kiwirecorder working.
    Make a folder kiwi in the C:drive i.e c:\kiwi

    Go to:

    Click on Clone or Download and then Download ZIP
    Download the whole folder – the zip file.
    Unzip this file into the directory C:\kiwi

    Step 3
    Type cmd in the search area to get back into the cmd line.
    Type c: \kiwi to get into the kiwi folder.

    Type pip install mod_pywebsocket to install the pywebsockey stuff
    - Must use the one in the kiwiClient zip file downloaded in Step 2.

    Now run from cmd line run:

    python -help
    This gives you a list of all the options. Here are most of them:

    Now run, for example, from the cmd line:

    python -k 30 -s -p 8073 -f 800 -m am --tlimit=30

    This will save the audio file in the kiwi folder with the name.

    Or try

    python -k 30 -s p 7083 -f 1170 -m am -–tlimit=15

    This will recorder a 15 second audio sample of AM on the frequency of 1170
Sign In or Register to comment.