Open smartphone with Linux - Openmoko Neo FreeRunner

January 13, 2010

Lang: cs en de es

How to easily and efficiently program for Neo FreeRunner

With a system built on Linux, GNU and other free projects, you can program in many languages and use many libraries for the resulting program and using modern mobile components makes it a breeze.
You can program in C/C++, of course, which is widespread and suitable for devices like the Neo FreeRunner, because the resulting program is usually faster.
An interesting option is the new Vala language, which makes it much easier to work with than C++, yet the resulting program is almost as fast as C++, because it is also compiled into native processor code.

Since we want to start programming quickly and easily, without acquiring and setting up any development resources that are specific to our device, such as libraries and a compiler, we choose the Python programming language. This programming language is scripting and therefore compiled at runtime, therefore it is possible to program in the most ordinary editor and in any OS (even on Windows in Notepad :-D). At the same time it is easier to develop in it than in C.

Controlling peripherals and other HW can be done easily using DBUS.
For graphical programs, SHR's preferred toolkit is Elementary. (OpenMoko wiki Elementary) , which is adapted for mobile devices with a small touchscreen.
The Python program can be tested directly on FreeRunner without modification. How to easily move the modified files? I finally arrive at a solution where I use NFS to mount the directory from the desktop, that contains the project under development, so there's no need to actually copy anything ;-) .

User Miss Neo:
slecna Neo

You can control FreeRunner quite easily e.g. from the console using bash and mdbus (or mdbus2)
We can find out the services provided by our system with the command:

mdbus -s
To find out what objects are provided by a particular service, use the command:
mdbus -s org.freesmartphone.odeviced
And then we can call the methods of each object of the service. For example, to flash the red AUX button, we can simply use this one command:
mdbus -s org.freesmartphone.odeviced \
  /org/freesmartphone/Device/LED/gta02_aux_red \
  org.freesmartphone.Device.LED.SetBlinking 100 100
Then turn off the blinking:
mdbus -s org.freesmartphone.odeviced \
  /org/freesmartphone/Device/LED/gta02_aux_red \
  org.freesmartphone.Device.LED.SetBrightness 0

In Python you can control the LEDs like this: Other simple programs that can serve as a model:
A sample Python graphical program using Elementary.
Diode control program.
Program to control USB mode.
Program that detects incoming/outgoing/.. calls, versions for both Elementary and GTK.

See the documentation for the FSO framework that mediates this communication with HW, calls, contacts and does other things.

Debugboard for OpenMoko Neo Freerunner

Finally got my hands on it debugboard for OpenMoko Neo Freerunner. So I'm looking forward to winter, the season of long evenings when one can't get out as much and so has more time to hack. With this special board, one can absolutely hack the FreeRunner perfectly at the lowest level. I plan for now to just use the SPI outputs and connect the FreeRunner directly to the IQRF module. After all, why connect the device via USB when you can connect the module directly? Because USB is not a native interface for IQRF, so additional USB hardware is needed on both sides. As a result, this saves two pieces of USB controller and also no need for a USB driver. For everyday use, the module could then be plugged directly into a mobile phone.
Of course, this solution can then be ported to tablet TouchBook, which also has an SPI line and definitely enough space inside.
Simply a cleaner solution than connecting an IQRF module to the FreeRunner using IQRF develop board. or simple low cost communication board.
openmokodebugboard

Articles on a similar topic

Analysis of assignment and pricing of software project development
Python program to control Docker using the API
How to use MailCatcher to test emails
Python OpenAI API
Creating a WebSocket web application and setting up a proxy
Project management: agile software development
How to run old PHP applications
What a good programmer should know
Rust programming language
NodeJS: development, server configuration
Nette security bug CVE-2020-15227
REST API: platform API
Custom web and mail hosting with ISP Config software
Programming in SQL: PostgreSQL, MySQL/MariaDB
HTTPS: secure web
NoSQL database Mongo DB
Connecting to Microsoft SQL Server from Linux
What is the job description of a programmer
Python application localization
Which mail and web hosting to choose
Digispark - Program Atmel ATtiny microcontroller with Arduino IDE
Development for ARM processors with Arduino IDE
How to program the ESP8266 WiFi processor

Newsletter

If you are interested in receiving occasional news by email.
You can register by filling in your email news subscription.


+