Serial Communication with Palm OS - Part 1/4
The Palm OS Application
This page describes how to write a small Palm-OS-Application, which is able to send some data via the serial interface.
The code is fully compilable with the tools, I mentioned here: Compiling and bulding Palm-OS-Applications on Ubuntu 18.04 LTS (64 Bit)
Feel free to make your own copy and edit it in a way you want/need.
In order to build a functional Palm-OS-Application, three files are nedded:
- a header-File, which contains declarations and definitions
- a resources-File, which contains the resources, like UI-Elements
- a c-File, which contains the actual code
This is the header-File of the application
90% this are definitions for forms, buttons, menus and Alerts. "appFileCreator" needs some attions, because this is an ID, wich identifies your application and must not be identical to other "appFileCreator"-IDs, otherwise it can lead to data loss. There was a service from Palm, which make sure, that there was only one unique ID for each application. Of course this service is not online anymore. So today is pure luck if it is working with other applications or not.
This is the resources-File of the application
Here are all UI-elements are defined and their parameters like titles and locations.
This is the c-File with all the code, which contains the "business-logic" of the application.
This application only works with the old COM port (DE-9 connector). If the application gets started on a devices, which is connected to a USB-cable or -cradle (the USB-cable does not need to be plugged in!), the application crashes with a "Serial: timeout [...] (Ser 0305)"-error-message.
Make always sure the baud rate is configured on all takers (Client/Server, Palm/PC) the same, e.g.: 9600 [bits per second]. Otherwise the transmission will fail.
The application was successfully developed and tested on a Palm m100 and POSE.
The next part (2/4) describes, how the data from the application can be read on a linux-commandline:
Serial Communication with Palm OS on Ubuntu 18.04 and the commandline