discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] gr-ieee 802.11 Wifi Transceiver Issue


From: Abhinav Jadon
Subject: Re: [Discuss-gnuradio] gr-ieee 802.11 Wifi Transceiver Issue
Date: Sun, 21 Feb 2016 01:35:08 +0530

Hi Bastian,

I used the Tag Debug Block to check on the sample generation. The Tag block stops throwing debug data after few seconds which is followed by the TX LED turning off. Thus I inferred something is happening on the code front.

Also,
to figure out what was going behind the scene, I used the gdb debugger ( I used it for the first time today, so my inferences can be wrong).  It runs smoothly, without any breakpoints. But I could not help but see that whenever the sample generation stopped, two threads exited.

The following is the gdb output. It was observed that thread 4907 exit caused the TX LED to stop blinking.

Sorry for dumping the whole output, thought might help you.


(gdb) run wifi_transceiver.py
The program being debugged has been started already.
Start it from the beginning? (y or n) y

Starting program: /usr/bin/python wifi_transceiver.py
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffedf9b700 (LWP 4856)]
[New Thread 0x7fffed79a700 (LWP 4857)]
[New Thread 0x7fffeaf99700 (LWP 4858)]
[New Thread 0x7fffe8798700 (LWP 4859)]
[New Thread 0x7fffe5f97700 (LWP 4860)]
[New Thread 0x7fffe3796700 (LWP 4861)]
[New Thread 0x7fffe0f95700 (LWP 4862)]
linux; GNU C++ version 4.8.4; Boost_105400; UHD_003.010.git-119-g42a3eeb6

[New Thread 0x7fffc6252700 (LWP 4863)]
[New Thread 0x7fffc5a51700 (LWP 4864)]
[New Thread 0x7fffc48f5700 (LWP 4865)]
[New Thread 0x7fffb7fff700 (LWP 4866)]
[New Thread 0x7fffb77fe700 (LWP 4867)]
Using Volk machine: avx2_64_mmx_orc
OFDM MAPPER: encoding: 0
set_min_output_buffer on block 10 to 96000
set_min_output_buffer on block 12 to 96000
set_min_output_buffer on block 14 to 96000
set_min_output_buffer on block 15 to 96000
set_min_output_buffer on block 18 to 96000
[New Thread 0x7fffb4a5a700 (LWP 4869)]
[New Thread 0x7fffaffff700 (LWP 4870)]
[Thread 0x7fffaffff700 (LWP 4870) exited]
[Thread 0x7fffb4a5a700 (LWP 4869) exited]
[New Thread 0x7fffb4a5a700 (LWP 4871)]
[New Thread 0x7fffaffff700 (LWP 4872)]
[Thread 0x7fffaffff700 (LWP 4872) exited]
[Thread 0x7fffb4a5a700 (LWP 4871) exited]
[New Thread 0x7fffb4a5a700 (LWP 4873)]
[Thread 0x7fffb4a5a700 (LWP 4873) exited]
[New Thread 0x7fffb4a5a700 (LWP 4874)]
[Thread 0x7fffb7fff700 (LWP 4866) exited]
[Thread 0x7fffb4a5a700 (LWP 4874) exited]
[New Thread 0x7fffb4a5a700 (LWP 4875)]
[New Thread 0x7fffb7fff700 (LWP 4876)]
[Thread 0x7fffb7fff700 (LWP 4876) exited]
[Thread 0x7fffb4a5a700 (LWP 4875) exited]
-- X300 initialization sequence...
-- Connecting to niusrpriorpc at localhost:5444...
[New Thread 0x7fffb4a5a700 (LWP 4877)]
[Thread 0x7fffb4a5a700 (LWP 4877) exited]
-- Using LVBITX bitfile /usr/local/share/uhd/images/usrp_x310_fpga_HGS.lvbitx...
[New Thread 0x7fffb4a5a700 (LWP 4878)]
[New Thread 0x7fffb7fff700 (LWP 4879)]
[Thread 0x7fffb7fff700 (LWP 4879) exited]
-- Setup basic communication...
[New Thread 0x7fffb7fff700 (LWP 4893)]
-- Loading values from EEPROM...
-- Setup RF frontend clocking...
-- Radio 1x clock:200
-- Detecting internal GPSDO.... Found an internal GPSDO
-- Initialize Radio0 control...
-- Performing register loopback test... pass
-- Initialize Radio1 control...
-- Performing register loopback test... pass
[New Thread 0x7fffaffff700 (LWP 4895)]
[New Thread 0x7fffaf7fe700 (LWP 4896)]
[Thread 0x7fffaf7fe700 (LWP 4896) exited]
[Thread 0x7fffaffff700 (LWP 4895) exited]
[New Thread 0x7fffaffff700 (LWP 4897)]
[New Thread 0x7fffaf7fe700 (LWP 4898)]
[Thread 0x7fffaf7fe700 (LWP 4898) exited]
[Thread 0x7fffaffff700 (LWP 4897) exited]
[New Thread 0x7fffaffff700 (LWP 4899)]
[Thread 0x7fffaffff700 (LWP 4899) exited]
[New Thread 0x7fffaffff700 (LWP 4900)]
[Thread 0x7fffaffff700 (LWP 4900) exited]
[New Thread 0x7fffaffff700 (LWP 4901)]
[New Thread 0x7fffaf7fe700 (LWP 4902)]
[Thread 0x7fffaf7fe700 (LWP 4902) exited]
[Thread 0x7fffaffff700 (LWP 4901) exited]
set_min_output_buffer on block 32 to 100000
set_min_output_buffer on block 34 to 100000
[New Thread 0x7fffaffff700 (LWP 4903)]
[New Thread 0x7fffaf7fe700 (LWP 4904)]
[New Thread 0x7fffae60f700 (LWP 4905)]
[New Thread 0x7fffade0e700 (LWP 4906)]
[New Thread 0x7fffad60d700 (LWP 4907)]
[New Thread 0x7ffface0c700 (LWP 4908)]
[New Thread 0x7fff83fff700 (LWP 4909)]
[New Thread 0x7fff837fe700 (LWP 4910)]

