Need help from Motorola Droid owners to port 3G Watchdog app


Last Updated:

  1. rgruet

    rgruet Member This Topic's Starter

    Joined:
    May 6, 2009
    Messages:
    19
    Likes Received:
    1
    Hi all,

    I'm the developer of 3G Watchdog, an application that monitors 3G traffic. I need help from Motorola Droid owners to port it to that phone.

    The app gets the network statistics data by reading pseudo-files /sys/class/net/xxxx/statistics/rx_bytes and tx_bytes. "xxx" is the network interface name, which depends on the platform (or, rather, the maker), e.g. for HTC phones it is "rmnet0", "pdp0" for Samsung...

    I'm looking for the name used by the Droid. If someone with a Droid could look (using adb) at /sys/class/net/xxxx/statistics/rx_bytes and tell me what the xxxx is, it would make 3G Watchdog accessible to Motorola users :)

    BTW, this remark is valid for any other future phone. New Android phones will probably appear on the market, and I need owner's contribution to port 3GW on them.

    Thanks in advance. You can also mail me at 3gdog@rgruet.net

    Richard
     

    Advertisement
  2. DaveInNYC

    DaveInNYC Well-Known Member

    Joined:
    Nov 7, 2009
    Messages:
    52
    Likes Received:
    3
    I have 4 directories on my droid, and all have the statistics subfolder: ip6tnl0, lo, ppp0,and sit0.
     
  3. rgruet

    rgruet Member This Topic's Starter

    Joined:
    May 6, 2009
    Messages:
    19
    Likes Received:
    1
    Thank you, can you determine which directory is relevant by observing the statistics changing when 3G is on (and there is some traffic)?

    What I also need is the name of the phone model (and ideally, the name of the manufacturer too). The model name can be found in Settings > About phone > Model number (e.g. "HTC Magic" for my phone).

    If you have access to the SDK, these informations are static fields in the Build class (Build.MODEL, Build.MANUFACTURER). I plan to display them in the "rejection page" of my app starting from the next release. I could even list the directories available under /sys/class/net/ to help contributors.

    Richard
     
  4. DaveInNYC

    DaveInNYC Well-Known Member

    Joined:
    Nov 7, 2009
    Messages:
    52
    Likes Received:
    3
    ppp0 is definitely the 3gs one. The string under "model number" is just "Droid".
     
  5. DaveInNYC

    DaveInNYC Well-Known Member

    Joined:
    Nov 7, 2009
    Messages:
    52
    Likes Received:
    3
    Using the SDK:

    Build.Model == "Droid"
    Build.Manufacturer == "Motorola"
     
  6. rgruet

    rgruet Member This Topic's Starter

    Joined:
    May 6, 2009
    Messages:
    19
    Likes Received:
    1
    Dave,

    Thank you for your help. I have modified the app to include your information, assuming a model of "Droid", and an interface name of "ppp0".

    Can you download the latest version of 3G watchdog (0.13.1) from the market, try it on your Droid, and tell me if it works? If we got it right, it might support the Droid :)
     
  7. cranky_dan

    cranky_dan Well-Known Member

    Joined:
    Nov 6, 2009
    Messages:
    161
    Likes Received:
    4
    I have downloaded the app, and it does seem to work. Nice!

    I picked up the droid Friday, and like any n00b, I *have* been running it full throttle - all services turned on - but as of yesterday, I'm trying to optimize my battery life. Consequently, I have it turned off until I can get a battery-life baseline. Probably a two or three day process for me.

    Dan
     
  8. DaveInNYC

    DaveInNYC Well-Known Member

    Joined:
    Nov 7, 2009
    Messages:
    52
    Likes Received:
    3
    Yup, works like a charm:

    [​IMG]
     
  9. rgruet

    rgruet Member This Topic's Starter

    Joined:
    May 6, 2009
    Messages:
    19
    Likes Received:
    1
    Good news! :)

    @cranky_dan: On my HTC Magic, with default settings of 1 refresh/mn, the app is reported (see Settings > About phone > Battery use) to use 2% of the battery. Of course, numbers varies depending on your usage (refresh frequency and how frequently you are looking at the detailed status screen), and possibly your phone model.

    @DaveInNYC: Are these the actual colors on your phone, or is this the screenshot? It should rather look like this:

    [​IMG]
     
  10. DaveInNYC

    DaveInNYC Well-Known Member

    Joined:
    Nov 7, 2009
    Messages:
    52
    Likes Received:
    3
    No, my real colors match yours. I did a screenshot using Eclipse, and it showed me the correct colors, but when I saved it to png, its colors got screwed up. Not sure why.
     
  11. cranky_dan

    cranky_dan Well-Known Member

    Joined:
    Nov 6, 2009
    Messages:
    161
    Likes Received:
    4
    This is a nice app. When I carried a laptop, I had a similar widget that'd report on the same statistics. Helpful when I was on a metered connection.

    I appreciate the battery usage numbers, and the refresh settings. BTW, my droid display looks as it should. Altho, I don't know (yet) how to screencap...

    Thanks again!
    Dan
     
  12. DaveInNYC

    DaveInNYC Well-Known Member

    Joined:
    Nov 7, 2009
    Messages:
    52
    Likes Received:
    3
    One bug I noticed - the quota row in the grid view is not correct.
     
  13. rgruet

    rgruet Member This Topic's Starter

    Joined:
    May 6, 2009
    Messages:
    19
    Likes Received:
    1
    @Dave: Could you be a little more specific !? What did you do exactly, and what happened? What do you mean by "the quota row is not correct"?
     
  14. DaveInNYC

    DaveInNYC Well-Known Member

    Joined:
    Nov 7, 2009
    Messages:
    52
    Likes Received:
    3
    Perhaps I am just misunderstanding what the first row means (refer to my screenshot above) The second row is how much I used today, the third is how much I used this week, and the fourth is how much I used this month. But what does the first row, labeled "quota" mean?
     
  15. DaveInNYC

    DaveInNYC Well-Known Member

    Joined:
    Nov 7, 2009
    Messages:
    52
    Likes Received:
    3
    Actually, do not look at my screenshot, but yours, since mine only has one number for all 4 rows.
     
  16. rgruet

    rgruet Member This Topic's Starter

    Joined:
    May 6, 2009
    Messages:
    19
    Likes Received:
    1
    Well, don't look to closely at my screenshot, since I frequently reset counters for testing purposes.

    The quota is the amount of 3G traffic you're allowed to use on your monthly, weekly or daily plan. Many so-called "unlimited" plans actually have a caps (=the quota) beyond which bandwidth is severely reduced, or you have to pay for extra usage. You set quota parameters (period, start day...) in the Settings screen. Counters are reset at the end of the quota period. That's the main (and original) purpose of 3GW to help you to monitor your quota usage, so you don't get caught off-guard.
     
  17. animere

    animere Member

    Joined:
    Nov 11, 2009
    Messages:
    6
    Likes Received:
    0
    Thanks for getting this to work. +REP
     
  18. devilbyte

    devilbyte New Member

    Joined:
    Jan 11, 2010
    Messages:
    1
    Likes Received:
    0
    dear rgruet, thank you for your great work.

    it's could be very very nice if you can add a function
    that counts the connection session too... for those (like me) have a mobile connection based on time (not only on traffic MByte).

    For me, Vodafone IT, it is a must to count the session (every 15 minutes) for not to go out the limit.

    For example, I have a 30 hours montly of connection, (120 sessions) and every time i have to call 414 to have info on how much sessions remain.
    Obviously, if I stay connected i can't call 414.

    I need to count montly sessions from 1 to X (I have to choose which limit is) and keep the count in memory so I can be able to see how much is remaining sessions.

    Sorry for my poor english :-|
    Thank you.
     
  19. rgruet

    rgruet Member This Topic's Starter

    Joined:
    May 6, 2009
    Messages:
    19
    Likes Received:
    1
    Hi

    I'm aware of that kind of problem, you are not the first one to ask for that feature or some variation of it .The difficulty is that 3GW counts raw traffic, while what you are asking for is to count consumption in a more logical, abstract (should I say commercial?) way. Your plan is constituted of a fixed number (120) of sessions of 15mn, and if I understand well every session started is counted as 15mn, even if it lasts less. Other people reported a variation of this scheme, where there are sessions of a fixed amount of data (like 100KB), and if you close the connection before, the consumption is rounded up.

    So there are timed sessions, and sessions with a fixed amount of data. And there are plans without sessions.

    All that is technically feasible, the problem lies more in the User Interface. How to represent all these variations without confusing the users? This would make the UI more complicated, and what I fear is that there will be people that won't understand the distinction and complain that it doesn't work correctly or just flame 3GW. To implement or not new features is frequently a designer's dilemma!

    Anyway I'll think about it, but don't hold your breath.
    If you have suggestions about the UI, feel free to send them to me (3gdog@rgruet.net).

    Cheers

    Richard
     

Share This Page

Loading...