Wireless Platforms - PowerPoint PPT Presentation

Loading...

PPT – Wireless Platforms PowerPoint presentation | free to view - id: 30712-MTJhY



Loading


The Adobe Flash plugin is needed to view this content

Get the plugin now

View by Category
About This Presentation
Title:

Wireless Platforms

Description:

Nokia Affix Bluetooth Stack. BlueZ comes with recent Linux distributions, and is very ... Nokia 770 Internet Tablet complies with Bluetooth 1.2 specification. ... – PowerPoint PPT presentation

Number of Views:84
Avg rating:3.0/5.0
Slides: 62
Provided by: cens
Category:

less

Write a Comment
User Comments (0)
Transcript and Presenter's Notes

Title: Wireless Platforms


1
Wireless Platforms Tools
2
Outline
  • Part I The Nokia 770 Platform
  • Maemo Tim Dasilva
  • Python Bluetooth John Binney
  • Part II A Look at Other Platforms
  • Platforms Shyamal Chandra
  • OSGI Daniel Lee

3
Outline
  • Part I The Nokia 770 Platform
  • Maemo Tim Dasilva
  • Python Bluetooth John Binney
  • Part II A Look at Other Platforms
  • Platforms Shyamal Chandra
  • OSGI Smart House Daniel Lee

4
What is Maemo?
  • http//www.maemo.org/
  • An open-source development platform.
  • Built for Linux-based handhelds.
  • Based on open-source desktop components
    handheld-specific tweaks.
  • Developed by Nokia, as part of development for
    the Nokia 770 Internet Tablet.

5
Why should you care?
  • It's open-source. That's neat!
  • It gives us an easy environment for development,
    building, and testing.
  • The development environment uses the same
    software as the 770.
  • So we don't need to emulate the 770.
  • We can run and test applications on a Linux
    computer, instead of the 770.

6
Why should you care?
  • You can use the Maemo SDK to develop applications
    for ALL Maemo-compliant handhelds!
  • Which, at the moment, is just the 770.
  • But Nokia plans to make other Maemo-compliant
    handheld devices.
  • Really. They promise.

7
So what does Maemo mean?
  • Short answer

8
So what does Maemo mean?
  • Short answer
  • It doesnt mean anything.

9
What languages can we use?
  • Most applications are written in C.
  • The user interface is written in C.
  • You can also use Python or C.
  • But Java fanboys are out of luck.

10
What is in the Maemo platform?
11
What is in the Maemo platform?
  • Hildon Application Framework
  • Platform Libraries
  • Linux Kernel

12
What is in the Maemo platform?
  • Hildon Application Framework
  • Platform Libraries
  • Linux Kernel

13
Hildon Application Framework
  • Basically, its the desktop interface stuff.
  • Its based on GNOME stuff, like GTK widgets,
    theming engine, Gconf, Gnome VFS, etc.
  • It includes these six components

14
Hildon Application Framework
  • Task Navigator. Start and switch between apps.
  • Home. Opening screen that allows plugins like
    clock, news feed, etc.
  • Status Bar. Plugin interface, communicates
    device status changes.
  • Control Panel. Framework for running applets
    that change user settings.
  • Hildon UI. GTK widgets others, and theming
    modifications.
  • KibOSSO. Library of required and helpful
    services for apps.

15
What is in the Maemo platform?
  • Hildon Application Framework
  • Platform Libraries
  • Linux Kernel

16
Platform Libraries
  • Matchbox
  • Base environment for the X windowing system to
    run on embedded platforms.
  • Lightweight window manager for X11.
  • Supports PDA-style windowing.
  • (Huh? Basically, its a window manager that's
    more appropriate for handhelds.)

17
Platform Libraries
  • Xserver
  • Draws pretty things on the screen for you.

18
Platform Libraries
  • D-BUS
  • A message system for apps and libraries to
    communicate.
  • Used for
  • System notification. Every app can be warned of
    low battery, for example.
  • Separating application UI and application engine.
  • Launching apps from Task Navigator saving their
    state.

19
Platform Libraries
  • Gnome VFS
  • Virtual file system.
  • A library for accessing various kinds of file
    systems, transparently to the user and developer.
  • For example, HTTP, FTP, and local files can all
    be used in the same way.
  • Provides access to internal and external memory.

20
Platform Libraries
  • GConf
  • System for storing app preferences.
  • Provides a preferences database, which is an
    organized hierarchy of keys and values.
  • All Maemo application settings
  • are stored in GConf.

21
What is in the Maemo platform?
  • Hildon Application Framework
  • Platform Libraries
  • Linux Kernel

22
Linux Kernel
  • Linux Nokia770-51 2.6.12.3-omap1
  • So yeah cool

23
What is the Maemo SDK?
  • Software development kit that allows you to
  • Create Maemo GUI apps in Linux.
  • Test and debug them in Linux.
  • In fact, run any Maemo apps in Linux.
  • Port other Linux projects to Maemo.
  • Build application packages for Maemo.
  • Basically, a development sandbox to play in,
    without having to actually deal with the 770.

24
How does it do all these wonderful things?
  • It uses the Scratchbox cross-compile toolkit
  • http//www.scratchbox.org
  • And it runs the same software as the device, so
    it can run Maemo applications.
  • Maemo provides a rootstrap file, which is
  • a software package containing all of the
    development libraries and header files needed for
    application development
  • Use the x86 rootstrap to create, test, and debug.
  • Use the ARM rootstrap to deploy on the 770.

25
Is there a tutorial for the Maemo SDK?
  • But of course! And it covers
  • Maemo overview
  • Setting up and testing the development
    environment
  • Writing GUI apps (aka how to work with the Hildon
    UI)
  • Hildon widgets
  • Using the input mechanism
  • Integrating apps into the Maemo framework
  • Usage of packup application
  • How to map MIME types
  • Clipboard usage
  • How to write Statusbar plugins
  • How to write Internect-connected apps
  • How to deploy apps

26
The tutorial looks long. What should I do?
  • The tutorial is long.
  • You should do it.

27
Maemo SDK Tutorial
  • Setup the development environment
  • Install Scratchbox 0.9.8.5
  • note other (newer) versions of it DON'T work
  • Install the Maemo rootstrap
  • Install Xephyr
  • makes pretty graphical windows in Linux for you

28
Maemo SDK Tutorial
  • Test the development environment
  • Start the Maemo GUI in a Xephyr window
  • Do you get weird stuff like "home_ap_home_name"
    instead of "Home"?
  • So did I.
  • In your Scratchbox .bash_profile, add this line
  • unset LC_ALL export LANGUAGEen_GB

29
Maemo SDK Tutorial
  • Use the development environment
  • They guide you through building (ie, compiling)
    and installing a cute little maemopad app.
  • Then they guide you through building it for ARM,
    to use on the actual 770.

30
Maemo SDK Tutorial
  • How to write Maemo GUI applications
  • They cover the basics of Hildon UI layouts

31
Maemo SDK Tutorial
  • How to write Maemo GUI applications
  • And windows...
  • and menus...
  • and toolbars...
  • and the Find toolbar...
  • and a lot of other Hildon widgets...

32
Maemo SDK Tutorial
  • Bored yet? Just to peek at everything else
  • Maemo text input methods
  • Application layout considerations (eg, wider
    layout)
  • Integrating apps into the Maemo framework
  • Using the LibOSSO library (get excited!)
  • Using the built-in backup application
  • Using the clipboard
  • Writing control panel applets
  • Writing Statusbar plugins
  • Writing Internet-connected apps
  • How to deploy apps (make install packages)

33
Maemo Resources
  • API documentation is available for
  • hildon-libs, hildon-lgpl, hildon-fm, libosso,
    control panel, status bar, home applets, gw-obex
    library, certificate manager
  • Blue-tooth related tools like Gwconnect
  • And other related things like GTK 2.6.4, GDK
    2.6.4, gdk-pixbuf library, etc.
  • http//www.maemo.org/platform/docs/api-index.html

