Giter Club home page Giter Club logo

kiwiclient's People

Contributors

aidanmontare avatar ansgarschmidt avatar dev-zzo avatar hcab14 avatar jks-prv avatar mcogoni avatar rikvanriel avatar szpajder avatar yesand92 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kiwiclient's Issues

kiwiwfrecorder seems obsolete....

Hi,

I was delighted to find kiwirecorder this afternoon. It will be a big help with a project I'm working on. In the process, I saw kiwiwfrecorder, and did:

python3 kiwiwfrecorder.py -h
Usage: kiwiwfrecorder.py [options]

Options:
  -h, --help            show this help message and exit
  -s SERVER_HOST, --server-host=SERVER_HOST
                        Server host
  -p SERVER_PORT, --server-port=SERVER_PORT
                        Server port, default 8073
  --pw=PASSWORD, --password=PASSWORD
                        Kiwi login password
  --tlimit-pw=TLIMIT_PASSWORD, --tlimit-password=TLIMIT_PASSWORD
                        Connect time limit exemption password (if required)
  -u USER, --user=USER  Kiwi connection user name
  -f FREQUENCY, --freq=FREQUENCY
                        Frequency to tune to, in kHz
  -z ZOOM, --zoom=ZOOM  Zoom level 0-14
  --station=STATION     Station ID to be appended to filename
  --log=LOG_LEVEL, --log-level=LOG_LEVEL, --log_level=LOG_LEVEL
                        Log level: debug|info|warn(default)|error|critical

This was helpful, but then I found that kiwirecorder seems to have surpassed kiwiwfrecorder, and the docs are way better. This was not apparent to me from the README, and at first kiwiwfrecorder seemed like more what I wanted. Then I read issue #119 from 2022 that kiwiwfrecorder was going to become obsolete. It now seems to have happened. Am I correct? If so, could we have some more obvious notes in the README?

Another thing I noted: Python3 is advised now, which is great, but the example .ipynb has not been updated. I would really appreciate that myself. :-)

Thanks for this very handy software to query kiwisdr receivers!

Rob
KL7NA

Interpreting KiwiSDRStream Waterfall Stream when Zoom is 0 vs Zoom 1 through 4

Summary: The waterfall data stream is different at zoom 0 than it is at zoom 1-4 and I don't know how to interpret it when zoom=0.


I am trying to utilize the KiwiSDRStream class to receive the entire frequency span waterfall data stream (0 to 30 MHz) and plot it in a pg.plotwidget in real-time.

Example of my progress so far.
image

However, zoom 1 appears to be half of the freq span, not 0 to 30 MHz. I verified visually by comparing the wf from the web UI to the screenshot

image

When I set the zoom to 0, I get a completely different type of data stream with values between -32768 and +32768 (assuming hz) and is 2038 bytes in length (after unpacking) using the KiwiSDRStream class (as mentioned above). While inconvenient, since the length is different and I'm not doing any interpolation yet, I have to reinitialize the entire image in my graph. Also, I can't appear to find the right color map to display this data (sample results below).

image

Can you provide any insights as to what I should expect to compute differently between zoom 0 and 1-4? I originally assumed that these data streams should be the same, but it appears they are not.

Really cool library, thank you for sharing with the world. Any help you can provide would be really appreciated! Thanks!

Faxes from recorded audio files

Hello!

First, thank you for this incredible project. Amazing and helpful.

However, I am looking for the possibility to modify kiwifax.py, so it could also read prerecorded audio files and plot faxes from them. And also to parse them faster than the realtime playing (like Fldigi does), using available CPU power. As I see it, there's no obvious issue with that, as sample rate is used to precalculate other required values, so each sample from WAV file would be processed just fine.

Could I expect such a feature in the future? If not, maybe you'd be so kind enough to give me some guidelines, how to add such a feature? I'm a developer and know Python a bit, but, unfortunately, don't have experience with DSP and WAV reading.

kiwiclientd : AssertionError

Hello,

i'm trying to use kiwiclientd to pipe KiwiSDR data flow over Loopback interface.
Kiwiclient installation it's at its last release and I'm working on PREEMPT_RT Debian 5.10.140-1 (2022-09-02) x86_64 GNU/Linux.
I'm not using pulseaudio.
Kiwiclient runs perfectly when generating IQ or demodulated files.
If I try, for example :

python3 kiwiclientd.py -h

the result is :

