×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Mar 2004
    Posts
    12

    error when creating GPRS connection

    Hello,

    I am having trouble accessing a servlet through my imlet. the exception is thrown when I try to open the inputstream. There are no problems with my SIM as I can send/receive sms, make calls etc with the imlet. I can also create a GPRS connection when the SIM is in my phone.

    Here's the code i am using to access the servlet


    InputStream dis = null;
    DataOutputStream dos = null;

    HttpConnection c = null;
    InputStream is = null;
    String url = "http://193.118.193.73:16000/ModuleServlet?status=okay"

    c = (HttpConnection)Connector.open( url );

    is = c.openInputStream(); // the exception is thrown here.

    Here is the excpetion that is thrown :

    java.io.IOException
    at com.sun.cldc.io.j2me.socket.PrivateOutputStream.write(+58)
    at java.io.DataOutputStream.write(+10)
    at java.io.OutputStream.write(+8)
    at com.sun.midp.io.j2me.http.Protocol.connect(+406)
    at com.sun.midp.io.j2me.http.Protocol.openInputStream(+64)
    at example.rs232demo.RS232Demo.connect(+36)
    at example.rs232demo.RS232Demo.startApp(+20)
    at javax.microedition.midlet.Main.main(+157)



    This is an ongoing problem and i really need it sorted .

    I would greatly appreciate any feedback .

    Thanks,

    Ken.

  2. #2
    Registered User
    Join Date
    Apr 2004
    Posts
    7
    Hi, I had the same problem trying to open an input stream using GPRS a while ago...

    An IOException will be thrown if an error occurs while trying to open a connection over GPRS. Firstly, make sure the SIM you are using is activated for GPRS - check with your network provider.

    Then double check your GPRS network settings are correct:
    1. APN
    2. Username
    3. Password
    4. etc...

    Then also, since you are trying to open HTTP connection, your HTTP configuration settings need to be setup seperately from the bearer settings.

    Good luck,
    dvisser

  3. #3
    Registered User
    Join Date
    Mar 2004
    Posts
    12
    got it sorted. it was sim card related. the sims worked fine in mobiles over gprs but just don't work in the n12. got a new set of sims sim and it worked fine.

    thanks for the help.

  4. #4
    Registered User
    Join Date
    Oct 2004
    Posts
    40

    what is your "a new set of sims sim"?

    Can you tell me?

    Thanks ahead, my mail is bgates1788@hotmail.com
    .

    By the way, N12 can access internet through GPRS, but since its assigned IP
    are private IP, how can we access N12 from internet?
    Last edited by nimbuslin; 2004-11-11 at 05:41.

Posting Permissions

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