Sunteți pe pagina 1din 3

Help Guide

Using the FlashDisk and Auto-Recovery


One of the most important things to consider when deploying battery powered devices in the
enterprise is what happens to the data if the device loses all power. Recovery procedures
should happen automatically without the need for user interaction. Most importantly,
transactions and other captured data must remain safe. This guide explains how to use Casio’s
standard recovery procedures to ensure that your users experience the minimum of downtime.

1. Storing transaction data on the FlashDisk


A built-in, non-volatile FlashDisk has been a feature of Casio’s rugged handheld
devices for many years now. In the vast majority of projects, this storage area is used
to store the actual transaction data or other captured data that the user collects whilst
performing their tasks. Using this FlashDisk area from your application is extremely
simple since it is exposed to the file system as a folder named \FlashDisk\. For
example:

// This line specifies the location of the laser scanner configuration file in C++
TCHAR tszIni_DefFileName[50] = L"\\FlashDisk\\Casio\\OBRDRV.ini" ;

’ This line specifies where to store a digital image on IT-500 in VB.NET


CamObj.Api.CAMSingleCapture("\FlashDisk\testpic.jpg", CamObj.Def.CAM_JPEG,
CamObj.Def.CAM_1PER9VGA)

2. The ‘autorun’ feature

CE devices with FlashDisks usually have an autorun feature whereby you can force an
application with a certain name and in a certain location to execute automatically if a
soft reset is performed. On DT-X10/DT-X11, IT-500, IT-600 and IT-3000, the file
should be called setup.exe and be stored in a folder called \FlashDisk\CE\ARM\. If
your application is a standalone .exe file then you can simply re-name it setup.exe,
copy it to this folder and it will execute a few seconds after a soft reset. This feature
represents a very simple way to make sure that your application persists (of course, it
will also survive a hard reset or total loss of all power). However, most applications are
more complicated than this and may incorporate multiple .exe files, changes to the
registry and so on. In these cases you should consider using a more sophisticated
automatic recovery procedure.

Recommended method

If you wish to autorun your own applications after a reset then the best way of
achieving this is to simply copy any executables (or shortcuts to them) to
\Windows\Startup\; they will then automatically run after a soft reset. They will also run
a few seconds before they would have done had they been stored on the FlashDisk.
To ensure that these files survive a hard reset, just follow the steps in point 4 to set up
the Casio Auto-Recovery feature.

3. Using the built in Backup/Restore utility manually

The ‘Backup Tool’ utility is built in on all models. It copies all files, applications, registry
entries and the database store from the RAM to a single file called backup.dat which is
stored in \FlashDisk\Backup\. On DT-X10/DT-X11 (non-RF models), IT-600 and IT-
3000 it is possible to store a backup on a storage card whereas on IT-500 only the
FlashDisk is available. It is possible to copy a backup.dat file to a PC and then to
another Casio unit (of the same model) and use the restore operation to re-create the

1 Document Version 4.00


original machine installation on the new one. This is useful if you wish to maintain a
library of machine ‘images’ which contain different combinations of applications and
data. For example, you might have different sets of demonstration programs for each
exhibition that you attend.

NOTE: The Backup utility only copies the contents of the RAM. Files and applications
stored on the FlashDisk are not included. If you want to duplicate a machine for
deployment to another unit and include the FlashDisk then you should use the ‘Copy
Devices’ utility which is built in on all models. This enables you to beam a duplicate of
the entire machine ‘image’ to an empty machine via the infrared port.

4. Using the Casio Auto-Recovery procedure

Service Pack 1 or greater installs this as a new feature on the DT-X10 or IT-500. On
IT-3000, IT-600 and DT-X11, the feature is built into the ROM as standard. On DT-X10
and IT-500, an application called ‘Restore.exe’ is stored in the \FlashDisk\CASIO\
folder. On IT-3000, IT-600 and DT-X11, this ‘Restore.exe’ file is in the \Windows\
folder. This utility makes use of the fact that the Backup/Restore utility can be passed
command line parameters to tell it what to do automatically. For example, you can
invoke the utility with commands to tell it to automatically start a restore operation from
the FlashDisk. This is exactly what the Casio auto-recovery procedure does. The steps
to make this effective are:

a. Configure the unit exactly how you want it.


b. Run Restore.exe.
c. The backup process starts and takes a few minutes to make a complete backup of
the RAM to the FlashDisk (on IT-3000, IT-600 and DT-X11, you are asked to confirm
first).
d. An application called setup.exe (restore.exe on IT-3000, IT-600 and DT-X11) is
created in the \FlashDisk\CE\ARM\ folder. This will invoke the Backup/Restore utility
to perform a restore operation from the FlashDisk if it detects that a complete restart
has occurred (for example, if the user has hard reset the unit).
e. When the setup.exe (restore.exe on IT-3000, IT-600 and DT-X11) program runs it
calls up the time/date setting dialog (this is in case the unit has been left for a long time
and the system clock has reset). Once the user OKs this dialog the restore operation
commences automatically.
f. When the restore operation is complete, the unit will reset automatically after 5
seconds. At this point, if you have applications or shortcuts to them in
\Windows\Startup\ they will run automatically.

A log file, Restore.log, is maintained in the \FlashDisk\CASIO\ folder. This contains the
most recent 30 backup and restore events.

5. DT-X5

When using these features on DT-X5, note the following differences:

1. The folder for autorun is \FlashDisk\CE\SH\ and the file name is setup.exe
2. The ‘Auto Restore Tool’ can be found by getting to the ‘Top Menu’ (press CLR until
you get there), pressing 0 and entering ‘12346789’. You will see ‘Auto Restore Tool’ on
the menu.
3. If you use the Auto Restore Tool and you still want to autorun your own apps then
copy them (or shortcuts to them) into the \Windows\Startup\ folder. If you have a
setup.exe file in \FlashDisk\CE\SH\ at the time you run the ‘Auto Restore Tool’ then it
will be over-written.

2 Document Version 4.00


6. Patch files and Service Packs

Casio Service Packs and patch files are deployed as updates to files in the RAM
storage area. Therefore, all updates that are currently on a device are included in a
backup automatically when it is performed. If you deploy a new patch or Service Pack,
all you need to do is is run ‘Restore.exe’ (or whichever of the methods discussed in
this document that you have implemented) afterwards and the backup image will be up
to date also. This means that you do not have to worry about re-installing any updates
individually after a cold restart.

In certain cases, devices shipped from the factory will have a patch or service pack
pre-installed on the FlashDisk along with a setup.exe file which will install it
automatically. It is recommended that you allow the patch or service pack to install and
then delete the setup.exe file from the device. Install other patches, service packs and
your own applications/files as necessary and then run the auto-recovery routine. Your
device should then be fully up-to-date and will auto-recover to that state if it is hard
reset.

If you are planning to use ‘Copy Devices’ to copy a complete configuration onto
another device of the same model then it is best to completely delete any service
packs and patches from the target device before performing the procedure.

Warning: If you create full screen applications and auto-recovery procedures that run
automatically, there is a possibility that you could lock the device in a perpetual loop if
your applications contain bugs or do not contain some means of exiting. It is your
responsibility to make sure that such procedures are fully tested. Casio will in no way
accept responsibility for mis-use of utilities or sample code leading to such situations.

Summary

Auto-recovery using the FlashDisk provides a simple way to avoid unnecessary downtime for
your solutions. It can greatly simplify the task of making sure that devices have the necessary
Service Packs, applications and configuration settings at all times.

3 Document Version 4.00

S-ar putea să vă placă și