The KiwiSDR 2 online store is open for orders! Please visit kiwisdr.nz
Realtime frequency/mode change via the jks-prv/kiwiclient library?
Is there some documentation on how a monitored frequency can be changed via this library?
Regards Olaf - LA3RK
Regards Olaf - LA3RK
Comments
There is something called catsync which apparently can do this, but does only run in windows and not on linux.
Another option is to open a 10 kHz IQ channel and process locally, but this uses extra bandwidth and once a retune out of the 10 kHz window is done, a retune would be needed.
73 de Olaf - LA3RK
Had to do "winetricks vcrun2013" to get the right C++ version and installed wine complete etc.
I thought I'd get it going then list steps but ran out of lunch and motivation (all remote, no rig to test if I had got it running).
The question is how can the rx be retuned/reset within through that library.
Using catsync via wine on linux is not a good solution. Amongst other catsync relies on a rig control solution which does not run under linux and accessing serial ports or usb ports via wine complicates matter further. Wine is best suited for simpler apps screen/mouse/keyboard only. Linux apps normally use rigctld (hamlib) for rigcontrol or to read rigsettings.
PS I may be using the term library incorrectly, not a programmer by trade.
73 de Olaf - LA3RK
The control commands sent to the Kiwi are very simple (e.g. set frequency, mode etc.) and you should be able to see what's being done just by inspection of the code. The real problem comes with how to deal with network and audio interfacing for the particular OS and programming language/environment you're working with. Kiwiclient is relatively straightforward because being written in Python it can just use the Python web socket library Also, it only records audio and waterfall data to files. If you want to do realtime audio output that's a whole new level of complexity and pain.
For Mac people, I just found this work by Chris yesterday: https://www.blackcatsystems.com/software/kiwiSdr-sound-client-virtual-audio-device.html
But I have to find out how to retune in real time, currently rx frequency is input on commandline and can not be changed when running.
Program was found on adress: https://www.blackcatsystems.com/software/kiwiSdr-sound-client-virtual-audio-device.html and was originally written for mac as indicated by jks.
Since python also works nicely on linux, I would assume that I can get it kiwisound.py also to work on one of my linux computers.
Another matter is that it seems that requested frequency on lsb is off compared to the kiwisdr web interface as I do not hear the same signal. Have not had time to track this issue further.
73 de Olaf - LA3RK
kiwi_nc doesn't seem to output a wav format like kiwirecorder, what is the format?
I didn't quite realize that kiwisound.py is able to play to an output device in addition to VACs if the output device appears in the list returned from "python -m sounddevice". That is useful.
Thanks for all help.
73 de Olaf - LA3RK
I think it should work on any platform? Although I have not tested it on anything other than my Mac. I wrote it specifically to scratch an itch, I wanted to be able to decode SSTV, fax, etc from my Kiwi without using a browser and messing around with rerouting its audio. One thing I'd like to fix is how the sound device is specified, I'd rather do it by name than index since the devices can move around. The problem is it "mostly works" this way so I am too lazy to fix it.
I just read that sounddevice is a wrapper for PortAudio and the later claims to be portable across platforms. But I know even less about that stuff than I do about Python.
Add the following somewhere around line 33 in kiwisound.py:
options.S_meter = False
(with proper indention)
It works well in Linux to port audio over directly to fldigi/JS8call/WXJT-X - just add a dummy ALSA device.
Olaf any further progress on your Kiwi API modification that allows frequency change with audio running ?
bregards, Ben