Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9004387
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T00:53:03+00:00 2026-06-16T00:53:03+00:00

I’m looking for the way to read packet loss counters from WiFi network. It

  • 0

I’m looking for the way to read packet loss counters from WiFi network.

It should be over adb shell or Java or C (NDK) or your way

Android is not rooted.

I have an Access Point where I configured packet loss 2% with Dummynet service.

I use wget command from PC and download 50 Mb file from local server (Band Width for LAN should be `100Mb). I see that after packet loss configuration Band Width reduced from 100Mb to 3Mb, its mean that all works fine.

So far so good,

My device (Android) is connected to above mentioned AP by WiFi.

I try to download the same 50 Mb file , download rate is 3M but I don’t see any error or retransmission counters rise.

I use adb shell CLI and entered to: sys/class/net/eth0/statistics where I see:

-r--r--r-- root     root         4096 2012-12-04 15:42 rx_packets
-r--r--r-- root     root         4096 2012-12-04 15:42 tx_packets
-r--r--r-- root     root         4096 2012-12-04 15:41 rx_bytes
-r--r--r-- root     root         4096 2012-12-04 15:41 tx_bytes
-r--r--r-- root     root         4096 2012-12-04 15:43 rx_errors
-r--r--r-- root     root         4096 2012-12-04 15:43 tx_errors
-r--r--r-- root     root         4096 2012-12-04 15:43 rx_dropped
-r--r--r-- root     root         4096 2012-12-04 15:43 tx_dropped
-r--r--r-- root     root         4096 2012-12-04 15:43 multicast
-r--r--r-- root     root         4096 2012-12-04 15:43 collisions
-r--r--r-- root     root         4096 2012-12-04 15:43 rx_length_errors
-r--r--r-- root     root         4096 2012-12-04 15:43 rx_over_errors
-r--r--r-- root     root         4096 2012-12-04 15:43 rx_crc_errors
-r--r--r-- root     root         4096 2012-12-04 15:38 rx_frame_errors
-r--r--r-- root     root         4096 2012-12-04 15:38 rx_fifo_errors
-r--r--r-- root     root         4096 2012-12-04 15:38 rx_missed_errors
-r--r--r-- root     root         4096 2012-12-04 15:38 tx_aborted_errors
-r--r--r-- root     root         4096 2012-12-04 15:38 tx_carrier_errors
-r--r--r-- root     root         4096 2012-12-04 15:38 tx_fifo_errors
-r--r--r-- root     root         4096 2012-12-04 15:38 tx_heartbeat_errors
-r--r--r-- root     root         4096 2012-12-04 15:38 tx_window_errors
-r--r--r-- root     root         4096 2012-12-04 15:38 rx_compressed
-r--r--r-- root     root         4096 2012-12-04 15:38 tx_compressed

So I run cat * and get all above mentioned files with 0 value except 4:

tx/rx_packets/bytes are active , it’s mean that I use write interface:

cat rx_packets
9106

If any know other way to detect packet loss or get it programmatically would be greatly appreciated

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T00:53:05+00:00Added an answer on June 16, 2026 at 12:53 am

    Unless I’m mistaken about your requirements. You could use wireshark if you are connected to the same network as your mobile device.

    Or you can do a tcpdump and then analyze it through wireshark to get packet loss.

    Here are a bunch of links that might help you.

    http://dennismillerdev.wordpress.com/2011/02/03/debug-network-activity-in-android-using-wireshark/
    http://mobile.tutsplus.com/tutorials/android/analyzing-android-network-traffic/
    Capturing mobile phone traffic on wireshark

    If you you are just trying to do a generic connectivity test. You could try simply sending a series of UDP packets to a server that echoes back the same packet in response. Have a separate thread running concurrently that is trying to receive these packets from the server. Record the timestamp if you want for other measurements, but if there are fewer packets returned than sent, you know how many packets were lost. If you give the packets a 1 byte payload that contains an id. (ie: send 20 packets with id’s 1-20) and then when you receive the packets from the server you can check the payload and see which packets were lost and/or out of sequence.

    Other than that, you are limited without rooting your phone. You can use TrafficStats to get the number of packets sent getTotalRxPackets() or getTotalTxPackets() to get total packets sent/received. Or if you using a higher level API you can even get the number of UDP packets per application. So you could find the number of packets sent, and received but not lost.

    If you know how many packets the device is sending, and on the server side detect the number of packets coming in from that device, the difference should help give you an idea of the number of lost packets too. (This method would require you to have control of the server and involve some more device-server communication)

    Hopefully this helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a jquery bug and I've been looking for hours now, I can't
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have a text area in my form which accepts all possible characters from
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
Does anyone know how can I replace this 2 symbol below from the string
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I have been unable to fix a problem with Java Unicode and encoding. The
I have thousands of HTML files to process using Groovy/Java and I need to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.