Click here to Skip to main content
15,885,920 members
Articles / Desktop Programming / MFC
Article

Sharp YO Series Communication Class

Rate me:
Please Sign up or sign in to vote.
4.71/5 (8 votes)
23 Sep 2001 169K   1.1K   16   34
Class for performing a backup/restore to a Sharp YO series organizer.

Disclaimer

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.

Introduction

The 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.

Features:

  • 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 :-)

Class description

Method Description
SharpComm()Initializes the COM port to COM1 and allocates memory for the communication buffer.
~SharpComm()Deallocates memory for the communication buffer and closes the COM port used.
void Initialize(void)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.
bool IsInitialized()Returns 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 Initialize.
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 Initialize.
void DoBackup()Backups the contents of the organizer in the file specified by SetFileName.
void DoRestore()Restores the contents of the organizer from a file specified by SetFileName.
void Shutdown()Closes the selected communication port.

Usage

The 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.

// SharpComm class instance
SharpComm device;
try {
// Set port to COM1
device.SetComPort(COM1);
// Initialize communication
device.Initialize();
// Set file name
device.SetFileName("c:\\SharpYO190.bin");
printf("Waiting for organizer...\r\n");
// Perform backup or restore (device.DoRestore())
device.DoBackup();
}
catch(DeviceException *ex)
{
// Catch exception, something has happened
printf("ERROR: %s\r\n", ex->GetMessage());
delete ex;
}

Known Issues

  1. 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.
  2. 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.
  3. 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.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Architect
Romania Romania
I am a software engineer based in Timișoara, Romania and currently hold the position of software architect for one of the largest companies in the world.

I invented a dialect of the Forth programming language and implemented the first Forth compiler for the .NET platform. I reverse-engineered the communication protocol of some GPS trackers and wrote from scratch a vehicle tracking system that is currently used to track my two cars. I hold a PhD in computer science and I am the author of several papers and a book chapter. In the 90s I wrote several computer viruses in assembly language for my own research and I was the first to devise a technique to deter heuristic virus scanners. In short, a humble man.

Comments and Discussions

 
QuestionY0-180 compatible to YO-190 ? Pin
yosharpy14-Aug-07 23:31
yosharpy14-Aug-07 23:31 
Questionhelp to sharp el6890 Pin
cholo749-Aug-07 4:29
cholo749-Aug-07 4:29 
GeneralYo180 1. Will not turn on 2. Salvage Data to new Sharp Wizard OZ 590A Pin
idowebster21-Jun-06 7:01
idowebster21-Jun-06 7:01 
QuestionSharp YO-190 organizer Auto-Off disable? Pin
MERLINMAGIX4-May-06 20:38
MERLINMAGIX4-May-06 20:38 
Not sure if my question is relavent to this site but thought I would go ahead and give it a shot and maybe someone might be able to help me. I have a Sharp YO-190 organizer and was wondering if it is possible to disable the auto-off function either by hack or part altering. I would really appreciate any input or ideas. Thanks.
GeneralYO-500 Pin
Anonymous2-Oct-05 11:16
Anonymous2-Oct-05 11:16 
GeneralRe: YO-500 Pin
Valer BOCAN2-Oct-05 17:41
Valer BOCAN2-Oct-05 17:41 
Generalyo-180 restoring backup problem Pin
mkshaji7-Jun-05 7:16
mkshaji7-Jun-05 7:16 
Generalcan't get data Pin
walliselkemercedes8-Oct-03 12:27
walliselkemercedes8-Oct-03 12:27 
GeneralWhere'd you find out... Pin
J. Dunlap9-Jun-03 17:26
J. Dunlap9-Jun-03 17:26 
GeneralRe: Where'd you find out... Pin
J. Dunlap9-Jun-03 17:28
J. Dunlap9-Jun-03 17:28 
GeneralRe: Where'd you find out... Pin
Valer BOCAN9-Jun-03 19:17
Valer BOCAN9-Jun-03 19:17 
GeneralRe: Where'd you find out... Pin
J. Dunlap9-Jun-03 20:31
J. Dunlap9-Jun-03 20:31 
GeneralRe: Where'd you find out... Pin
J. Dunlap9-Jun-03 20:53
J. Dunlap9-Jun-03 20:53 
Generalbke file refuses to download to Organiser ZQ485 Pin
georgea17-May-03 12:39
georgea17-May-03 12:39 
GeneralRe: bke file refuses to download to Organiser ZQ485 Pin
Valer BOCAN20-May-03 20:48
Valer BOCAN20-May-03 20:48 
GeneralIm looking for computer link cable for YO-380 Pin
Anonymous2-Apr-03 8:21
Anonymous2-Apr-03 8:21 
GeneralRe: Im looking for computer link cable for YO-380 Pin
Anonymous11-Apr-03 0:02
Anonymous11-Apr-03 0:02 
GeneralIm looking for cable diagram for SHARP YO-380 Pin
Member 22401802-Apr-03 8:19
Member 22401802-Apr-03 8:19 
GeneralFYI Pin
6-Feb-02 9:48
suss6-Feb-02 9:48 
GeneralRe: FYI Pin
Valer BOCAN6-Feb-02 17:00
Valer BOCAN6-Feb-02 17:00 
GeneralYo180 or ZQ180 Protocol Pin
15-Nov-01 10:11
suss15-Nov-01 10:11 
GeneralRe: Yo180 or ZQ180 Protocol Pin
Anonymous13-Feb-03 21:29
Anonymous13-Feb-03 21:29 
Generalneed to decrypt the .bke file Pin
7-Nov-01 15:01
suss7-Nov-01 15:01 
GeneralRe: need to decrypt the .bke file Pin
Valer BOCAN7-Nov-01 21:10
Valer BOCAN7-Nov-01 21:10 
GeneralRe: need to decrypt the .bke file Pin
8-Nov-01 15:14
suss8-Nov-01 15:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.