I am working on a wifi project using a custom FPGA and AD9361.
hardware: FMCOMMS3-EBZ, 1x1, CMOS, TDD, dual port half duplex, SDR, data_clk 40MHz, ENSM(level mode, pin control)
software: no-os driver.
At present, the software has successfully run, and there is no problem in sending and receiving wifi data frame separately. Unfortunately, it fails when receiving and sending ACK frame.
According to the 802.11 protocol:
After receiving a data frame, the device delays one sifs (about 9us) and then reply an ACK frame to the sender.
Similarly, after sending a data frame, the device waits for the ACK frame. If times out, it retransmits the data frame.
I tested with the AD9361 and a wireless router. I found that after the AD9361 had sent a data frame, it did not receive the ACK frame replied by the peer (but I could capture it using Sinffer). On the other hand, the AD9361 cannot successfully send ACK frame after receiving a data frame (I can't capture it with Sinffer).
For debugging, I tested with 2 AD9361s (AD9361-1 and AD9361-2), one as an wireless client and one as a AP. The client sends a data frame and waits for ACK. If no ACK is received, retransmit the packet . Once the AP receives the packet, it replies a ACK frame first. Then send a data frame to the client.
I connected their interface signals to a logic analyzer, and the signals are as follows:
Ad9361-1(client): enable trnrx rxframe txframe
Ad9361-2(AP) : enable2 trnrx2 rxframe2 txframe2
It seems that AP can only receive the first packet sent by STA. He immediately replies with an ACK packet (the duration of the txframe high level is the same as the transmission duration of the ACK packet), but the client does not receive it. Then they were sending packets to each other, but none of them succeeded in receiving the packets.
I have 2 questions about this waveform:
1. Both trnrx and txframe change from high level to low level, but the rxframe will not change to high level until about 200us.Within this 200us, the peer has already sent a packet to it, which may cause it to not receive packets sent by the peer such as ACK? Why does this delay exist?
2. After the ad9361-2 receives the first packet sent by the ad9361-1, the txframe2 immediately becomes high. At this time, it may be sending an ack, but sinffer does not capture it. It should not be sent successfully. I read the wifi related discussion on the forum and said that it takes 18 us to switch from rx to tx. These were discussions a few years ago. Could our question be related to this?
This is the first time we use the ad9361. Please help us check the waveform.
Thank you very much!