Discussion Board

Results 1 to 7 of 7

Thread: GPRS IP Address

  1. #1
    Registered User flurryli's Avatar
    Join Date
    May 2004
    Posts
    8
    How can I get the GPRS IP Address of my mobile when I start a connection of GPRS.Have any API to get this IP Address in Symbian.

  2. #2
    Registered User carl_rocha's Avatar
    Join Date
    Mar 2004
    Posts
    21
    Hi!

    You need to use the GetOpt() function of the sockets with an option level = KSolInetIfCtrl and an option name = KSoInetConfigInterface. The information of the desired interface will be returned in a TPckgBuf so be sure to use it in the GetOpt. Then you just need to extract the informations you want, like the IP address.
    If you use this, first you need to connect a socketSer, open a socket for the tcp/ip protocol, use SetOpt with an option level = KSolInetIfCtrl and option level = KSoInetEnumInterfaces. Then you will use the GetOpt().

    I don`t have here the code or SDK`s help but if you check out the help in the TCP constants section you see what i`m talking about.

    Any doubts, don`t hesitate to post.

  3. #3
    Registered User flurryli's Avatar
    Join Date
    May 2004
    Posts
    8
    But I just use Sendto function of Socket, and didn't get connection with Server ,How can I get the IP Address of my mobile? thanks for help

  4. #4
    Registered User carl_rocha's Avatar
    Join Date
    Mar 2004
    Posts
    21
    Hi!

    I don`t quite understand what you said before, could be explain a bit better? Are you using UDP?

    The thing is, for you to get the IP address of an interface or routes, the interface has to be created. If you don`t have a connection to a server the interface won`t be created ( unless you create it yourself). For example when you browse around in Opera, if you implement a function that gets informations concerning the interfaces, you will get a new one because of the GPRS connection. When you turn off your browser after a while the GPRS interface will disappear.

    Please explain better your problem in order for me to write a more direct and satisfatory reply.OK?

    Any doubts, post again.

    PS: Slipknot rule.

  5. #5
    Registered User flurryli's Avatar
    Join Date
    May 2004
    Posts
    8
    yes I use udp in the mobil

  6. #6
    Registered User encryptor's Avatar
    Join Date
    Jun 2008
    Posts
    22
    hey i have the same doubt. how can we know what the ip address of our mobile is??? how can we extract that ip address and access points in a j2me program??? im new to this field so could give me sum link or a sample code that in detail explains the procedure.
    any suggestions would be highly appreciable

    thanks...

  7. #7
    Nokia Developer Moderator wizard_hu_'s Avatar
    Join Date
    Feb 2006
    Location
    Mallorca, Holiday
    Posts
    27,683
    Check Madsum's code in http://discussion.forum.nokia.com/fo...ad.php?t=54226 for the Symbian C++ solution.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved