how to program a smartphone: openmoko sneha gopinath winlab, rutgers university acknowledgements:...
Post on 21-Dec-2015
227 views
TRANSCRIPT
![Page 1: How to Program a SmartPhone: OpenMoko Sneha Gopinath WINLAB, Rutgers University Acknowledgements: Pravin Shankar, Department of Computer Science, Rutgers](https://reader036.vdocument.in/reader036/viewer/2022062304/56649d565503460f94a34b1d/html5/thumbnails/1.jpg)
How to Program a SmartPhone: OpenMoko
Sneha Gopinath
WINLAB, Rutgers University
Acknowledgements: Pravin Shankar,
Department of Computer Science, Rutgers University
Ronak Daya, WINLAB
![Page 2: How to Program a SmartPhone: OpenMoko Sneha Gopinath WINLAB, Rutgers University Acknowledgements: Pravin Shankar, Department of Computer Science, Rutgers](https://reader036.vdocument.in/reader036/viewer/2022062304/56649d565503460f94a34b1d/html5/thumbnails/2.jpg)
Introduction to OpenMoko
Outline
Introduction to the phone: Architecture & Features
Getting started and Developing on the OpenMoko
How can You use it in Your Research Example Applications and Demo
![Page 3: How to Program a SmartPhone: OpenMoko Sneha Gopinath WINLAB, Rutgers University Acknowledgements: Pravin Shankar, Department of Computer Science, Rutgers](https://reader036.vdocument.in/reader036/viewer/2022062304/56649d565503460f94a34b1d/html5/thumbnails/3.jpg)
Introduction to OpenMoko
Open Source Smart phones
Android: Google developed Software platform for mobile devices, powered by the Linux kernel.
OFono: Nokia and Intel collaboration
![Page 4: How to Program a SmartPhone: OpenMoko Sneha Gopinath WINLAB, Rutgers University Acknowledgements: Pravin Shankar, Department of Computer Science, Rutgers](https://reader036.vdocument.in/reader036/viewer/2022062304/56649d565503460f94a34b1d/html5/thumbnails/4.jpg)
Introduction to OpenMoko
What is OpenMoko?
Linux based SmartPhone platform
– Hardware (Neo Freerunner 1973)
– Software (Om 2008.8) Wifi/GPS/GPRS/Bluetooth/... etc. Open Source hardware and software
![Page 5: How to Program a SmartPhone: OpenMoko Sneha Gopinath WINLAB, Rutgers University Acknowledgements: Pravin Shankar, Department of Computer Science, Rutgers](https://reader036.vdocument.in/reader036/viewer/2022062304/56649d565503460f94a34b1d/html5/thumbnails/5.jpg)
Introduction to OpenMoko
The Hardware – Neo FreeRunner
● 500 MHz Samsung (ARM) Processor
● 128 MB SDRAM, 256 MB NAND Flash
● Touchscreen
● Wifi – 802.11b/g Atheros based chipset
● GPS/AGPS
● GSM/GPRS
● Accelerometer – 2 tri-axis sensors
![Page 6: How to Program a SmartPhone: OpenMoko Sneha Gopinath WINLAB, Rutgers University Acknowledgements: Pravin Shankar, Department of Computer Science, Rutgers](https://reader036.vdocument.in/reader036/viewer/2022062304/56649d565503460f94a34b1d/html5/thumbnails/6.jpg)
Introduction to OpenMoko
The Software OM2008.8
● OS Linux 2.6.24
● Languages C/Java/Python/...
● GUI X11/Qtopia
● uBoot
● Installer – opkg
![Page 7: How to Program a SmartPhone: OpenMoko Sneha Gopinath WINLAB, Rutgers University Acknowledgements: Pravin Shankar, Department of Computer Science, Rutgers](https://reader036.vdocument.in/reader036/viewer/2022062304/56649d565503460f94a34b1d/html5/thumbnails/7.jpg)
Introduction to OpenMoko
SSHing into the Phone
● Over USB– ifconfig usb0 192.168.0.200 netmask 255.255.255.0
– ssh [email protected]
● Over wireless
– Using the phone’s terminal, add Network to /etc/wpa_supplicant/wpa_supplicant.conf
– ifdown eth0 && ifup eth0
– ssh root@IP
where IP is the IP address of eth0
![Page 8: How to Program a SmartPhone: OpenMoko Sneha Gopinath WINLAB, Rutgers University Acknowledgements: Pravin Shankar, Department of Computer Science, Rutgers](https://reader036.vdocument.in/reader036/viewer/2022062304/56649d565503460f94a34b1d/html5/thumbnails/8.jpg)
Introduction to OpenMoko
Installing sw using opkg
Example (installing a web server apache)
– cd /etc/opkg
– wget http://buildhost.automated.it/scaredycat.conf
– opkg update
– opkg install apache2
![Page 9: How to Program a SmartPhone: OpenMoko Sneha Gopinath WINLAB, Rutgers University Acknowledgements: Pravin Shankar, Department of Computer Science, Rutgers](https://reader036.vdocument.in/reader036/viewer/2022062304/56649d565503460f94a34b1d/html5/thumbnails/9.jpg)
Introduction to OpenMoko
Developing Applications
Using C Cross compiler available at
http://downloads.openmoko.org/toolchains GCC command for compiling:
/usr/local/openmoko/arm/bin/arm-angstrom-linux-gnueabi-gcc –o foo foo.c
Copy the executable to the phone:
scp foo root@openmoko:~/
![Page 10: How to Program a SmartPhone: OpenMoko Sneha Gopinath WINLAB, Rutgers University Acknowledgements: Pravin Shankar, Department of Computer Science, Rutgers](https://reader036.vdocument.in/reader036/viewer/2022062304/56649d565503460f94a34b1d/html5/thumbnails/10.jpg)
Introduction to OpenMoko
Developing contd.Using Python:
As simple as:– opkg install python-core
● Graphical API:– GTK– ETK
Using Java:Cacao:– JVM implementation for OpenMoko– http://www.cacaojvm.org
![Page 11: How to Program a SmartPhone: OpenMoko Sneha Gopinath WINLAB, Rutgers University Acknowledgements: Pravin Shankar, Department of Computer Science, Rutgers](https://reader036.vdocument.in/reader036/viewer/2022062304/56649d565503460f94a34b1d/html5/thumbnails/11.jpg)
Introduction to OpenMoko
Interfaces and Drivers
Wifi: eth0 – Atheros AR6K driverSame commands as on a regular Linux laptop (iwconfig/iwlist/dhclient/...)
Accelerometer: Two sensors:– /dev/input/event2 and /dev/input/event3
GPS: – opkg install gpsd – gpsd /dev/ttySAC1
– nc localhost 2947 – r
![Page 12: How to Program a SmartPhone: OpenMoko Sneha Gopinath WINLAB, Rutgers University Acknowledgements: Pravin Shankar, Department of Computer Science, Rutgers](https://reader036.vdocument.in/reader036/viewer/2022062304/56649d565503460f94a34b1d/html5/thumbnails/12.jpg)
Introduction to OpenMoko
Applications in WINLAB
Similar to Orbit Nodes Mobility Localization Social Networking Applications Create your own Iphone like apps
![Page 13: How to Program a SmartPhone: OpenMoko Sneha Gopinath WINLAB, Rutgers University Acknowledgements: Pravin Shankar, Department of Computer Science, Rutgers](https://reader036.vdocument.in/reader036/viewer/2022062304/56649d565503460f94a34b1d/html5/thumbnails/13.jpg)
Introduction to OpenMoko
Examples
Accelerometer PositioningLive Twitter updates giving LocationLive GPS location tracking
![Page 14: How to Program a SmartPhone: OpenMoko Sneha Gopinath WINLAB, Rutgers University Acknowledgements: Pravin Shankar, Department of Computer Science, Rutgers](https://reader036.vdocument.in/reader036/viewer/2022062304/56649d565503460f94a34b1d/html5/thumbnails/14.jpg)
Introduction to OpenMoko
Additional Resources
● Openmoko Wiki:– http://wiki.openmoko.org/wiki/Main_Page– Google :-)
<search term> site:http://wiki.openmoko.org/wiki/
● Planet Openmoko http://planet.openmoko.org/● Source Code (git repo) http://git.openmoko.org/● Mailing list: http://lists.openmoko.org/mailman/listinfo/
![Page 15: How to Program a SmartPhone: OpenMoko Sneha Gopinath WINLAB, Rutgers University Acknowledgements: Pravin Shankar, Department of Computer Science, Rutgers](https://reader036.vdocument.in/reader036/viewer/2022062304/56649d565503460f94a34b1d/html5/thumbnails/15.jpg)
Introduction to OpenMoko
Internal Architecture