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.
Thanks
Dave
M0TAZ
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.
Thanks
Dave
M0TAZ
Comments
Usage: kiwirecorder.py [options]
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
list)
--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
-f FREQUENCY, --freq=FREQUENCY
Frequency to tune to, in kHz (can be a comma-separated
list)
-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
list)
-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
The program suite is called Kiwiclient.
https://github.com/jks-prv/kiwiclient/tree/jks-v0.1
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 kiwirecorder.py 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/kiwirecorder.py -s southwest.ddns.net -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
There you will find a Makefile containing a bunch of use cases for the many arguments the program accepts.
That has solved that error
Now for the next error ImportError: No module named 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.
I have followed the instructions in the readme file.
Help please.
Cannot seem to get to it from https://github.com/jks-prv
I am learning. Thanks
Thanks..
Use the "-s" and "-p" arguments to specify the host (server) and port (almost always 8073). For example a Kiwi with the URL name "my_kiwi.com:8073" would be specified to kiwiclient as "-s my_kiwi.com -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 github.com 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.
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. https://g8jnj.net/vdsl
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.
Regards,
Martin - G8JNJ
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.
I am sure there will be some more questions.
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 ;-)).
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 python.org 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 numpy.py (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:
Numpy==.1.15.4
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:
https://github.com/jks-prv/kiwiclient/tree/jks-v0.1
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 kiwirecorder.py -help
This gives you a list of all the options. Here are most of them:
Now run, for example, from the cmd line:
python kiwirecorder.py -k 30 -s bonaire.twrmon.net -p 8073 -f 800 -m am --tlimit=30
This will save the audio file in the kiwi folder with the name.
20181130T0942007_800000_am.wav
Or try
python kiwirecorder.py -k 30 -s 192.168.100.10 p 7083 -f 1170 -m am -tlimit=15
This will recorder a 15 second audio sample of AM on the frequency of 1170
Hey, the years have flown by...
Just tested Kiwiclient and specifically the kiwirecorder.py on Python3.11 and it seems to all work! (-:
Thank you to all who are working on the Kiwiclient.
PS.. Been updating my Raspberry Pi from Debian 10 to Debian 12.