0% found this document useful (0 votes)
8 views19 pages

RS804 - EmbeddedSDK - Manual - 20200812

The document is a user's manual for the Embedded SDK for RS804, detailing installation and setup procedures on Ubuntu, as well as sample applications using IndySDK and WebAPI. It includes instructions for disabling RFID services, changing administrator passwords, and interfacing with hardware components like GPIO and RS232. The manual is structured into chapters covering environment preparation, SDK installation, sample applications, administration, and hardware interface.

Uploaded by

Carlos Barrera
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views19 pages

RS804 - EmbeddedSDK - Manual - 20200812

The document is a user's manual for the Embedded SDK for RS804, detailing installation and setup procedures on Ubuntu, as well as sample applications using IndySDK and WebAPI. It includes instructions for disabling RFID services, changing administrator passwords, and interfacing with hardware components like GPIO and RS232. The manual is structured into chapters covering environment preparation, SDK installation, sample applications, administration, and hardware interface.

Uploaded by

Carlos Barrera
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 19

Embedded SDK for RS804

User's Manual
Version 1. 1

-1-
Revision Pages Description By Date
V1.0 Release Matisse 2020/05/08
V1.1 Add hierarchy of sample code Matisse 2020/05/18
Add administration page
Add GPIO/LED/RS232 page

-2-
Table of Contents

Chapter 1: Prepare Environment ..................................................................4


1.1 Install Ubuntu .........................................................................................4
1.2 Install Tools............................................................................................4
Chapter 2: Install/Setup SDK ........................................................................5
2.1 Install SDK..............................................................................................5
2.2 Setup SDK..............................................................................................6
Chapter 3: Sample C Application..................................................................7
3.1 Using IndySDK - IndySample .................................................................7
3.2 Using WebAPI - WebAPISample..........................................................10
Chapter 4: Disable RFID Service ................................................................13
4.1 Disable LLRP/WebAPI service .............................................................13
Chapter 5: Administration ...........................................................................14
5.1 Change administrator password ...........................................................14
Chapter 6: Hardware Interface ....................................................................15
6.1 GPIO ....................................................................................................15
6.2 User LED..............................................................................................16
6.3 RS232 ..................................................................................................18

-3-
Chapter 1: Prepare Environment
 Host PC OS: Ubuntu 16.04 x64
 RS804 OS: #200508
http://w3.tw.ute.com/pub/rd/RS804/OS-200508/openwrt-omap-ti_am335x
-rs804-squashfs-sdcard.img.gz
 RS804 Embedded SDK:
http://w3.tw.ute.com/pub/rd/RS804/OS-200508/openwrt-sdk-omap_gcc-7.
3.0_musl_eabi.Linux-x86_64.tar.xz.zip

1.1 Install Ubuntu


 Host PC OS: Ubuntu 16.04 x64
https://releases.ubuntu.com/16.04/ubuntu-16.04.6-desktop-amd64.iso

1.2 Install Tools


 Install essential packages
$ sudo apt-get update
$ sudo apt-get install libncurses5-dev gawk

-4-
Chapter 2: Install/Setup SDK

2.1 Install SDK


 Download URL:
http://w3.tw.ute.com/pub/rd/RS804/SDK/openwrt-sdk-omap_gcc-7.3.0_m
usl_eabi.Linux-x86_64.tar.xz.zip
 Install SDK (openwrt-sdk)
$ wget openwrt-sdk-omap_gcc-7.3.0_musl_eabi.Linux-x86_64.tar.xz.zip
$ unzip openwrt-sdk-omap_gcc-7.3.0_musl_eabi.Linux-x86_64.tar.xz.zip
$ tar xvf openwrt-sdk-omap_gcc-7.3.0_musl_eabi.Linux-x86_64.tar.xz
$ mv openwrt-sdk-omap_gcc-7.3.0_musl_eabi.Linux-x86_64
openwrt-sdk

-5-
2.2 Setup SDK
 Setup SDK
$ cd openwrt-sdk
$ make defconfig

-6-
Chapter 3: Sample C Application

