You are on page 1of 10

TelePower SDK

--Development Guide for Linux


Contents
History
Release Date Author Modification
2013-08-17 Mai Yongqi First Release
1 Summary

1.1 Introduction

This article is for TPS300 financial POS terminal SDK based development guide.

1.2 History

Date Version Remark


2013-08-17 1.0 First release

2 Development Environment

System 64M above ram, 200M available hard drive space


requirement Windows2000 and above OS
s
Compiler arm-brcm-linux-gnueabi-gcc

API Header TP SDK Headers

API library libtpsdk.a

vapinpad.a

lib3326api_v2_nolcd.a

Note:

( 1 ) Basically we edit source code on Windows system, compile in Linux system. For this
reason, we recommended developer to use Virtual machine with a Windows host / Linux guest.
Below we will take Windows XP / Ubuntu 10.04 as example.

(2)POS terminal connect with Windows PC by Ethernet, please make sure they are in the same
LAN. Linux VM connects with Windows by using NAT (Default connection setting in VM).
Generally speaking we only need to upgrade several file in the system in most cases, in those case
we don’t need to use Ethernet, just serial port is enough.
3 Compiler Setup

We use “arm-brcm-linux-gnueabi-gcc” compile tool-chains, it will been provide with the SDK.
Please follow below instructions to setup the compiler.

(1) Step 1. Extra the compiler package to a folder

For example, first we copy the “brcm-armtools-32_bit_mod.tar.bz” to


“/home/telpo/BCM5892”, then we run below commands:

cd /home/telpo/BCM5892

tar –xjvf brcm-armtools-32_bit_mod.tar.bz2

(2) Step 2. Configure environment variable

Run “sudo vi /etc/environment” to open environment for editing. Append below path

/home/telpo/BCM5892/tools/le_arm11_external_20090506_32bit/bin

Run “cat /etc/environment ” to check the result, if you Ubuntu is a fresh one, you should get
the result as same as the followed one:

PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/telpo/BC
M5892/tools/le_arm11_external_20090506_32bit/bin"

(3) Step 3. Reboot Linux system


(4) Step 4. Check if the installation was success

Open Terminal window, type “arm-brcm-linux-gnueabi-gcc”, then press Enter to run the
compiler.

If you get “command not found”, this means the installation is failed. Please check the file
was extracted successfully. Then check the environment variable is correct or not.

If you get “no input files” this means the installation is success. This error shows because we
didn’t give it an source file to compile.

4 Build Project

Here we provide a demo to show how to build a project.


(1) Change directory to “Demo_Project”.
(2) Write code with what you need(Here we have provide the code of demo).
(3) Write make file(Here we have provide the makefile in directory “Demo_Project/build”).
(4) Execute the makefile.
(5) Finish. In this demo, app is under the directory “Demo_Project/build/image/app”

5 Burning App

5.1 How to Sign to the Application

Unless be signed, application could not run in this machine. Please follow the steps below for
application signature.

First, modify AppMsg.txt according to what you need. Please note that the application name in
file AppMsg.txt could be changed. It is suggested that the length of the application name should be
the same as the example.
For example, the application name is 3326demo, so the content of AppMsg.txt is shown as below:
3326demo 3326demo 1.0 ViewAT 1 VPOS306-SAPP

Second, sign to the application. After compiling the application, use the command below to sign.
eg: cat AppMsg.txt >> 3326demo

After these steps, the signature is done.

5.2 How To Load Application into TPS300

(1) Connect the PC and TPS300


Using the loading cable to connect the POS to PC
(2) Enter Download Interface
Power on the device, it will enter download interface.
(3) Run load tools
Running the “LoadTools.exe”;
Viewing application information of terminal. Connecting the loading Line between PC and
TPS300. Click the “Reflush” Button to view all application files in TPS300.
(4) Load application
 Select the APP file : “*****.bin”;
 Click button “Start” and Load the application into TPS300.

5.3 How To Load Font/Parameters File into

TPS300

The step is the same with downloading application, just select the different file.
5.4 How To Write SN Into TPS300

As the picture upside, select check box “SN” and input the SN, and the device in the download
interface, then click start to download SN into device.
5.5 How To Rebuild File System Of TPS300

As the picture upside, select check box “Create file system”, and the device in the download
interface, then click start to rebuild file system of device.

6 Note

Before use, please check if all the material is prepared.

7 Product Introduction

It is a mobile transaction terminal with build-in thermal printer and battery. It supports processes
of money transfer, airtime top-up, bill payment, ticket booking, online food ordering ,lotteries and
E-shopping. Due to its all-in-one design, TPS300 can help merchant expand the point of sale,
enhance service and increase revenue quickly.

You might also like