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
  • Thanks Michael,

      It was exactly that what I wanted. Just one small clarification though... it seems it is loosing in precision... well that was somehow expected and in fact it is not a big deal!  The thing that is bothering me is that I am having a hard time to understanding how it works the receiving part. As in the example, I fill just the tx0_i, and try to read only the rx0_i... the result is strange. If I fill the tx0_i and try to read the rx0_i and rx0_q... seems quite better, everything it is there at least, but I don't know understand how to make sense of  the results.

    For the values, I am generating a sinusoid of 4 points for I and  Q is the same sinusoid, but shifted of 2 and multiplied by -1 (I made a lot of tests to try to find the logic ). I am attaching the smallchange.c (small changes over the standard  ad9361-iiostream.c ). By the way, I am using over the network, I don't think it makes any difference.... but who knows?!?!

    -> main:338: --- To Send Values ---

    -> main:346: i:0 I=0,Q=FFFF8001

    -> main:346: i:1 I=5A82,Q=FFFFA57E

    -> main:346: i:2 I=7FFF,Q=0

    -> main:346: i:3 I=5A82,Q=FFFFA57E

    -> main:346: i:4 I=0,Q=FFFF8001

    -> main:346: i:5 I=5A82,Q=FFFFA57E

    -> main:346: i:6 I=7FFF,Q=0

    -> main:346: i:7 I=5A82,Q=FFFFA57E

    -> main:346: i:8 I=0,Q=FFFF8001

    -> main:346: i:9 I=5A82,Q=FFFFA57E

    -> main:369: --- Received Values  rx0_i ---

    -> main:376: i:0 I_i=7FF,Q_i=0

    -> main:376: i:1 I_i=5A8,Q_i=FFFFFA57

    -> main:376: i:2 I_i=7FF,Q_i=0

    -> main:376: i:3 I_i=5A8,Q_i=FFFFFA57

    -> main:376: i:4 I_i=7FF,Q_i=0

    -> main:376: i:5 I_i=5A8,Q_i=FFFFFA57

    -> main:376: i:6 I_i=7FF,Q_i=0

    -> main:376: i:7 I_i=5A8,Q_i=FFFFFA57

    -> main:376: i:8 I_i=7FF,Q_i=0

    -> main:376: i:9 I_i=5A8,Q_i=FFFFFA57

    -> main:382: --- Received Values  rx0_q ---

    -> main:389: i:0 I_q=0,Q_q=5A8

    -> main:389: i:1 I_q=FFFFFA57,Q_q=7FF

    -> main:389: i:2 I_q=0,Q_q=5A8

    -> main:389: i:3 I_q=FFFFFA57,Q_q=7FF

    -> main:389: i:4 I_q=0,Q_q=5A8

    -> main:389: i:5 I_q=FFFFFA57,Q_q=7FF

    -> main:389: i:6 I_q=0,Q_q=5A8

    -> main:389: i:7 I_q=FFFFFA57,Q_q=7FF

    -> main:389: i:8 I_q=0,Q_q=5A8

    -> main:389: i:9 I_q=FFFFFA57,Q_q=7FF

        RX    3.15 MSmp, TX    3.15 MSmp

    Another fast question is, is there a way to reset the loopback buffer from the code? Sometimes I see that I get the results of the last run, what I am doing is to change the loopback to 0, run the code, chage it again to 1 to be sure it will work, I guess there is a smarter way of doing it .

    Best regards....

              Daniel

    smallchange.c.zip
Reply
  • Thanks Michael,

      It was exactly that what I wanted. Just one small clarification though... it seems it is loosing in precision... well that was somehow expected and in fact it is not a big deal!  The thing that is bothering me is that I am having a hard time to understanding how it works the receiving part. As in the example, I fill just the tx0_i, and try to read only the rx0_i... the result is strange. If I fill the tx0_i and try to read the rx0_i and rx0_q... seems quite better, everything it is there at least, but I don't know understand how to make sense of  the results.

    For the values, I am generating a sinusoid of 4 points for I and  Q is the same sinusoid, but shifted of 2 and multiplied by -1 (I made a lot of tests to try to find the logic ). I am attaching the smallchange.c (small changes over the standard  ad9361-iiostream.c ). By the way, I am using over the network, I don't think it makes any difference.... but who knows?!?!

    -> main:338: --- To Send Values ---

    -> main:346: i:0 I=0,Q=FFFF8001

    -> main:346: i:1 I=5A82,Q=FFFFA57E

    -> main:346: i:2 I=7FFF,Q=0

    -> main:346: i:3 I=5A82,Q=FFFFA57E

    -> main:346: i:4 I=0,Q=FFFF8001

    -> main:346: i:5 I=5A82,Q=FFFFA57E

    -> main:346: i:6 I=7FFF,Q=0

    -> main:346: i:7 I=5A82,Q=FFFFA57E

    -> main:346: i:8 I=0,Q=FFFF8001

    -> main:346: i:9 I=5A82,Q=FFFFA57E

    -> main:369: --- Received Values  rx0_i ---

    -> main:376: i:0 I_i=7FF,Q_i=0

    -> main:376: i:1 I_i=5A8,Q_i=FFFFFA57

    -> main:376: i:2 I_i=7FF,Q_i=0

    -> main:376: i:3 I_i=5A8,Q_i=FFFFFA57

    -> main:376: i:4 I_i=7FF,Q_i=0

    -> main:376: i:5 I_i=5A8,Q_i=FFFFFA57

    -> main:376: i:6 I_i=7FF,Q_i=0

    -> main:376: i:7 I_i=5A8,Q_i=FFFFFA57

    -> main:376: i:8 I_i=7FF,Q_i=0

    -> main:376: i:9 I_i=5A8,Q_i=FFFFFA57

    -> main:382: --- Received Values  rx0_q ---

    -> main:389: i:0 I_q=0,Q_q=5A8

    -> main:389: i:1 I_q=FFFFFA57,Q_q=7FF

    -> main:389: i:2 I_q=0,Q_q=5A8

    -> main:389: i:3 I_q=FFFFFA57,Q_q=7FF

    -> main:389: i:4 I_q=0,Q_q=5A8

    -> main:389: i:5 I_q=FFFFFA57,Q_q=7FF

    -> main:389: i:6 I_q=0,Q_q=5A8

    -> main:389: i:7 I_q=FFFFFA57,Q_q=7FF

    -> main:389: i:8 I_q=0,Q_q=5A8

    -> main:389: i:9 I_q=FFFFFA57,Q_q=7FF

        RX    3.15 MSmp, TX    3.15 MSmp

    Another fast question is, is there a way to reset the loopback buffer from the code? Sometimes I see that I get the results of the last run, what I am doing is to change the loopback to 0, run the code, chage it again to 1 to be sure it will work, I guess there is a smarter way of doing it .

    Best regards....

              Daniel

    smallchange.c.zip
Children
No Data