Intermec ck1 Reference Guide

Page of 390
Chapter 2 — Configuring the CK1 System 
94 
CK1 SDK Programmer’s Reference Manual 
Default Setting Configuration Files 
The factory default setting file is:  
/etc/default/default_ru_xxxxxx       (read only) 
The current setting file is:        
/etc/config/default_ru_xxxxxx        (read/write) 
You can call the APIs to change the content of these 
/etc/config/default_ru_xxxxx, but the device needs to reboot for the 
changes to take effect. 
Sample Test Code 
This section contains the following sample test code: 
• sdk/example/app_apo/remote_upgrade_test/do_upgrade.sh 
• sdk/examples/app_apo/remote_upgrade_test/checkVersion.c 
• sdk/examples/app_api/remote_upgrade_test/set_info.c 
• sdk/examples/app_api/remote_upgrade_test/get_image.c 
sdk/example/app_apo/remote_upgrade_test/do_upgrade.sh 
#!/bin/sh 
# $1: partition/image name (kernel/rootfs/usrlocal) 
# $2: vendor name 
# $3: product name 
# $4: version serial number (YYMMDD) 
# $5: the IP address of the ftp server 
# $6: the user name to login into the ftp server 
# $7: the password of the user 
# $8: the path to the destination image for device to download 
# $9: the filename of the destination image 
 
 
# check if newer version first 
/usr/bin/checkVersion $1 $2 $3 $4 
if [ "$?" -eq "0" ] 
then 
 
netflash -bfFk -U $6 -P $7 -T $8 -V $1 -r /dev/flash/c$1 $5 $9 
fi 
sdk/examples/app_apo/remote_upgrade_test/checkVersion.c 
/***************************************************************** 
 * ------- 
 * Purpose 
 * ------- 
 * (1) To demonstrate how to check the vendor/product/version 
 *     of a specified partition, if passed do remote upgrade 
 * (2) This program will be used while host trying to perform remote upgrade. 
 * 
 * ----------------------------------- 
 * Requirement to run this sample code 
 * ----------------------------------- 
 * Use PPP to connect to device. 
 *