discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] BPSK receiver issue / message passing


From: Vanush Vaswani
Subject: Re: [Discuss-gnuradio] BPSK receiver issue / message passing
Date: Thu, 7 Nov 2013 04:19:18 +1100

Thanks for the reply. It seems to be an endian issue such that I can't
simply shift bits but must use a proper framer.

I have modified an existing AX.25 block such that I can now see my
frames over the air using debug prints but I am having difficulty
getting my data out from gnuradio. The AX.25 block, from gr-ec,
creates frames through several iterations of the work() fn using a
state machine and also has a message queue output (but hasn't actually
implemented the message passing). Once I have a verified frame, what
is the best way to get the data out?

I have tried this technique:

d_good_byte_cnt += frame_size-2; // don't count CRC
gr_message_sptr msg = gr_make_message(0, 0, 0, d_good_byte_cnt);
memcpy(msg->msg(), frame_buf, d_good_byte_cnt);
d_target_queue->insert_tail(msg);
msg.reset();

and then connect to a message source, and then a file sink. However,
the memcpy seems to cause my flowgraph to crash. Any tips?


On Wed, Nov 6, 2013 at 1:42 AM, Tom Rondeau <address@hidden> wrote:
> On Mon, Nov 4, 2013 at 10:25 AM, Vanush Vaswani <address@hidden> wrote:
>> Hi all,
>>
>> I am using GR 3.6.5.1 to receive BPSK modulated data from a third
>> party RF chip / microcontroller combination and am having a strange
>> experience. I am implementing a very simple protocol by constantly
>> transmitting 0x7E constantly and then ASCII data triggered by a serial
>> connection to the microcontroller, all at 9.6kbps
>>
>> With the  following configuration
>> FCDPP source sampling at 192KHz.
>> -> AGC
>>  -> Freq Xlate (bring near baseband)
>>  -> Costas loop (remove carrier)
>> -> RRC (48 taps, symbol rate = 9600)
>> -> PSK Demod (sps = 20 as 192/20 = 9.6kbps, everything else default)
>>
>> I can see my 0x7E bitstream "square wave" in a scope sink.
>> When I pack the bits and send it to a file sink, I can see my 0x7E's
>> and also ascii data that I've typed in to the microcontroller serial
>> port. However - this is rare. Most of the time, I see the bytes of
>> rotated flag - 0x3F, 0xFC, 0x3F etc. I thought this was ok, I can
>> simply rotate the whole file by x bits to remake all the flags as
>> 0x7E. But when I do this, my ascii text input is completely garbled,
>> with only a few letters showing up.
>>
>> Can anyone give me a hint as to what is going on? I don't think my
>> transmitter is the issue, as when I get my flag bytes in the output
>> file, I can see my data.
>>
>> vanush
>
> The PSK demod has the FLL, Costas loop, and RRC filter in it. That's
> what each of those bandwidth settings are for (frequency, phase, and
> timing). But also, going in at 20 sps is really high. You should put a
> channel filter in front that both removes any extra noise and
> downsamples (by a factor of 5 or 10 to get to 4 or 2 sps).
>
> Tom



reply via email to

[Prev in Thread] Current Thread [Next in Thread]