34
Maemo Resources
  • How-tos are available for
  • Developing/porting applications
  • Making packages for the Application Installer
  • Using the Linux flasher tool making your own
    root file system
  • Setting up USB networking, CPU transparency
  • Introduction to Maemo connectivity
  • Create help content for Maemo
  • Customizing and theming Maemo
  • Certificate manager
  • How to do localization
  • Multimedia architecture explained
  • Getting started with multimedia development
  • http//www.maemo.org/platform/docs/how-to.html

35
Maemo Resources
  • Maemo Wiki http//maemo.org/maemowiki/
  • Bugzilla https//maemo.org/bugzilla/
  • IRC channel maemo on freenode.net
  • Mailing lists maemo-announce
  • maemo-users
  • maemo-developers
  • maemo-commits

36
What does the future hold for Maemo?
  • Current version of Maemo is 1.1.
  • Two weeks ago, Maemo Mistral (2.0) was announced.
  • Nokia says it will release more
  • Maemo-compliant handhelds.
  • So get excited!

37
Outline
  • Part I The Nokia 770 Platform
  • Maemo Tim Dasilva
  • Python Bluetooth John Binney
  • Part II A Look at Other Platforms
  • Platforms Shyamal Chandra
  • OSGI Smart House Daniel Lee

38
Bluetooth
  • All Bluetooth Devices have a 48 bit address
    (permanently set for each hardware)
  • Piconet 1 master and up to 7 slaves who can
    communicate
  • Transport layers Bluetooth specific
  • Middleware bridges gap between Bluetooth and
    other protocols

39
Bluetooth on Linux
  • Several different implementations of the
    bluetooth protocol stack for Linux
  • Axis OpenBT Stack
  • IBM BlueDrekar
  • Qualcomm BlueZ
  • Nokia Affix Bluetooth Stack
  • BlueZ comes with recent Linux distributions, and
    is very complete

40
Bluetooth on the 770
  • From the Nokia 770 website
  • Which Bluetooth profiles are supported in Nokia
    770 Internet Tablet?
  • Nokia 770 Internet Tablet complies with Bluetooth
    1.2 specification. Supported profiles are SAP
    (SIM access), FTP (File Transfer), DUN (Dial-up
    Networking), GAP (Generic Access) and SPP (Serial
    Port).

41
Python on the 770
  • Installing Python Just download the installer
    file, copy it to the 770, and install!
  • Comes with the GTK for GUIs and PyGame
  • Installing PyBluez Compile it (or download the
    binaries) and copy them to the 770 (see Wiki)
  • Using it Since Python code runs as a script, no
    cross compiling is necessary!

42
PyBluez Scanning for Devices
  • import bluetooth
  • Look for devices
  • addresses bluetooth.discover_devices()
  • if len(addresses) 0
  • print "No devices found!"
  • else
  • print addresses

43
PyBluez Reading from a Device
  • import bluetooth
  • Connect to the GPS (by hardware address)
  • gpsAddress '00081B0CFDD9'
  • sock bluetooth.BluetoothSocket(
    bluetooth.RFCOMM )
  • sock.connect((gpsAddress, 1))
  • Read 200 bytes
  • sock.recv(200)
  • (this code is all you need to read from your
    GPS!)

44
PyBluez Example
45
Bluetooth Comparing C and Python
inquiry_info ii NULL int max_rsp,
num_rsp int dev_id, sock, len, flags
int dev_num int i char addr19 0
char name248 0 // get the id
of the first available local bluetooth device
dev_id hci_get_route(NULL) sock
hci_open_dev( dev_id ) if (dev_id lt 0
sock lt 0) perror("opening socket")
exit(1) // allocate room for the
responses to our inquiry len 8
max_rsp 255 flags IREQ_CACHE_FLUSH
ii (inquiry_info)malloc(max_rsp
sizeof(inquiry_info)) // inquire to get info
for all nearby bluetooth devices num_rsp
hci_inquiry(dev_id, len, max_rsp, NULL, ii,
flags) if( num_rsp lt 0 )
perror("hci_inquiry") return num_rsp
// copy the addresses into the array which
we will return for (dev_num 0 dev_num lt
num_rsp dev_num lt max_devices dev_num)
// store the device address in the user
supplied array addressesdev_num (ii
dev_num)-gtbdaddr free( ii )
close( sock )
  • Import bluetooth
  • devs bluetooth.discover_devices()

