I’ve finally found the time to continue working on my WiFi backend (it can be used as a drop-in replacement for the iPhone GameKit, shares the same interface and works almost identically). While not everything is working yet, I was able to run some simple preliminary latency and bandwidth tests.
Apparently, the latency of a single ping/pong packet is around 100ms-150ms. This comes at no surprise, it’s what I’ve posted before. However, when I start to send (unreliable) data at a constant rate, like 3-10KiB/s, it will simply use UDP to do that, the latency drops down by about 90%. Yes, I can achieve latencies of around 15ms. However, they are a little more unstable than the Bluetooth latencies. I’m sometimes still seeing up to 100ms in between, but the average and most of the packets are around 15-20ms.
I wonder where that comes from. An educated, but fully out-of-the-air, guess would be that maybe the antenna is powering down when the device doesn’t send anything for a few milliseconds, to conserve power, and it has to power up for a few milliseconds when something is being sent. However, this is only my own guess and I don’t expect it to be even close to reality. If you have more information on that, please let me know. Maybe it sheds some light on how to control the latency issues.