.... to 4939

pdu len 26

new mac frame  (length 26)
=========================================
duration: 00 3c
frame control: 01 c8 (DATA)
Subtype: QoS Null
seq nr: 0
mac 1: c4:a:cb:2d:61:34
mac 2: e0:9d:31:14:73:18
mac 3: c4:a:cb:2d:61:34
instantaneous fer: 0
pdu len 26

new mac frame  (length 26)
=========================================
duration: 00 3c
frame control: 01 c8 (DATA)
Subtype: QoS Null
seq nr: 0
mac 1: c4:a:cb:2d:61:34
mac 2: e0:9d:31:14:73:18
mac 3: c4:a:cb:2d:61:34
instantaneous fer: 0.999756
pdu len 10

new mac frame  (length 10)
=========================================
frame too short to parse (<20)
thread[thread-per-block[3]: <block ofdm_mac (30)>]: std::bad_alloc
[Thread 0x7fffad60d700 (LWP 4907) exited]


duration: 00 3c
frame control: 01 c8 (DATA)
Subtype: QoS Null
seq nr: 0
mac 1: c4:a:cb:2d:61:34
mac 2: e0:9d:31:14:73:18
mac 3: c4:a:cb:2d:61:34
instantaneous fer: 0.999756
^C
Program received signal SIGINT, Interrupt.
0x00007ffff78e412d in poll () at ../sysdeps/unix/syscall-template.S:81
81    ../sysdeps/unix/syscall-template.S: No such file or directory.
(gdb) thread find 4907
Thread 1 has name '4907'
(gdb) thread info 1
No symbol "info" in current context.
(gdb) info thread
  Id   Target Id         Frame
  70   Thread 0x7fff20ffb700 (LWP 4939) "python" 0x00007ffff78e8337 in ioctl ()
    at ../sysdeps/unix/syscall-template.S:81
  69   Thread 0x7fff227fc700 (LWP 4938) "gr uhd usrp si2" pthread_cond_timedwait@@GLIBC_2.3.2 ()
    at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:238
  68   Thread 0x7fff22ffd700 (LWP 4937) "foo_packet_pa23" pthread_cond_timedwait@@GLIBC_2.3.2 ()
    at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:238
  67   Thread 0x7fff23fff700 (LWP 4936) "multiply_const3" pthread_cond_timedwait@@GLIBC_2.3.2 ()
    at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:238
  66   Thread 0x7fff28ff9700 (LWP 4935) "ofdm_cyclic_pr1" pthread_cond_timedwait@@GLIBC_2.3.2 ()
    at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:238
  65   Thread 0x7fff297fa700 (LWP 4934) "fft_vcc_fftw12" pthread_cond_timedwait@@GLIBC_2.3.2 ()
    at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:238
  64   Thread 0x7fff29ffb700 (LWP 4933) "ofdm_carrier_a1" pthread_cond_timedwait@@GLIBC_2.3.2 ()
    at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:238
  63   Thread 0x7fff2a7fc700 (LWP 4932) "tagged_stream_1" pthread_cond_timedwait@@GLIBC_2.3.2 ()
