Core (real-time) Framework v0.2 - Installation Instructions

From wiki.gpii
Revision as of 21:20, 19 March 2014 by CStrobbe (talk | contribs) (large is big enough, isn't it?)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

WARNING: Unless you are specifically looking for the old v0.2 instructions, this page is outdated.

For the latest instructions that are always up to date, see Setting Up Your Development Environment.


This page describes installation instructions for v0.2 of the GPII's real-time framework, which was planned to be released before the workshop at the AAATE Conference, Vilamoura, Portugal, in September 2013.

This release supports three platforms:

  • Windows 7,
  • GNU/Linux with Gnome 3 (Fedora 20),
  • Android.

Fedora 20

Requirements:

  • Fedora 20 needs to be installed. Installation requires super-user privileges.

Installation Instructions

Ensure pre-requisites

sudo yum install kernel-devel kernel-headers dkms gcc gcc-c++ \
  git openssl-devel glib-devel glib2-devel gtk3-devel \
  pcsc-lite-devel pcsc-lite pcsc-perl \ 
  alsa-lib-devel  libXrandr-devel  libXrender-devel libX11-devel

Install node

sudo yum install nodejs nodejs-devel npm
sudo ln -s /usr/bin/node /usr/bin/nodejs 

Install RFID listener

(only required if you want to use a RFID listener on the system)

Go to the location where you want to install the GPII

Clone the GPII PCSC Tools Repository

git clone https://github.com/GPII/linux-rfid-user-listener
cd linux-rfid-user-listener

Compile and install

make all
sudo make install

Final step is to start a daemon running in the background and the scanner

Start first daemon and then scanner:

sudo /usr/sbin/pcscd
./pcsc_scan

Install and run GPII Personalization Framework

Make sure you're in the directory where you want to install the GPII.

From the command line:

# Clone the GPII Linux repository:
git clone git://github.com/GPII/linux.git
cd linux
git checkout tags/v0.2

# Build the Framework:
./build.sh

# Start up the Personalization Framework:
./start.sh

Running the framework in general

After having followed the above steps, you will have installed the GPII and it should be running on the machine. In general (for example after a reboot), you would have to do the following steps:

To starts GPII, go to the GPII install dir, then:

cd linux
./start.sh

To enable the RFID listener, go to the GPII install dir, then:

cd linux-rfid-user-listener
sudo /usr/sbin/pcscd
./pcsc_scan

Windows Installation Instructions

Dependencies

  • Node

Building and Starting

  • Open up cmd.exe (Start > Run > cmd.exe)
  • Create a GPII directory
    • mkdir c:\gpii (or wherever you prefer)
    • cd c:\gpii
  • Clone the GPII Windows repository and make sure you get the correct version:
    • git clone git://github.com/GPII/windows.git
    • cd windows
  • Compile the GPII Windows native code (run the following command from the Windows/DOS shell):
    • build.cmd
  • Start the GPII Framework and the USB Listener (while in the gpii\windows directory):
    • start.cmd

Setup and Configuration

  • On Windows 7, the GPII can't currently kill applications using taskkill unless you:
  • You MUST make this configuration change in order to run the current GPII real-time framework successfully
    • Go into Control Panel > User Accounts and Family Safety > User Accounts > Change User Account Control Settings
    • Set the notification level to "Never notify"
    • You need to reboot Windows to apply this settings

RFID Listener

The RFID is currently at an experimental state and only available as an exe. It can be found here: https://www.dropbox.com/s/n7ntpzvj4v1ksm8/GpiiUserListener110.exe

Android Installation Instructions

Requirements

In order to build the GPII for Android on your PC you need to have:

  • A Unix-like shell
  • The official and latest Android SDK
  • Apache Ant
  • Git
  • A C++ compiler
  • Node.js, specially for the 'npm' command

Regarding the Android device:

  • Android version >= 4.0
  • Busybox app from the Play Store (or any other app providing a powerful shell for Android)

About Rooting and Special Privileges

Rooting the device is an optional step. The functionality available to you will depend on whether or not you root the device and install the GPII package in a privileged directory. Here are the three possible scenarios you can choose from:

  1. If you want to only configure third-party apps such as FreeSpeech, you don't need to root the device
  2. If you want to set built-in settings such as font size, you need to root the device
  3. To stop and start core services such as Talkback and Brailleback, you need System Privileges. In that case, you can manually install the GPII .apk into the /system/apps directory

Our recommendation is to use the third one

Build instructions

Get the code from Github

Clone the GPII's Android repository, cd in to it and checkout the GPII 0.2 release branch

git clone git://github.com/GPII/android.git
cd android
git checkout origin/v0.2

Prepare the build-env and build the apk

  • Set the ANDROID_HOME environmental variable with your system's path where the Android SDK is located.
export ANDROID_HOME=/path/to/your/adt-bundle-linux/sdk/
  • cd in to platform directory
cd platform
  • It's important that you source rather than execute prebuild.sh because it needs to export some env variables
source ./prebuild.sh
cd app
ant debug
adb install ./bin/GpiiApp-debug.apk
cd ../..

Prepare the GPII JavaScript code

  • Pull GPII/universal
./android-gpii.sh get-universal


Install the GPII JavaScript code into your device

In future releases this will change and won't be necessary since we will bundle it in the apk for production builds)

Rooted devices (with busybox installed on it)
./android-gpii.sh install-js
Non-rooted devices

In a non-rooted device you have to decompress the .tar.gz file in the device by your own. Firstly, you should run:

./android-gpii.sh install-js

If your Android shell doesn't has the gunzip or the tar commands, this command will fail when trying to decompress the .tar.gz file on your device, but it will be placed into your device's /sdcard directory. Then, you can use any app from the Play Store, such as ArchiDroid or ZArchiver in order to decompress the file into /sdcard directory. After decompressing it, it should be a directory called 'gpii' under the /sdcard directory.

Start/Stop the GPII

Take into account that the first time running, you need to manually start the GPII activity. ( This will be fixed in the future )

In order to start/stop the GPII use the android-gpii.sh script

# Start GPII on port 8081 (by default)
./android-gpii.sh start
# Stop
./android-gpii.sh stop

Testing

Once you start the system (by using the start.cmd/start.sh scripts), you can test it without USB by navigating your browser to the following URLs:

http://localhost:8081/user/sammy/login (This will run the windows magnifier which can be exited with the WindowsKey + Esc)

http://localhost:8081/user/sammy/logout

To test the USB listener create a file '.gpii-user-token.txt' in the root of a USB memory stick containing the text "sammy" (no quotes). Insert the stick to login and remove it to logout.

To test the NFC listener you should write the NP set name as PLAIN-TEXT into an NFC tag (ie: sammy). Read the tag to log in into the system, then, read the tag again to log out from the system.