• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

getting the ipaddress

 
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
how could we get the ip address of a nokia phone particularly N3530, N3650 and N6610?
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just out of curiosity? Wouldn't a Cell Phone's IP address change every time, like get a new one each time for DHCP?
Mark
 
Benjoe Reyes
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
but how do we programatically get the ip address assigned by the DHCP server even for that particular moment???
 
Mark Spritzler
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I was just curious, I remember reading it somewhere, and how you can post the IP address to a website, so that others can get that information, but I can't remember more than that. It is in the specifications for either the Messaging API, or ...

Nope, Push technology.


To create an inbound connection based on a static address, call Connector.open() with a URL that describes both a protocol and a local inbound port; for example:
Connector.open("socket://:5000")
Connector.open("datagram://:5000")
Connector.open("sms://:5000")


To create an inbound connection based on a dynamic address, call Connector.open() with a URL that describes just a protocol (and not a local inbound port), to indicate you want the system to assign an address; for example:
Connector.open("socket://")
Connector.open("datagram://")


When using a system-assigned address, you must publish this address so that external systems can connect to your application. If you're using a ServerSocketConnection or a UDPDatagramConnection you can get the dynamically assigned address from the getLocalAddress() and getLocalPort() methods. You can also retrieve the hostname assigned to your device, by invoking System.getProperty("microedition.hostname"). To publish the dynamic address on an external system you can simply use HTTP.


Found here.

Hope that helps.
Mark
 
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
With many (most?) operators, it's no use to get the phone's IP address. These operators' firewalls prevent inbound TCP connection attempts, and inbound UDP packets that don't match a recent outbound UDP packet. I have SIM cards from the two main operators in my area, and they both have this kind of firewall (though I'm told that the third operator doesn't have this restriction yet).
 
reply
    Bookmark Topic Watch Topic
  • New Topic