From OpenSCADAWiki
Jump to: navigation, search

Build OpenSCADA for Linux based mobile devices of the Nokia company (N770, N800, N810, N900, N950, N9)
Begin: 12 (December) 2010
Participants: Roman Savochenko, Maxim Lysenko (2011)
Description: This project is dedicated for building the OpenSCADA project for the mobile devices of the Nokia company N770, N800, N810, N900, N950, N9 on the Linux platforms Maemo and MeeGo.
State of the support:

  • N800, N810 (Maemo 4.1): builds by the Automatic builder; starts an works;
  • N900 (Maemo 5): builds by the Automatic builder; starts with the command-line parameters "--plastique" but fine starts and works with the original style "maemo".
  • N950, N9 (MeeGo 1.2): builds by the Automatic builder; starts with the command-line parameters "--showWin=2 --graphicssystem=raster"; stable works;
    • does not open the virtual keyboard for any QLineEdit or QTextEdit widgets.
Nokia devs.png

The Nokia company is one of the global leaders in the manufacture and sale of mobile phones. In 2005 the Nokia company has released a pocket-sized personal digital assistant (PDA) N770 on the basis of the full-blown Linux environment with their own desktop environment (based on the GTK+) — Hildon with the title of the project — Maemo. Subsequently, based on the Maemo platform three more mobile devices were produced, namely, two PDAs, "Internet Tablets" N800, N810, and smart phone, "Internet Tablet" N900. In 2010 the Nokia company teamed up to work on Maemo with the MobLin project of the Intel company, thus creating the MeeGo project. Based on the MeeGo platform in 2011 two smartphones N950(prototype) and N9 were released.

For the OpenSCADA project the mobile devices of the Nokia company on the Maemo and MeeGo platforms are interesting in terms of their full-blown OS Linux environment, and the lack of restrictions and blocks on the expansions of these platforms by building and adapting the typical OS Linux programs, which allows easy to adapt the OpenSCADA to the ARM hardware platform and to build the project for these mobile devices of the Nokia company.