Traceback (most recent call last):
File "/home/ugo/kiwiclient/kiwiclientd.py", line 16, in
import soundcard as sc
File "/usr/local/lib/python3.9/dist-packages/soundcard/init.py", line 4, in
from soundcard.pulseaudio import *
File "/usr/local/lib/python3.9/dist-packages/soundcard/pulseaudio.py", line 265, in
_pulse = _PulseAudio()
File "/usr/local/lib/python3.9/dist-packages/soundcard/pulseaudio.py", line 76, in init
assert self._pa_context_get_state(self.context)==_pa.PA_CONTEXT_READY
AssertionError

Python soundcard is NOT installed at user level and via PIP.

Any help will be appreciated
Best regard

Ugo

kiwi_nc: do we need the writer part?

Thanks for merging my kiwi_nc PR. Now I have a question about this:

2021-11-14 23:28:18,131 pid 24617 a.b.c.d:8073 server closed the connection unexpectedly. Reconnecting after 5 seconds

This happens every 8-or-so seconds over and over again and is caused by the fact that kiwi_nc starts two instances of KiwiNetcat object:

    for i,opt in enumerate(options):
        opt.multiple_connections = multiple_connections
        opt.idx = 0
        nc_inst.append(KiwiWorker(args=(KiwiNetcat(opt, True),opt,run_event)))
        opt.writer_init = False
        opt.idx = 1
        nc_inst.append(KiwiWorker(args=(KiwiNetcat(opt, False),opt,run_event)))

which spawns two receivers and hence two connections to the KiwiSDR:

2021-11-14 22:51:08,931 pid 24617 started sound recorder 0
2021-11-14 22:51:08,932 pid 24617 started sound recorder 1

The first one is for reading samples and this one works fine. The other one is a writer that waits for commands to be entered via stdin and sent to the server. However most Kiwis allow only one connection per IP address, so the second one gets dropped, kiwi_nc wants to reconnect, gets dropped again and so on. This floods the logs on the client and probably also on the server.

While I understand that the original netcat utility works in both directions (reading and writing), I'm not sure if the writing part has any purpose in kiwi_nc. Is there any use case for it? And if there is, how is it supposed to work, given that it needs two connections to the Kiwi? In order to be usable, it would need to be reworked somehow.

If there is no use case for this feature, I suggest removing it. I may file a PR for this.

kiwirecorder and kiwiclilent support synchronous demodulation modes

Is there a reason that the code does not support the synchronous demodulation methods of synchronous am (sam), synchronous am upper sideband (sau) and synchronous am lower sideband (sal)? As I understand it these modes are supported by the BeagleBone on the kiwiSDR.

Are there any planes to support these modes in future?

Thank you
lileswc

Is 'master' now the preferred version?

I have been installing v0.1 in wsprdeamon clients.
With this merge, is 'master' the best for me to install?

It would be helpful if there were a '-V' flag which would print out the version of the kiwirecorder.py

Options for Volume and De-emphasis

Hi,

I use kiwiclientd to output to a soundcard on a raspberry pi for monitoring of a broadcast radio station on my own kiwisdr and it's working really well, thank you for your efforts on providing great tools.

On the kiwi web interface I can turn on de-emphasis and also boost the stream volume, I couldn't locate a way to do this within kiwiclient command line options? Is this a possibility or could it be added in the future? I'm not in any way a python expert but if there's anything I can do to help contribute I'd happily try and experiment if you can point me in the right direction.

Thanks!

BtonBadger

Should it check for python3-numpy instead of numpy or python-numpy ?

Dependencies
Make sure the Python package 'numpy' is installed. On many Linux distributions the command would be similar to 'apt install python-numpy'

Although python3-numpy is installed on my Ubuntu 2104 system the install used by wsprdaemon misses numpy when checking the kiwirecorder dependencies.

The latest command should be 'apt install python3-numpy'

Demodulation of KiwiSDR

Hi!
I am wanting to measure the modulation data such as the envelop and modulation index, and I was wondering if that's possible to do with the kiwiclient even if I had to modify the code myself to get it to work.
Would that be possible? Does the kiwiclient perform demodulation or does it simply read sound data from the KiwiSDR?

kiwiclientd and python3

Hi,
This ran well with python2, which is no longer supported in debian bullseye. So I assume it is a python3 compatibility issue, perhaps you or @rikvanriel have a tip how to solve this?

 ./kiwiclientd.py 
Traceback (most recent call last):
  File "/home/helios/git/kiwiclient/./kiwiclientd.py", line 427, in <module>
    main()
  File "/home/helios/git/kiwiclient/./kiwiclientd.py", line 401, in main
    snd_recorders.append(KiwiWorker(args=(KiwiSoundRecorder(opt),opt,run_event)))
  File "/home/helios/git/kiwiclient/kiwi/worker.py", line 18, in __init__
    self._rigctld = Rigctld(self._recorder, self._options.rigctl_port, self._options.rigctl_address)
  File "/home/helios/git/kiwiclient/kiwi/rigctld.py", line 75, in __init__
    s.bind(addr)
