Android : Android 4.4 kitkat. JNI(sys_sendto) realtime on UDP socket

on Monday, November 10, 2014


I'm using in JNI "sys_sendto" to send UDP packet to a client/server for voice application. As I need realtime, I'm sending a packet, over wifi, each 20ms of around 200bytes. In my debug traces I can see the sys_sendto is really called at the frequence expected. But on the router and even sniffing the wifi traffic in promiscuous mode in can see it is not the case. On mobile phone running Android 4.1/4.2 I use to see 2 packets sent in the same Ms each 40ms. Using Android 4.4 the situation is worst at the beginning it is send as in 4.1/4.2 but after a while I have 6 packets in a burst afetr 120ms. This is not acceptable for my solution. Could it be due to the process priority which is downgraded? Some IO problem? Some internal OS thread scheduling on the IO? Any hint?


0 comments:

Post a Comment