Re: [Discuss-gnuradio] Decoding 2FSK Compensating for carrier jitter/skewing (CFO)

2017-07-08 Thread HLL
>
>
> > Some extra information:
> > -I Only have access to trigger communication of the device.
> > -All captures taken from very close proximity (~10 cm) the device is
> > intended to work over hundreds of meters outdoors
> > -I Have access to FCC docs, but since I don't live in the US, *I'm not
> > sure what actual* "primary" *freq* of the device is.
>
> Try looking up the FCC Id at
>
>   https://fcc.io/
>
> Would you post the FCC Id? If I have the FCC id I may play with it when
> while I'm commuting.
>

In fact I don't know the specific FCC id of the device, but from it's
function, appearance and capabilities it can be either of these next
products...
MLLSPEEDHPTX450 <https://fcc.io/MLLSPEEDHPTX450>
MLLSPEEDTXP45-47 <https://fcc.io/MLLSPEEDTXP45-47>
I'm not sure what the difference between the HP and Just "TX" casing looks
the same, I tend to think it's the standard TX.
This is a AMR (Automated Meter Reading) system endpoint device (I.E. Just
the transmitter part)

HLL.
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] Decoding 2FSK Compensating for carrier jitter/skewing (CFO)

2017-07-10 Thread HLL
Hi,
Thank you very much!!
I Need to thoroughly go over your response and understand it all, but
thanks :)

I also noticed the 2 different in bit timings, I thought it's something
electrically, since I noticed the "long" lows and highs are on some
specific timings and the shorts have another timing.

Before experimenting with the graph (and the said OOT modules). I'm going
over it and trying to understand it,
what the rotator does, and what it it's role?
The part with 2 pll carrier tracking is used for locking the carrier of the
low and high freq as I understand (I.E. The cheap digital PWM or clock
devider)
what is the role of the complex conjugates (mirror over the real axis?),
subtract, c-to-f and add part?
  Are you "subtracting" the (locked) `0` square wave from the `1` square
wave, why?
I think I understand most of the rest (the `missing block` from their names
:) )

Thanks,
HLL

P.S. FYI, The capture I'v attached contains 4 bursts of 2 devices, 2 from
device A and 2 from device B.
P.S.2 It is probably some cheapo electronic components or re-using the
micro that is already there.



On Sun, Jul 9, 2017 at 10:15 PM, Andy Walls 
wrote:

> On Sat, 2017-07-08 at 21:38 -0400, Andy Walls wrote:
> > > Date: Fri, 7 Jul 2017 19:50:55 +0300
> > > From: HLL
> > > Hi all,
> > >
> > > I'm relatively new to DSP and gnuradio but I tried tons of stuff
> > > and
> > > I couldn't decode a fairly simple FSK data.
> > > baudrate seems around 600-700 bps and fsk deviation is less then
> > > 3k.
> >
> >
> > Hmmm.  I took a look at your signal and tried building a coherent 2-
> > FSK
> > demodulator.  Under the assumption that it was straight 2-FSK, the
> > signaling tones looked to be at +/- 1200 Hz when properly centered.
> > The
> > fastest bit rate appeared to be 1880 bits/sec.
> >
> > But in reality that doesn't work.  I could never get good symbol
> > timing
> > recovery as the "FSK" signal appeared to have two different baud
> > rates.
> >
> > After some reflection, the signal you have appears to actually be
> > AFSK
> > inside of FM.  Zoom out a little on the output of the quad demod, and
> > your eye can see the two tones.  The two tones appear to be at 350 Hz
> > and 940 Hz.  The tones are unusual in that they are square wave tones
> > vs. sine wave.
> >
> > I haven't worked you the baud rate yet.  I'll hack away at it more
> > tomorrow.
>
> It definitely is AFSK in an FM transmission.
>
> The baseband baud rate appears to be a 233 bits/second.
>
> The beginning of every packet starts out with the following bits:
>
>  100 0110
>
> I keyed off of those last 8 bits above (0110), since they looked
> like an HDLC flag character to me.
>
> The payload bytes of the 4 packets in the file (after that 0110 bit
> pattern) are:
>
> 6884485b066e7505647e875a4ac70c74447474477e47e5f85c47065f44be
> 79a74e67a6a452bf
> 68c4485b062c7565e67227564ac74e74247478477447e5f85ce7065f44be
> 75a74867a6ec52df
> 68c4485a278e6f856e7006706a470c7fa4f67c057c47e7f06f47447f66ae
> 7d867048874243df
> 68c4485a278e6f85ec70a67a6267cc7fa4f678257647e7726fe7447f662c
> 7d8670488700437f
>
> The ff's at the end are the space after the end of the packet.
>
>
> Try the attached GRC file.
>
> For it to work, you will need to build and install:
>
> 1. A relatively recent GNURadio
>
> 2. The gr-nwr OOT module found here:
> https://github.com/awalls-cx18/gr-nwr
> You'll have to write your own PyBOMBS recipe file, if using PyBOMBS to
> build GNURadio and OOT modules.
>
> 3. The gr-reveng OOT module found here:
> https://github.com/tkuester/gr-reveng
>
> Regards,
> Andy
>
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] Decoding 2FSK Compensating for carrier jitter/skewing (CFO)

