SlideShare a Scribd company logo
1 of 34
Download to read offline
Amora: A mobile remote assistant




                              Adenilson Cavalcanti
                              Community Group - Instituto Nokia
                              adenilson.silva@indt.org.br
                              cavalcantii@gmail.com


 1    © INdT 2007 | Company
Confidential
Objectives




     •Explain reasons for design/implementation
      of Amora

     •Present tools used



     •Share knowledge and lessons




 2    © INdT 2007 | Company
Confidential
Why create Amora

     Free/OSS 'remote controllers' @ 2007/06

     •Abandoned, no longer maintained

     •Unstable/bad performance

     •Confusing user interface

     •Windows only (or poor support for Linux)




 3    © INdT 2007 | Company
Confidential
Amora Team



      •Adenilson Cavalcanti: server, client, design, even the
       kitchensink

      •Wilson Prata: design, usability

      •Ademar de Souza Reis Jr.: logging functions,
       buildsystem, RPM packaging

      •Thiago Marcos P. Santos: uLoop code, utests

      •Tomaz Noleto: Debian package, tablet client


 4    © INdT 2007 | Company
Confidential
Project Size
     • 2400LOC (6 persons/month):   • 3000 visits/month, 93 different
     68% ANSI C, 31% Python           nations




 5    © INdT 2007 | Company
Confidential
Project

     •GPL 2.0: free/opensource software
     •officially packaged: Mandriva, Fedora Core
     •code base is small
     •contributors are welcome

     Webpage
     http://amora.googlecode.com/


     Repository
     http://amora.googlecode.com/svn/trunk/




 6    © INdT 2007 | Company
Confidential
Concept
     A long way to go...




   *The project was codenamed P4X (Presenter 4 X)

 7    © INdT 2007 | Company
Confidential
Concept: design
     A long way to go...




 8    © INdT 2007 | Company
Confidential
Implementation

   Coding can get messy!




 9    © INdT 2007 | Company
Confidential
Implementation

   “Programmers shalt not do user interface...”




 10    © INdT 2007 | Company
Confidential
Implementation

     Clear vision of where to go is important!


         06/16




                               2.5 months
                               spare time




                                            08/31 rev. 186
                                            1616 LOCs
 11    © INdT 2007 | Company
Confidential
Today usability




 12    © INdT 2007 | Company
Confidential
Architecture




 13    © INdT 2007 | Company
Confidential
Server



      Server components
      •ANSI C/POSIX: protocol + communication

      •Xlib/XTest: window events

      •imlib: screenshot, resize, rotation

      •BlueZ: communication

      •D-BUS: dongle disconnection

 14    © INdT 2007 | Company
Confidential
Server




 15    © INdT 2007 | Company
Confidential
Server: Why?



     •ANSI C: portable, simple, stable, known-how
     •POSIX: sockets (read/write)
     •Xlib: less dependencies than GDK/QT
     •imlib: fast/simple/reliable
     •BlueZ: official bluetooth stack on Linux*
     •main loop: micro loop (88LOCs)




 16    © INdT 2007 | Company
Confidential
Client


       Classes
       •Amora: main loop
       •Application: main application logic
       •Wallpaper: main app background image
       •Help: display help text
       •Bluetooth: communication
       •Keyboard: required to draw in Canvas




 17    © INdT 2007 | Company
Confidential
Protocol

     •Default log when connecting:
     [Apr   15 18:34:31]: Accepted connection. Client is 00:18:42:E3:EC:
       44
     [Apr   15   18:34:31]:    Read   buffer   =   SCREEN_MODE_ON
     [Apr   15   18:34:31]:    Read   buffer   =   SCREEN_RESOLUTION
     [Apr   15   18:34:31]:    Read   buffer   =   240
     [Apr   15   18:34:31]:    Read   buffer   =   320


     •Protocol is:
     - set screenshot on or off
     - screen width
     - screen height



 18    © INdT 2007 | Company
Confidential
Protocol

     •Log for screenshot event:
     [Apr 15 18:39:17]: Read buffer = SCREEN_TAKE


     •Protocol is:
     - set orientation (rotate or not)
     - client ask for screenshot (SCREEN_TAKE)
     - server answers with image size (56732)
     - server starts to write data in socket
     - client must read this data




 19    © INdT 2007 | Company
Confidential
Screenshot client code




 20    © INdT 2007 | Company
Confidential
Other protocol commands




 21    © INdT 2007 | Company
Confidential
Why use Python for client side?
 Symbian x Java x Python
  _LIT(Scnst, “Welcome to darkness...”);
  TBufC8<20> buffer(Scnst);
  TBufC8<20> copy;
  TPtr8 ptr = copy.Des();
  ptr.Copy(buffer);
  //Deprecated!
  printf(“symbian string = %sn”, ptr.PtrZ());

  String tmp = new String("Hello, Java is cool!");
  StringBuffer newer = new StringBuffer(tmp);
  System.out.println(newer);

   a = 'Python rulez!'; b = a; print b



 22    © INdT 2007 | Company
Confidential
How many lines a simple 'hello world' have?

                       LOC por linguagem
                60
                55
                50
                45
                40
Lines of Code




                35
                                               LOC
                30
                25
                20
                                                     import appuifw
                15                                   appuifw.note(u'Hello!')
                10
                5
                0
                     Symbian   Java   Python



 23    © INdT 2007 | Company
Confidential
Tools


     •logging: helped to track on missing call to XFlush();
     •electric fence: helped to find one memory leak in
      logging functions;
     •gtk-devel-list: help for get real root window for
      GTK apps;
     •valgrind: server can run fine inside it;
     •autotools: buildsystem help to support Linux
      flavors;
     •doxygen: source code documentation;
     •subversion: today I would use git...
     •utest: help to optimize uloop code;



 24    © INdT 2007 | Company
Confidential
electric fence

     •overloaded 'malloc'
     •helpful to catch over/underflows
     •usage: just link with it
     $gcc -lefence hello.c
     $./a.out
      Electric Fence 2.1 Copyright (C)
      1987-1998 Bruce Perens.




 25    © INdT 2007 | Company
Confidential
lcov

     •info: which parts are executed and how
      many times. Example:

     hello: hello.c
          gcc -o hello -Wall -fprofile-arcs -ftest-
      coverage hello.c

     coverage: hello
          ./hello
          lcov --directory . --capture --output-file
      hello.info
          genhtml hello.info
 26    © INdT 2007 | Company
Confidential
lcov output




 27    © INdT 2007 | Company
Confidential
BT terminal

     •Script to create a terminal
     sdptool add --channel=1 SP
     sdptool browser local
     while true; do rfcomm listen /dev/rfcomm0 1;
      done




 28    © INdT 2007 | Company
Confidential
BT terminal




 29    © INdT 2007 | Company
Confidential
BT Terminal




 30    © INdT 2007 | Company
Confidential
BT Terminal




 31    © INdT 2007 | Company
Confidential
Help is needed

     •packaging: Gentoo, Slackware, Ubuntu
     •tablet amora: client for internet tablet
     •ports: Mac OSX, FreeBSD, Solaris (does anyone
      really uses it for desktop?)
     •j2me client: cover other cellphones models
     •features: see project issues list




 32    © INdT 2007 | Company
Confidential
What is next

     • BT webcam
     • D-BUS integration
     • Amora applet
     • Tamora (Tablet amora)




 33    © INdT 2007 | Company
Confidential
Acknowledgments

     • INdT (for paying my travel expenses and allowing me to write this
       software)
     • Wilson Prata: the UI, usability and graphic design guy
     • My fellow programmer friends: Ademar Reis, Thiago M. P. Santos and
       Tomaz Noleto




 34    © INdT 2007 | Company
Confidential

More Related Content

What's hot

Rapid prototyping with open source
Rapid prototyping with open sourceRapid prototyping with open source
Rapid prototyping with open sourceAlison Chaiken
 
LAS16-500: The Rise and Fall of Assembler and the VGIC from Hell
LAS16-500: The Rise and Fall of Assembler and the VGIC from HellLAS16-500: The Rise and Fall of Assembler and the VGIC from Hell
LAS16-500: The Rise and Fall of Assembler and the VGIC from HellLinaro
 
Kubinception: using Kubernetes to run Kubernetes
Kubinception: using Kubernetes to run Kubernetes Kubinception: using Kubernetes to run Kubernetes
Kubinception: using Kubernetes to run Kubernetes OVHcloud
 
NTT Docomo's Challenge looking ahead the world pf 5G × OpenStack - OpenStack最...
NTT Docomo's Challenge looking ahead the world pf 5G × OpenStack - OpenStack最...NTT Docomo's Challenge looking ahead the world pf 5G × OpenStack - OpenStack最...
NTT Docomo's Challenge looking ahead the world pf 5G × OpenStack - OpenStack最...VirtualTech Japan Inc.
 
DCC Labs Company Presentation
DCC Labs Company PresentationDCC Labs Company Presentation
DCC Labs Company PresentationDCC Labs
 
HKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
HKG18- 115 - Partitioning ARM Systems with the Jailhouse HypervisorHKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
HKG18- 115 - Partitioning ARM Systems with the Jailhouse HypervisorLinaro
 
Presentation on HP ProLiant value add tools on Linux
Presentation on HP ProLiant value add tools on LinuxPresentation on HP ProLiant value add tools on Linux
Presentation on HP ProLiant value add tools on LinuxBruno Cornec
 
Enabling accelerated networking - seminar by Enea at the Embedded Conference ...
Enabling accelerated networking - seminar by Enea at the Embedded Conference ...Enabling accelerated networking - seminar by Enea at the Embedded Conference ...
Enabling accelerated networking - seminar by Enea at the Embedded Conference ...EneaSoftware
 
HKG18-318 - OpenAMP Workshop
HKG18-318 - OpenAMP WorkshopHKG18-318 - OpenAMP Workshop
HKG18-318 - OpenAMP WorkshopLinaro
 
ELC-E 2016 Neil Armstrong - No, it's never too late to upstream your legacy l...
ELC-E 2016 Neil Armstrong - No, it's never too late to upstream your legacy l...ELC-E 2016 Neil Armstrong - No, it's never too late to upstream your legacy l...
ELC-E 2016 Neil Armstrong - No, it's never too late to upstream your legacy l...Neil Armstrong
 
Redfish and python-redfish for Software Defined Infrastructure
Redfish and python-redfish for Software Defined InfrastructureRedfish and python-redfish for Software Defined Infrastructure
Redfish and python-redfish for Software Defined InfrastructureBruno Cornec
 
Enea Keystone training 2014
Enea Keystone training 2014Enea Keystone training 2014
Enea Keystone training 2014EneaSoftware
 
Shipping Mobile Applications Using Qt for Symbian
Shipping Mobile Applications Using Qt for SymbianShipping Mobile Applications Using Qt for Symbian
Shipping Mobile Applications Using Qt for Symbianaccount inactive
 
ORTC Library - Introduction
ORTC Library - IntroductionORTC Library - Introduction
ORTC Library - IntroductionErik Lagerway
 
Cuda meetup presentation 5
Cuda meetup presentation 5Cuda meetup presentation 5
Cuda meetup presentation 5Rihards Gailums
 
ELC-NA 2020: War story - Using mainline linux for an Android TV bsp
ELC-NA 2020: War story - Using mainline linux for an Android TV bspELC-NA 2020: War story - Using mainline linux for an Android TV bsp
ELC-NA 2020: War story - Using mainline linux for an Android TV bspNeil Armstrong
 
Embedded Recipes 2019 - Making embedded graphics less special
Embedded Recipes 2019 - Making embedded graphics less specialEmbedded Recipes 2019 - Making embedded graphics less special
Embedded Recipes 2019 - Making embedded graphics less specialAnne Nicolas
 
Elc Europe 2020 : u-boot- porting and maintaining a bootloader for a multimed...
Elc Europe 2020 : u-boot- porting and maintaining a bootloader for a multimed...Elc Europe 2020 : u-boot- porting and maintaining a bootloader for a multimed...
Elc Europe 2020 : u-boot- porting and maintaining a bootloader for a multimed...Neil Armstrong
 

What's hot (20)

Rapid prototyping with open source
Rapid prototyping with open sourceRapid prototyping with open source
Rapid prototyping with open source
 
LAS16-500: The Rise and Fall of Assembler and the VGIC from Hell
LAS16-500: The Rise and Fall of Assembler and the VGIC from HellLAS16-500: The Rise and Fall of Assembler and the VGIC from Hell
LAS16-500: The Rise and Fall of Assembler and the VGIC from Hell
 
