• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Jeanne Boyarsky
  • Tim Cooke
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
Bartenders:

Connecting two mobiles through socket connection

 
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

Is it possible to connect two mobile\cellphones using socket connection(similar two one that we can do between two PC)

To establish socket connection ,I need IP address and a port .

i should assign IP address for each mobile ...Based on IP address i can identify the Mobile ..

Question:
1)Can i establish socket connection between
(a)Mobile - Mobile
(b)PC - Mobile
(c)Mobile - PC (i know this is possible,but i have doubt about a & b)

Suppose if we can establish socket connection between PC and Mobile can any one assist me in setting IP address and port .
 
Ranch Hand
Posts: 524
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
It is possible create a socket connection using the SocketConnection class in the GCF. But if you want to connect a PC to a mobile through socket connection, it will be a problem, cause it is a server push. You can use the PushRegistry to push data from the server to the phone. According to my knowledge it is not possible to configure a IP address to a phone, you will get one when you connect through GPRS. Hope this information helps you. Regards.
 
Ranch Hand
Posts: 231
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As long as two devices (PC or mobile) have IP addresses, they can be connected through SocketConnection or ServerSocketConnection on the J2ME side; whatever socket API you use on the PC.

ServerSocketConnection and Push Registry can be combined so that a MIDlet is started in response to an incoming socket connection on a specified port.

There is no standard way for assigning an IP to a mobile, it should be the one you get through GPRS. It is normally best to have the mobile contact a known server (ie the one you want) first to acknowledge its presente.
 
Mo-om! You're embarassing me! Can you just read a tiny ad like a normal person?
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic