This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

WL1837MOD: TCP packet loss at the start of a P2P GO wifi connection with some Android devices

Part Number: WL1837MOD

Hi,

We use WL1837MODGIMOC with a zynq board to host a P2P GO network to send/receive data from a mobile application.

The issue described below occurs with several Android tablets - I've reproduced it with Samsung T580, T813 and T713.

I also tried hosting a p2p go network on my Linux laptop and my raspberry pi, which these Android devices have no issues sending TCP packets to. This leads me to believe that the problem could be somewhere on our side or with the wifi module.

Contents of p2p.conf for wpa_supplicant:

ctrl_interface=/var/run/wpa_supplicant
ap_scan=2
device_name=mydevice
device_type=1-0050F204-1
p2p_go_intent=15
p2p_pref_chan=115:40
network={
    ssid=...
    psk=...
    mode=3
    disabled=2
    proto=RSN
    pairwise=CCMP
    key_mgmt=WPA-PSK
}

Start the network:

wpa_supplicant -B -i wlan0 -c p2p.conf
wpa_cli p2p_group_add persistent=0
ifconfig p2p-wlan0-0 192.168.1.1
udhcpd -S dhcpserver.conf

Then, I'm connecting to this network with an Android tablet and testing throughput with iperf3. This is what the typical iperf3 output looks like from the Android side immediately after connecting to the p2p go network:

Linux localhost 3.10.84-13024869 #1 SMP PREEMPT Thu Jun 7 22:14:19 KST 2018 armv8l
Time: Thu, 20 Sep 2018 17:02:13 GMT
Connecting to host 192.168.1.1, port 5201
      Cookie: localhost.1537462930.814506.68231ff9
      TCP MSS: 1448 (default)
[  4] local 192.168.1.10 port 44159 connected to 192.168.1.1 port 5201
Starting Test: protocol: TCP, 1 streams, 131072 byte blocks, omitting 0 seconds, 0 second test
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-1.01   sec   341 KBytes  2.78 Mbits/sec
[  4]   1.01-2.01   sec  0.00 Bytes  0.00 bits/sec
[  4]   2.01-3.01   sec  0.00 Bytes  0.00 bits/sec
[  4]   3.01-4.00   sec  0.00 Bytes  0.00 bits/sec
[  4]   4.00-5.01   sec  0.00 Bytes  0.00 bits/sec
[  4]   5.01-6.01   sec  0.00 Bytes  0.00 bits/sec
[  4]   6.01-7.00   sec  0.00 Bytes  0.00 bits/sec
[  4]   7.00-8.00   sec  0.00 Bytes  0.00 bits/sec
[  4]   8.00-9.01   sec  0.00 Bytes  0.00 bits/sec
[  4]   9.01-10.00  sec  0.00 Bytes  0.00 bits/sec
[  4]  10.00-11.01  sec  0.00 Bytes  0.00 bits/sec
[  4]  11.01-12.01  sec  0.00 Bytes  0.00 bits/sec
[  4]  12.01-13.00  sec  0.00 Bytes  0.00 bits/sec
[  4]  13.00-14.01  sec  0.00 Bytes  0.00 bits/sec
[  4]  14.01-15.00  sec  0.00 Bytes  0.00 bits/sec
[  4]  15.00-16.00  sec  0.00 Bytes  0.00 bits/sec
[  4]  16.00-17.01  sec  0.00 Bytes  0.00 bits/sec
[  4]  17.01-18.01  sec  0.00 Bytes  0.00 bits/sec
[  4]  18.01-19.01  sec  0.00 Bytes  0.00 bits/sec
[  4]  19.01-20.00  sec  0.00 Bytes  0.00 bits/sec
[  4]  20.00-21.00  sec  0.00 Bytes  0.00 bits/sec
[  4]  21.00-22.01  sec  0.00 Bytes  0.00 bits/sec
[  4]  22.01-23.00  sec  0.00 Bytes  0.00 bits/sec
[  4]  23.00-24.01  sec  0.00 Bytes  0.00 bits/sec
[  4]  24.01-25.01  sec  0.00 Bytes  0.00 bits/sec
[  4]  25.01-26.00  sec  0.00 Bytes  0.00 bits/sec
[  4]  26.00-27.01  sec  0.00 Bytes  0.00 bits/sec
[  4]  27.01-28.01  sec  0.00 Bytes  0.00 bits/sec
[  4]  28.01-29.00  sec  0.00 Bytes  0.00 bits/sec
[  4]  29.00-30.01  sec  0.00 Bytes  0.00 bits/sec
[  4]  30.01-31.00  sec  0.00 Bytes  0.00 bits/sec
[  4]  31.00-32.01  sec  0.00 Bytes  0.00 bits/sec
[  4]  32.01-33.00  sec   362 KBytes  2.98 Mbits/sec
[  4]  33.00-34.00  sec  2.62 MBytes  21.9 Mbits/sec
[  4]  34.00-35.00  sec  3.08 MBytes  25.8 Mbits/sec
[  4]  35.00-36.00  sec  2.42 MBytes  20.3 Mbits/sec
[  4]  36.00-37.00  sec  2.47 MBytes  20.7 Mbits/sec

