×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Oct 2005
    Posts
    2

    Mobile-to-mobile transfer with J2ME sockets

    Does anyone know the issues involved with direct mobile-to-mobile transfer using J2ME sockets, without going through a web server? (e.g. signing, specific ports, access point).

    I had success with the following (all using socket connections):
    - Mobile-to-mobile (J2ME client server) on an emulator
    - Real Nokia mobile client (J2ME) to PC-based server (PHP, Java, etc)
    both the above using port 5000. I discovered that port 8080 does not work.

    But when I tried doing real world mobile-to-mobile, I get the dreaded error:
    [java.lang.SecurityException: Target port denied to untrusted applications with untrusted midlet]

    If anyone was successful with this, I would be grateful if you could post some information.

    Thanks,
    jbrodie

  2. #2
    Nokia Developer Champion
    Join Date
    Mar 2003
    Location
    Finland
    Posts
    9,545

    Re: Mobile-to-mobile transfer with J2ME sockets

    Well, first of all, both mobiles should then be assigned a public IP address by the operator (without that, they are not direcly visible to each other).

    Most operators do not allocate a public IP for phones. Some do it with a special/separate access point (and additional cost = higher data transfer prices).

    Even if both phones has a public IP, as they are not registered at a name server, you then would also need an intermediate mechanism for one phone to tell the other phone what its IP address is.

    Even if that was possible, the operator might on their firewalls still be preventing connections to the phone initiated from the "outside" (even if it is another phone on the same operator's network).

    That's why an Internet based server acting as the relay/gateway is the easiest way to handle this with least dependencies on device or operator capabilities (except that the operator must still allow full Internet access from phones, which all won't do).

  3. #3
    Registered User
    Join Date
    Oct 2005
    Posts
    2

    Re: Mobile-to-mobile transfer with J2ME sockets

    Petrib, thanks for your comments. Even with public IPs, I can see that connecting the mobiles would be a complex undertaking. Add to that the constraints of the mobile's memory, processing speed as well as the gateway transmission delays and higher cost, we may have expensive and extremely slow dataflow on our hands. Might be best to stay with the Internet server approach. When I posed that question, I had distributed processing on my mind. One can consider a local net using Bluetooth but the phones have to be within close proximity. Can't win them all, huh? Sigh...

    Quote Originally Posted by petrib
    Well, first of all, both mobiles should then be assigned a public IP address by the operator (without that, they are not direcly visible to each other).

    Most operators do not allocate a public IP for phones. Some do it with a special/separate access point (and additional cost = higher data transfer prices).

    Even if both phones has a public IP, as they are not registered at a name server, you then would also need an intermediate mechanism for one phone to tell the other phone what its IP address is.

    Even if that was possible, the operator might on their firewalls still be preventing connections to the phone initiated from the "outside" (even if it is another phone on the same operator's network).

    That's why an Internet based server acting as the relay/gateway is the easiest way to handle this with least dependencies on device or operator capabilities (except that the operator must still allow full Internet access from phones, which all won't do).

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

    Re: Mobile-to-mobile transfer with J2ME sockets

    another solution would be to open a socket from each phone to a static ip server, that would act as a relay between the phones (like take what comes from a socket and put it in the other one)

  5. #5
    Registered User
    Join Date
    May 2005
    Location
    Cape Town, SA
    Posts
    11

    Smile Re: Mobile-to-mobile transfer with J2ME sockets

    Finally, people who think as I do.

    I've been trying to implement this for a short while now and have a "server" setup to interface the two devices or at least return the IP addresses of the devices trying to access it.

    My question is: how can the device find out its own IP address when it logs onto the net?

    Also, which connection do I use to connect the two devices? eg, Http or ServerSocket?

    Thanks,

    Regan

Similar Threads

  1. J2ME MIDlet is limited, why not Java applications on mobile?
    By chen_lin99 in forum Mobile Java General
    Replies: 11
    Last Post: 2007-12-29, 01:15
  2. J2ME & Mobile Data Communications
    By jcecchin in forum Mobile Java General
    Replies: 4
    Last Post: 2005-02-04, 17:51
  3. Nokia Mobile VPN Client
    By marcyl in forum Symbian Networking & Messaging (Closed)
    Replies: 1
    Last Post: 2003-12-01, 14:47
  4. transfer j2me app to phone?
    By garyshi in forum Mobile Java General
    Replies: 1
    Last Post: 2003-06-11, 10:06
  5. taking pictures in mobile phones with digital cameras through J2ME
    By pedrosalazar in forum Mobile Java General
    Replies: 1
    Last Post: 2002-12-02, 09: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
  •