0

On Samsung devices, the directory with network statistics /sys/devices/virtual/net/wlan0/ is missing... There are directories for other (e.g.loopback) interfaces.

wlan0 is the right name for the interface, it is in /sys/class/net or programmatic listing from java application.

Does anybody know why or where to find these data (e.g. nr of transmitted bytes and similar?)

tpcz
  • 186
  • 1
  • 4

2 Answers2

0

The following is taken from Open Source Code PowerTutor

String interfaceName = SystemInfo.getInstance().getProperty("wifi.interface");
if(interfaceName == null) interfaceName = "eth0";

transPacketsFile = "/sys/devices/virtual/net/" +
                   interfaceName + "/statistics/tx_packets";

Hope this could help you.

Qylin
  • 1,501
  • 1
  • 16
  • 26
0

In motorola X and Nexus 7 that file is located at :

/sys/class/net/wlan0/*

Network statistics on Nexus 7

Community
  • 1
  • 1