Solved

Wap-Mobile phone side, Create a connection

Posted on 2003-11-20
12
393 Views
Last Modified: 2013-12-27
Hei!! I'm a portuguese student, and I'm a beginner.

I want do an application to a mobile phone in Java, to connect a web site using WAP.

What I need do?? If some one can give me a example or steps to do that fine.

 - I don't know how begin a wap connection and how set the id addrss
  - I need AT COMMANDS ??? (how I do that?)

 Tanks bye bye

Vasco Mouta
0
Comment
Question by:ib00049
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 4
12 Comments
 
LVL 15

Expert Comment

by:jimmack
ID: 9786696
A WAP browser on your phone works just like an HTML browser on your desktop.  There is no need to deal with AT commands and things like that.

Where you would write HTML for a web page, you use WML for a WAP page.  Here is an example:

<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.x
ml">
<wml>
  <card id="card1" title="First card">
    <p>Welcome to the <strong> My First Card </strong> on my first WAP site.</p>
  </card>
</wml>

You just need to save this file on your web server and then enter the URL on your phone.  eg. If this file is saved as "index.wml" and your web server is at "http://www.myserver.com", on your WAP phone, you need to enter the URL as:

http://www.myserver.com/index.wml

You need to ensure that your web server supports the correct MIME types for WAP (most do):

wbmp  image/vnd.wap.wbmp
wml  text/vnd.wap.wml
wmlc  application/vnd.wap.wmlc
wmls  text/vnd.wap.wmlscript
wmlscriptc  application/vnd.wap.wmlscriptc

Have a look at this site too:

file:///usr/share/doc/WML/WML%20Overview.html
0
 
LVL 15

Expert Comment

by:jimmack
ID: 9786699
Sorry ;-)  That link is on my local system.  It should have been:

http://developer.openwave.com/htmldoc/41/wmlref/front.html
0
 

Author Comment

by:ib00049
ID: 9786719
tanks men, i need that side to.

But what I want do is one application to run in the nokia mobile phone serie60, and when i begin this application i go to the site along, whithout insert the url name for the site.

You give me the solution to the page and no to the mobile application

Sorry about the Inglish

Thanks, if you can help in this to nice, the points gone to you

Vasco Mouta
0
Retailers - Is your network secure?

With the prevalence of social media & networking tools, for retailers, reputation is critical. Have you considered the impact your network security could have in your customer's experience? Learn more in our Retail Security Resource Kit Today!

 
LVL 15

Expert Comment

by:jimmack
ID: 9786761
The Nokia series 60 phones have a built-in WAP browser (go to the Services menu and look for "Go to address" or "Go to URL" (or similar) where you can enter the URL).

Alternatively, you could store a bookmark for the site - to avoid having to enter the URL every time.

If you want to write your own application to access the site, you are looking at a *massive* project :-(
0
 

Author Comment

by:ib00049
ID: 9786785
yes, you are right!!!

But i realy need do this..

I need that my application have some communication with the web page.
0
 
LVL 15

Expert Comment

by:jimmack
ID: 9786836
OK.  What programming languages have you used?

If you've used mainly Java, then you need to be looking at creating a J2ME application.  This (again) uses the http protocol to communicate across the network.

http://wireless.java.sun.com/allsoftware/

If you haven't used Java and you want to write native code for the device(s), then I can't really help much further.
0
 

Author Comment

by:ib00049
ID: 9786940
I have all software that i need etc. etc.
Yes if you can help me with this code is nice, like with an example..
0
 
LVL 15

Expert Comment

by:jimmack
ID: 9787193
Have you written anything at all yet?

How much Java experience do you have (specifically J2ME)?

You're asking too much for 50 points - "This question is not important and easy (50 points)".

Here's a link that might help:
http://www.j2me.org/yabbse/index.php?board=10
0
 

Author Comment

by:ib00049
ID: 9787375
you are right but i don´t have to much points.

I only know do simple things nothing more.
 
I can do my simple applications in JAVA(J2ME) but i don't know yet how do this.

ib00049@alunos.deis.isec.pt  is you want privaciti :o)

if you can send me i little example to begin the connection, i try do the rest. I want finish my studies :o)

Tanks men again
0
 
LVL 15

Accepted Solution

by:
jimmack earned 100 total points
ID: 9787480
   private HttpConnection conn;
    private DataInputStream dis;

    private void openConnection(String url) throws IOException
    {
        conn = (HttpConnection)Connector.open(url);
        conn.setRequestProperty("connection", "close");
        dis = conn.openDataInputStream();
    }

    private void closeConnection()
    {
        try
        {
            if (dis != null)
            {
                dis.close();
            }

            if (conn != null)
            {
                conn.close();
            }
        }
        catch (IOException ioe)
        {
        }

        dis = null;
        conn = null;
    }

    public void manageConnection() throws IOException
    {
        openConnection("http://....");

        // Read any data you want here, eg:
        int anInteger = dis.readInt();
        String aString = dis.readUTF();

        closeConnection();
    }

Include your data/commands/instructions to the server in the URL that you use to open the connection (just as you would with a normal browser request), eg:

http://www.myhost.com?param1=abcd¶m2=1234
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For Sennheiser, comfort, quality and security are high priority areas. This paper addresses the security of Bluetooth technology and the supplementary security that Sennheiser’s Contact Center and Office (CC&O) headsets provide.  
DECT technology has become a popular standard for wireless voice communication. DECT devices are not likely to be affected by other electronic devices and signals because they operate in a separate frequency-band.
This Micro Tutorial will show you how to maximize your wireless card to its maximum capability. This will be demonstrated using Intel(R) Centrino(R) Wireless-N 2230 wireless card on Windows 8 operating system.
Viewers will learn how to connect to a wireless network using the network security key. They will also learn how to access the IP address and DNS server for connections that must be done manually. After setting up a router, find the network security…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question