×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Apr 2006
    Posts
    2

    6600 connection problem.

    Hello!

    I'm trying to get a http connection working on a S60 phone (6600). Everything is ok as long as I use the emulator or another phone (SE, Siemens, Samsung) but when i use the 6600 i get a "connection failure". I've read a couple of other threads on the forum and there seems like a lot of people have had similar problems... did any of you get a solution you the problem?

    ##############################################
    private final String sendMessage(int communicationType, String communicationAddress, int messageId) {
    HttpInputStream his = null;
    try{

    // Collect the information and prepare it to be sent!
    StringBuffer sb = new StringBuffer();
    sb.append( MESSAGE_PRE_SET );
    sb.append( COMMUNICATION_SEND_MESSAGE );
    sb.append( COMMUNICATION_SEPERATOR );
    sb.append( this.m_gameID );
    sb.append( COMMUNICATION_SEPERATOR );
    sb.append( communicationType );
    sb.append( COMMUNICATION_SEPERATOR );
    sb.append( communicationAddress );
    sb.append( COMMUNICATION_SEPERATOR );
    sb.append( messageId );
    sb.append( COMMUNICATION_SEPERATOR );
    sb.append( GameEngine.getInstance().getPetName() );
    sb.append( MESSAGE_POST_SET );

    // Get a byte array with the information
    byte[] postData = sb.toString().getBytes();
    //Logger.debug( "Sending text:"+sb );
    // init and open a connection
    his = new HttpInputStream(m_url, postData);
    his.open();
    // Skipping the XML preset!
    his.read( new byte[MESSAGE_PRE_SET.length()+1] );

    int errorIndicator = Integer.parseInt( new String( getNext(his) ) );
    if( errorIndicator != 0){
    // try to read the error string...
    return (new String(getNext(his)));
    }else{
    return null;
    }
    }catch( Exception e ){
    Logger.debug( "SM7Loader.sendMessage(): Exception in sending data, returning default error string:" + e.toString() );
    //return this.m_err;
    OuterMenu.getInstance().errorAlert(m_err, RESOURCE_LOADER_STATE_SEND_MESSAGES);
    } finally {
    try {
    his.close();
    } catch (Exception e) {
    e.printStackTrace();
    }
    return null;
    }
    #############################################

    Thanks!

  2. #2
    Super Contributor
    Join Date
    Dec 2005
    Location
    Europe/Poland/Warsaw
    Posts
    1,699

    Re: 6600 connection problem.

    hi,

    HttpInputStream is not a part of MIDP2 specification,
    you are probably either using some library from standard JSE or some library for J2me, in latter case which one?

    also try to check if you have correct connection settings defined in your phone (use carriers default),

    regards,
    peter

  3. #3
    Registered User
    Join Date
    Apr 2006
    Posts
    2

    Re: 6600 connection problem.

    Your right. It's one of our librarys I think the error is in the library.

Similar Threads

  1. Data Call on Nokia 6600 (ETel/RCall) problem
    By NSDev in forum Symbian C++
    Replies: 9
    Last Post: 2010-06-10, 12:39
  2. Problem MMC+USB Connection
    By Fede81 in forum General Development Questions
    Replies: 3
    Last Post: 2006-07-19, 15:21
  3. GPRS connection problems on 6600..
    By suckho in forum Symbian Networking & Messaging (Closed)
    Replies: 10
    Last Post: 2005-12-02, 14:00
  4. 6600: MIDlet activation on inbound connection - URGENT HELP NEEDED PLZ!
    By alatto in forum Mobile Java Networking & Messaging & Security
    Replies: 0
    Last Post: 2004-02-26, 12:48
  5. Problem: RGenericAgent::Progress does not detect open connection
    By bjorn.rudolfsson in forum Symbian Networking & Messaging (Closed)
    Replies: 1
    Last Post: 2004-02-18, 08:59

Posting Permissions

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