This communication class is conducted by experimenting with a commercially available product by Sharp Electronics Corp. Sharp Electronics Corp. is in no way involved in this research and assumes no liability, express or implied. The software may contain bugs and may not work with any given organizer; I do not take responsibility. Use the information herein at your own risk. You've been warned.
SharpComm class has been written as a result of my research on the protocol used by the Sharp YO series organizers. The protocol for the backup and restore procedures has been hacked through using Portmon, an excellent tool from SysInternals; since Sharp has denied my request to obtain the official documents describing the protocol.
As of now, the class has been tested using my Sharp YO-190 organizer, with 256KB of RAM. It's not as fancy as the Palm Pilots, but it's cheap (as low as $30 from Best Buy) and it's exactly what I need. This probably works with other models, as well.
- Memory: 256KB (254KB user area)
- PC Link: cable & software included
- Display: 19 x 5 characters dot matrix display with backlight
- Weight: 9.5 oz (270 g)
This may not be a technical masterpiece, but is smarter than my old 11KB Canon organizer :-)
|Method ||Description |
|Initializes the COM port to COM1 and allocates memory for the communication buffer.|
|Deallocates memory for the communication buffer and closes the COM port used.|
|Opens the selected COM port and sets the communication parameters (9600 baud, 8N1), then purges the queue. This method must be called before performing a backup or a restore operation.|
true if the communication port has been successfully opened.
void SetComPort(int Port)
|Sets the desired COM port. The |
Port parameter must have one of the following values: COM1, COM2, COM3, COM4. To be effective, this method must be called before
void SetFileName(char *szFileName)
|Establishes the name of the file used for backup and restore operations. To be effective, this method must be called before |
|Backups the contents of the organizer in the file specified by |
|Restores the contents of the organizer from a file specified by |
|Closes the selected communication port.|
SharpComm class is fairly easy to use, there is no special setup needed, just the requirement that your organizer be connected to the computer using the included cable.
printf("Waiting for organizer...\r\n");
printf("ERROR: %s\r\n", ex->GetMessage());
- The backup and restore operations are not implemented using threads, so there's no elegant way to cancel the operation or to add a progress bar to a GUI. The class is very simple and I leave the chore of adding multithreading to whoever is interested.
- The checksum computation is a simple 16 bit addition, but the first and the last data blocks seem to follow a different rule. The implementation of
GetCheckSum is done experimenting, so I am not sure if the results are stable.
- The sample utility provided is extremely simple therefore minimal error checking is performed. Don't blame me if your computer explodes or goes on strike :-)
A word about Sharp's backup files (*.bke)
The backup files generated by the original program that comes with the organizer seem to be encrypted. I say "seem", because the encryption schema used is so weak that I could decrypt the files within minutes after I saw them. For those who are used to working with files at a low level, all you have to do is apply XOR FFh to each byte from offset 8 onwards. That's all. In addition, if you do that, the password of your organizer can be found at offset 112h. For those who don't understand a word of what I am saying, here is the English version :-)
Don't store sensitive information in your organizer!!! Even protected by the password, your data and password can be easily revealed using the simple class presented in this article. Also, remember that even after a reset, the memory is not completely erased, just marked as erased. Take out the batteries for a few minutes to wipe out any trace of your data from the organizer. Most importantly, do not store the backup files where they can be easily reached by others.