Adaptation of the OpenSCADA project to run on the ARM hardware platforms was made in 2011 in accordance with the general plan of development in the N800 environment ( Much of adaptation was made in the chroot environment of the ALTLinux distribution, as more recent and less problematic. The latest builds of the OpenSCADA correctly operate in the native environment of the N800.

1 N800 (Maemo 4.1)

N800 PDA (Fig.1) contains the OMAP2420 processor, with an operating frequency of 400 MHz, touch (resistive) 4.1" 800×480 and is based on the Maemo 4.1 software platform.

Fig. 1. Internet Tablet (PDA) N800.

At the stage of exploring the possibility of building the OpenSCADA on the N800 some problems of obsolescence of software environment and a number of problems in the performance of the built OpenSCADA were found, part of which was associated with unwillingness the OpenSCADA to work on the ARM architecture. For this reason, the build of OpenSCADA in "chroot" environment of the ALTLinux distribution on the N800 was made. Among the most significant problems encountered during building of OpenSCADA, it may be noted:

  • The relatively small amount of RAM, as well as the the paged memory for build. Thus, the device contains 128MB of RAM and up to 128MB of paged memory, which is not enough to build in the "chroot" some of the user interface modules with (-O2) optimization.
  • Access to the file system problem during the loading libraries' and models' databases of OpenSCADA. On the early stages of the OpenSCADA start in the N800 native environment the OpenSCADA crashes during the loading of standard libraries in the SQLite database were found, which was not seen in the ALTLinux chroot environment. Later this problem was solved by a fine adaptation of OpenSCADA to work in a "bad" [LP5xxx environment of the LP-5141 controller of the "ICP DAS" company].
  • The low performance of the device. The device contains the TI OMAP 2420 processor with 400MHz frequency, which is not sufficient for a full run of mathematical models. In general, the low processor's frequency aggravated by low processor's speed of floating-point calculations, detailed information can be seen from the performance analysis of the floating-point calculations.

To safely make the experiments with the device and prevent possible damage of the original software environment it was adjusted the multi-boot with the ability to boot from the original software environment on the internal flash-drive and from the experimental environment on the internal SD-card, a copy of the original software environment (

To create the "chroot" of the ARM environment of ALTLinux repository the manual was used. On the basis of the received chroot it was created the building environment to build the OpenSCADA in it, directly on the N800. Theoretically it is possible to build directly on the big PC through quemu, but at the same time I'm having problems with crashing of quemu. In addition to the building of OpenSCADA the resulting "chroot" environment has also been successfully used to launch a fresh environment KDE 3.5.12 on the N800.

Subsequently, to build the OpenSCADA with GUI for the native environment, which became possible with the appearance of the QT4 packages, the official SDK and compile environment of the Nokia company was installed. Installation was made by the installation script of the building environment and the SDK installation script General description of the SDK can be obtained from the link.

At.png In the extended Maemo 4.1 repository, the latest version of Qt4 (libqtcore4, libqtgui4-4.5.3-1maemo1) contains an error which leads to the crash of the applications at the time of the creation/deletion of widgets that can be observed in the OpenSCADA configurator on the Qt library. To circumvent this problem, it is necessary to install and fix from the updating the previous version of Qt4 (libqtcore4, libqtgui4-4.5.2-1maemo2), which does not have this problem and is stable.

In addition to the primary purpose of building and running OpenSCADA on this device the following tasks were also made:

  • Installing the KDE3 (3.5.8) desktop environment as more developed and familiar environment, supplementing the original "Hildon" environment.
  • Correction of the virtual keyboardprogram kvkbd when switching Shift.
  • Build of the krusader file manager program.

2 N900 (Maemo 5)

Nokia N900 contains the ARM processor Cortex-A8 OMAP3430 (600 MHz), touch (resistive) display 3.5" 848×480 and is based on [WikiPedia:Maemo Maemo 5] software platform.

Fig. 2. Mobile phone N900.

To build OpenSCADA for the native environment an official SDK and compile environment of Nokia company was installed. Installation was made by the building environment installation script and the SDK installation script General description of the SDK is available at the link.

3 N950, N9 (MeeGo 1.2 Harmattan)

Nokia N950 and N9 contain the ARM processor Cortex-A8 OMAP3630 (1 GHz), touch (capacitive) display 4" 854×480 and their are based on the MeeGo 1.2 Harmattan software platform.

The phone N950 was received from Nokia within the Qt Ambassador Program program to adapt the OpenSCADA for it. And the phone N9 was purchased for the project OpenSCADA needs after Maxim Lysenko left the project and took the N950 phone with himself.

Fig. 3. Mobile phone N950.
Fig. 4. Mobile phone N9.

Due to the fact that Nokia dropped out its own mobile platforms in 2012 there need some external resources and actions to make the phones usable now and most of them provided on the file server of OpenSCADA.

Then for combined flashing the phones currently that instruction is actual, for Chinese region (003):

# Europe region 2 (009) main image.
# Here you can flash only a firmware with the biggest region number from the phone current number then we write 009!
$ flasher -f -F DFL61_HARMATTAN_40.2012.21-3_PR_LEGACY_009-OEM1-958_ARM.bin
# Communication part reflasing from Chinese region (003)
$ flasher -f -F DFL61_HARMATTAN_40.2012.21-3_PR_LEGACY_003-OEM1-958_ARM.bin --flash-only=cmt
# Multimedia content part, without maps
$ flasher -f -F DFL61_HARMATTAN_40.2012.13-7.NOMAPS_EMMC_NOMAPS.bin --flash-only=mmc
# Restart phone
$ flasher -R

For rooting:

  • Settings -> Applications -> Installations -> Enable "Allow installation from non store sources"
  • Install n9repomirror v0.7xxx
  • Reboot
  • Settings -> Security -> Developer mode -> Turn on

MeeGo packages (app store):

Disable links to Nokia resources and login:

  • Rename-hide: /usr/lib/AccountSetup/bin/oviplugin to .oviplugin
  • In the section "GeneralSettings" of the file /home/user/.config/Nokia/Drive.ini set: "ssoDone=true"
  • In the section "General" of the file /home/user/.config/Nokia/Maps.conf set: "isSsoEnabled=false"

Remote access by SSH which starts by default into the development mode but for connect to it you need password for the "user":

# Gain root with password here "rootme"
$ devel-su
# Change password of the "user"
$ password user

For remote connection to the device you can use WLAN directly or the debug network through USB

  • Set self password for "user" and for it at SSH: $ devel-su; $ passwd user
  • Connect to the ssh server through the sync mode where the device assigned to the address

To build OpenSCADA for the native environment an official SDK and compile environment of Nokia company was installed. Installation was made using the installation script General description of the SDK and installation instructions are available at the link. Then currently the build OpenSCADA for the phones N950 and N9 allowed by the link.

OpenSCADA builds and mostly works now on the phones and more its building doesn't need anything extra dependencies but MeeGo mostly based on Qt4 itself. But anyway there present some missfunctions, problems and awkwardness related to the mobile environment:

Issue Actions State
Does not open the virtual keyboard for any QLineEdit or QTextEdit field.
  • (-) Check for some Qt4 pluggings missing.
    • there the package "meegotouch-qt-style" is provided for the plain stiles (not the QML mode) but it is initially crash-able now.
  • Update the actual MeeGo SDK for the last one of the MeeGo Qt4.
  • Find sources of the package "meegotouch-qt-style" and check them for fix.
Hides some widgets at work in the Widgets mode (not QML).
  • (+) Try some other graphics system variant of Qt.
    • the variant "raster" of the command-line argument "--graphicssystem" solved the problem of hiding some widgets at work.
Spare Toolbar from MeeGo on all pages
  • (-) Try to remove it from the C++ code but there allowed only receipts from QML.
  • (+) The Toolbar hides in the fullscreen mode then we can make the mode as typical for like mobile devices.
    • the command-line argument "--showWin" was added to the module UI.QTStarter to force all GUI windows into the mode "Maximized (1)" or "Full-screen (2)".
User projects are hidden from the users
  • Configure the user project to place into /home/user/MyDocs
  • Improve the projects manager openscada-proj to prevent sym-links into the user folder
QSensors support by the Qt Mobility Sensors module.

(+) Added by the library libqtsensors1 or libqt5sensors5. Reading all allowed mobility sensors was added to the module UI.QTStarter due there defined and managed the main Qt thread. For access all the sensors data to the module there added the user API function "sensors()", which are used into the module DAQ.System for the sensors access as a data source.