-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question: How to use https://triq.org/pdv/ to analyse a wav file #2949
Comments
There is no workflow in PDV to go from a WAV file to anything else, you can just look at it. If you start with a .cu8 file (try |
Thanks... I feared you'd say that :-( The thing is: when all I have is such a wav file with clear pulses (see attachment), how can I more or less comfortably parse it (like in that UI). Do you know any such tool? I also tried Universal Radio Hacker which works fine if I do an IQ recording but those are so incredibly large and I cannot say upfront how long it might take until that message gets send/received. Can I use rtl_433 to basically record everything in a sensible way if all I know the frequency and that it is AM OOK? Or would I always need the equivalent of an IQ recording if I cannot say upfront how my signal will look like exactly? Can I instruct rtl_433 to only record once RSSI is > value X to minimize the recording file size? |
rtl_433 will only record signals, not noise. See |
Awesome! Thank you very much! TIL rtl_433 has a webuI?!?!? :-O :-D Thanks I'll certainly try those suggestions! Just wondering: What I originally wanted - to get the signal straight from a WAV file (some sent, uploaded, ...) - isn't this possible too? None of the tools I used so far seem to offer this possibility and I am wondering why this is. Maybe I have the wrong idea of how this is performed and it's just not possible with a simple WAV file? |
WAV is just a container. We could be talking about the contained raw samples, Mono, 16bit, 48k could be a representation of AM (or FM) demodulated data (and rtl_433 can read raw |
Yes, you are right ofc, that technically we should talk about the samples in the WAV not the WAV itself. I tried your suggestions with my minimalistic Arduino sketch.
These are my findings:
(Format is aaaa (preamble), 3910 (syncword), 0x0b = Length of data, date = 'Hello world', CRC) I am still trying to understand if my code (based on library samples) is wrong or I am using combination of parameters (AM/too fast/...) which inhibits the decoding. Nevertheless, using the S option and the variations you provided above I am confident I will be able to decode proper unknown signals and not my self-generated test code. Thank you very much. If you are able to see what I am doing wrong in my attempts with setModulation(0) (FM) - no demodulation is possible for rtl_433 no matter how fast or slow (parameter setDRate) I send or whether I use Manchester or not (setManchester(1)). Also without Manchester but ASK/OOK (setModulation(2)) I can only get corrupted/parted decodings. |
I don't readily know CC1101 registers. MC isn't usually seen with OOK. Plain PWM should work (but you might need to encode it yourself e.g. 0-bit -> 1000, 1-bit -> 1110), PCM might not work well if you have long runs of 0's or 1's. |
Thank you very much for your offer to have a look. Please keep in mind that I am in no way claiming that is an issue with rtl_433 but pretty sure it's about how I use the sample code. Nevertheless I´d like to understand the underlying reason WHY it cannot properly be decoded, if that is extractable from the files in order to understand everything better. When I am going to sniff signals from a "real" device I'm pretty sure those issues won´t turn up, as those developers probably know how to do it the right way ;-) Why I am stressing the point with those samples? When I have some unknown signals, I want to have confidence which options I have, where I can tweak, how can I massage the pulses in order to try to get a proper decoding. My idea was to send some known data (i.e my HelloWorld sketch above in various modifications) so I KNOW what to have as a result and have a correlation like "Ok, when it's FSK I need to tweak this and that, or when it's send very slow I need to do this and that, etc." - so just getting some experience by trying to get results known in advance ;-) In the attached samples, the decoded output should always be "2aaad3910b48656c6c6f20576f726c6415fe8" as above. I've changed a) modulation, b) datarate, c) manchester on/off, d) timeout for send
|
DR 99 -- too fast for the sample rate, zoom in with https://triq.org/spectrogram-next/ and you'll see it's barely two samples per bit. FSK -- the deviation seems massive. We usually see much less, maybe 10k to 30k. That aside the files seem to read well with Also note that all files are clipping (too loud) and the gain should be lower or distance to antenna greater. |
Re DR: Ok, assumed so. Using URH I also saw that basically the whole messag was send within one period of the carrier(?) wave and I had errors the moment the wave has a zero point. That's why I was starting with lowering the DR and saw with 5 or 20 it was good. Could I just increase the sample rate to a much higher value with rtl_433? Would that alone make the signal properly decodeable? Re OOK in filename: Oh, I didn´t know that. Thanks for mentioning. FSK: What do you mean by deviation. The value for " ELECHOUSE_cc1101.setDeviation(47.6); // Set the Frequency deviation in kHz. Value from 1.58 to 380.85. Default is 47.60 kHz." ? I read that this would offset the sending base frequency to avoid collisions. But I also noticed, setting this to 0 so it will send at exactly at 433.92 MHz, does not send anything at all. So this is how far the FM actually changes? "That aside the files seem to read well with rtl_433 -Y minmax -A" Gain: Yes, sender and SDR are on the same table. Will try again. |
For "ask_ook_nomanchester_5_1000.cu8" (original, now renamed to have nomore ook in the filename) I get
Same result also with -Y minmax. For all the FSK examples I did not get any decoding with -A -Y minmax for any sample file. Is this due to the deviation, that is too high in my example code? |
Re DR, here I meant sample literally. There are about two I/Q pairs per bit. You need to raise the sample rate to get oversampling by at least 20 (i.e. one bit should last 20 samples). Yes, FSK deviation is the offset between both carriers. 50k should be fine too, it just looks pretty wide. If you send at exactly 433.92 MHz then record at some offset, e.g. 433.85M. Assume that the receiver is deaf at the exact center frequency. E.g.
That looks good. All the multiples of 200 µs are the runs of bits. Examine the pdv link to see. |
Which PDF do you mean please? I now tried Modulation=0 (2-FSK), SetDeviation(15) (and also the original value), setPA (Power) to -12. Deafness at center: As far as I know this is only an issue with the E4000 tuner, but not with R828? |
Where did you see the samples were clipping initially? Which value do I need to have an eye on? Is it the RSSI? RSSI: -0.1 dB SNR: 20.2 dB Noise: -20.4 dB The values don´t seem to change though when I change the output power... I am right now experimenting with the settings, increasing speed/sample rate, etc. Do you know what the maximum sample rate is for the RTL-SDR Blog v4? It seems I cannot set it to > 300.000 Hz? (Error cannot set to ...) |
pdv, https://triq.org/pdv/ sorry, edited. Yes, clipping will be a big problem for rtl_433. Or demod needs to find (part of) a sine wave to work. (The algorithm uses instant phase angle measurements.) The center frequency is represented a 0 Hz there can be no meaningful signal at 0 Hz. Examine a signal ever closer to 0 Hz (i.e. 433.92 MHz with the defaults) in https://triq.org/spectrogram-next/ by looking at the bottom waveform display in full zoom. For clipping look for red areas in the small amplitude bar in https://triq.org/spectrogram-next/ For sample rates try 1024k and maybe 2048k (or 2000k). Up to 3072k should be supported but the receiver will get pretty hot and needs cooling usually. |
Could you kindly explain how to read this?
You wrote: "All the multiples of 200 µs are the runs of bits". |
Yes. In order: average, range (in brackets, µs), average in number of samples. |
I am new to signal analysis and want to decode signals with my RTL-SDR. I used rtl_433 to see and understand how the decoding of my temperature sensors work by using the '-A'. So I understood rtl_433 measures things like pulse widths etc. to detemine what could be a 1 and what could be a 0, if it's manchester, etc. Then I noticed those links to triq.org int the output like the one below this output:
https://triq.org/pdv/#AAB02F040701700814103824288182828181818181818181818182828181828182818181818282828182818181818282828355+AAB020040101700814103824288182828181818181818181818182828181828182818355
OK, now, for signals that cannot yet be decoded with rtl_433 I basically want some assistance in determining the sequence of bits from the signal.
I hoped that https://triq.org/pdv/ would allow me to load and analyse the contents of a WAV files that I saved with audacity from the demodulated output from gqrx. (converted to mono, 16bit, 48k) just like with the link printed out by the run of rtl_433.
audiosample.zip
I can see the spectrum when I drag n drop the file there, but I am not sure what I can then do from this? (Note: This is (probably) not the same signal like in the link above from rtl_433. I basically recorded a strong signal at 433 MHz using gqrx and postprocessed it a little bit. Actually... - it COULD be it's the same, as there also seem to be these 7 repetitions visible in the spectrum like in the printout at the top of this post.)
"Add pulse build or examples" lets me choose a couple of different things, but which one do I need to use to decode it like a pulse width modulation with known lengths?
I would like to get this kind of "UI" like in the first link above with the output from rtl_433? Using audacity I tried to measure the width for the 0 and 1 pulses to 100 and 200 samples and the gaps vice verca (not sure if this is actually correct), but selecting one of the options from the "Add pulse build or examples" like "Custom (basic)" or "Raw pulse data"does not seem to actually use the uploaded file for analysis?
Basically I would like to tweak the values using the UI until "something sensible" gets decoded from the WAV file.
Isn´t this UI supposed to work like that? Or am I doing anything wrong? I didn´t find any documentation for the triq.org/pdv site? Or can´t I actually do what I hope to do with the webpage? As said, I am very new to all this and instead of drawing 0 and 1 below the zoomed wave form printed out to lots of paper I´d appreciate something which could support me here. The webpage looked like it would allow for exactly that...?
Thanks!
The text was updated successfully, but these errors were encountered: