180 likes | 205 Views
Develop a framework enabling control of Tizen devices from remote Android smartphones, using Bluetooth connectivity and virtual input device drivers. This project involves design, implementation, and Tizen service development.
E N D
Contents • Motivation and Concept • Requirements • Design • Implementation • Virtual Input Device Driver • Tizen Service Development • Source code managementon Github
Motivation • No home key, back key and menu key in ODROID-U3&ODROID-VU. ?
Concept • A framework to control Tizen device through remote Android smartphones.
Requirements • Wireless connection between Android device andTizen device • Bluetooth and RFCOMM protocols • Bluetooth frameworks in Tizen and Android • Virtual key input event on Tizen device • Virtual input device driver is required • Background process • Register a Tizen service on Systemd • Easydebugging • Use dlog as a debugging tool • Easy deployment • Make as a RPM package
Design • Client (Android Application) • UI and connection with Tizen devicevia Bluetooth • Server Service (Tizen Framework Service) • Connection with Android device via Bluetooth • Virtual Input Device Driver (Kernel Module) • If a command come from service,it creates an input event.
Virtual Input Device Driver • Host driver • Connected toevdev(event device driver) • In this project, make a new host driver for making virtual key events. • evdev • Sends events toudev • udev • Sendsdevice events to xinput • xinput (in X server) • Sends events to X clients
Host Device Driver (1/2) Register a platform device Register a sysfs entry Allocate an input device data structure Register an entry to keymap Register aninput device to evdev
Host Device Driver (2/2) Make a KEY_XFER (code=147) input event. Synchronize the input event. Register an entry to sysfs, a trigger to make input events.
Tizen Service Development (1/8) • Make a new Git repository • Make configuration files • RPM package specification • Build configuration(CMakelists.txt) • Pkgconfig configuration • SMACK manifest • Systemd service • Coding • Build • Install the package
Tizen Service Development (2/8) • Make a new Git repository • $ mkdir remote-key-framework • $ cd remote-key-framework • $ git init Initialized empty Git repository in /home/user/repository/tizen/2.2/framework/system/remote-key-framework/.git/
Tizen Service Development (3/8) • Make configuration files • Red files are required at least. • AUTHORS: Author list • LICENSE: License information • CMakeLists.txt: cmake configuration file about this directory’s build • <project-name>.manifest: SMACK manifest file • packaging • <project-name>.manifest: SMACK manifest file • <project-name>.spec: RPM package specification file • <sub-directory 1> • CMakeLists.txt • include • Header files • src • Source code files • <sub-directory 2>, <sub-directory 3>, …
Tizen Service Development (4/8) • ex. Remote Key Framework Service Project(Link) • AUTHORS: Author list • LICENSE: License information • CMakeLists.txt: cmake configuration file about this directory’s build • remote-key-framework.manifest: SMACK manifest file • packaging • remote-key-framework.manifest: SMACK manifest file • remote-key-framework.spec: RPM package specification file • remote-key-framework.service: systemd service configuration file • server • CMakeLists.txt • include • common.h: Common header file • src • main.cpp: Main source code • common.cpp: Source code of dlog connector
Tizen Service Development (5/8) • Coding • Refer toexisting code in Tizen framework. • References of Remote Key Service Framework: • Bluetooth Native API (framework/api/bluetooth) • RFCOMM/Bluetooth support as Android does • APIheader files (framework/api/bluetooth/include) • Test case code (framework/api/bluetooth/test):practical example usingAPI • Bluetooth WRT API (framework/web/wrt-plugin-tizen/bluetooth) • Bluetooth Framework (framework/connectivity/bluetooth-frwk)
Tizen Service Development (6/8) • Build • Build the working directory • $ gbs build -A armv7l --include-all • Build the most recent version in Git repository • $ gbs build -A armv7l
Tizen Service Development (7/8) • Install the package • Package files are located in: ~/GBS-ROOT/local/repos/tizen2.2/armv7l/RPMS/ • Send package files to target board through SDB • Install the packages by RPM tool
Tizen Service Development (8/8) • Connect to ODROID-U3via USB • How to check connection: $ sdb devices • Caution: If you are using VMWare, check the connection of ‘removable device’ • Enter to SDB root mode $ sdb root on • Send package file to target board through SDB $ sdb push package_name-version.arch.rpm / • Install the package $ sdb shell rpm -ivh --nodeps --force package_name-version.arch.rpm • Reboot your target board $ adb shell sync; sdb shell reboot -f
Source Code on Github • Source code of External Hardware Framework is uploaded to Github. • Android Client Application • https://github.com/SKKU-ESLAB-Tizen/remote-key-framework-client • Tizen Remote Key Server Service • https://github.com/SKKU-ESLAB-Tizen/remote-key-framework-service • Tizen Virtual Key Device Driver • https://github.com/SKKU-ESLAB-Tizen/virtual_inputdevice