Funcube dongle issues and a solution

Hi,

I was using Funcube dongle and found a strange bug. Whenever I used the
FCD
source in my flow graph and started the flow, the (demodulated) signal
came
out corrupted. However, if I then just started qthid, it would correct
itself
and could see bits in waveform perfectly well. This was happening with
different firmware versions.

With a bit of experimenting in the earlier out of tree gr-fcd, I found
out
that reverting two commits[1][2] resulted in resolving the issue.

I’ve made changes to in-tree gr-fcd and recompiled and it’s now working
in a
way, but issues remain. One is setting frequency at runtime (via a
variable),
where FCD flips back into spitting out corrupted waveform.

This is where the problem outgrows my knowledge.

Kind regards,
Gasper Z.

[1] https://github.com/csete/gr-
fcd/commit/02a773ebf5ce01b8f527fb8f8b6f74e6b8191cab
[2] https://github.com/csete/gr-
fcd/commit/407b4281dbc9b3bc7b1eb58a5fb8acf500607fda

On Wed, May 30, 2012 at 8:51 AM, Gasper Z. [email protected] wrote:

I’ve made changes to in-tree gr-fcd and recompiled and it’s now working in a
way, but issues remain. One is setting frequency at runtime (via a variable),
where FCD flips back into spitting out corrupted waveform.

This is where the problem outgrows my knowledge.

Hi Gasper,

Sounds to me like you are having some interference on the frequency
you are trying to use. Or maybe your are using the center of the
passband where we have a strong DC peak. I’m only guessing since you
don’t give any details about your setup, e.g. what modulation are your
using, and how do you determine that your signal is corrupted.

The FCD source block in the master branch appears to work correctly
and I have no issues demodulating narrow band FM. I have no setup to
try digital modes. The commits you refer to are necessary for correct
setup and tuning of the FCD. If you revert them the FCD may not have
the correct initial setup or may have the settings from the last time
you were using it.

As said, I suspect you have some noise or interference in your filter
passband. Please provide more details about your setup, flowgraph,
etc. I found that plugging the FCD directly into the PC is a bad idea
causing strong interference. Always use an extension cable and
preferably also a USB hub between PC and FCD.

Alex

On Thu, Jun 7, 2012 at 11:13 AM, Gasper Z. [email protected] wrote:

Somewhere in the funcube source block there is obviously something wrong with
initialization. Running qthid after starting flow changes something in funcube
that makes it output correct signal. Using this and the fact, that the lead-in
stays the same, it seems the “corrupt” signal (viewed in scope) is sometimes a
derivative of the expected signal - most of the time on zero, with spikes up
and down on transitions, with timing corresponding to transitions in expected
signal.

Do you have the same frequency correction value in both qthid and the
FCD source? If yes, what is the value?

Alex

Dne Wednesday 30 May 2012 ob 12:01:59 je Alexandru C. napisal(a):

out that reverting two commits[1][2] resulted in resolving the issue.
you are trying to use. Or maybe your are using the center of the

As said, I suspect you have some noise or interference in your filter
passband. Please provide more details about your setup, flowgraph,
etc. I found that plugging the FCD directly into the PC is a bad idea
causing strong interference. Always use an extension cable and
preferably also a USB hub between PC and FCD.

Alex

Hi,

a bit more on my setup: I’m using funcube as a source, tuned to 868.48M,
LNA
gain 20dB, mixer gain 12dB, connected to simple squelch
(threshold=-40dB,
alpha=1) and on to quadrature demodulation block. This block then
outputs
clearly visible binary signal when funcube is initialized properly.

The observed signal is rated at 20kbit, so it’s a bit on the upper limit
of
what Funcube can do, but it’s still possible to get a decent read. It’s
a
burst of bits every 5s from a power meter[1][2], and the first part is a
lead-
in and stays the same even if readings change.

Somewhere in the funcube source block there is obviously something wrong
with
initialization. Running qthid after starting flow changes something in
funcube
that makes it output correct signal. Using this and the fact, that the
lead-in
stays the same, it seems the “corrupt” signal (viewed in scope) is
sometimes a
derivative of the expected signal - most of the time on zero, with
spikes up
and down on transitions, with timing corresponding to transitions in
expected
signal.

Does this give any clues?

Kind regards,
Gašper Žejn

[1]
http://www.conrad.de/ce/de/product/125353/VOLTCRAFT-ENERGYCOUNT-3000-
ENERGIE-MESSG
[2] » Energy tracking with Cost Control » JeeLabs

On Thu, Jun 7, 2012 at 10:27 PM, Gasper Z. [email protected] wrote:

It’s a burst of bits every 5s from a power meter[1][2], and the first
Do you have the same frequency correction value in both qthid and the
FCD source? If yes, what is the value?

Alex

Ahh, yes. I had 0 in my flow and qthid was -120.

So sorry to waste your precious time.

No problem, time wasn’t wasted since there is actually a bug in the
init part of fcd_source_c.xml: it checks whether correction is 115
whereas it should check -120, but this bug is only triggered if your
initial correction is set to 115 ppm.

I also realized that I never added 1 Hz resolution to qthid.

Alex

Dne Thursday 07 June 2012 ob 22:38:51 je Alexandru C. napisal(a):

limit of what Funcube can do, but it’s still possible to get a decent
signal.
No problem, time wasn’t wasted since there is actually a bug in the
init part of fcd_source_c.xml: it checks whether correction is 115
whereas it should check -120, but this bug is only triggered if your
initial correction is set to 115 ppm.

I also realized that I never added 1 Hz resolution to qthid.

Alex

Ah, that explains something then.

I remember experimenting with correction, but I was looking at
fcd_source_c.xml and, influenced by it, used 120 instead of -120,
therefore
not getting correct result and dismissing it as not the right parameter
to
tune.

Any way, it’s allways nice to see bugs fixed. :slight_smile:

Gasper

Dne Thursday 07 June 2012 ob 21:59:24 je Alexandru C. napisal(a):

part is a lead- in and stays the same even if readings change.
FCD source? If yes, what is the value?

Alex

Ahh, yes. I had 0 in my flow and qthid was -120.

So sorry to waste your precious time.

Gasper