3.1 Using IndySDK - IndySample


 Description: Sample C program using IndySDK.
 Source
 Dir: openwrt-sdk/package/example/indysample
 Hierarchy of src/host/rfid_library/samples/inventory_live :
 inventory_live.c: Main program code
 SConscript: Makefile of inventory_live using scons
 Hierarchy of indysample
 Makefile: openwrt Makefile for indysample
 Includes files of indysdk
 src/host/rfid_library/samples/include/*
 src/host/include/*
 src/include/*
 Libraries of indysdk
 src/host/compat/linux/libcpl.so
 src/host/transport/library/linux/librfidtx.so
 src/host/rfid_library/librfid.so
 Other samples
 src/host/rfid_library/samples/*
 Output
 Dir: openwrt-sdk/bin/packages/arm_cortex-a8_vfpv3/base
 File: indysample_2.6.0-1_arm_cortex-a8_vfpv3.ipk
 Target App: /bin/inventory_live

-7-
1. Build:
$ cd openwrt-sdk
$ make package/indysample/compile
2. Install
1. Copy indysample package to RS804
$ cd openwrt-sdk/bin/packages/arm_cortex-a8_vfpv3/base
$ scp -o StrictHostKeyChecking=no
indysample_2.6.0-1_arm_cortex-a8_vfpv3.ipk [email protected]:/tmp
2. Install indysample on RS804
$ ssh -o StrictHostKeyChecking=no [email protected]
(RS804)$ opkg install /tmp/indysample_2.6.0-1_arm_cortex-a8_vfpv3.ipk
3. Run
$ ssh -o StrictHostKeyChecking=no [email protected]
(RS804)$ /bin/inventory_live

Fig. Build IndySample

-8-
Fig. Install IndySample

Fig. Run IndySample

-9-
3.2 Using WebAPI - WebAPISample
 Description: Sample C program using WebAPI (thru libcurl).
 Source
 Dir: openwrt-sdk/package/example/webapisample
 Hierarchy of webapisample
 Makefile: openwrt Makefile for webapisample
 src/webapigetversion.c: Main program code
 src/curl/*: include files of libcurl library.
 src/lib/*: libraries of libcurl library
 Output
 Dir: openwrt-sdk/bin/packages/arm_cortex-a8_vfpv3/base
 File: webapisample_1.0.0-1_arm_cortex-a8_vfpv3.ipk
 Target App: /bin/webapigetversion
 WebAPI URL: localhost
 WebAPI Port: 8443

1. Build:
$ cd openwrt-sdk
$ make package/webapisample/compile
2. Install
1. Copy webapisample package to RS804
$ cd openwrt-sdk/bin/packages/arm_cortex-a8_vfpv3/base
$ scp -o StrictHostKeyChecking=no
webapisample_1.0.0-1_arm_cortex-a8_vfpv3.ipk [email protected]:/tmp
2. Install webapisample package on RS804
$ ssh -o StrictHostKeyChecking=no [email protected]
(RS804)$ opkg install
/tmp/webapisample_1.0.0-1_arm_cortex-a8_vfpv3.ipk
3. Run
$ ssh -o StrictHostKeyChecking=no [email protected]
(RS804)$ /bin/webapigetversion

- 10 -
Fig. Build WebAPISample

Fig. Install WebAPISample

- 11 -
Fig. Run WebAPISample

- 12 -
Chapter 4: Disable RFID Service

4.1 Disable LLRP/WebAPI service


 Log in RS804 (thru USB)
$ ssh -o StrictHostKeyChecking=no [email protected]
 Disable RFID service steps
(RS804)$ uci set RFID.@RFID[0].Server=NONE
(RS804)$ uci commit
(RS804)$ /etc/init.d/rfid-service stop

- 13 -
Chapter 5: Administration

5.1 Change administrator password


 Administrator account information
 username: root
 password: (NONE)
 Change root password
(RS804)$ passwd root
 Delete root password
(RS804)$ passwd -d root

- 14 -
Chapter 6: Hardware Interface

6.1 GPIO
 GPI (1~4)
 GPI 1: /dev/gpio_in0/value
 GPI 2: /dev/gpio_in1/value
 GPI 3: /dev/gpio_in2/value
 GPI 4: /dev/gpio_in3/value
 GPO (1~4)
 GPO 1: /dev/gpio_out0/value
 GPO 2: /dev/gpio_out 1/value
 GPO 3: /dev/gpio_out 2/value
 GPO 4: /dev/gpio_out 3/value
 Example
 Get GPI 1 status
(RS804)$ cat /dev/gpio_in0/value
 Set GPO 1 output
(RS804)$ echo 1 > /dev/gpio_out0/value

- 15 -
6.2 User LED
 User LED
 Green LED: /dev/led_APP_green/brightness
 Red LED: /dev/led_APP_red/brightness
 Example
 Set Green LED On
(RS804)$ echo 1 > /dev/led_APP_green/brightness
 Set Red LED Off
(RS804)$ echo 0 > /dev/led_APP_red/brightness

- 16 -
- 17 -
6.3 RS232
 RS232
 Port: /dev/ttyS1
 Baud rate: 9600 (default)
 Example
 Set string “Hello” thru RS232 port
(RS804)$ echo “Hello” > /dev/ttyS1
 Monitor input from RS323 port
(RS804)$ cat /dev/ttyS1

- 18 -
- 19 -

You might also like