You Are Here:

Community: Developer Discussion Boards

#1 Old Peer to Peer connection in J2ME possible? - 2006-08-08, 11:15

Join Date: Feb 2006
Posts: 23
capricious28
Offline
Registered User
Hi all,

I am trying to send some bytes of data from one handset A to another handset B over TCP via a J2ME application. Basically, it's peer to peer in nature.

Can someone advice how I can do this in J2ME?

Thanks very much.

Regards.
Reply With Quote

#2 Old Re: Peer to Peer connection in J2ME possible? - 2006-08-08, 16:48

Join Date: Dec 2005
Posts: 1,886
Location: Brazil
Send a message via MSN to juarezjunior Send a message via Skype™ to juarezjunior
juarezjunior's Avatar
juarezjunior
Offline
Forum Nokia Champion
Hi capricious28,

I advise you to take a look at the SIP API for JME (JSR-180). Forum Nokia has good documentation and example for SIP and P2P is a good use case for SIP.

Here are some links:

MIDP: SIP API Developer's Guide
http://www.forum.nokia.com/info/sw.n..._0_en.pdf.html

MIDP: SIP API Example

http://www.forum.nokia.com/info/sw.n..._0_en.zip.html

Hope it helps!

BR,

Juarez Junior
Reply With Quote

#3 Old Re: Peer to Peer connection in J2ME possible? - 2006-08-08, 17:50

Join Date: Nov 2003
Posts: 3,641
Location: Bangalore , India
Send a message via Yahoo to balagopalks
balagopalks's Avatar
balagopalks
Offline
Forum Nokia Expert
Just to add what Juarez said:: Me already had some some discussion regarding some introduction docs to SIP. Please note that several links have been provided by different users, if interested you could navigate through different pages in this thread.
http://agathonisi.erlm.siemens.de:80...art=0&tstart=0

Regards
Gopal
Reply With Quote

#4 Old Re: Peer to Peer connection in J2ME possible? - 2006-08-10, 12:30

Join Date: Feb 2006
Posts: 23
capricious28
Offline
Registered User
Hi balagopalks and juarezjunior,

Thanks for your replies respectively.

However, I was thinking, can this task of transferring bytes peer to peer be accomplished using SocketConnection and ServerSocketConnection?

If yes, is there any way of getting the IP address of the handset?

Thanks again.
Reply With Quote

#5 Old Re: Peer to Peer connection in J2ME possible? - 2006-08-10, 14:04

Join Date: Dec 2005
Posts: 1,886
Location: Brazil
Send a message via MSN to juarezjunior Send a message via Skype™ to juarezjunior
juarezjunior's Avatar
juarezjunior
Offline
Forum Nokia Champion
Hi capricious28,

"is there any way of getting the IP address of the handset"

AFAIK, if you manage to get one device's address, you'd need to publish it externally to allow another device to get it. Note that IP addresses in mobile networks are dynamic (DHCP) and they will change. I consider SIP as the best solution, no doubt.

BR,

Juarez Jr
Reply With Quote

#6 Old Re: Peer to Peer connection in J2ME possible? - 2006-08-11, 04:15

Join Date: Feb 2006
Posts: 23
capricious28
Offline
Registered User
Hi Juarez Jr,

Okay let's say I am using SIP, am I right to pass the bytes of data via a SIP MESSAGE to the other party? Is there a limit to how many bytes a SIP MESSAGE can carry? Because I may attempt to pass huge number of bytes of data.

Quite new in this area, appreciate any help! Thanks!

Quote:
Originally Posted by juarezjunior
Hi capricious28,

"is there any way of getting the IP address of the handset"

AFAIK, if you manage to get one device's address, you'd need to publish it externally to allow another device to get it. Note that IP addresses in mobile networks are dynamic (DHCP) and they will change. I consider SIP as the best solution, no doubt.

BR,

Juarez Jr
Reply With Quote

#7 Old Re: Peer to Peer connection in J2ME possible? - 2006-08-11, 14:13

Join Date: Dec 2005
Posts: 1,886
Location: Brazil
Send a message via MSN to juarezjunior Send a message via Skype™ to juarezjunior
juarezjunior's Avatar
juarezjunior
Offline
Forum Nokia Champion
Hi capricious28,

AFAIK there's no such restriction. Read below:

"SIP works in concert with other protocols and is only involved in the signaling portion of a communication session, acting as a carrier for the SDP. The SDP describes the session name and purpose, time(s) the session is active, the media comprising the session, information to receive the media (addresses, ports, formats etc.). In typical use, SIP "sessions" are simply packet streams of the Real-time Transport Protocol (RTP), which funtions as the carrier for the actual voice or video content itself."

I am not a specialist regarding this SIP API (JSR-180), I've just worked with some examples related to it as well as the SIP Servlet API (JSR-116), though. I am looking forward to an opportunity of implementing some solution using them :)

BR,

Juarez Jr
Reply With Quote

#8 Old Re: Peer to Peer connection in J2ME possible? - 2006-08-15, 06:18

Join Date: Feb 2006
Posts: 23
capricious28
Offline
Registered User
Thanks, Juarez Jr.

I am in the process of working on SIP now. Thanks for your help :)
Reply With Quote

#9 Old Re: Peer to Peer connection in J2ME possible? - 2006-08-16, 13:41

Join Date: Dec 2005
Posts: 1,886
Location: Brazil
Send a message via MSN to juarezjunior Send a message via Skype™ to juarezjunior
juarezjunior's Avatar
juarezjunior
Offline
Forum Nokia Champion
Hi capricious28,

You're very welcome! Glad it helped :)

BR,

Juarez Junior
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules

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

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Forum Jump
Similar Threads
Thread Thread Starter Forum Replies Last Post
Connection way in j2me. lukaszpl Mobile Java General 0 2005-07-21 11:05
Mobile which supports Datagram Connection in J2ME hbfornies Mobile Java Networking & Messaging & Security 7 2003-09-08 16:25
Add username and password to an HTTP connection with J2ME daldaver Mobile Java Networking & Messaging & Security 1 2003-08-23 06:23
GPRS Mobile Termination (MMS) and peer to peer connection lajmve General Discussion 1 2003-05-22 18:34
close a wap connection in j2me hadam Mobile Java General 0 2002-08-29 07:38

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia