×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Super Contributor
    Join Date
    Mar 2003
    Posts
    580

    Programmatically starting a GPRS connection

    Although I received some tips about this topic in another thread, being them not enough to solve the problem, and being that thread title completely misleading about my issue, I open a new thread to ask:
    how can I have my program starting a GPRS connection without asking user intervention? My phone has 2 operator-locked access points, so I can't define a "default" one, and I'm always asked which one I want to use every time a program try accessing internet. Can I override the request in python?

    I tried:
    import socket #imports the Module
    #apid = socket.select_access_point() # Skip user request
    ap = socket.access_point(1)
    ap.start() # start an GPRS connection
    ap.stop()

    It does not work: ap.ip() reveals the connection IS active, but upon using it to upload a file (with ftplib.FTP), I get a "(0, 'getaddrinfo failed')" error.

  2. #2
    Registered User
    Join Date
    Aug 2008
    Posts
    28

    Re: Programmatically starting a GPRS connection

    From what I read in the other thread it really seems you have no solution, mate..
    ap.start(), <network code>, ap.stop() here in my phone works just fine without setting default AP nor selection dialog showing up..

  3. #3
    Nokia Developer Champion
    Join Date
    Feb 2008
    Location
    Ahmedabad, Gujarat, India
    Posts
    3,852

    Re: Programmatically starting a GPRS connection

    hi cassioli
    sorry for asking this stupid question what sort of connection you are using a WAP or GPRS connection.

    Hope you get this question

  4. #4
    Super Contributor
    Join Date
    Mar 2003
    Posts
    580

    Re: Programmatically starting a GPRS connection

    Quote Originally Posted by gaba88 View Post
    hi cassioli
    sorry for asking this stupid question what sort of connection you are using a WAP or GPRS connection.

    Hope you get this question
    Actually I don't know, phone is operator locked, so I can't edit or even view settings. I only know there are 2 APN named "3" and "3 MMS" ("3" is for "H3G"). I think the first one is a GPRS connection, as it works with a midlet of mine which requires GPRS connection to work rather than WAP... But it's also the same which works while browsing with internal browser, which maybe is a WAP browser... or not?
    Guys, I'm quite confused....

    Isn't there any other module apart from socket to check/access connection status?

  5. #5
    Nokia Developer Champion
    Join Date
    Feb 2008
    Location
    Ahmedabad, Gujarat, India
    Posts
    3,852

    Re: Programmatically starting a GPRS connection

    hi cassioli
    as far as i know the error you are getting is due to the wap connection. I suggest you to try with some other operators GPRS connection and i think that will work. Or contact your operator they can explain you about your connection type.
    but i am very much sure the error you are getting is due to wap connection.

    Hope this will help you

Similar Threads

  1. how to check gprs connection +j2me?
    By mrrajesh_1982 in forum Mobile Java Networking & Messaging & Security
    Replies: 3
    Last Post: 2006-10-26, 23:41
  2. how to check gprs connection +j2me?
    By mrrajesh_1982 in forum Mobile Java General
    Replies: 1
    Last Post: 2006-10-25, 10:23
  3. GPRS connection help please!
    By bevered in forum General Development Questions
    Replies: 0
    Last Post: 2005-03-08, 12:25
  4. GPRS connection help please!
    By bevered in forum Mobile Web Site Development
    Replies: 0
    Last Post: 2005-03-08, 12:22
  5. http connection / gprs
    By DaneelGiskard in forum Mobile Java General
    Replies: 1
    Last Post: 2002-06-16, 08:30

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •