O'Reilly logo

Palm Programming: The Developer's Guide by Julie McKeehan, Neil Rhodes

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 9. Communications

In this chapter, we discuss the types of communication available on the Palm OS. Next we go into detail about two of these types and show you how to write code to use them.

Palm OS supports three kinds of communication: IrDA, serial, and TCP/IP:

IrDA

This is an industry-standard hardware and software protocol. We won’t discuss the details of communicating using IrDA. We will, however, show you how to use the Exchange Manager to implement beaming (see the section entitled Section 8.4). Beaming is a data exchange method built on top of IrDA.

Serial

Serial communication occurs between the handheld and other devices using the cradle port. This is the most common form of communication on the Palm OS, and as an example we develop a special serial application that communicates (indirectly) with satellites.

TCP/IP

Currently, this communication standard is available only via a serial or modem connection. The future has no boundaries, however, so you might expect to see built-in Ethernet or devices using wireless TCP/IP appear some day. To show you how to use TCP/IP, we create a small application that sends email to a server.

Serial

The Serial Manager is fairly straightforward. There are routines to do all of the following:

  • Open and close the serial port

  • Read and write data

  • Query how many bytes are ready to be read

  • Set options

Serial I/O is synchronous, so there’s no notification when data gets received. Instead, your code must poll to see whether data has arrived.

Tips for ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required