Post Go back to editing

Get in RX the same values of TX

Hi people,

There is a way to send a data in the TX and receive the same in the RX?  I mean if I put a cable between TX A and RX A and send a value in I and another in Q, there is a way to get them back on the RX A I/Q?  I am developing a IEEE 802.15.4 transceiver, and for testing, at least in the begging would be nice to be able to do that, send something and get the same the other side.

I tried to change the ad9361-iiostream.c to send always the same data, RX and TX in the same frequency, and on the RX compare the received I/Q to see if was the same... but I didn't manage to do it.  Well it makes sense not being able to, the process is too fast, so the time you say send this and you start reading it is possible that you will not read the same thing you just sent, even more because, as far as I understood the buffers in the middle would make this  synchronization a nightmare, even with different threads for the send and receive.

Nevertheless, I would know if I can do it, somehow to be able to test my transceiver.

   Best regards...

          Daniel

Parents
  • Hi Michael,

      Thanks for the link that really answers the question about the loss in precision.  But there is a way to set the size of the buffer for the loopback? It seems the buffer is limited to 4 symbols.

       I spend some time trying to understand again and I perceived (yes I am kind of slow ) that in fact it just repeats some values, over and over. I changed the code to, instead of a sinusoid just send a number count and then the result is even clearer.... The loop back buffer has a size that I should set somewhere? I tried to find in the osciloscope but I didn't managed to. Any ideas?

    Just for the sake of the example, here, the RX buffer is a sequence of FE, FF, FC, FD:

    --- To Send Values ---

    i:0 I=0,Q=10 :: 100000

    i:1 I=20,Q=30 :: 300020

    i:2 I=40,Q=50 :: 500040

    i:3 I=60,Q=70 :: 700060

    i:4 I=80,Q=90 :: 900080

    i:5 I=A0,Q=B0 :: B000A0

    i:6 I=C0,Q=D0 :: D000C0

    i:7 I=E0,Q=F0 :: F000E0

    i:8 I=100,Q=110 :: 1100100

    i:9 I=120,Q=130 :: 1300120

    --- Received Values  rx0_i ---

    i:0 I_i=FFFFFFFE,Q_i=FFFFFFFF :: FFFFFFFE

    i:1 I_i=FFFFFFFC,Q_i=FFFFFFFD :: FFFDFFFC

    i:2 I_i=FFFFFFFE,Q_i=FFFFFFFF :: FFFFFFFE

    i:3 I_i=FFFFFFFC,Q_i=FFFFFFFD :: FFFDFFFC

    i:4 I_i=FFFFFFFE,Q_i=FFFFFFFF :: FFFFFFFE

    i:5 I_i=FFFFFFFC,Q_i=FFFFFFFD :: FFFDFFFC

    i:6 I_i=FFFFFFFE,Q_i=FFFFFFFF :: FFFFFFFE

    i:7 I_i=FFFFFFFC,Q_i=FFFFFFFD :: FFFDFFFC

    i:8 I_i=FFFFFFFE,Q_i=FFFFFFFF :: FFFFFFFE

    i:9 I_i=FFFFFFFC,Q_i=FFFFFFFD :: FFFDFFFC

    --------------------------

    ////////////////////////////////////

    If I change it to  my sinusoid again.... than the first time it flushes the old buffer (as expected), and after it gets locked into a sequence of the sinusoid. (0000, FFFF, FA82, 57E).

    //////////////////////////////////////

    --- To Send Values ---

    i:0 I=0,Q=10 :: 100000

    i:1 I=FFFFA820,Q=57E0 :: 57E0A820

    i:2 I=FFFFFFF0,Q=0 :: FFF0

    i:3 I=FFFFA820,Q=57E0 :: 57E0A820

    i:4 I=0,Q=10 :: 100000

    i:5 I=FFFFA820,Q=57E0 :: 57E0A820

    i:6 I=FFFFFFF0,Q=0 :: FFF0

    i:7 I=FFFFA820,Q=57E0 :: 57E0A820

    i:8 I=0,Q=10 :: 100000

    i:9 I=FFFFA820,Q=57E0 :: 57E0A820

    --- Received Values  rx0_i ---

    i:0 I_i=FFFFFFFE,Q_i=FFFFFFFF :: FFFFFFFE

    i:1 I_i=FFFFFFFC,Q_i=FFFFFFFD :: FFFDFFFC

    i:2 I_i=FFFFFFFE,Q_i=FFFFFFFF :: FFFFFFFE

    i:3 I_i=FFFFFFFC,Q_i=FFFFFFFD :: FFFDFFFC

    i:4 I_i=FFFFFFFE,Q_i=FFFFFFFF :: FFFFFFFE

    i:5 I_i=FFFFFFFC,Q_i=FFFFFFFD :: FFFDFFFC

    i:6 I_i=FFFFFFFE,Q_i=FFFFFFFF :: FFFFFFFE

    i:7 I_i=FFFFFFFC,Q_i=FFFFFFFD :: FFFDFFFC

    i:8 I_i=FFFFFFFE,Q_i=FFFFFFFF :: FFFFFFFE

    i:9 I_i=FFFFFFFC,Q_i=FFFFFFFD :: FFFDFFFC

        RX     1.05 MSmp, TX     1.05 MSmp

    --- To Send Values ---

    i:0 I=0,Q=10 :: 100000

    i:1 I=FFFFA820,Q=57E0 :: 57E0A820

    i:2 I=FFFFFFF0,Q=0 :: FFF0

    i:3 I=FFFFA820,Q=57E0 :: 57E0A820

    i:4 I=0,Q=10 :: 100000

    i:5 I=FFFFA820,Q=57E0 :: 57E0A820

    i:6 I=FFFFFFF0,Q=0 :: FFF0

    i:7 I=FFFFA820,Q=57E0 :: 57E0A820

    i:8 I=0,Q=10 :: 100000

    i:9 I=FFFFA820,Q=57E0 :: 57E0A820

    --- Received Values  rx0_i ---

    i:0 I_i=FFFFFFFF,Q_i=0 :: FFFF

    i:1 I_i=FFFFFA82,Q_i=57E :: 57EFA82

    i:2 I_i=FFFFFFFF,Q_i=0 :: FFFF

    i:3 I_i=FFFFFA82,Q_i=57E :: 57EFA82

    i:4 I_i=FFFFFFFF,Q_i=0 :: FFFF

    i:5 I_i=FFFFFA82,Q_i=57E :: 57EFA82

    i:6 I_i=FFFFFFFF,Q_i=0 :: FFFF

    i:7 I_i=FFFFFA82,Q_i=57E :: 57EFA82

    i:8 I_i=FFFFFFFF,Q_i=0 :: FFFF

    i:9 I_i=FFFFFA82,Q_i=57E :: 57EFA82

