Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Aug 2009

    open local port to receive data


    i have an application which will receive data from a server. first i give the server the destination port where it should send me the packets. but, this port is hardcoded by me and not actually opened.

    if i do

    ServerSocketConnection ssc = (ServerSocketConnection) Connector.open("rtp://localhost:49172");
    it gives me a ConnectionNotFound exception. i've also have tried other protocols like socket, http

    please advice,
    Thank you.

  2. #2
    Super Contributor
    Join Date
    Jun 2003
    Cheshire, UK

    Re: open local port to receive data

    Three things:

    1. If you check the JavaDocs for ServerSocketConnection, you'll see that the URL format is "socket://:4567" (where 4567 is the port number).

    2. Support for ServerSocketConnection is optional in MIDP. Many devices do not support it (it is not supported on Series 40, for example).

    3. On devices that do support ServerSocketConnection (such as MIDP-2 Series 60s), it can only be used for communication between applications running on the same device. It cannot be used for in-bound connections from the network, since the phone does not have a publically accessible IP address.


  3. #3
    Registered User
    Join Date
    Aug 2009

    Re: open local port to receive data

    Thanks Graham.

    well, my scenario is that (i run this in emulator)

    after the other party has accepted a SIP invite, then i read the SDP and gain the IP and Port where to send outgoing audio. and i think for the incoming audio sent by the other party, i need to open the port that i've specified in my INVITE SDP.

    i've seen in Wireshark that the other party is constantly sending me RTP packets, but i couldnt process it as the port specified in my SDP is not actually open.

    anyone has solved this problem? any opinion&advice will be appreciated.
    Thank you.

Similar Threads

  1. Choosing a port number for a local HTTP server
    By TwmD in forum General Development Questions
    Replies: 0
    Last Post: 2009-02-19, 18:54
  2. How to receive GPS Data from GPS chipset using bluetooth and serial port
    By RB_Sahu in forum Symbian Networking & Messaging (Closed)
    Replies: 1
    Last Post: 2008-01-24, 10:58
  3. data port writing problem
    By mobile_don in forum Symbian Media (Closed)
    Replies: 0
    Last Post: 2007-07-28, 06:51
  4. Cannot to receive data from server...
    By ramis55 in forum Symbian Networking & Messaging (Closed)
    Replies: 0
    Last Post: 2005-05-09, 13:46
  5. How to Open BT com port in app, use BT com port in other apps?
    By frostybeard in forum Bluetooth Technology
    Replies: 1
    Last Post: 2002-10-24, 06:51

Posting Permissions

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