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".
+ repairing, updating to the last environment and fixing the OpenSCADA building
+ restoring: the hardware keyboard configuration — adaption the UA layout to the QWERTY keyboard
+ expanding the module DAQ.System by accessing the Linux Power subsystem, than control the discharging through the chip BQ27000
- creating the DAQ-templates for controlling data of charging (BQ24151,TWL4030), discharging (BQ27000) ICs and finishing the battery calibration
- connecting the device sensors to OpenSCADA
- connecting the IR communication
- connect GPS and maps to OpenSCADA
- append audio and video writing in OpenSCADA
- adapt for the scanning-photo functions under OpenSCADA control with reading the barcodes
  • 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.
  • User projects directory: "~/MyDocs/.openscada" (where "~/MyDocs" is root of the built in SD-Card)
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 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 OpenSCADA correctly operate in the native environment of the N800.

1 N800 (Maemo 4.1)

Hardware CPU Entry into JavaLikeCalc, us Operation sin(Pi) [in JavaLikeCalc], us Operation pow(Pi,2) [in JavaLikeCalc], us Model AGLKS [Vision, main mnemo], %(core) Extra tests and notes
Nokia N800 ARMv6, TI OMAP2420, 90nm, 400 MHz, 397 BogoMIPS 2.32 2.93 [6.29] 2.11 [6.98] -

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

Fig. 1. Internet Tablet (PDA) N800.

At the stage of exploring the possibility of building 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 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 OpenSCADA start in the N800 native environment 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" 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 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 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.

1.1 Links

2 N900 (Maemo 5)

Hardware CPU Entry into JavaLikeCalc, us Operation sin(Pi) [in JavaLikeCalc], us Operation pow(Pi,2) [in JavaLikeCalc], us Model AGLKS [Vision, main mnemo], %(core) Extra tests and notes
Nokia N900 ARM Cortex-A8, TI OMAP3430, 65nm, 600 MHz, 598.9 BogoMIPS 1.07
1.59 [1.79]
0.96 [1.06]
0.89 [1.32]
0.53 [0.76]
>100 600 MHz
1000 MHz
Updated: 15.07.2023
BL-5J Grand: 4.1mA (1.24Ah/300h), 7.2mA (+SIM, 1.238Ah/171h), 11mA (+WLAN, 1.226Ah/116h)

Nokia N900 contains the ARMv7 processor Cortex-A8 OMAP3430 (600 MHz), 256 MB RAM, 32 GB Flash, touch (resistive) display 3.5" 848×480 and it is based on Maemo 5 software platform. Though the device is released in 2009, that is the last Nokia device from the true Open Source collaboration, so even after Nokia drops the N9 model support, the Open Source Community supports N900 still and therefore it is most interesting one for OpenSCADA from any Nokia devices.

Fig. 2. Mobile phone N900.

In year 2017, N900 of the OpenSCADA project had been broken at damaging the internal display cable with the front camera and which had been replaced in year 2023. Also in year 2022 OpenSCADA had been stopped in building for N900 at crashes of the SDK compiler GCC 4.2.1 during compiling some big files, what had been fixed in year 2023 by moving to the GCC 4.7.2 from Linaro.

The updating and actualizing procedure with the OpenSCADA installation:

  • setup the initial Nokia firmware: flasher-3.5 -F RX-51_2009SE_20.2010.36-2.002_PR_COMBINED_002_ARM.bin -f
  • setup the date in about year 2012 due to expiring Nokia keys of signing the original packages;
  • disable all standard application catalogues in "App. manager";
  • connect to Internet and open in the built-in Web-browser for the link of complete OpenSCADA installation together all actual package repositories, after that you may update all N900 environment together the OpenSCADA installation;
  • install for additional applications on your taste like to:
    • for remote connection: rootsh, openssh (client and server);
    • install the Linux kernel from the Community SSU-Thumb: community-ssu-enabler;
    • for Ukrainian localisation: n900-l10n-uk, ukeyboard.
  • setup the actual date.