Reply
  • Hi Michael,

      Thanks for the link that really answers the question about the loss in precision.  But there is a way to set the size of the buffer for the loopback? It seems the buffer is limited to 4 symbols.

       I spend some time trying to understand again and I perceived (yes I am kind of slow ) that in fact it just repeats some values, over and over. I changed the code to, instead of a sinusoid just send a number count and then the result is even clearer.... The loop back buffer has a size that I should set somewhere? I tried to find in the osciloscope but I didn't managed to. Any ideas?

    Just for the sake of the example, here, the RX buffer is a sequence of FE, FF, FC, FD:

    --- To Send Values ---

    i:0 I=0,Q=10 :: 100000

    i:1 I=20,Q=30 :: 300020

    i:2 I=40,Q=50 :: 500040

    i:3 I=60,Q=70 :: 700060

    i:4 I=80,Q=90 :: 900080

    i:5 I=A0,Q=B0 :: B000A0

    i:6 I=C0,Q=D0 :: D000C0

    i:7 I=E0,Q=F0 :: F000E0

    i:8 I=100,Q=110 :: 1100100

    i:9 I=120,Q=130 :: 1300120

    --- Received Values  rx0_i ---

    i:0 I_i=FFFFFFFE,Q_i=FFFFFFFF :: FFFFFFFE

    i:1 I_i=FFFFFFFC,Q_i=FFFFFFFD :: FFFDFFFC

    i:2 I_i=FFFFFFFE,Q_i=FFFFFFFF :: FFFFFFFE

    i:3 I_i=FFFFFFFC,Q_i=FFFFFFFD :: FFFDFFFC

    i:4 I_i=FFFFFFFE,Q_i=FFFFFFFF :: FFFFFFFE

    i:5 I_i=FFFFFFFC,Q_i=FFFFFFFD :: FFFDFFFC

    i:6 I_i=FFFFFFFE,Q_i=FFFFFFFF :: FFFFFFFE

    i:7 I_i=FFFFFFFC,Q_i=FFFFFFFD :: FFFDFFFC

    i:8 I_i=FFFFFFFE,Q_i=FFFFFFFF :: FFFFFFFE

    i:9 I_i=FFFFFFFC,Q_i=FFFFFFFD :: FFFDFFFC

    --------------------------

    ////////////////////////////////////

    If I change it to  my sinusoid again.... than the first time it flushes the old buffer (as expected), and after it gets locked into a sequence of the sinusoid. (0000, FFFF, FA82, 57E).

    //////////////////////////////////////

    --- To Send Values ---

    i:0 I=0,Q=10 :: 100000

    i:1 I=FFFFA820,Q=57E0 :: 57E0A820

    i:2 I=FFFFFFF0,Q=0 :: FFF0

    i:3 I=FFFFA820,Q=57E0 :: 57E0A820

    i:4 I=0,Q=10 :: 100000

    i:5 I=FFFFA820,Q=57E0 :: 57E0A820

    i:6 I=FFFFFFF0,Q=0 :: FFF0

    i:7 I=FFFFA820,Q=57E0 :: 57E0A820

    i:8 I=0,Q=10 :: 100000

    i:9 I=FFFFA820,Q=57E0 :: 57E0A820

    --- Received Values  rx0_i ---

    i:0 I_i=FFFFFFFE,Q_i=FFFFFFFF :: FFFFFFFE

    i:1 I_i=FFFFFFFC,Q_i=FFFFFFFD :: FFFDFFFC

    i:2 I_i=FFFFFFFE,Q_i=FFFFFFFF :: FFFFFFFE

    i:3 I_i=FFFFFFFC,Q_i=FFFFFFFD :: FFFDFFFC

    i:4 I_i=FFFFFFFE,Q_i=FFFFFFFF :: FFFFFFFE

    i:5 I_i=FFFFFFFC,Q_i=FFFFFFFD :: FFFDFFFC

    i:6 I_i=FFFFFFFE,Q_i=FFFFFFFF :: FFFFFFFE

    i:7 I_i=FFFFFFFC,Q_i=FFFFFFFD :: FFFDFFFC

    i:8 I_i=FFFFFFFE,Q_i=FFFFFFFF :: FFFFFFFE

    i:9 I_i=FFFFFFFC,Q_i=FFFFFFFD :: FFFDFFFC

        RX     1.05 MSmp, TX     1.05 MSmp

    --- To Send Values ---

    i:0 I=0,Q=10 :: 100000

    i:1 I=FFFFA820,Q=57E0 :: 57E0A820

    i:2 I=FFFFFFF0,Q=0 :: FFF0

    i:3 I=FFFFA820,Q=57E0 :: 57E0A820

    i:4 I=0,Q=10 :: 100000

    i:5 I=FFFFA820,Q=57E0 :: 57E0A820

    i:6 I=FFFFFFF0,Q=0 :: FFF0

    i:7 I=FFFFA820,Q=57E0 :: 57E0A820

    i:8 I=0,Q=10 :: 100000

    i:9 I=FFFFA820,Q=57E0 :: 57E0A820

    --- Received Values  rx0_i ---

    i:0 I_i=FFFFFFFF,Q_i=0 :: FFFF

    i:1 I_i=FFFFFA82,Q_i=57E :: 57EFA82

    i:2 I_i=FFFFFFFF,Q_i=0 :: FFFF

    i:3 I_i=FFFFFA82,Q_i=57E :: 57EFA82

    i:4 I_i=FFFFFFFF,Q_i=0 :: FFFF

    i:5 I_i=FFFFFA82,Q_i=57E :: 57EFA82

    i:6 I_i=FFFFFFFF,Q_i=0 :: FFFF

    i:7 I_i=FFFFFA82,Q_i=57E :: 57EFA82

    i:8 I_i=FFFFFFFF,Q_i=0 :: FFFF

    i:9 I_i=FFFFFA82,Q_i=57E :: 57EFA82

Children
No Data