2017-07-12 Thread HLL
On Wed, Jul 12, 2017 at 1:56 AM, Cinaed Simson 
wrote:
>
> It seems odd that a device with a maximum power 116 dBm would have such
> a weak signal.
>
As I mentioned earlier, I'm not really sure what is the frequency of the
device is, I just scanned the 300 + area and I found a few that correlate
with the device transmission
This one was taken on 440.15M; I Also have another similar capture,
captured at 419.562M

>
> Maybe the antenna was to close? The distance of the receiving antenna
> was roughly 0.1 of the carrier wavelength from transmitting antenna.
>
I guess it was, distance was around 8-15 cm or so, as the wavelength is
68.15cm, When capturing I didn't considered it (or even known it is a
factor)
The antenna used is the stock RTL SDR one.

If you can recommend some hackish (DIY or even retail) antenna to better
receive that signal that would be grate.

>
> Also, the documents indicate the channel width is from 7 kHz to 16 kHz -
> the sampling rate of 8 kHz may have been to small.
>
Well, As  Andy mentioned, it's not FSK, so the documentation may be talking
about other version of the device.
I Downsampled the capture to 8khz after centering because that was much
more then 2 times of bandwidth I've seen on the FFT on active burst


> But in any case, there's a lot of good information in this thread and
> it's going to take me a while to digest all of it.
>
If that helps, I kindda made a quick graph that does similar thing to
Andy's graph, and I got similar results:

[image: Inline image 1]

now it seems that a large CFO glitch translates to short glitchs in the
digital signal

Graph:
[image: Inline image 2]


>
>
>
> On 07/10/2017 05:55 PM, Andy Walls wrote:
> > From: HLL
> > Date: Mon, 10 Jul 2017 20:44:01 +0300
> >> Hi,
> >> Thank you very much!!
> >> I Need to thoroughly go over your response and understand it all, but
> >> thanks :)
> >>
> >> I also noticed the 2 different in bit timings, I thought it's
> >> something electrically, since I noticed the "long" lows and highs are
> >> on some specific timings and the shorts have another timing.
> >>
> >> Before experimenting with the graph (and the said OOT modules). I'm
> >> going over it and trying to understand it,
> >> what the rotator does, and what it it's role?
> >
> > It performs a (cyclic) frequency shift of the signal spectrum.  It is
> > called a rotator because the DFT of a sampled signal "lives" on the
> > unit circle of the z-plane.  The rotator block rotates the entire z-
> > plane about its origin by a certain number of radians, thus effectively
> >  shifting the spectrum of the signal.
> >
> > I use the rotator block to shift the audio frequency bins of +350 Hz
> > and +940 Hz down to -295 Hz and +295 Hz respectively.  Then I filter
> > off what were the negative audio frequency bins, the DC spike from the
> > FM CFO, and a lot of the spectrum which is just noise.
> >
> >> The part with 2 pll carrier tracking is used for locking the carrier
> >> of the low and high freq as I understand (I.E. The cheap digital PWM
> >> or clock devider)
> >
> > Yes, but they both track *and* downconvert the tracked tone to DC.
> >
> > This is a coherent FSK receiver design, which is probably overkill for
> > this application, but I used it to handle uncertainty in the actual
> > audio tone bins used for the mark and space frequencies.
> >
> >> what is the role of the complex conjugates (mirror over the real
> >> axis?),
> >
> > The complex conjugate is to handle a quirk of the GNURadio PLL block
> > before the subtraction.  When the PLL carrier tracking block does it's
> > downconversion of the tracked tone to DC, it doesn't have a phase angle
> > of 0 degrees (a purely real number), instead it has a phase angle of
> > something a bit less than pi/4 radians.
> >
> > The complex conjugate is so when I do the following subtract, I will
> > get constellation points on opposite sides of the circle in the I-Q
> > plane.
> >
> >
> >>  subtract,
> >
> > This is standard for a coherent FSK demodulator and for certain non-
> > coherent FSK demodulators.  Google images should show a number of block
> > diagrams doing this.
> >
> >
> >>  c-to-f and add part?
> >
> > Well, after the subtraction you have I-Q plane constellation points of
> > about A*exp(j*pi/4) and A*exp(j*5*pi/4), and a fuzzy trajectory line
> > going approximately straight between those points.  I needed to convert
> &