How to cut cu8 file?

576 views
Skip to first unread message

dietmar...@gmail.com

unread,
May 16, 2021, 3:05:43 AM5/16/21
to rtl_433
I am able to capture an asynchronous bit stream from a micronet wireless link in a .cu8 file. Converting it to pulseview I see that there is a long period without signal before the synchronization phase startet. I have the impression that rtl_433 is confused analyzing the signal later with file input. So my question how can I cut unwanted signals from .cu8 file.

Christian Z.

unread,
May 16, 2021, 6:42:53 AM5/16/21
to rtl_433
The .cu8 files are headerless and contain 2-byte wide samples. You can cut to any even file length. Use any tool you have available, on Linux it's commonly "dd".
An audio editor with support for raw will also work: import (and export!) as raw 2-channel unsigned 8-bit, ignore the sample rate.

dietmar...@gmail.com

unread,
May 17, 2021, 9:46:27 AM5/17/21
to rtl_433
Thank you Christian.
But no luck with both Methods:
dd bs=2 skip=25601 count=25600 if=g010_869.84M_1000k.cu8 of=gcut_869.84M_1000k.cu8
and also the export to raw in audacity seems to change the IQ order by one (or more) byte so the transformed pulseview FM translation is unusable.
The attached files has a 76.8k baudrate asynchronous bitstream (syncword is x5599) sampled with 1000k. I tried different setups for the flex decoder with file input but no luck so far:
rtl_433 -s 1000k -r g010_869.84M_1000k.cu8 -R 0 -X "n=Micronet,m=OOK_PCM,s=13,l=13,r=20000,preamble={16}0x55"
Can you take a look and give a hint.
In my opinion the calculated FM level is too low so some inaccuracies in the timing will appear. I will try to use lower sample rate to increase IQ level.
Thanks for your help.
g010_869.84M_1000k.zip

dietmar...@gmail.com

unread,
May 17, 2021, 9:49:40 AM5/17/21
to rtl_433
Sorry typo: Correct parameter was preamble={16}0x5599

Christian Z.

unread,
May 17, 2021, 10:50:07 AM5/17/21
to rtl_433
That looks good (dd and -X, not sure why Audacity messes up).

If you want to get a close look what the rtl_433 demodulation looks like, use e.g. rtl_433 -s 1000k -r g010_869.84M_1000k.cu8 -W somefile.sr
That will render all intermediate steps to a Sigrok Pulseview file and open that, you need Sigrok installed. I'll post a screenshot (good AM to Frame/ASK but no FM to FSK).

The default FM demod ("classic") doesn't do well with GFSK (the smooth FM transitions), better use -Y minmax
But the real problem should be the center frequency, one frequency seems to be at DC. This is shown with -A as
Frequency offsets [F1, F2]:   -1327,      0    (-20.2 kHz, +0.0 kHz) -- i.e. just one freq seen, at 20k below center. Try to shift by say 50k.
Could also be that the deviation is too small or the symbol rate to high for 1M sample rate, try 2M perhaps.

Christian Z.

unread,
May 17, 2021, 10:50:38 AM5/17/21
to rtl_433
debug.png

Dietmar Warning

unread,
May 17, 2021, 12:33:32 PM5/17/21
to rtl...@googlegroups.com

Yes, I have pulseview in use and got same result as you. In attachement we can find preamble and sync word. Don't know why pulseview OOK decoder stops decoding and made this gaps afterwards.

Am 17.05.21 um 16:50 schrieb Christian Z.:

The default FM demod ("classic") doesn't do well with GFSK (the smooth FM transitions), better use -Y minmax

This I didn't understood, you mean a command like this:

rtl_433 -s 1000k -r g010_869.84M_1000k.cu8 -R 0 -Y minmax -X "n=Micronet,m=OOK_PCM,s=13,l=13,r=20000,preamble={16}0xaa99"

Doing this I got not the results from pulseview.

But the real problem should be the center frequency, one frequency seems to be at DC. This is shown with -A as
Frequency offsets [F1, F2]:   -1327,      0    (-20.2 kHz, +0.0 kHz) -- i.e. just one freq seen, at 20k below center. Try to shift by say 50k.

