USE AT YOUR OWN RISK. I have used the program to backup my casio many times and I have checked that data and found that it correctly stores all the info in the backup file. My Casio is an SF-4600B and is the only one that the program has been tested on so far. I also inadvertently deleted every entry in my phone book and used wcasio to restore all of it from the backup file so it appears to work well too. BUT USE AT YOUR OWN RISK! At the moment the programs must be used with the CLI. Once I have converted the code to the SAS compiler, I'll make a version which can uses icons too. The casio must be set to send/rcv 8 data bits, 1 stop bit and no parity. 1. CASIO backup and restore Before using these two programs you should be aware of a few shortcomings in what the CASIO can backup and restore. If the CASIO is reset or totally loses power then, before you do anything else, you must enter the communication menu and reset the CASIO to 8 bit transmission (it powers up as 7) and set the correct baud rate, because you won't be able to restore from a backup file until this is done. The following items are also not backed up and must be restored manually: - EVERY item in the HOME/WORLD menu, such as the home time, timezone, DST, 12/24hrs, sound settings etc. are reset and not saved by a backup. - in the phone menu, the extra labels FREE 1, FREE 2 etc., are reset and are not saved by the backup procedure. So if you change, for example, FREE 1 to FAX: then you must manually reset this yourself. The backup program is called rcasio and all that is required to use it is to start it running and then using the CASIO menu to tell the CASIO to send all data. The rcasio program APPENDS all the received output to the file casio.out in the current directory. This allows you to select single items for backup from different menu items and append them all to one file if you wish to do so. Usually, though, you would backup all items and then rename casio.out to some other name. The default speed is 9600 baud and the default device is serial.device unit 0. These can be changed by using the -b, -s and -u arguments. E.G. rcasio -b4800 -sibmser.device -u2 will tell the rcasio program to use the ibmser.device unit 2 at 4800 baud. A word of caution here though. I have a GGII card with two serial ports which use ibmser.device and I found that although rcasio works fine, the wcasio program will only work correctly once and then your system has to be rebooted for it to work again, This appears to be a problem in the ibmser.device driver code because I don't have any trouble with the standard amiga serial port. By default, the rcasio program shows which type of item is being received and shows a count of the items as they are received. If you specify a -w argument to the program, it opens a window instead and shows the data being received. This is mainly useful for debugging. The wcasio program is used to send data from a backup file to the CASIO and has the same arguments as the rcasio program except that it always opens a window to show the data. You must always specify the name of a backup file as an argument to the program with the optional arguments first. E.G. wcasio -b4800 -sibmser.device -u3 all.out Both programs can also be used to save or restore private data. This should be done by saving to a separate file. You must enter your secret password to the CASIO before transferring the data, otherwise the data will be transferred to or from the main area. 2. CASIO Record Format The basic structure of the data sent between the Casio and a computer is similar to an INTEL HEX dump. Each record begins with a colon followed by four pairs of hexadecimal characters which describe the data on the current line. These four pairs of hex characters are always present. The remainder of the line depends upon the type of record and may contain pairs of hex data bytes. The last pair of hex characters on the line is always a two's complement checksum of all the preceding pairs of hex chars. The data are NOT sent as lines so each record does NOT have a CR/LF after it. To make the structure of the data easier to see, the records will be shown below as if there were a CR/LF after each one. If, for the moment, we assume that only one item (e.g. one phone number entry) in the Casio is transmitted, then the general structure of what is sent is: :Data Mode description record :Entry 1 record 1 :Entry 1 record 2 : " " :Entry 1 record n :End of Entry Record :End of Transmission Record The Data Mode description record specifies whether the following data entry is a phone book, memo, reminder, schedule, etc. entry. This is followed by several records which contain the actual data for this entry. For example, if a phone mode item is sent, there will be lines of data for the name entry, the phone number, the address and the Free entries. The End of Entry Record signifies the end of this specific Entry in the Casio. The End of Transmission Record (EOT) is actually not sent by the Casio if you send only one Entry, but if you send ALL data then the EOT is sent. If the Casio is in receive mode, the computer can send an EOT whenever it wishes and this will cause the Casio to exit from the data communication mode and return to whichever menu item you were in when you first selected data communication. When multiple entries are sent from one mode, one data mode record is sent followed by several Entry data records each of which is followed by an End of Entry Record. When all modes are sent, each block of entries are preceded by a Data Mode description record. 3. Casio Protocol When data transfer is to take place, the transmitting end sends pairs of CR/LF until either the receiving end transmits an XON (0x11) or until a timeout is reached. The CR/LF pairs are sent roughly every half second by the Casio and it sends 15 of them before giving up. My "wcasio" program will send CR/LF until it sees the XON, a 60 second timeout timer expires, or until the user manually terminates the attempt by typing the ESCape character. Once the XON has been received, the data records are transmitted. Acknowledgement of correct receipt of records is only done after a Data Mode description record and an End of Entry Record (which means that for the End of Entry record the acknowledgement means that the checksum for the preceding data Entry records and this End of Entry Record are correct). If the checksum(s) is correct then a # is sent, otherwise a ? character is sent. The Casio will transmit a ! character if the user has manually terminated the data communication mode. This can happen whether it is sending or receiving. 4. File format. The data in "casio.out" is stored in such a way that it can be read with a normal text editor such as "ed". This allows you to be able to read most of the data, such as the telephone directory. However, you must not change the data at all unless you know exactly what you are doing because you can introduce errors in to the file which prevent it from being restored to the Casio. There are some changes you can make which will not cause a problem because the wcasio program recomputes the line lengths and checksums when it sends data to the Casio. Until I document this properly, or you really understand the format anyway, it's best to modify data in the Casio and then back it up. 5. Hardware Interface. Casio sells a hardware interface for the BOSS but it is very expensive for what it contains. I just made up a simple interface using the MAX-232 chip. There is another program on Aminet for the Casio BOSS which contains a circuit diagram for an interface - see hard/misc/mcc040.lha Pete Hardie Peter.Hardie@usask.ca