4 Replies Latest reply on Jan 15, 2015 12:38 PM by David_C

    WiFi delay every 120 seconds




      We're trying to configure Edison for a real time streaming application over WiFi.  We're noticing a 70 millisecond pause in data traffic every 120 seconds.  We've examined the traffic in Wireshark and notice that the pause always follows a Clear to Send signal. 


      What could be causing the delay every 120 seconds?  Could this be a WiFi scan of some kind?  How can we modify the observed interval or disable whatever causes the delay?




        • 1. Re: WiFi delay every 120 seconds

          Hi David_C,


          Which image version is your board currently using? Are you using the Linux side of the board or Arduino side? Please provide as much information on how are you doing this to see if we are able to replicate it or to identify the source of the latency.



          • 2. Re: WiFi delay every 120 seconds

            Thanks for your quick response!  We're working with Linux and the mini breakout boards, and we can reproduce the problem with the rel1-maint-ww42-14 image.  Here are two reproducible cases:


            Example 1: CTS frames occur every 120 seconds even without data transfer


            1. Flash an Edison to the rel1-maint-ww42-14 image, run configure_edison --setup, then start hostapd


            > systemctl stop wpa_supplicant

            > systemctl start hostapd


            2. I next connect to the Edison's WiFi network from my Mac.  I start a capture in Wireshark with the interface set to capture in monitor mode (Capture->Options, double-click the WiFi interface, then check "capture packets in monitor mode").


            3. Start a capture.  After 5 minutes, look for Clear-to-send frames (perhaps after filtering on the mac address of the Edison to make life easier).  We see Clear-to-send frames every 120 seconds.  They have a duration of 10000 microseconds and are addressed to the Edison.  They do not follow a Request-to-send (perhaps they are CTS-to-self?).




            Example 2: Data transfer is delayed approximately 70 milliseconds after each periodic CTS frame


            1. Flash 2 Edisons to the rel1-maint-ww42-14 image, run configure_edison on both.


            2. We can use iPerf to push some data between the devices.  Download and install it on each Edison with


            > wget https://iperf.fr/download/iperf_2.0.5/iperf_2.0.5-2_i386 --n

            o-check-certificate; chmod +x iperf_2.0.5-2_i386 ; mv iperf_2.0.5-2_i386 /usr/bi



            3. Start one Edison (Edison1) as an access point with


            > systemctl stop wpa_supplicant

            > systemctl start hostapd


            Connect the other Edison (Edison2) to Edison1's network (eg. configure_edison --wifi).  Manually assign an IP address with


            > ifconfig wlan0

            > route add -net netmask gw


            4. I connect my Mac to Edison1's network and start Wireshark in monitor mode.


            5. Edison1 will send data to Edison2.  Start an iPerf server on Edison2 with


            > iperf -s -u -i 1


            6. On Edison1, start sending 300 seconds of UDP traffic with


            > iperf -c -u -b 250k -l 250 -t 300


            7. After 5 minutes, stop the test.  Find CTS frames that specify duration=10000 microseconds using a Wireshark filter like: "(wlan.addr == <mac address Edison1> or wlan.addr == <mac address Edison2>) and wlan.duration == 10000".  When I do this, I see CTS frames from each device, where the frames at each device are separated by 120 seconds.


            8. Now, select one of the CTS frames in Wireshark and then clear the filter.  This brings back the surrounding data frames.  We notice that data packets are usually separated by about 8 ms; after one of these CTS frames, however, there's a 60 to 80 ms delay before the next data frame.


            These delays manifest themselves as holes or pops in our real-time media traffic.


            Thanks for your help!


            • 3. Re: WiFi delay every 120 seconds

              Awesome feedback!  I've flagged this to our FW team, and we're working on it.

              • 4. Re: WiFi delay every 120 seconds

                Thanks!  In case it's helpful, we've reproduced this on 802.11b, g, and n (2.4 and 5 GHz).