Name

Pushdemo

--------------------------------------------------------------------------------------------------------

Description

This sample app shows how to set up a connection between your device (the client) and a PC (the server), and use that connection to push packets of data from the PC to your device.


--------------------------------------------------------------------------------------------------------

Builds with

This project was generated by Palm OS Application wizard in
CodeWarrior Development Studio for Palm OS, version 9.0.

Also builds with GCC.


--------------------------------------------------------------------------------------------------------

Devices

Should run on all Palm OS Treo and centro devices


--------------------------------------------------------------------------------------------------------

Requirements

Set up your PC to have an IP address that is not behind a router or firewall. This is described in the Note section below.

The device is activated and has a valid data plan (for network connection).

-------------------------------------------------------------------------------------------

Libraries Used

Net Library


-------------------------------------------------------------------------------------------

How to Run

1. Copy the tcp folder from the sample app onto your PC.

2. On the PC, open a cmd.exe window and change directory to where the tcp folder is.

3. Type tcptest on the command line. You will see a message which says:
Ready for client connect<>.

The server is now ready to accept a network connection from the client. The port number for this connection has been set to 9930.


4. Copy the Pushdemo.prc to your device.

5. Launch the Pushdemo app. You will see an alert asking you to enter the IP address of the server. Clear the alert and enter the IP address of the server in the IP field provided. The IP address should be of the form x.x.x.x The port number of the server (9930) has already been entered for you. 

If you have already entered the IP address of the server (in a previous run), it will show up.

6. Hit the Start button. You will be prompted to connect to the internet if you have not already done so.

7. The status field will say "Connecting".

8. The device will put up an alert saying "Proceeding to connect". You should have run tcptest on your server by now and have the server ready to accept a connection from the client. Hit OK to clear the alert.

9. The device will make the connection to the PC. The status field will change to "waiting  to receive ...". In the cmd.exe window on the PC you will see "Sending data packet to    client".
   
10. On the device you will get an alert saying "ConnectionAlert. Data packet received." Clear the alert.

11. The status field will change to say "This is your data."


-------------------------------------------------------------------------------------------

Note

On your PC, set up a Bluetooth connection between the PC and a different Treo or Centro device. Connect to this device from your PC. This connection should generate a new IP address for your PC.

To find out the IP address of your PC, use the ipconfig command in the cmd.exe window. Choose the IP address corresponding to the Bluetooth connection you just set up.

For CDMA devices, use #777 as the dial-up number.

For GSM devices, use *99# as the dial-up number.

The device you use for the bluetooth connection should be different from the device on which you will run the Pushdemo app.
-------------------------------------------------------------------------------------------
