Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 06-17-2010, 09:01 PM   #1 (permalink)
Registered Member
 
Join Date: Jun 2010
Posts: 2
dnunes is on a distinguished road
Lightbulb Getting network interface info (pdp_ip0 -- cellular data usage).

. . The iPhone gives the user some info about how much data it transfered overtime in its menu (Settings -> General -> Usage -> Cellular Network Data). Altough the official APIs doesn't mention anything related to this, I know you can get some info from the network interface (pdp_ip0 for cellular info).
. . In the ideal cenario I would get this info "legally" and would be able to get my app in the App Store, but I don't really need that because this app will be used for a limited number of users (no more than 10 at time) and I can do some "ad hoc" distribution. Anyway, if it is needed to use some undocumented API call or undocumented framework, ok (I can't pay the same, but still...)--but the app absolutely must run on stock iPhone (nothing jailbreak-only).
. . All I need is to get this info into a variable.

. . Does anyone knows how to get this info from the network interface? A buddy told me it is possible (and I know it is because there is an app in the App Store that does just that), but I couldn't find how, yet.

. . Thanks.
dnunes is offline   Reply With Quote
Old 06-17-2010, 10:38 PM   #2 (permalink)
Registered Member
 
Join Date: Jun 2010
Posts: 2
dnunes is on a distinguished road
Lightbulb

. . Some progress, but not much: the app is really getting info from the network interfaces. I managed to install the "network-cmds" on an iPhone and have access to ifconfig and netstat commands, but none of them returned anything meaningful (the "netstat -s" is more or less usefull, but can't show interface-specific info). "ifconfig" doesn't show anything good (no RX or TX bytes).
. . ifconfig:
cuckoo:~ root# ifconfig pdp_ip0
pdp_ip0: flags=8011<UP,POINTOPOINT,MULTICAST> mtu 1024

cuckoo:~ root# ifconfig en0
en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULT ICAST> mtu 1500
inet 192.168.0.194 netmask 0xffffff00 broadcast 192.168.0.255
ether 00:25:bc:09:2d:3f

. . Anyway, these commands are not installed by default in the iPhone, so how can I call them from an application? Is there any way to include a precompiled binary into the app? Or another way to get network info?

. Thanks.
dnunes is offline   Reply With Quote
Old 01-28-2011, 02:32 PM   #3 (permalink)
Registered Member
 
Join Date: Feb 2009
Posts: 97
roocell is on a distinguished road
Default

i've posted lots of info here.

http://www.iphonedevsdk.com/forum/ip...atavolume.html

let me know if you have since come up with a method - i'd like to get your opinion.
there is an app called "DataMan" that is doing it - so i know it's possible.
i have no idea how they're doing it.


Quote:
Originally Posted by dnunes View Post
. . Some progress, but not much: the app is really getting info from the network interfaces. I managed to install the "network-cmds" on an iPhone and have access to ifconfig and netstat commands, but none of them returned anything meaningful (the "netstat -s" is more or less usefull, but can't show interface-specific info). "ifconfig" doesn't show anything good (no RX or TX bytes).
. . ifconfig:
cuckoo:~ root# ifconfig pdp_ip0
pdp_ip0: flags=8011<UP,POINTOPOINT,MULTICAST> mtu 1024

cuckoo:~ root# ifconfig en0
en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULT ICAST> mtu 1500
inet 192.168.0.194 netmask 0xffffff00 broadcast 192.168.0.255
ether 00:25:bc:09:2d:3f

. . Anyway, these commands are not installed by default in the iPhone, so how can I call them from an application? Is there any way to include a precompiled binary into the app? Or another way to get network info?

. Thanks.
roocell is offline   Reply With Quote
Reply

Bookmarks

Tags
cellular, data, info, network, usage

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 330
9 members and 321 guests
Absentia, Chickenrig, Domele, fiftysixty, givensur, heshiming, michaelhansen, PixelInteractive, Sloshmonster
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,657
Threads: 94,118
Posts: 402,892
Top Poster: BrianSlick (7,990)
Welcome to our newest member, jenniead38
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 12:16 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0