Kubinception: using Kubernetes to run Kubernetes
Kubinception: using Kubernetes to run Kubernetes Kubinception: using Kubernetes to run Kubernetes
Kubinception: using Kubernetes to run Kubernetes
 
NTT Docomo's Challenge looking ahead the world pf 5G × OpenStack - OpenStack最...
NTT Docomo's Challenge looking ahead the world pf 5G × OpenStack - OpenStack最...NTT Docomo's Challenge looking ahead the world pf 5G × OpenStack - OpenStack最...
NTT Docomo's Challenge looking ahead the world pf 5G × OpenStack - OpenStack最...
 
DCC Labs Company Presentation
DCC Labs Company PresentationDCC Labs Company Presentation
DCC Labs Company Presentation
 
HKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
HKG18- 115 - Partitioning ARM Systems with the Jailhouse HypervisorHKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
HKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
 
Presentation on HP ProLiant value add tools on Linux
Presentation on HP ProLiant value add tools on LinuxPresentation on HP ProLiant value add tools on Linux
Presentation on HP ProLiant value add tools on Linux
 
Enabling accelerated networking - seminar by Enea at the Embedded Conference ...
Enabling accelerated networking - seminar by Enea at the Embedded Conference ...Enabling accelerated networking - seminar by Enea at the Embedded Conference ...
Enabling accelerated networking - seminar by Enea at the Embedded Conference ...
 
HKG18-318 - OpenAMP Workshop
HKG18-318 - OpenAMP WorkshopHKG18-318 - OpenAMP Workshop
HKG18-318 - OpenAMP Workshop
 
SMP/What?
SMP/What?SMP/What?
SMP/What?
 
ELC-E 2016 Neil Armstrong - No, it's never too late to upstream your legacy l...
ELC-E 2016 Neil Armstrong - No, it's never too late to upstream your legacy l...ELC-E 2016 Neil Armstrong - No, it's never too late to upstream your legacy l...
ELC-E 2016 Neil Armstrong - No, it's never too late to upstream your legacy l...
 
Redfish and python-redfish for Software Defined Infrastructure
Redfish and python-redfish for Software Defined InfrastructureRedfish and python-redfish for Software Defined Infrastructure
Redfish and python-redfish for Software Defined Infrastructure
 
Enea Keystone training 2014
Enea Keystone training 2014Enea Keystone training 2014
Enea Keystone training 2014
 
Shipping Mobile Applications Using Qt for Symbian
Shipping Mobile Applications Using Qt for SymbianShipping Mobile Applications Using Qt for Symbian
Shipping Mobile Applications Using Qt for Symbian
 
ORTC Library - Introduction
ORTC Library - IntroductionORTC Library - Introduction
ORTC Library - Introduction
 
Cuda meetup presentation 5
Cuda meetup presentation 5Cuda meetup presentation 5
Cuda meetup presentation 5
 
ELC-NA 2020: War story - Using mainline linux for an Android TV bsp
ELC-NA 2020: War story - Using mainline linux for an Android TV bspELC-NA 2020: War story - Using mainline linux for an Android TV bsp
ELC-NA 2020: War story - Using mainline linux for an Android TV bsp
 
Toward "OCF Automotive" profile
Toward "OCF Automotive" profileToward "OCF Automotive" profile
Toward "OCF Automotive" profile
 
Embedded Recipes 2019 - Making embedded graphics less special
Embedded Recipes 2019 - Making embedded graphics less specialEmbedded Recipes 2019 - Making embedded graphics less special
Embedded Recipes 2019 - Making embedded graphics less special
 
Elc Europe 2020 : u-boot- porting and maintaining a bootloader for a multimed...
Elc Europe 2020 : u-boot- porting and maintaining a bootloader for a multimed...Elc Europe 2020 : u-boot- porting and maintaining a bootloader for a multimed...
Elc Europe 2020 : u-boot- porting and maintaining a bootloader for a multimed...
 

Viewers also liked (6)

QtEmbedded
QtEmbeddedQtEmbedded
QtEmbedded
 