---Type <return> to continue, or q <return> to quit---
    at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:238
  62   Thread 0x7fff2affd700 (LWP 4931) "wifi_chunks_to1" pthread_cond_timedwait@@GLIBC_2.3.2 ()
    at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:238
  61   Thread 0x7fff2b7fe700 (LWP 4930) "chunks_to_symb1" pthread_cond_timedwait@@GLIBC_2.3.2 ()
    at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:238
  60   Thread 0x7fff237fe700 (LWP 4929) "packet_headerg1" pthread_cond_timedwait@@GLIBC_2.3.2 ()
    at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:238
  59   Thread 0x7fff2bfff700 (LWP 4928) "ofdm_mapper4" pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
  58   Thread 0x7fff58ff9700 (LWP 4927) "ofdm_decode_mac" pthread_cond_timedwait@@GLIBC_2.3.2 ()
    at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:238
  57   Thread 0x7fff597fa700 (LWP 4926) "null_sink33" pthread_cond_timedwait@@GLIBC_2.3.2 ()
    at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:238
  56   Thread 0x7fff59ffb700 (LWP 4925) "vector_to_stre1" pthread_cond_timedwait@@GLIBC_2.3.2 ()
    at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:238
  55   Thread 0x7fff5a7fc700 (LWP 4924) "ofdm_decode_sig" pthread_cond_timedwait@@GLIBC_2.3.2 ()
---Type <return> to continue, or q <return> to quit---
    at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:238
  54   Thread 0x7fff5affd700 (LWP 4923) "ofdm_equalize_s" pthread_cond_timedwait@@GLIBC_2.3.2 ()
    at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:238
  53   Thread 0x7fff5bfff700 (LWP 4922) "fft_vcc_fftw11" pthread_cond_timedwait@@GLIBC_2.3.2 ()
    at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:238
  52   Thread 0x7fff60fff700 (LWP 4921) "stream_to_vect1" pthread_cond_timedwait@@GLIBC_2.3.2 ()
    at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:238
  51   Thread 0x7fff61800700 (LWP 4920) "ofdm_sync_long3" pthread_cond_timedwait@@GLIBC_2.3.2 ()
    at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:238
  50   Thread 0x7fff62ffd700 (LWP 4919) "delay23" pthread_cond_timedwait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:238
  49   Thread 0x7fff637fe700 (LWP 4918) "ofdm_sync_short" pthread_cond_timedwait@@GLIBC_2.3.2 ()
    at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:238
  48   Thread 0x7fff5b7fe700 (LWP 4917) "divide_ff21" pthread_cond_timedwait@@GLIBC_2.3.2 ()
    at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:238
  47   Thread 0x7fff63fff700 (LWP 4916) "complex_to_mag2" pthread_cond_timedwait@@GLIBC_2.3.2 ()
