You Are Here:

Community: Developer Discussion Boards

#1 Old socket:// - 2003-05-13, 15:45

Join Date: May 2003
Posts: 1
itx
Offline
Registered User
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
Reply With Quote

#2 Old 2003-05-30, 15:26

Join Date: Mar 2003
Posts: 112
ossipetz
Offline
me-2-j :)
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.
Reply With Quote

#3 Old Socket Problem - 2003-06-04, 06:17

Join Date: Jun 2003
Posts: 24
barryIyer
Offline
Registered User
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.
Reply With Quote

#4 Old 2003-06-05, 08:29

Join Date: Mar 2003
Posts: 112
ossipetz
Offline
me-2-j :)
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.
Reply With Quote

#5 Old 2003-06-05, 10:38

Join Date: Apr 2003
Posts: 47
gicio
Offline
Registered User
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 08:16.
Reply With Quote

#6 Old 2003-06-10, 18:02

Join Date: Mar 2003
Posts: 5
eddyau
Offline
Registered User
Hi gicio,

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

Eddy
Reply With Quote

#7 Old 2003-06-10, 18:07

Join Date: Apr 2003
Posts: 47
gicio
Offline
Registered User
Yes....

and it's impossible!!!

;(


gicio
Reply With Quote

#8 Old 2003-06-11, 10:54

Join Date: Jun 2003
Posts: 26
ravi@purpleace.com
Offline
Registered User
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.
Reply With Quote

#9 Old 2003-06-11, 15:22

Join Date: Jun 2003
Posts: 12
harpreet_pune
Offline
Registered User
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.
Reply With Quote

#10 Old 2003-06-11, 15:36

Join Date: Jun 2003
Posts: 26
ravi@purpleace.com
Offline
Registered User
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.
Reply With Quote

#11 Old 2003-06-12, 04:00

Join Date: Mar 2003
Posts: 5
eddyau
Offline
Registered User
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
Reply With Quote

#12 Old 2003-06-12, 04:30

Join Date: Jun 2003
Posts: 26
ravi@purpleace.com
Offline
Registered User
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.
Reply With Quote

#13 Old 2003-06-12, 07:12

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

Thanks
Reply With Quote

#14 Old 2003-06-12, 15:44

Join Date: Jun 2003
Posts: 26
ravi@purpleace.com
Offline
Registered User
Theoretically, yes I suppose that should be possible. Lemme know how it shapes up practically. Thanx.
Reply With Quote

#15 Old 2003-06-13, 06:29

Join Date: Jun 2003
Posts: 12
harpreet_pune
Offline
Registered User
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();
}
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

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