Adenilson cavalcanti devdays12_part2
Adenilson cavalcanti devdays12_part2Adenilson cavalcanti devdays12_part2
Adenilson cavalcanti devdays12_part2
 
KLF_chromium02
KLF_chromium02KLF_chromium02
KLF_chromium02
 
Fisl10 adenilson08
Fisl10 adenilson08Fisl10 adenilson08
Fisl10 adenilson08
 
How Servo Renders the Web
How Servo Renders the WebHow Servo Renders the Web
How Servo Renders the Web
 
Adenilson cavalcanti devdays12_part1
Adenilson cavalcanti devdays12_part1Adenilson cavalcanti devdays12_part1
Adenilson cavalcanti devdays12_part1
 

Similar to Amora

Fast, Scalable Quantized Neural Network Inference on FPGAs with FINN and Logi...
Fast, Scalable Quantized Neural Network Inference on FPGAs with FINN and Logi...Fast, Scalable Quantized Neural Network Inference on FPGAs with FINN and Logi...
Fast, Scalable Quantized Neural Network Inference on FPGAs with FINN and Logi...KTN
 
Srikanth_PILLI_CV_latest
Srikanth_PILLI_CV_latestSrikanth_PILLI_CV_latest
Srikanth_PILLI_CV_latestSrikanth Pilli
 
Software Stacks to enable SDN and NFV
Software Stacks to enable SDN and NFVSoftware Stacks to enable SDN and NFV
Software Stacks to enable SDN and NFVYoshihiro Nakajima
 
How to Use Telegraf and Its Plugin Ecosystem
How to Use Telegraf and Its Plugin EcosystemHow to Use Telegraf and Its Plugin Ecosystem
How to Use Telegraf and Its Plugin EcosystemInfluxData
 
Media processing with serverless architecture
Media processing with serverless architectureMedia processing with serverless architecture
Media processing with serverless architectureKensaku Komatsu
 
UC18NA-D3D202-Dianomic-IZoratti-Introduction-To-FogLAMP.pdf
UC18NA-D3D202-Dianomic-IZoratti-Introduction-To-FogLAMP.pdfUC18NA-D3D202-Dianomic-IZoratti-Introduction-To-FogLAMP.pdf
UC18NA-D3D202-Dianomic-IZoratti-Introduction-To-FogLAMP.pdfWlamir Molinari
 
2014/09/02 Cisco UCS HPC @ ANL
2014/09/02 Cisco UCS HPC @ ANL2014/09/02 Cisco UCS HPC @ ANL
2014/09/02 Cisco UCS HPC @ ANLdgoodell
 
Userspace drivers-2016
Userspace drivers-2016Userspace drivers-2016
Userspace drivers-2016Chris Simmonds
 
Usernetes: Kubernetes as a non-root user
Usernetes: Kubernetes as a non-root userUsernetes: Kubernetes as a non-root user
Usernetes: Kubernetes as a non-root userAkihiro Suda
 
Ryu SDN Framework
Ryu SDN FrameworkRyu SDN Framework
Ryu SDN FrameworkAPNIC
 
Introduction to Node-RED
Introduction to Node-REDIntroduction to Node-RED
Introduction to Node-REDnodered_ug_jp
 
Webex Devices xAPI - DEVNET_2071 - Cisco Live - San Diego 2019
Webex Devices xAPI - DEVNET_2071 - Cisco Live - San Diego 2019Webex Devices xAPI - DEVNET_2071 - Cisco Live - San Diego 2019
Webex Devices xAPI - DEVNET_2071 - Cisco Live - San Diego 2019Cisco DevNet
 
Quick and Easy Device Drivers for Embedded Linux Using UIO
Quick and Easy Device Drivers for Embedded Linux Using UIOQuick and Easy Device Drivers for Embedded Linux Using UIO
Quick and Easy Device Drivers for Embedded Linux Using UIOChris Simmonds
 
Integrated, Automated Video Room Systems - Webex Devices - Cisco Live Orlando...
Integrated, Automated Video Room Systems - Webex Devices - Cisco Live Orlando...Integrated, Automated Video Room Systems - Webex Devices - Cisco Live Orlando...
Integrated, Automated Video Room Systems - Webex Devices - Cisco Live Orlando...Cisco DevNet
 
