Software Development Guidelines
Shuping Zhang (Annie)
Oct, 2015
Revision History
Date Version Author Remarks
2015-09-01 1.0 Shuping Zhang First draft
2015-10-27 1.1 Shuping Zhang Add key injection
2 Kaifa Confidential
Objective
Background review for a new user
Brief understandings of Kaifa software architecture
Brief understandings of Kaifa SDK
Brief understandings of how to develop software on
Kaifa terminal
Brief introduction of Kaifa Tools
3 Kaifa Confidential
Content
Platform and Environment Introduction
Software Architecture Overview
SDK Introduction
Software Development on Debug Mode
System Tools and Fundamental
4 Kaifa Confidential
Different POS one Platform
KF900+
Broadcom platform
Linux 2.6.32.9
KF351C ARM 11 CPU
KF853G
5 Kaifa Confidential
OS Prepare
PC Linux OS
2GHz CPU Fedora
2GB Memory Red Hat Enterprise
256GB Hard Drive Ubuntu
Serial Port Accessories
Windows OS USB Drive
Capacity between 256MB
Windows XP and 8GB
Window 7 USB to RS232 converter
VMware Workstation In case your PC doesn`t
have serial port
10.0 or above
6 Kaifa Confidential
Software Prepare
Windows OS Linux OS
Serial Terminal Serial Terminal
SecureCRT Putty
Realterm SSH Terminal
SSH Terminal Putty
SecureCRT Code Editor
Putty eclipse
Code Editor
Source Insight
UltraEdit
Code::Blocks
7 Kaifa Confidential
Software Architecture
App App (App1, App2)
App Manager
Middleware
Shared Libraries (base, public libs, *.so)
Firmware Drivers(s2bl, boot, kernel, rootfs, data.bin)
8 Kaifa Confidential
System Startup Process
s2bl bootloader kernel
Read /etc/inittab
Run init Process
(config file)
Excute
/etc/rc.d/rc(script)
Hardware
AppManager
Test
Application
9 Kaifa Confidential Oct. 2011
Firmware
Firmware: s2bl.bin, boot.bin, kernel.bin, rootfs.bin, data.bin
2 versions: release and debug versions.
Differences:
Update with s2bl.bin(debug and release version)
Release Debug Remarks
Disassemble Enable Enable
Detection
Application Enable Disable Include app
Authenticatio download and
n execution
Console login Disable Enable Log in console
via serial port
COM1
Debug Enable Enable Output from
Message Serial Port
10 Kaifa Confidential
Middleware
There are 3 main components in the middleware:
AppManager, Share libraries, System Shortcut
AppManager
System Shortcut
Share libraries
11 Kaifa Confidential Oct. 2011
App Manager
A management application once terminal startup.
Main Features:
TMS Client
POS client for Terminal Management System
Remote update apps from Kaifa TMS automatically when boot
up or set manually
Need upload applications to Kaifa TMS host firstly
Application Manager
Delete, Add apps.
App download via serial cable / Ethernet / USB / SD card
Terminal parameter setting
Version check of firmware & App (8.Version Show)
Hardware Test access (5.Hardware Maintenance)
12 Kaifa Confidential Oct. 2011
System Shortcut
Hold on pressing different
keys after power on in Kaifa
logo screen
Link to different features
Power+0 to TFTP update TFTP
firmware
Power+0
Power+8 to USB/SD update USB/SD
Power+8
Power+9 to Hardware Test
Power+9 Hardware
Pwd: 110
P+Enter Test
Power+Enter to console NULL
(debug only) Console
Default (not holding any keys)
to AppManager
Pwd: 00000000
AppManager
13 Kaifa Confidential Oct. 2011
SDK
Software Development Kits
Provides the comprehensive development environment, guide
and utility to developers.
- Doc
- Demo
- Downloader
- Libsdk
14 Kaifa Confidential Oct. 2011
Doc & Demo
- Doc
How to start with KF900+.pdf
Application Development Guide.pdf
Guide to develop under debug mode in console
AppManager User Guide.pdf
Guide to operate AppManager
Kaifa-SDK-Specification.pdf
API Specification for software development
KF951B User Manual.pdf
- Demo
Standard Demo recommend to KF853 KF351
QT Demo (recommend to KF900+)
Sample code
Kaifa provides different demos to different usage, such as basic
configure, opitonal configure: FP, barcode, ISO8583, EMV.
15 Kaifa Confidential Oct. 2011
Tool & Libs
- Downloader
Compiler Install.rar
Complier installed under Linux
TFTP Downloader
Download firmware (s2bl, boot, kernel, roofts, data)
downloader.exe
Download app or files with rules.ini
Compress USB package for download via U-disk
<Downloader User Guide.pdf>
Refer to < AppManager User Guide.pdf> when download app
- Libsdk
Head files(*.h)
Libs(*.so)
16 Kaifa Confidential Oct. 2011
Production APP
Debug version: app no need to sign.
s2bl version: r49-d
Release version: app need sign with PCI
sign tool.
s2bl version: r49-r
17 Kaifa Confidential Oct. 2011
Procedure of sign app
Generate Public
Key and private
Key Run app
Send back public
key to Kaifa Authentication
app(AppManage )
Download signed
public key
(/data/AppManage Start app
r/certs/)
Download app
Sign app with tool
with .sig file
18 Kaifa Confidential Oct. 2011
Generate key
Double click
GenerateRSA2
048bit.bat
Click Run
19 Kaifa Confidential Oct. 2011
PCI sign tool
20 Kaifa Confidential Oct. 2011
Before Development
Two packages download from FTP
SDK, Virtual Machines
ftp://210.245.235.7 U/P:ptbuuser
Develop under Linux OS
Install Linux OS
Install compiler
Develop under Window OS
Install VMware Workstation
Startup Virtual Machines in VM
Study SDK
Start development
21 Kaifa Confidential Oct. 2011
Complier
arm-brcm-linux-gnueabi-gcc
Successful
22 Kaifa Confidential Oct. 2011
Debug Tool
Exit AppManager (Press FUNC+9) to log in console
Console: user: root, password: root
SecureCRT
23 Kaifa Confidential Oct. 2011
Code Tool
Source Insight
24 Kaifa Confidential Oct. 2011
Download
Update Firmware
via USB, SD, TFTP
Update App
via console (only debug mode)
Command: lrz
via USB
Enter to AppManager, refer to <Downloader User Guide.pdf>
Package name:KF951_USB_UPDATE.zip
Compress to get the package with downloader.exe
via SD
Enter to AppManager, Package name:KF951_USB_UPDATE.zip
via downloader tool
rules.ini
via TMS
Package name: KF951_USB_UPDATE.zip
25 Kaifa Confidential Oct. 2011
Downloader
File download
Support multiple files
RS232, Ethernet
APP Manager
Parameters configuration
Start download
Use with AppManager
Load rules.ini and press
Start to download.
26 Kaifa Confidential Oct. 2011
TMS
TMS(Terminal Management System): app remote
update
Procedure
startup->connect to TMS->enquiry whether have new version
->If have new version->Update app->Reboot->Run new app
->else, go to App selection screen->Run app
Disable automatically update from TMS
AppManager/TMS/TMS mode/ offline
Refer to: < AppManager User Guide.pdf >
27 Kaifa Confidential Oct. 2011
TMS Web Server(Test Account)
URL: http://210.21.216.87:8002/tms
User: admin PWD:111111
Manual: <Manual for Terminal Management System.pdf>
28 Kaifa Confidential Oct. 2011
Key Injection
Implement according to bank or 3rd
party acquiring institutions
Mom-POS
Chip IC card with key
Hand input for debug only
29 Kaifa Confidential Oct. 2011
Questions?
30 Kaifa Confidential
Thank You!
31 Kaifa Confidential