• 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
  • Liutauras Vilda
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Carey Brown
  • Stephan van Hulst
  • Tim Holloway
  • Peter Rooke
  • Himai Minh
Bartenders:
  • Piet Souris
  • Mikalai Zaikin

Push Registry with socket or datagram connections

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I need my server(servlet) connect to a client(MIDP device) and let it know that the information that the midlet requested is ready. Then midlet will connect to the server via http/https to get the information.
It seems that this is possible with push registry. But I do not know which devices support "Push registry" with socket or datagram connections. Nokia 60 series seems to support SMS and bluetooth. Is that right?
Am I have to use SMS to implement Push registry on a real device?
PS: I can get the IP address and MSISDN of the client. So it will not be a problem for server to call the client back...
 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
so far it seems like everyone is using sms to awaken a midlet.(maybe the only way?)

i think 6600 and 6220 are waht u r looking for.

i wanted to do the same thing as you. i have a midlet in emulator listening to port xxx. then i opened up telnet and just 'open' port xxx(doing nothing else) and true enough the midlet is awaken cause it detected activity on port xxx. i guess it is possible to awaken a midlet even without sms.

i could not prove this cause i do not own a midp2.0 phone. if i use the getLocalHost() on the emulator it will just return the pc's ip.

anyway u could try this:
download ur jar and jad file via OTA. since u say u could get the device ip, when u register ur connection, the server side app can get it automatically(if not just send it there). next, when the server have new information, the server app just need to include the device's ip when it open port xxx, then the midlet detect activity on that port and awaken.

at least in my opinion it can works this way.
so, pls let me know ur progress.
can u tell me how u get the ip and number of the device.(getLocalHost())??

thanks!!!
ps: hope u are able to prove this. in dire need for a sms-less solution

[ August 26, 2004: Message edited by: scud ]
[ August 26, 2004: Message edited by: scud ]
 
kubilay akgul
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

It is possible to make a socket connection to a MIDP2.0 device with Push functionality. I have tried it on a Nokia 6600 and it works. The only problem you may have at this connection is some Operators do not allow inbound network connections towards mobile devices of GPRS network in their firewall.
 
author
Posts: 1436
6
Python TypeScript Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
scud,

Please change you display name according to the JavaRanch naming policy, which you had agreed to when you signed up.

Thanks
Michael
 
Ryan Chai
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
sorry bout the name.

yes, some operator do not allow inbound connection through their firewall. in that case nothing can be done, is it?. i've also read that some telco have all their devices under 1 gateway and under that the devices are given different identifier not in terms of IP addresses.
i guessed the only sensible way is to do it the SMS way.
may i know how u get the phone's ip and MSISDN???

thank in advance
 
Michael Yuan
author
Posts: 1436
6
Python TypeScript Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Chai,

Your display name still does not conform to JavaRanch's naming policy, which requires a first name and a last name. Please make the change.

Thanks
Michael
 
Ryan Chai
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Michael,
in push registry, when we download the midlet via OTA, we will also publish our ip address to the server side app. of course we can't guarantee that our connection is always ON and using the same ip. let's say our connection is lost and a new ip is assigned to our device, will the AMS detect this change and automatically publish this new ip to the server app OR we can write a code segnment to do that??

since according to SUN, we are able do push through Http,datagram and socket and by publishing our ip, the server app can send 'alert' to the device, of course they had thought of this right?

Thanks in advance
 
Michael Yuan
author
Posts: 1436
6
Python TypeScript Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Ryan Chai:

in push registry, when we download the midlet via OTA, we will also publish our ip address to the server side app. of course we can't guarantee that our connection is always ON and using the same ip. let's say our connection is lost and a new ip is assigned to our device, will the AMS detect this change and automatically publish this new ip to the server app OR we can write a code segnment to do that??



When you download the MIDlet OTA, the server normally gets the WAP gateway's IP address -- not your device's. Actually, in some networks, the device itself does not even have an IP address or only has an private address behind the firewall that blocks all incoming connections.

If the wireless operator wants to inform the server about your IP address, it could append a special HTTP header in each HTTP request from your device, which contains the IP address of the device. If this is the case, you can use a servlet to parse the IP address out of that header and bounce the result back to your MIDlet upon request. But again, this is highly operator dependent.



since according to SUN, we are able do push through Http,datagram and socket and by publishing our ip, the server app can send 'alert' to the device, of course they had thought of this right?



The J2ME spec targets generic scenarios. It leaves open the possibility that you might push using IP address but in reality, no wireless operator would allow you to do it easily. But this may change soon. With the new generation Wifi phones coming out, you might be able to get around the carrier network and give your phone a real IP address. But today, the easiest way to push is to use SMS messages.
 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

kubilay akgul wrote:Hi,

It is possible to make a socket connection to a MIDP2.0 device with Push functionality. I have tried it on a Nokia 6600 and it works. The only problem you may have at this connection is some Operators do not allow inbound network connections towards mobile devices of GPRS network in their firewall.



hi ,
i want to launch my midlet using socket connection.
Can you tell me how can i do that?
I am just confused i.e
How you can access an application on a mobile device if you don't know the ip address of that device.
Becuase you know ip address is changing oftenly.
thanks and regards
 
reply
    Bookmark Topic Watch Topic
  • New Topic