How can I change the MTU or Packet Size for Bluetooth in Android?! It is not possible in using Android's API, right? I believe I should change the native codes. How can I change it? And is it also possible to change the transmission rate, or it is hardware dependent? Thanks
Asked
Active
Viewed 3,450 times
1 Answers
3
Yes, You are right - it is not possible in Android API. You can only get MTU value for an interface with networkInterface.getMTU() method.
Based on sources for the NetworkInterface class
public int getMTU() throws SocketException {
return readIntFile("/sys/class/net/" + name + "/mtu");
}
You probably can change MTU value (for rooted devices) - You need to write new int MTU value to "/sys/class/net/" + networkInterface.getName() + "/mtu" file.
But I'm not sure if it is reliable solution for You.

Sergii Kozyrev
- 121
- 3
-
1ummm, so it seems the MTU size is predefined on the device; interesting! For each interface it's different, right? WiFi, BT – Dec 21 '13 at 18:16
-
Yes, seems like that - default MTU value depends on interface type – Sergii Kozyrev Dec 23 '13 at 13:22
-
With Android API >=21 you should be able to change that – bertonc96 Mar 21 '19 at 09:25