×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Nov 2006
    Posts
    3

    Problems with tcp-connection over GPRS on nokia 6270

    Hello everyone.

    I have coded a midlet which downloads a few images from http-server over GPRS and publish them on the screen.

    Code:
    HttpConnection c = null;
            DataInputStream is = null;
            try {
                //a.getPort();
                c = (HttpConnection) Connector.open("http://www.whateversite.com/" +
                                                    name);
                int status = c.getResponseCode();
                if (status != 200) {
                    throw new IOException("HTTP Response Code = " + status);
                }
    
                int len = (int) c.getLength();
                String type = c.getType();
                if (!type.equals("image/png") && !type.equals("image/jpeg")) {
                    throw new IOException("Expecting image, received " + type);
                }
    
                if (len > 0) {
                    is = c.openDataInputStream();
                    byte[] data = new byte[len];
    
                    //String map_name = null;
    
                    is.readFully(data);
    
    ............ and so one
    Midlet works perfect on emulator (JBuilder + j2me).
    On nokia 6270 device, while Connector.open() is trying to connect to server, "G" doesnt show up at the top left corner (which must indicate that GPRS connection established).
    So the question is: should I connect 6270-device manualy before starting the midlet? If yes, then how? I didnt find any connect-manager on it..

    ps. useing the default nokia 6270 web-browser, GPRS internet works without any problems. Browser connects to GPRS automaticly when Im trying to open any web-site.

    Thanks in advance.

  2. #2
    Super Contributor
    Join Date
    Apr 2003
    Location
    USA, CA
    Posts
    7,191

    Re: Problems with tcp-connection over GPRS on nokia 6270

    You probably do not have you network settings set properly

    In the configuration settings you need to activate the default configuration settings. Also you need to have preferred access point specified there (If you do not have anything to choose from, you need to create an access point with correct settings yourself)
    check also this document for pointers
    http://www.forum.nokia.com/Technical...figuration.htm

    Hartti

  3. #3
    Registered User
    Join Date
    Nov 2006
    Posts
    3

    Re: Problems with tcp-connection over GPRS on nokia 6270

    Quote Originally Posted by hartti
    You probably do not have you network settings set properly

    In the configuration settings you need to activate the default configuration settings. Also you need to have preferred access point specified there (If you do not have anything to choose from, you need to create an access point with correct settings yourself)
    check also this document for pointers
    http://www.forum.nokia.com/Technical...figuration.htm

    Hartti
    I have access point specifed. GPRS works well useing default nokia 6270 web-browser :\ GRPS doesnt work exactly from my midlet (I mean device doesnt connect to internet via GPRS automaticly when my midlet is trying to open tcp-connection).
    Last edited by darkgrey; 2006-11-06 at 18:50.

  4. #4
    Super Contributor
    Join Date
    Apr 2003
    Location
    USA, CA
    Posts
    7,191

    Re: Problems with tcp-connection over GPRS on nokia 6270

    Yes, it looks like your network settings for MIDlets are not properly set. Even if the browser works, the settings for MIDlets can be incorrect. Also you could check that there is no problem with your code by installing a simple midlet which tries to connect to the network (like this one hartti.com/FirstExample.jar - you should see a short string displayed on the screen if the network connection succeeds)

    Hartti

  5. #5
    Registered User
    Join Date
    Nov 2006
    Posts
    3

    Re: Problems with tcp-connection over GPRS on nokia 6270

    Quote Originally Posted by hartti
    Yes, it looks like your network settings for MIDlets are not properly set. Even if the browser works, the settings for MIDlets can be incorrect. Also you could check that there is no problem with your code by installing a simple midlet which tries to connect to the network (like this one hartti.com/FirstExample.jar - you should see a short string displayed on the screen if the network connection succeeds)

    Hartti
    Your application asked for network access. Then I clicked "Yes" it printed a phrase on my native (Russian) language such as like "Application is working (loading?)...". Thats all.
    And there was no "G" at the top left conner of the screen while midlet was loaded, since it must be :\

    As for network settings _exactly_ for MIDlets, I cant find such thing in device gprs properties.

  6. #6
    Super Contributor
    Join Date
    Apr 2003
    Location
    USA, CA
    Posts
    7,191

    Re: Problems with tcp-connection over GPRS on nokia 6270

    Ok, it is not pretty certain that the network access settings for midlets are not properly configured.

    You need to have an access point configured (Personal Configuration Settings) which you then have to choose as your "Preferred access point".

    I do not know the settings for your operator, unfortunately.

    Hartti

Similar Threads

  1. Replies: 2
    Last Post: 2006-10-06, 17:24
  2. which phones for laptop
    By dvdljns in forum PC Suite API and PC Connectivity SDK
    Replies: 2
    Last Post: 2006-02-14, 12:58
  3. Replies: 0
    Last Post: 2004-04-27, 14:18
  4. Nokia Mobile VPN Client
    By marcyl in forum Symbian Networking & Messaging (Closed)
    Replies: 1
    Last Post: 2003-12-01, 14:47
  5. Nokia 3650 bluetooth connection problems
    By Steviemac in forum Bluetooth Technology
    Replies: 0
    Last Post: 2003-03-24, 23:23

Posting Permissions

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