×

Discussion Board

Results 1 to 15 of 15

Thread: socket://

  1. #1
    Registered User
    Join Date
    May 2003
    Posts
    1

    socket://

    Any Nokia phone suppoer socket protocol?
    On my Nokia S60 emulator and Nokia 6310 emulator
    c = (StreamConnection) Connector.open("socket://"+url, Connector.READ_WRITE, true);
    always return:
    javax.microedition.io.ConnectionNotFoundException: The requested protocol does not exist socket://10.90.90.34:35000

  2. #2
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    112
    socket support is comin for midp 2.0 which will be available in symbian os 7 (i think)

    in midp 1.0 you can not use sockets.

  3. #3
    Registered User
    Join Date
    Jun 2003
    Posts
    24

    Socket Problem

    hi
    Why is it that , there are different versions of sdk or MIDP/CLDC versions in each model of phone?

    I mean to say that , is there any standard version of java which i can follow for different phones.

    Im currently using java wireless toolkit 2.0 and 1.0.4_01 from sun.

    If i compile my code in 2.0 which uses java MIDP 2.0 i get no problem. But the same code when compiled under 1.0.4_01 which uses java MIDP 1.0 shows compilation errors in Socket.

    How can choose the SDK or the exact version of MIDP which has support for sockets.

    And is there and version of MIDP 1.0.x which has support for Socket.

  4. #4
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    112
    for midp 1.0 devices use the sun wireless toolkit 1.x

    for midp 2.0 devices use the wtk 2.x


    sockets are new in midp 2.0. therefore you cant use them in midp 1.0

    there are maybe devices that implement sockets in midp 1.0 but that would break the least common standart thingie.

  5. #5
    Registered User
    Join Date
    Apr 2003
    Posts
    47
    It should be work in midp 1.0

    check this out:

    http://www.informit.com/isapi/produc...t/articlex.asp

    gicio
    Last edited by gicio; 2003-06-06 at 07:16.

  6. #6
    Registered User
    Join Date
    Mar 2003
    Posts
    5
    Hi gicio,

    Have you tested the socket in Nokia phone? I have tried many times but still cannot connect to server thru socket.

    Eddy

  7. #7
    Registered User
    Join Date
    Apr 2003
    Posts
    47
    Yes....

    and it's impossible!!!

    ;(


    gicio

  8. #8
    Registered User
    Join Date
    Jun 2003
    Posts
    26
    The socket protocol is defined in the Symbian SDK, and it seems to be missing from J2ME. And reasonably, socket works for me on series 60 (i tried on 7650), while http works on both series 60 and series 40 (6610, 6800)..

    One thing to be noted with sockets is that, the connection should be made with internet over gprs and not wap over gprs.

  9. #9
    Registered User
    Join Date
    Jun 2003
    Posts
    12
    Hi,
    I did not understand ur stmt
    "One thing to be noted with sockets is that, the connection should be made with internet over gprs and not wap over gprs."

    could you plz explain it.

  10. #10
    Registered User
    Join Date
    Jun 2003
    Posts
    26
    From any operator, you can acquire two configuration settings. Wap over GPRS, Internet over GPRS (in addition to others like CSD, MMS etc)... When your client prompts you for the access point, if you are using the socket connection, you would have to choose Internet over GPRS.

    To reason it logically (my previous para was based from experience), as sockets need TCP, we need to use HTTP over TCP/IP, The other accespoint must be using WSP/WTP over WDP.

  11. #11
    Registered User
    Join Date
    Mar 2003
    Posts
    5
    Hi,

    Just for sure.

    If I can use the GPRS settings to establish a HTTP request using Java, so I should be able to use the same GPRS settings for socket connection request. Right? As HTTP itself is running over TCP/IP.

    Eddy

  12. #12
    Registered User
    Join Date
    Jun 2003
    Posts
    26
    Fact:
    On series 60 phone, while HTTP worked on "WAP over GPRS accesspoint", Socket didnt.
    On series 60 phone, HTTP and Socket both worked on "WAP over Internet accesspoint".
    On series 40 phone, Socket never worked as the library doesnt support socket protocol.

    Understanding:
    WSP provides HTTP 1.1 functionality, as its a binary form of HTTP. WSP can go over datagram (WDP/UDP). This channel doesnt require TCP. Socket requires TCP.
    I dont know the low level implementation of HTTPConnection you see in the MIDP Api, but my guess is that it is binary http.

    Though I find my facts and logic appropriately leading to my reasoning, I am uncertain of some issues, and would appreciate the experts comments.

  13. #13
    Registered User
    Join Date
    Jun 2003
    Posts
    12
    Hi
    Does this mean that we can make a UDP (Datagaram) connection on a nokia 7210 phone using midp 1.0.

    Thanks

  14. #14
    Registered User
    Join Date
    Jun 2003
    Posts
    26
    Theoretically, yes I suppose that should be possible. Lemme know how it shapes up practically. Thanx.

  15. #15
    Registered User
    Join Date
    Jun 2003
    Posts
    12
    I tried making a Datagram connection, but it gave an exception on the phone.

    try
    {
    DatagramConnection myConn = (DatagramConnection)Connector.open("datagram://:60533");
    Datagram dg = myConn.newDatagram( 5 );
    myConn.receive(dg);
    myConn.close();
    }
    catch (IOException ioe)
    {
    ioe.printStackTrace();
    }

Posting Permissions

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