---Type <return> to continue, or q <return> to quit---
    at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:238
  46   Thread 0x7fff80ff9700 (LWP 4915) "moving_average_" 0x00007ffff476a270 in address@hidden () from /usr/local/lib/libgnuradio-runtime-3.7.8.so.0.0.0
  45   Thread 0x7fff817fa700 (LWP 4914) "multiply_cc20" pthread_cond_timedwait@@GLIBC_2.3.2 ()
    at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:238
  44   Thread 0x7fff81ffb700 (LWP 4913) "conjugate_cc24" pthread_cond_timedwait@@GLIBC_2.3.2 ()
    at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:238
  43   Thread 0x7fff827fc700 (LWP 4912) "delay22" pthread_cond_timedwait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:238
  42   Thread 0x7fff82ffd700 (LWP 4911) "moving_average_" pthread_cond_timedwait@@GLIBC_2.3.2 ()
    at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:238
  41   Thread 0x7fff837fe700 (LWP 4910) "complex_to_mag2" pthread_cond_timedwait@@GLIBC_2.3.2 ()
    at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:238
  40   Thread 0x7fff83fff700 (LWP 4909) "gr uhd usrp so2" 0x00007ffff78e8337 in ioctl () at ../sysdeps/unix/syscall-template.S:81
  39   Thread 0x7ffface0c700 (LWP 4908) "ofdm_parse_mac2" pthread_cond_timedwait@@GLIBC_2.3.2 ()
    at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:238
  37   Thread 0x7fffade0e700 (LWP 4906) "file_sink36" pthread_cond_timedwait@@GL---Type <return> to continue, or q <return> to quit---
IBC_2.3.2 ()
    at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:238
  36   Thread 0x7fffae60f700 (LWP 4905) "python" pthread_cond_timedwait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:238
  35   Thread 0x7fffaf7fe700 (LWP 4904) "wireshark_conn3" pthread_cond_timedwait@@GLIBC_2.3.2 ()
    at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:238
  34   Thread 0x7fffaffff700 (LWP 4903) "message_strobe3" pthread_cond_timedwait@@GLIBC_2.3.2 ()
    at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:238
  25   Thread 0x7fffb7fff700 (LWP 4893) "python" pthread_cond_timedwait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:238
  23   Thread 0x7fffb4a5a700 (LWP 4878) "python" 0x00007ffff78f1b13 in epoll_wait () at ../sysdeps/unix/syscall-template.S:81
  13   Thread 0x7fffb77fe700 (LWP 4867) "pool" pthread_cond_timedwait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:238
  11   Thread 0x7fffc48f5700 (LWP 4865) "gmain" 0x00007ffff78e412d in poll ()
    at ../sysdeps/unix/syscall-template.S:81
  10   Thread 0x7fffc5a51700 (LWP 4864) "gdbus" 0x00007ffff78e412d in poll ()
    at ../sysdeps/unix/syscall-template.S:81
  9    Thread 0x7fffc6252700 (LWP 4863) "dconf worker" 0x00007ffff78e412d in poll () at ../sysdeps/unix/syscall-template.S:81
  8    Thread 0x7fffe0f95700 (LWP 4862) "python" pthread_cond_wait@@GLIBC_2.3.2
---Type <return> to continue, or q <return> to quit---
    () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
  7    Thread 0x7fffe3796700 (LWP 4861) "python" pthread_cond_wait@@GLIBC_2.3.2
    () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
  6    Thread 0x7fffe5f97700 (LWP 4860) "python" pthread_cond_wait@@GLIBC_2.3.2
    () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
  5    Thread 0x7fffe8798700 (LWP 4859) "python" pthread_cond_wait@@GLIBC_2.3.2
    () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
  4    Thread 0x7fffeaf99700 (LWP 4858) "python" pthread_cond_wait@@GLIBC_2.3.2
    () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
  3    Thread 0x7fffed79a700 (LWP 4857) "python" pthread_cond_wait@@GLIBC_2.3.2
    () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
  2    Thread 0x7fffedf9b700 (LWP 4856) "python" pthread_cond_wait@@GLIBC_2.3.2
    () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
* 1    Thread 0x7ffff7fc2740 (LWP 4854) "4907" 0x00007ffff78e412d in poll ()
    at ../sysdeps/unix/syscall-template.S:81



Regards




Abhinav PS  Jadon
2012122
Electronics and Communication Engineering Undergraduate
IIIT - Delhi
IASc Summer Research Fellow 2015
E: address@hidden
M: +919650936845



On Thu, Feb 18, 2016 at 4:44 AM, Bastian Bloessl <address@hidden> wrote:
Hi,