Yes I got same analyzing result.

Detected OOK package    @0.032311s
Analyzing pulses...
Total count:    3,  width: 13.48 ms        (13476 S)
Pulse width distribution:
 [ 0] count:    1,  width:   12 us [12;12]    (  12 S)
 [ 1] count:    1,  width: 4564 us [4564;4564]    (4564 S)
 [ 2] count:    1,  width: 6890 us [6890;6890]    (6890 S)
Gap width distribution:
 [ 0] count:    1,  width:   22 us [22;22]    (  22 S)
 [ 1] count:    1,  width: 1988 us [1988;1988]    (1988 S)
Pulse period distribution:
 [ 0] count:    1,  width:   34 us [34;34]    (  34 S)
 [ 1] count:    1,  width: 6552 us [6552;6552]    (6552 S)
Pulse timing distribution:
 [ 0] count:    1,  width:   12 us [12;12]    (  12 S)
 [ 1] count:    1,  width: 4564 us [4564;4564]    (4564 S)
 [ 2] count:    1,  width: 6890 us [6890;6890]    (6890 S)
 [ 3] count:    1,  width:   22 us [22;22]    (  22 S)
 [ 4] count:    1,  width: 1988 us [1988;1988]    (1988 S)
 [ 5] count:    1,  width: 68901 us [68901;68901]    (68901 S)
Level estimates [high, low]:  15960,      3
RSSI: -0.1 dB SNR: 37.3 dB Noise: -37.4 dB
Frequency offsets [F1, F2]:   -1326,      0    (-20.2 kHz, +0.0 kHz)
Guessing modulation: Pulse Width Modulation with sync/delimiter
view at https://triq.org/pdv/#AAB106000C11D41AEA001607C40D258394A555
Attempting demodulation... short_width: 4564, long_width: 6890, reset_limit: 1989, sync_width: 12
Use a flex decoder with -X 'n=name,m=OOK_PWM,s=4564,l=6890,r=1989,g=0,t=0,y=12'

But because the pulse recognition is Nonsens I don't trust the frequency values. I will try with lower center frequency.

Could also be that the deviation is too small or the symbol rate to high for 1M sample rate, try 2M perhaps.
As I said we have a 76.8kBaud signal. I know from other evaluations that we should see about+/-30kHz. Is 500ks sufficient for such a signal?
--
You received this message because you are subscribed to a topic in the Google Groups "rtl_433" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/rtl_433/EtPPnXyFTAM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to rtl_433+u...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/rtl_433/59a65b77-2f2e-4d34-a98f-f79bd3e32e12n%40googlegroups.com.
Bildschirmfoto vom 2021-05-17 18-08-17.png

Christian Z.

unread,
May 17, 2021, 12:59:14 PM5/17/21
to rtl_433
Yes, "-Y minmax" like you used. It's automatically selected for >800M, but not when reading a file with "-r".

At ~77k a "bit" is 13µs wide. You usually want about 10+ samples, so 1µs time resolution. 500k isn't great, 1M sounds right.

The frequency value is not dependent on the pulse decoding, it's just the instantaneous phase rate (phase angle diff between samples). If no second freq (F2) is found the FSK demod is not activated.

Dietmar Warning

unread,
May 17, 2021, 2:39:29 PM5/17/21
to rtl...@googlegroups.com

Thanks for the explanations.

Am 17.05.21 um 18:59 schrieb Christian Z.:
The frequency value is not dependent on the pulse decoding, it's just the instantaneous phase rate (phase angle diff between samples). If no second freq (F2) is found the FSK demod is not activated.

I made an spectrogram of the cu8 file (attached) and see something like +/-30kHz.

With that and the results of the shown pulseview I am still confused about the analyzing results of rtl_433. But I will make at next few measurements with different center frequencies.


--
You received this message because you are subscribed to a topic in the Google Groups "rtl_433" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/rtl_433/EtPPnXyFTAM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to rtl_433+u...@googlegroups.com.
Screenshot_2021-05-17 I Q Spectrogram Pulsedata(1).png
Reply all
Reply to author
Forward
0 new messages