TypeError: an integer is required (got type str)

NOTE: Debian testing (bullseye) has removed the "python" package and the '/usr/bin/python' symlink due to the deprecation of Python 2. No packaged scripts should depend on the existence of '/usr/bin/python': if they do, that is a bug that should be reported to Debian. You can use the 'python-is-python3' or 'python-is-python2' packages to restore an appropriate '/usr/bin/python' symlink for third-party or legacy scripts.
From: https://wiki.debian.org/Python

I've installed the "python-is-python3" package, since kiwicliend does not specify a python version and python2 is deprecated (pip2 is no longer available to install the required soundcard module).

kiwirecorder runs fine.

Thank you.

Working with kiwiwfrecorder waterfall data

Is there an example for reading .npy generated by kiwiwfrecorder?

I understand that there is a kind of "header" with the bin frequencies. Thats followed by ts and the wf data for each line
(According to #77 )

np.load returns a singe array containing the bin frequencies. But how do I fetch the wf data?

Is reading the waterfall npy done in any other related code where I could have a look?

Regards,
Andy

Reading IQ WAV files generated by kiwirecorder.py

I am trying to working thru the paragraph below on my Ubuntu 20.04 using Octave:
Working with the recorded .wav files
There is an octave extension for reading such WAV files, see read_kiwi_wav.cc where the details of the non-standard WAV chunk can be found; it needs to be compiled in this way mkoctfile read_kiwi_wav.cc.
For using read_kiwi_wav an octave function proc_kiwi_iq_wav.m is provided; type help proc_kiwi_iq_wav in octave for documentation.

I have recording a wav file using kiwirecorder.py, m is set to iq and using --kiwi-wav
I have installed Octave. In Octave I generated a read_kiwi_iq_wav.oct file.
I now get the following error:

proc_kwi_iq_wav.m 20211008T150350Z_702000_jnb_iq.wav
parse error:

syntax error

proc_kwi_iq_wav.m 20211008T150350Z_702000_jnb_iq.wav
^
Seems it does not like the file name that kiwirecorder.py generated.

Can you please give me some guidance
Thanks
ZS2B

KIWIFAX: ERROR: slice indices must be integers or None or have an __index__ method

Hi

I am trying to receive weather faxes with kiwifax but always getting the error:

20240207T2142Z CRITICAL: * * * * * * * *
20240207T2142Z CRITICAL: Logging started
20240207T2142Z INFO: Kiwi server version: 1.661
20240207T2142Z INFO: GNSS position: lat,lon=[+52.52,  +13.38]
20240207T2142Z INFO: Start/stop center bin: 2048; width: 68
20240207T2142Z INFO: Start side bins: 2150/1946; stop side bins: 2201/1895
20240207T2142Z INFO: Resampling factor: 3.316438
20240207T2142Z INFO: Block: 00000001, RSSI: -107 idle
20240207T2142Z INFO: Block: 00000002, RSSI: -106 idle
20240207T2142Z INFO: Block: 00000003, RSSI: -106 idle
20240207T2142Z ERROR: slice indices must be integers or None or have an __index__ method
20240207T2142Z INFO: Block: 00000004, RSSI: -103 idle
20240207T2142Z ERROR: slice indices must be integers or None or have an __index__ method
20240207T2142Z INFO: Block: 00000005, RSSI: -099 idle
20240207T2142Z ERROR: slice indices must be integers or None or have an __index__ method
20240207T2142Z INFO: Block: 00000006, RSSI: -098 idle
20240207T2142Z ERROR: slice indices must be integers or None or have an __index__ method
20240207T2142Z INFO: Block: 00000007, RSSI: -096 idle
20240207T2142Z ERROR: slice indices must be integers or None or have an __index__ method
20240207T2142Z INFO: Block: 00000008, RSSI: -096 idle
20240207T2142Z ERROR: slice indices must be integers or None or have an __index__ method
20240207T2142Z INFO: Block: 00000009, RSSI: -098 idle
20240207T2142Z ERROR: slice indices must be integers or None or have an __index__ method
20240207T2142Z INFO: Block: 0000000a, RSSI: -095 idle
20240207T2142Z ERROR: slice indices must be integers or None or have an __index__ method
20240207T2142Z INFO: Block: 0000000b, RSSI: -095 idle
20240207T2142Z ERROR: slice indices must be integers or None or have an __index__ method
20240207T2142Z INFO: Block: 0000000c, RSSI: -097 idle

I am using the latest master and called Kiwifax with:

python3 kiwifax.py -s astw.proxy.kiwisdr.com -f 3855

What am I doing wrong?

Greetings
Ansgar

"catch: TypeError: Cannot set property 'innerHTML' of undefined" appearing in Log

someone connecting from wildly different IP addresses but always tuning to 428.33 kHz upon arrival and causing a breadcrumb trail of

x-DEBUG 52.191.87.41 "audio_start.demodulator_analog_replace: catch: TypeError: Cannot set property 'innerHTML' of undefined"

entries in my kiwisdr log.

is it possible this is evidence someone is probing for a vulnerability in the demodulation selection?

i have suspended all remote user access for the time being. should i continue to be cautious?

i would be reassured if something like this has happened in the past and has already been resolved with some confidence the avenue of illicit access has been closed.

Would it be possible to signal the Kiwi to change frequency without restarting the session?

When the wsprdaemon schedule feature needs to change the receive band of a receiver, it currently kills the running session and starts a new kiwirecorder session on the new band. Doing that has the unfortunate side effect of missing recording of one complete WSPR packet during a schedule change.

So I wonder if it would be possible for kiwirecorder to signal a tuning change at the end of the current wav file recording?

kiwiclientd.py sound trouble

Having some trouble getting kiwiclientd.py to play to any sound devices. No sound output at all. Errors shown below. This is on a Mac Mini with the latest master. I can connect/record with kiwirecorder.py and can successfully hear the expected audio in the wav files, so the KiwiSDR connection is fine.

python3 kiwiclientd.py -s kiwisdr -p 8073 -f 8906 -m usb --snddev="Display Audio" --rigctl-port=6400
speaker.player failed with blocksize must be between 15.0 and 512
speaker.player failed with blocksize must be between 15.0 and 512
speaker.player failed with blocksize must be between 15.0 and 512
speaker.player failed with blocksize must be between 15.0 and 512
speaker.player failed with blocksize must be between 15.0 and 512
speaker.player failed with blocksize must be between 15.0 and 512
speaker.player failed with blocksize must be between 15.0 and 512
speaker.player failed with blocksize must be between 15.0 and 512
speaker.player failed with blocksize must be between 15.0 and 512
speaker.player failed with blocksize must be between 15.0 and 512
speaker.player failed with blocksize must be between 15.0 and 512
speaker.player failed with blocksize must be between 15.0 and 512
speaker.player failed with blocksize must be between 15.0 and 512
speaker.player failed with blocksize must be between 15.0 and 512
speaker.player failed with blocksize must be between 15.0 and 512
Block: 00000001, RSSI: -112.62021-06-12 18:00:33,520 pid 2526 'KiwiSoundRecorder' object has no attribute '_player'
Block: 00000002, RSSI: -114.02021-06-12 18:00:33,524 pid 2526 'KiwiSoundRecorder' object has no attribute '_player'
Block: 00000003, RSSI: -111.92021-06-12 18:00:33,528 pid 2526 'KiwiSoundRecorder' object has no attribute '_player'
Block: 00000004, RSSI: -114.72021-06-12 18:00:33,532 pid 2526 'KiwiSoundRecorder' object has no attribute '_player'
Block: 00000005, RSSI: -112.72021-06-12 18:00:33,535 pid 2526 'KiwiSoundRecorder' object has no attribute '_player'
Block: 00000006, RSSI: -112.82021-06-12 18:00:33,604 pid 2526 'KiwiSoundRecorder' object has no attribute '_player'
Block: 00000007, RSSI: -113.12021-06-12 18:00:33,766 pid 2526 'KiwiSoundRecorder' object has no attribute '_player'
Block: 00000008, RSSI: -113.42021-06-12 18:00:33,929 pid 2526 'KiwiSoundRecorder' object has no attribute '_player'
Block: 00000009, RSSI: -112.42021-06-12 18:00:34,112 pid 2526 'KiwiSoundRecorder' object has no attribute '_player'
Block: 0000000a, RSSI: -114.02021-06-12 18:00:34,275 pid 2526 'KiwiSoundRecorder' object has no attribute '_player'
Block: 0000000b, RSSI: -113.32021-06-12 18:00:34,457 pid 2526 'KiwiSoundRecorder' object has no attribute '_player'
Block: 0000000c, RSSI: -112.82021-06-12 18:00:34,623 pid 2526 'KiwiSoundRecorder' object has no attribute '_player'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.