On 17 Feb 2016, at 11:45, Abhinav Jadon <address@hidden> wrote:

Upon running the transceiver code on a single X310, the transceiver shuts down after few seconds of action (the LED ceases to blink) while the RX continues to be up and decodes the packets.

I can’t tell you much about the LEDs of the X310, but is there an error message, a seg fault, output from UHD (like ‘O's, ’T's, ‘D’s printed on the console), or any other indicator that something went wrong?
Maybe start the flow graph in a debugger to get more information.

If you use my Packet Pad block, try disabling the delay.

If I run only the RX ( replacing the UHD sink with a null sink), it continues to decode the packet.
If I run only the TX ( replacing the UHD source with a null source), it continues to transmit, the LED stays on until I stop the flow graph.

What happens if you use just one transceiver flow graph (it has RX and TX)?


I also ran simple tests (single tone transmission and reception) on the same device. The TX and RX LEDs remain up until the flowgraph is stopped. This was done at the behest of James Humpheris of Ettus Research.
I raised the issue on the Ettus mailing list and they asked me to put this up on the GNURadio Mailing List. 

Just read the thread… I see...
How about piping the samples to the UHD Sink also in a Tag Debug block or something to check whether samples are generated at all.

Best,
Bastian

Regards


Abhinav PS  Jadon
2012122
Electronics and Communication Engineering Undergraduate
IIIT - Delhi
IASc Summer Research Fellow 2015
E: address@hidden
M: +919650936845



On Mon, Feb 15, 2016 at 9:51 AM, Bastian Bloessl <address@hidden> wrote:
Hi,


On 14 Feb 2016, at 14:46, Abhinav Jadon <address@hidden> wrote:

There are no overruns and the connections to the antenna ports are correct.
The frame detection is working

Note, that this also means that frame detection is only triggered once per frame. Sometimes, it can be triggered all the time (if there is a DC offset or LO leakage for example).
Since you connected the devices via cable I would try to change LO offset of sender and receiver.
(Btw, I guess you use attenuators)


I tried all the stuff you told me to try ie I tried LMS ansd LO offset, they worked as in I saw some packets being decoded by the wireshark connector. But the packet content was incorrect . Each packet decoded looked like this 


new mac frame  (length 10)
=========================================
frame too short to parse (<20)
WIRESHARK: received new message
message length 10
WIRESHARK: d_msg_offset: 0   to_copy: 43   d_msg_len 43
WIRESHARK: output size: 32768   produced items: 43

You should check in Wireshark if the content makes sense. I just implemented a very minimal parser for demo purposes.


While the packet that is being transmitted has the following characteristics

WIRESHARK: received new message
message length 624
WIRESHARK: d_msg_offset: 0   to_copy: 657   d_msg_len 657
WIRESHARK: output size: 32768   produced items: 657

Is the signal field being wrongly interpreted ?

That would be one thing to find out. The easiest way is to enable the log option of the Decode Signal block (not the Wireshark block) to print what it decoded.

In general, I would recommend to try to find out where things break. (is the frame detected, is the signal field decoded, does the constellation plot look OK, etc.)

Best,
Bastian





On Thu, Feb 11, 2016 at 6:13 AM, Bastian Bloessl <address@hidden> wrote:
Hi

> On 10 Feb 2016, at 15:13, Abhinav Jadon <address@hidden> wrote:
> Next I replaced the loopback with a uhd source and sink and connected the RF frontends using a SMA cable. It fails to give me any packet (the wireshark connector). I tried playing with the value of rx_gain and tx_gain. I also tried playing with the value of the the correlation threshold.
> I then chose to debug using the data flow. The data in the flowgraph flows until the Decode MAC block where it gets dropped with checksum wrong message.
>

Your debugging sounds already pretty good. Some more stuff you could try

- assert that there are no overruns (‘O’s or ‘D’ on the console)
- check that frame detection is working (there are no frames detected when the transmitter is turned off)
- test with antennas
- assert that you connected the correct antenna ports (RX and TX use a different ports by default)
- set a different LO offset
- use the LMS equaliser
- try a different sample rate / bandwidth
- check if the signal field is decoded correctly (log or debug option)

Best,
Bastian







reply via email to

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