Actual (on 2023 year) and useful package repositories:

Name URL Distributive Components For
Initial Nokia repositories
Nokia Applications ./ RUN
Nokia System Software Updates ./ RUN

Must be disabled for complete updating from "Community SSU (thumb)" ./ RUN
Fremantle SDK fremantle/sdk free non-free SDK
Fremantle tools fremantle/tools free non-free SDK
Nokia binaries fremantle/4bc37c7c77ebe90177c050b805a8dc79 nokia-binaries SDK
Maemo repositories
Maemo extras

Contains: libfftw3 fremantle free non-free RUN, SDK
Maemo extras-testing

Contains: libgd2-xpm, libpcre3, libportaudio2, libpq5, libxpm4 fremantle free non-free RUN, SDK
Maemo extras-development fremantle free non-free RUN, SDK
Community SSU repositories
Community SSU fremantle free non-free RUN, SDK
Community SSU (testing) fremantle free non-free RUN, SDK
Community SSU (thumb) fremantle free non-free RUN, SDK

For the automatic OpenSCADA building there used the ready scratchbox environment with SDK, which updated to CSSU-Thumb Toolchain with GCC 4.7.2 from Linaro. So, thanks to the updating, OpenSCADA is building again for N900 without the biggest source files splitting. This GCC also adapted for building with Thumb (-mthumb) and many original packages was rebuilt with that option, what allows to decrease significantly the packages code size, so decrease significantly the operative memory consumption, that is the OpenSCADA main package size was decreased on 22% and the Maemo common environment on about 30%.

2.1 Battery management

The battery management hardware built on two chips BQ24151 for control the charging and BQ27000 for control discharging and the battery capacity.

BQ24151 is simple enough, but it allows you to control the charging currents, voltages and OTG through the I2C bus. So, some of those parameters can be not optimal and we need to change them like to (BME resets that at detection the charging!):

# Setting the charging current to 550 mA, in my it was 950 mA (0xC8)
# !> big charging current is bad for such old hardware and it is charging to lesser capacity
i2cset -y 2 0x6b 0x04 0x08
# Setting the charging voltage to 4.2 V (0x8c), in my it was 4.15 V (0x84), 0xA0 for 4.3 V
# !> for LiPo this value can be bigger and up to disabling the charging by the hardware controller
i2cset -y 2 0x6b 0x02 0x8c

BQ27000 is seems initially designed and configured in mode far from the power effectivity, so now it is not calibrated automatically in capacity of changed batteries, due to it needs of high enough power consumption in the final discharging stage. About the manual calibration procedure you can read on the link. And even you completely and in several iterations calibrate the battery, BME will show wrong charging level, so the BQ27000 data is not used by them and there is needed of rebuilding BME v1.0 — replacement, that wants to replace the Linaro kernel.

For controlling the BQ27000 data in OpenSCADA right now, you can load the kernel module bq27x00_battery modprobe bq27x00_battery.

2.2 Links

3 N950, N9 (MeeGo 1.2 Harmattan)

Hardware CPU Entry into JavaLikeCalc, us Operation sin(Pi) [in JavaLikeCalc], us Operation pow(Pi,2) [in JavaLikeCalc], us Model AGLKS [Vision, main mnemo], %(core) Extra tests and notes
Nokia N950, N9 ARM Cortex-A8, TI OMAP3630, 45nm, 1 GHz 0.52 0.91 [1.68] 0.6 [0.91] >100

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.

At.png The phone N950 was received from Nokia within the Qt Ambassador Program program to adapt 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"
# 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.
  • (-) QApplication::setAutoSipEnabled(true) and QLineEdit::setAttribute(Qt::WA_InputMethodEnabled).
    • them are not worked.
  • (-) 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. But the libqtsensors1 implementation is crashable at the program exit!


4 Common links