Your SlideShare is downloading. ×
0
Amora
Amora
Amora
Amora
Amora
Amora
Amora
Amora
Amora
Amora
Amora
Amora
Amora
Amora
Amora
Amora
Amora
Amora
Amora
Amora
Amora
Amora
Amora
Amora
Amora
Amora
Amora
Amora
Amora
Amora
Amora
Amora
Amora
Amora
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Amora

175

Published on

Amora (A mobile remote assistant) development history and design.

Amora (A mobile remote assistant) development history and design.

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
175
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
2
Comments
0
Likes
1
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Amora: A mobile remote assistant Adenilson Cavalcanti Community Group - Instituto Nokia adenilson.silva@indt.org.br cavalcantii@gmail.com 1 © INdT 2007 | CompanyConfidential
  • 2. Objectives •Explain reasons for design/implementation of Amora •Present tools used •Share knowledge and lessons 2 © INdT 2007 | CompanyConfidential
  • 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 | CompanyConfidential
  • 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 | CompanyConfidential
  • 5. Project Size • 2400LOC (6 persons/month): • 3000 visits/month, 93 different 68% ANSI C, 31% Python nations 5 © INdT 2007 | CompanyConfidential
  • 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 | CompanyConfidential
  • 7. Concept A long way to go... *The project was codenamed P4X (Presenter 4 X) 7 © INdT 2007 | CompanyConfidential
  • 8. Concept: design A long way to go... 8 © INdT 2007 | CompanyConfidential
  • 9. Implementation Coding can get messy! 9 © INdT 2007 | CompanyConfidential
  • 10. Implementation “Programmers shalt not do user interface...” 10 © INdT 2007 | CompanyConfidential
  • 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 | CompanyConfidential
  • 12. Today usability 12 © INdT 2007 | CompanyConfidential
  • 13. Architecture 13 © INdT 2007 | CompanyConfidential
  • 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 | CompanyConfidential
  • 15. Server 15 © INdT 2007 | CompanyConfidential
  • 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 | CompanyConfidential
  • 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 | CompanyConfidential
  • 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 | CompanyConfidential
  • 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 | CompanyConfidential
  • 20. Screenshot client code 20 © INdT 2007 | CompanyConfidential
  • 21. Other protocol commands 21 © INdT 2007 | CompanyConfidential
  • 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 | CompanyConfidential
  • 23. How many lines a simple hello world have? LOC por linguagem 60 55 50 45 40Lines of Code 35 LOC 30 25 20 import appuifw 15 appuifw.note(uHello!) 10 5 0 Symbian Java Python 23 © INdT 2007 | CompanyConfidential
  • 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 | CompanyConfidential
  • 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 | CompanyConfidential
  • 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 | CompanyConfidential
  • 27. lcov output 27 © INdT 2007 | CompanyConfidential
  • 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 | CompanyConfidential
  • 29. BT terminal 29 © INdT 2007 | CompanyConfidential
  • 30. BT Terminal 30 © INdT 2007 | CompanyConfidential
  • 31. BT Terminal 31 © INdT 2007 | CompanyConfidential
  • 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 | CompanyConfidential
  • 33. What is next • BT webcam • D-BUS integration • Amora applet • Tamora (Tablet amora) 33 © INdT 2007 | CompanyConfidential
  • 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 | CompanyConfidential

×