×

Discussion Board

Results 1 to 9 of 9
  1. #1
    Registered User
    Join Date
    Jul 2006
    Posts
    41

    Unhappy Problem of socket connection with N70

    Hi all,

    I have a bluestreak soft on my N70 to play flash applications. So I have a flash application which opens a socket connection on port 4443 (socket.connect("127.0.0.1", 4443)).
    I have installed a midlet which is registered on this port for socket connection. It can be opened by a socket connection, I tried to do it with another midlet and there was no problem.
    BUT when I open my flash appli, open the socket, the connection fails, the midlet is not opened.
    Though, when I try to simulate this on my computer it works...
    Any idea what's the problem? I have only tried on the N70.

    Thanks,

    Isa

  2. #2
    Nokia Developer Champion
    Join Date
    Mar 2005
    Location
    Paris
    Posts
    814

    Re: Problem of socket connection with N70

    did you made sure your flash stuff was authorised to open sockets ?

  3. #3
    Registered User
    Join Date
    Jul 2006
    Posts
    41

    Re: Problem of socket connection with N70

    Well, maybe indeed that's the problem but I can't find any docs, or any settings for such authorization...
    I was also wondering if the local address "127.0.0.1" is allowed in a mobile.
    I made a small test. I modified my jad like this:

    MIDlet-Push-1: socket://:4443, serverMidlet2, 127.0.0.1

    instead of

    MIDlet-Push-1: socket://:4443, serverMidlet2, *

    and the midlet did not open when trying to open it with an example midlet (it worked fine with the previous jad).
    Have you ever heard of such problems? Or some successful cases with local address?

    Thanks

  4. #4
    Nokia Developer Champion
    Join Date
    Mar 2005
    Location
    Paris
    Posts
    814

    Re: Problem of socket connection with N70

    i use socket push with 127.0.0.1, and it works, but i didn't try on n70
    may be you can try with 'localhost' instead of the numerical address

  5. #5
    Registered User
    Join Date
    Jul 2006
    Posts
    41

    Re: Problem of socket connection with N70

    But where from do you use it? A flash appli? Another midlet?

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

    Re: Problem of socket connection with N70

    hi,

    flash api always require specified ip addres and port, "localhost" is frequently used accross forum so it should work for midlets at least (but incoming socket bound for midlet is specified without ip address, only with port)
    by the way: from what you described it seems that flash movie and registered midlets both listen (should be bound) to the same local port on device (flash with XMLSocket object, midlet with push registry for socket connection), is that correct?

    regards,
    peter

  7. #7
    Registered User
    Join Date
    Jul 2006
    Posts
    41

    Re: Problem of socket connection with N70

    Yes, to the same port since the flash appli should open the midlet...
    The suport of Bluestreak, the player I use to play flash applis on my phone answered me this:

    You should use a Network.connect() before starting the socket.connect(). You can use Network.onConnect() callback to start socket.connect() to be sure that the network connection is established successfully.
    Even for a local TCP/IP connection with XMLSocket, you first need to create a network connection with the Network object.

    but I don't want to connect the network of m operator to do a local socket connection, this is ... an absurdity ...

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

    Re: Problem of socket connection with N70

    hi,

    you're using 3rd party solution (they wrap flash api calls within their custom wrapper I guess), if you could ask them what actually happens when their client establish network connection/ (network/socket)) before your midlet is to be started by application manager it could help someone from Nokia developers to guess what's wrong,
    If you look into MIDP 2.0 specification for PushRegistry (it ships with every nokias sdk docs) it list in details when push operations fails or when midlet is not to be executed due to listed cases, it should be general start point for investigation,
    regards,
    peter

  9. #9
    Registered User
    Join Date
    Jul 2006
    Posts
    41

    Re: Problem of socket connection with N70

    Hi,

    Thanks for all. I had a confirmation that I must do a
    Network.connect()
    then
    socket.connect()
    with this flash player, so I'm not gonna resolve my problem this way.

    I want my flash appli to open my midlet with some arguments. Since I didn't find out how to launch directly a midlet from my flash appli, I would like to call a C++ appli, which would open the local socket to open the midlet. AndI don't know C++.. I think it wil be must more difficult I thought it would be!!

    Anyway, thank you for help!

Similar Threads

  1. Problem in establishing socket connection
    By elise_ee in forum Mobile Java General
    Replies: 4
    Last Post: 2005-08-30, 13:57
  2. Socket problem
    By defragger in forum Symbian
    Replies: 0
    Last Post: 2005-08-25, 08:16
  3. Socket problem
    By Smeetesh Ooka in forum Mobile Java General
    Replies: 1
    Last Post: 2004-10-07, 21:20
  4. TCP socket connection between Symbian device and Windows
    By raghucp in forum Symbian Networking & Messaging (Closed)
    Replies: 3
    Last Post: 2003-09-15, 10:15
  5. Problem with socket connection
    By prakashsainani in forum Symbian Networking & Messaging (Closed)
    Replies: 1
    Last Post: 2003-09-10, 15:33

Posting Permissions

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