Afterwards it's fine. If we stay connected to the network, I can restart iperf3 and see traffic right away. The issue happens just after switching networks. Note: It does not occur with UDP (using -u in iperf3).

I've done packet captures from both sides while running iperf3 and I frequently see things like this:

The capture below was taken on the board with WL1837MODGIMOC. Notice the huge time gap between packets 122 and 132 in this TCP conversation.

This next capture was taken on a rooted SM-T580 at the same time. Notice how it's trying to send the same packet a few times until it finally happens at the 18 second mark.

Another important observation: if I don't use p2p go, and communicate with the tablet through a wifi router, there are no such issues! However, the p2p go functionality if very important to us.

We are using R8.7_SP3 and the firmware version is 8.9.0.0.79. We have builds with kernel 4.4.0 and 4.14.0, both have the same issue.

Any assistance is be greatly appreciated!

Thank you,

  • Our, expert will take a look at it.. If, you have air sniffer logs, can you please provide them too.. It helps to see, if there is any thing peculiar in the air interface..

    Thanks
  • I made an air capture between the two devices - see attached. I include only the first 1549 frames because iperf captures tend to get very large... But this capture does demonstrate the problem: the iperf3 output was similar to my original post with TCP traffic starting after about 18seconds (since the beginning of iperf, not the capture).

    To decrypt the capture in wireshark, use IEEE 802.11 WPA-PSK: ce400f502cf4a62b2571b8def66d43249de1cce4cba6f8d27357a21ead1fdb9c

    Hope this helps!

    aircapture_T580_iperf3.zip

  • Hi,

    I don't see anything wrong on the wifi level in the log. Seems like more of a system/networking related issue
    Can you try to make sure the P2P GO is fully up before you start traffic to it?
    What happens if you wait this 30 seconds before you start TCP traffic? Do you still see this 30 seconds delay before the P2P GO starts responding.

    In addition, which wpa_supplicant version are you using? Are you also using the one from R8.7_SP3 or a different one?

    BR,
    Eyal
  • The P2P GO is fully up when I do these tests.
    To clarify, I don't have to restart P2P GO to reproduce the issue. It happens when an Android device connects to this wifi network (not every Android, only a few tablets mentioned in my original post).

    If I wait 30 seconds after Android connects to the P2P GO, the traffic typically starts right away. Not always though, sometimes there's about 5 second delay.
    The problem is definitely worst when I try to start traffic immediately - I've seen delays over 3 minutes.

    We use wpa_supplicant 2.6 from buildroot. Not the R8.7_SP3 one. Do you think wpa_supplicant could be the problem?

    Update: I've built wpa_supplicant from git.ti.com/wilink8-wlan/hostap.git tag R8.7_SP3. Unfortunately, it didn't have any effect on the issue.

  • Based on the info you provided it seems like this issue is somehow related to the android system itself, the time it takes for the p2p application to fully come up etc.
    As we are not supporting Android internally I am not sure I can really help here.
    I suggest you try to take an air capture of the wlan channel using a sniffer and see when packets are really starting to be transmitted over the air.

    Best Regards,
    Eyal
  • As I mentioned in my original post, I've successfully run iperf3 tests between Android and a P2P GO hosted on a linux laptop and a raspberry pi.
    From the point of view of these Andrdoids, only the device with WL1837MODGIMOC is problematic.
    To me, this suggests that the issue should be fixable from our side.

    For an air capture, taken using a wifi stick in monitor mode, refer to my earlier post: 
    Notice the retransmissions sent from Android (192.168.1.10) which happen between packets 419 and 603, trying to resend packet 404. I don't understand why these packets are not being received.

  • Hi Konstantin,

    The team is continuing to look into this - are you able to provide the team with firmware logs ( gLogger)? They may require it to be able to analyze further.

    Regards,

    ~John

  • Hi,

    Any update on this?
    Can you provide firmware and wpa_supplicant logs for this?
    There is not much we can do further without it.

    BR,
    Eyal
  • Hi Eyal

    Thank you so much for the input and help, I work with Konstantin, and we're currently bringing up our board to be able to get gLogger working, will post again when we have some results from that.

    Thank you
    Kris
  • Hi Kris,

    I will close this thread for mow. Please submit a new request when you have new data.

    Best Regards,

    Eyal