46
GUIs in Python
  • import gtk
  • import hildon
  • . . .
  • self.app hildon.App()
  • self.appview hildon.AppView("GPS Readings")
  • self.app.set_title("PyGPS")
  • . . .

47
GUIs In Python Example
48
Python, PyBluez, and HildonBringing it all
together
49
References
  • ttp//cnscenter.future.co.kr/resource/hot-topic/wp
    an/RC22109.pdf
  • An Overview of the Bluetooth Wireless
    Technology by Chatschik Bisdikian
  • ttp//www.holtmann.org/papers/bluetooth/wtc2003_sl
    ides.pdf
  • Bluetooth Programming for Linux by Marcel
    Holtmann and Andreas Vedral
  • ttp//people.csail.mit.edu/albert/bluez-intro/
  • Excellent tutorial on Bluetooth programming in
    Linux, in both C and Python
  • ttp//www.lecs.cs.ucla.edu/urban-sensing/index.php
    /Nokia_770_Python
  • Information about Python on the 770 on our Wiki
    (thanks Thomas!)

50
Outline
  • Part I The Nokia 770 Platform
  • Maemo Tim Dasilva
  • Python Bluetooth John Binney
  • Part II A Look at Other Platforms
  • Platforms Shyamal Chandra
  • OSGI Smart House Daniel Lee

51
Outline
  • Part I The Nokia 770 Platform
  • Maemo Tim Dasilva
  • Python Bluetooth John Binney
  • Part II A Look at Other Platforms
  • Platforms Shyamal Chandra
  • OSGI Smart House Daniel Lee

52
  • OSGI Overview
  • What is OSGI?
  • The Framework
  • Development Toolkits
  • Application Matildas Smart House

53
What is OSGI
  • The Open Service Gateway Initiative
  • A framework that connects various devices in a
    local network
  • It defines a standard execution environment and
    service interfaces.

54
The Framework - I
  • An OSGI platform is an instantiation of a Java
    Virtual Machine and a set of bundles.
  • Bundles are Java-based service applications.
  • The framework only defines a set of consistent
    interfaces, leaving the actual implementation to
    application developers.

55
The Framework - II
  • Services are connected with bundles in registry.
  • Advantages of the design
  • Encapsulation
  • Allow ease of maintenance and portability
  • Flexibility
  • Service selection and interaction decisions are
    made dynamically at service discovery and use
    time.

56
Development Toolkits
  • Prosyst mBedded Builder
  • Java Embeded Server
  • IBM SMF Bundle Developer
  • Service Management Framework

57
Outline
  • OSGI Overview
  • What is OSGI?
  • The Framework
  • Development Toolkits
  • Application Matildas Smart House

58
Matildas Smart House
  • A project that uses smart phones and other
    wireless technologies so that elder people with
    disabilities could interact with, monitor and
    control their surroundings.
  • It also supports remote monitoring and
    administration by family members and caregivers.

59
Implementation
  • The house is instrumented with various sensors
    and devices, including J2ME smart phones as user
    devices, ultrasonic locations sensors, X-10
    controlled devices (door, mailbox, etc.) and
    networked devices (microwave etc.).
  • Matilda is a robot with an onboard computer and
    equipped with location sensors.

60
Remarks on OSGI
  • OSGI technology has gained significant momentum
    and is ready for wide market deployment.
  • The OSGI introduces platform and vendor
    independence and architecture openness, making
    extendible software infrastructure more
    realistic.

61
References
  • C. Lee, D. Nordstedt, and S. Helal, Enabling
    Smart Spaces with OSGI.
  • www.osgi.org
About PowerShow.com