The Story of SNCF Connect - biggest Flutter app in Europe (@FlutterHeroes 2023)
The Story of SNCF Connect - biggest Flutter app in Europe (@FlutterHeroes 2023)The Story of SNCF Connect - biggest Flutter app in Europe (@FlutterHeroes 2023)
The Story of SNCF Connect - biggest Flutter app in Europe (@FlutterHeroes 2023)François
 
How OpenShift SDN helps to automate
How OpenShift SDN helps to automateHow OpenShift SDN helps to automate
How OpenShift SDN helps to automateIlkka Tengvall
 
Dds presentation omg
Dds presentation omgDds presentation omg
Dds presentation omgmilsoftSDC
 
Mp25: Mobile dev with QT and Python for the Notorious N9
Mp25: Mobile dev with QT and Python for the Notorious N9Mp25: Mobile dev with QT and Python for the Notorious N9
Mp25: Mobile dev with QT and Python for the Notorious N9Montreal Python
 

Similar to Amora (20)

Node-RED Installer, Standalone Installer using Electron
Node-RED Installer, Standalone Installer using ElectronNode-RED Installer, Standalone Installer using Electron
Node-RED Installer, Standalone Installer using Electron
 
Fast, Scalable Quantized Neural Network Inference on FPGAs with FINN and Logi...
Fast, Scalable Quantized Neural Network Inference on FPGAs with FINN and Logi...Fast, Scalable Quantized Neural Network Inference on FPGAs with FINN and Logi...
Fast, Scalable Quantized Neural Network Inference on FPGAs with FINN and Logi...
 
Srikanth_PILLI_CV_latest
Srikanth_PILLI_CV_latestSrikanth_PILLI_CV_latest
Srikanth_PILLI_CV_latest
 
Software Stacks to enable SDN and NFV
Software Stacks to enable SDN and NFVSoftware Stacks to enable SDN and NFV
Software Stacks to enable SDN and NFV
 
How to Use Telegraf and Its Plugin Ecosystem
How to Use Telegraf and Its Plugin EcosystemHow to Use Telegraf and Its Plugin Ecosystem
How to Use Telegraf and Its Plugin Ecosystem
 
Media processing with serverless architecture
Media processing with serverless architectureMedia processing with serverless architecture
Media processing with serverless architecture
 
UC18NA-D3D202-Dianomic-IZoratti-Introduction-To-FogLAMP.pdf
UC18NA-D3D202-Dianomic-IZoratti-Introduction-To-FogLAMP.pdfUC18NA-D3D202-Dianomic-IZoratti-Introduction-To-FogLAMP.pdf
UC18NA-D3D202-Dianomic-IZoratti-Introduction-To-FogLAMP.pdf
 
2014/09/02 Cisco UCS HPC @ ANL
2014/09/02 Cisco UCS HPC @ ANL2014/09/02 Cisco UCS HPC @ ANL
2014/09/02 Cisco UCS HPC @ ANL
 
How to Enterprise Node
How to Enterprise NodeHow to Enterprise Node
How to Enterprise Node
 
Userspace drivers-2016
Userspace drivers-2016Userspace drivers-2016
Userspace drivers-2016
 
Usernetes: Kubernetes as a non-root user
Usernetes: Kubernetes as a non-root userUsernetes: Kubernetes as a non-root user
Usernetes: Kubernetes as a non-root user
 
Ryu SDN Framework
Ryu SDN FrameworkRyu SDN Framework
Ryu SDN Framework
 
Introduction to Node-RED
Introduction to Node-REDIntroduction to Node-RED
Introduction to Node-RED
 
Webex Devices xAPI - DEVNET_2071 - Cisco Live - San Diego 2019
Webex Devices xAPI - DEVNET_2071 - Cisco Live - San Diego 2019Webex Devices xAPI - DEVNET_2071 - Cisco Live - San Diego 2019
Webex Devices xAPI - DEVNET_2071 - Cisco Live - San Diego 2019
 
Quick and Easy Device Drivers for Embedded Linux Using UIO
Quick and Easy Device Drivers for Embedded Linux Using UIOQuick and Easy Device Drivers for Embedded Linux Using UIO
Quick and Easy Device Drivers for Embedded Linux Using UIO
 
