discuss-gnuradio
[Top][All Lists]
Advanced

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

[Discuss-gnuradio] Accessing nasty elements of 'payload' in benchmark_rx


From: Ahmed Majeed Khan
Subject: [Discuss-gnuradio] Accessing nasty elements of 'payload' in benchmark_rx.py
Date: Thu, 23 Jul 2009 23:32:23 -0400
User-agent: Internet Messaging Program (IMP) 4.2.2

Hi all,

Here is the summary:

Example File:     benchmark_rx.py
Function:           rx_callback(ok, payload)
Argument:         payload 
Problem:            Can any one please tell me how to access and assess individual elements/entities/values of the argument 'payload' in the function "rx_callback(ok, payload)" in benchmark_rx.py.
Need:                 Need to calculate bit/byte-error rate and so need to compare transmitted and received words.

It seems to be a binary-stream and I am transmitting a packet with just 0's and 1's.

I have tried writing payload to both, .txt and .bin files and output contains wierd characters. (Ofcourse, writing .txt file required me use repr() ). 

I am done with trying decode it using utf-8, utf-16, latin-1 and ascii encodings, but all in vain. None of these schemes can decode a packet correctly if CRC is False. (Shows error that value is out of range)

payload.count(0) returns an error: "TypeError: expected a character buffer object".

Feeling sleepy now, wish I can get some answer by tomorrow. I guess working-hours's gonna start in Europe and already in Asia etc :). Any help would be highly appreciated.

-Ahmed


reply via email to

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