Integrated, Automated Video Room Systems - Webex Devices - Cisco Live Orlando...
Integrated, Automated Video Room Systems - Webex Devices - Cisco Live Orlando...Integrated, Automated Video Room Systems - Webex Devices - Cisco Live Orlando...
Integrated, Automated Video Room Systems - Webex Devices - Cisco Live Orlando...
 
The Story of SNCF Connect - biggest Flutter app in Europe (@FlutterHeroes 2023)
The Story of SNCF Connect - biggest Flutter app in Europe (@FlutterHeroes 2023)The Story of SNCF Connect - biggest Flutter app in Europe (@FlutterHeroes 2023)
The Story of SNCF Connect - biggest Flutter app in Europe (@FlutterHeroes 2023)
 
How OpenShift SDN helps to automate
How OpenShift SDN helps to automateHow OpenShift SDN helps to automate
How OpenShift SDN helps to automate
 
Dds presentation omg
Dds presentation omgDds presentation omg
Dds presentation omg
 
Mp25: Mobile dev with QT and Python for the Notorious N9
Mp25: Mobile dev with QT and Python for the Notorious N9Mp25: Mobile dev with QT and Python for the Notorious N9
Mp25: Mobile dev with QT and Python for the Notorious N9
 

Amora

  • 1. Amora: A mobile remote assistant Adenilson Cavalcanti Community Group - Instituto Nokia adenilson.silva@indt.org.br cavalcantii@gmail.com 1 © INdT 2007 | Company Confidential
  • 2. Objectives •Explain reasons for design/implementation of Amora •Present tools used •Share knowledge and lessons 2 © INdT 2007 | Company Confidential
  • 3. Why create Amora Free/OSS 'remote controllers' @ 2007/06 •Abandoned, no longer maintained •Unstable/bad performance •Confusing user interface •Windows only (or poor support for Linux) 3 © INdT 2007 | Company Confidential
  • 4. Amora Team •Adenilson Cavalcanti: server, client, design, even the kitchensink •Wilson Prata: design, usability •Ademar de Souza Reis Jr.: logging functions, buildsystem, RPM packaging •Thiago Marcos P. Santos: uLoop code, utests •Tomaz Noleto: Debian package, tablet client 4 © INdT 2007 | Company Confidential
  • 5. Project Size • 2400LOC (6 persons/month): • 3000 visits/month, 93 different 68% ANSI C, 31% Python nations 5 © INdT 2007 | Company Confidential
  • 6. Project •GPL 2.0: free/opensource software •officially packaged: Mandriva, Fedora Core •code base is small •contributors are welcome Webpage http://amora.googlecode.com/ Repository http://amora.googlecode.com/svn/trunk/ 6 © INdT 2007 | Company Confidential
  • 7. Concept A long way to go... *The project was codenamed P4X (Presenter 4 X) 7 © INdT 2007 | Company Confidential
  • 8. Concept: design A long way to go... 8 © INdT 2007 | Company Confidential
  • 9. Implementation Coding can get messy! 9 © INdT 2007 | Company Confidential
  • 10. Implementation “Programmers shalt not do user interface...” 10 © INdT 2007 | Company Confidential
  • 11. Implementation Clear vision of where to go is important! 06/16 2.5 months spare time 08/31 rev. 186 1616 LOCs 11 © INdT 2007 | Company Confidential
  • 12. Today usability 12 © INdT 2007 | Company Confidential
  • 13. Architecture 13 © INdT 2007 | Company Confidential
  • 14. Server Server components •ANSI C/POSIX: protocol + communication •Xlib/XTest: window events •imlib: screenshot, resize, rotation •BlueZ: communication •D-BUS: dongle disconnection 14 © INdT 2007 | Company Confidential
  • 15. Server 15 © INdT 2007 | Company Confidential
  • 16. Server: Why? •ANSI C: portable, simple, stable, known-how •POSIX: sockets (read/write) •Xlib: less dependencies than GDK/QT •imlib: fast/simple/reliable •BlueZ: official bluetooth stack on Linux* •main loop: micro loop (88LOCs) 16 © INdT 2007 | Company Confidential
  • 17. Client Classes •Amora: main loop •Application: main application logic •Wallpaper: main app background image •Help: display help text •Bluetooth: communication •Keyboard: required to draw in Canvas 17 © INdT 2007 | Company Confidential
  • 18. Protocol •Default log when connecting: [Apr 15 18:34:31]: Accepted connection. Client is 00:18:42:E3:EC: 44 [Apr 15 18:34:31]: Read buffer = SCREEN_MODE_ON [Apr 15 18:34:31]: Read buffer = SCREEN_RESOLUTION [Apr 15 18:34:31]: Read buffer = 240 [Apr 15 18:34:31]: Read buffer = 320 •Protocol is: - set screenshot on or off - screen width - screen height 18 © INdT 2007 | Company Confidential
  • 19. Protocol •Log for screenshot event: [Apr 15 18:39:17]: Read buffer = SCREEN_TAKE •Protocol is: - set orientation (rotate or not) - client ask for screenshot (SCREEN_TAKE) - server answers with image size (56732) - server starts to write data in socket - client must read this data 19 © INdT 2007 | Company Confidential
  • 20. Screenshot client code 20 © INdT 2007 | Company Confidential
  • 21. Other protocol commands 21 © INdT 2007 | Company Confidential
  • 22. Why use Python for client side? Symbian x Java x Python _LIT(Scnst, “Welcome to darkness...”); TBufC8<20> buffer(Scnst); TBufC8<20> copy; TPtr8 ptr = copy.Des(); ptr.Copy(buffer); //Deprecated! printf(“symbian string = %sn”, ptr.PtrZ()); String tmp = new String("Hello, Java is cool!"); StringBuffer newer = new StringBuffer(tmp); System.out.println(newer); a = 'Python rulez!'; b = a; print b 22 © INdT 2007 | Company Confidential
  • 23. How many lines a simple 'hello world' have? LOC por linguagem 60 55 50 45 40 Lines of Code 35 LOC 30 25 20 import appuifw 15 appuifw.note(u'Hello!') 10 5 0 Symbian Java Python 23 © INdT 2007 | Company Confidential
  • 24. Tools •logging: helped to track on missing call to XFlush(); •electric fence: helped to find one memory leak in logging functions; •gtk-devel-list: help for get real root window for GTK apps; •valgrind: server can run fine inside it; •autotools: buildsystem help to support Linux flavors; •doxygen: source code documentation; •subversion: today I would use git... •utest: help to optimize uloop code; 24 © INdT 2007 | Company Confidential
  • 25. electric fence •overloaded 'malloc' •helpful to catch over/underflows •usage: just link with it $gcc -lefence hello.c $./a.out Electric Fence 2.1 Copyright (C) 1987-1998 Bruce Perens. 25 © INdT 2007 | Company Confidential
  • 26. lcov •info: which parts are executed and how many times. Example: hello: hello.c gcc -o hello -Wall -fprofile-arcs -ftest- coverage hello.c coverage: hello ./hello lcov --directory . --capture --output-file hello.info genhtml hello.info 26 © INdT 2007 | Company Confidential
  • 27. lcov output 27 © INdT 2007 | Company Confidential
  • 28. BT terminal •Script to create a terminal sdptool add --channel=1 SP sdptool browser local while true; do rfcomm listen /dev/rfcomm0 1; done 28 © INdT 2007 | Company Confidential
  • 29. BT terminal 29 © INdT 2007 | Company Confidential
  • 30. BT Terminal 30 © INdT 2007 | Company Confidential
  • 31. BT Terminal 31 © INdT 2007 | Company Confidential
  • 32. Help is needed •packaging: Gentoo, Slackware, Ubuntu •tablet amora: client for internet tablet •ports: Mac OSX, FreeBSD, Solaris (does anyone really uses it for desktop?) •j2me client: cover other cellphones models •features: see project issues list 32 © INdT 2007 | Company Confidential
  • 33. What is next • BT webcam • D-BUS integration • Amora applet • Tamora (Tablet amora) 33 © INdT 2007 | Company Confidential
  • 34. Acknowledgments • INdT (for paying my travel expenses and allowing me to write this software) • Wilson Prata: the UI, usability and graphic design guy • My fellow programmer friends: Ademar Reis, Thiago M. P. Santos and Tomaz Noleto 34 © INdT 2007 | Company Confidential