Plasma Active / Mer vs. Archos 101 G9 Turbo vs. Touchscreen

With the current Plasma Active images available from basyskom I had the issue that the touchscreen of my Archos 101 G9 Turbo was not working. As it turned out the reason was simply that the required kernel module was not loaded. Thanks a lot to mdfe_ for the help to solve this issue. 🙂

In my case i need the kernel module “tr16c0-i2c”. In order to autoload the module I simply added the file “/etc/modules-load.d/tr16c0-i2c.conf”:

[root@localhost ~]# cat /etc/modules-load.d/tr16c0-i2c.conf
tr16c0-i2c
Posted in Misc., Snippets | Tagged , , , | Leave a comment

Enable WLAN in Plasma Active on Start-up

Alright, the setting is this: I got an Archos 101 G9 Turbo with the goal to experiment/develop/play around with Plasma Active/Mer. I use the images available from basyskom. Unfortunately, with these images the touch screen on my G9 did not work.

So, I was confronted with the problem of debugging a non-working touch screen somehow. The easiest solution for me would have been to access the tablet via SSH somehow. So I decided to look for a way to enable WLAN in order to get SSH access.

Fortunately, it is possible to access the root filesystem on the data partition; simply export the data partition and mount it on your local desktop as described in the basyskom guide linked above.

Now, I was left with the issue of enabling and configuring WLAN automatically at start-up. At this point lot of thanks go to mdfe_ from #active @freenode who pointed me into the correct direction. 🙂

The approach to enable WLAN at start-up is as follows: firstly, an “autostart” for the configuration script needs to be created. Secondly, the configuration script itself needs to be created.

As pointed out by mdfe_ I used a file in /usr/share/autostart to automatically trigger the WLAN configuration at start-up. Here is what my file looks like:

[root@localhost ~]# cat /usr/share/autostart/connect-wolf359.desktop
[Desktop Entry]
X-SuSE-translate=true
Exec=/usr/local/bin/connect_wolf359
Name=Wolf359

I used this *.desktop file to automatically launch a script that configures WLAN. The script simply configures WLAN as advised on the basyskom site linked above and looks as follows:

[root@localhost ~]# cat /usr/local/bin/connect_wolf359
#!/bin/sh

cd /usr/lib/connman/test
./test-connman enable wifi
./connect-service "Wolf 359" "MySuperSecretPSK"

Note that my SSID is “Wolf 359” and I am using WPA2 with PSK.

So, that’s it. SSH is enabled by default and the default root password is “mer”.

 

 

Posted in Misc., Snippets | Tagged , , , | Leave a comment

Full Source Code for QML vs. C++ Example

Upon request I just uploaded the full source code of my previous example on how to exchange data and objects between QML and C++. You can find the full source including a short readme that explains how to build an run the example on github. I released this example under the terms of the Creative Commons Attribution-ShareAlike 3.0 Unported License.

 
Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.

Posted in Announcements, Qt/QML, Snippets | Tagged , , , | Leave a comment

cljAcmeUtils: Assorted Helper Functions for Clojure

cljAcmeUtils is a collection of assorted helper functions that I wrote over time in order to reduce the amount of duplicate code in my Clojure projects and to help me implement code quicker. Now, I finally had the time to publicly release this code. I hope this is useful for some.

cljAcmeUtils is released under the terms of the Eclipse Public License (EPL), the same license under which Clojure is released. cljAcmeUtils including its source code can be downloaded from github. For building, running tests, and packaging Leiningen is used.

For now, I just post the general announcement here. Later, I will also explain some of the functionality included in cljAcmeUtils a little bit more in detail. For now you can have a look at the docstrings or unit tests.

Posted in Announcements, clj-assorted-utils, Libs. | Tagged | Leave a comment

cljNetPcap: Packet Capturing with Clojure

Update: Please note that cljNetPcap had been moved to clj-net-pcap.

cljNetPcap allows to easily capture packets in Clojure. cljNetPcap builds on top of the jNetPcap Java library and provides a wrapper/facade/whatever for easily using the functionality as provided by jNetPcap from within Clojure code. jNetPcap itself is an, in my opinion, very good packet capturing library for Java that enables easy access to the packet capturing functionality as provided by libpcap.

I wrote cljNetPcap in order to enable packet capturing in Clojure. Besides providing a wrapper for using jNetPcap in Clojure cljNetPcap features some more convenience functionality to further ease the usage of jNetPcap. In this post I just make the general announcement for cljNetPcap. If my time allows it I will explain the cljNetPcap functionality and architecture in more detail as well.

cljNetPcap is released under the terms of the GNU Lesser General Public License (LGPL). The cljNetPcap source code can be downloaded from github. For building, running tests, and packaging cljNetPcap Leiningen is used.

Posted in Announcements, clj-net-pcap, Libs. | Tagged , , , , | 1 Comment

Nemo/Mer vs. Battery Status vs. N9/N950

While Nemo/Mer runs reasonably well on N9/N950 there is a little annoying issue: the battery status is not correctly displayed. Reason for this is that there is currently no driver for querying the required information from the battery gauge chip yet.

With the command “upower -d” information about the battery status as “seen” by the system can be queried. By default, in the current stage, this will show output that is not much helpful as we are missing the required drivers.

The battery gauge chip can be accessed via the i2c bus number 2 at address 0x55. At least this seems to be the right chip.

For gathering data from the i2c bus and for interacting with the chip the programs from the “i2c-tools” package can be used. Via, e.g., “i2cdump -y 2 0x55 b” the current “state” of this chip can be dumped to console.

Furthermore, “commands” can be sent to the chip by writing words to the first address of the chip. “Return” values can then be read from the same address. E.g., writing 0x0001 returns 0x0521:

[root@localhost ~]# i2cset -y 2 0x55 0x00 0x0001 w
[root@localhost ~]# i2cget -y 2 0x55 0x00 w
0x0521

From experiences with the N900, the battery gauge chip could be a chip manufactured by Texas Instruments. Assuming this, the above command could indicate the device type being a bq27521. This would at least match what is defined in the specification for a similar chip, the bq27520. Looking at the file system seems to verify that we are dealing, in fact, with a bq27521:

[root@localhost ~]# find /usr/ -name "bq*"
/usr/lib/hwi/ic/bq24153.so
/usr/lib/hwi/ic/bq24156.so
/usr/lib/hwi/ic/bq27521.so

However, the data that can be queried with i2cdump looks highly differing from what is defined in this specification and so far I could not find a specification of an bq27521 yet.

So the first try is to identify the meanings of the different fields of the chip. In order to do so I queried data over a longer period using the following script:

#!/bin/sh

while : ;
do
date >> i2c_data.out
i2cdump -y 2 0x55 b | head -n 5 >> i2c_data.out
echo "" >> i2c_data.out
sleep 30s ;
done

The raw results, notes, and some observations can be found in form of text files at github. So far I came up with the following guesses:

Note that the data seems to be organized in words of 2 bytes. The byte order or endianess seems to be little endian; i.e., the least significant byte is stored at the lower address. The following is an excerpt of the observations that can be found on github.

The following shows a summary of the findings.
"C" indicates the fields used for command I/O including the "display" of "returned" values.
"k" indicates fields that had so far observed containing constant values.
"v" indicates fields with variable values.
"B" is used to indicate the fields for which so far only two different "states" could be observed.

0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00: CC CC kk kk kk kk kk kk kk kk vv vv vv vv vv vv
10: vv vv vv vv vv vv kk kk kk kk kk kk kk kk kk kk
20: kk kk kk kk kk kk BB BB BB kk kk kk kk kk kk kk
30: kk kk kk kk kk kk kk kk kk kk kk kk XX XX XX XX

Wild Guesses:
0x0a+0x0b -> Voltage [mV]?
0x0c+0x0d -> Available Energy [mWh], Remaining Capacity [mAh]?
(This seems to have a much higher resolution than 0x12+0x13.)
0x0e+0x0f -> Time To Full [Minutes]?
0x10+0x11 -> Similar to 0x0e+0x0f?
They show very similar data.
0x12+0x13 -> State of Charge [%]?
0x14+0x15 -> AtRate [mA], Average Current [mA]?
Can be used to calculate a difference between subsequent measurements.
Else, this would be pretty useless.

Finally, the battery gauge chip in the N9 seems to be the same as in the N950. At least the output of i2cdump looks similar and using the 0x0001 command returns the same value.

Please see also the following thread on the MeeGo forum that contains very useful information: http://forum.meego.com/showthread.php?t=4610

Posted in Misc. | Tagged , , , | 2 Comments

Q To-Do on github

Q To-Do is a simplistic todo list organizer. Q To-Do is available for Harmattan/MeeGo and Nemo/Mer. For more information about Q To-Do, its features, usage, installation, screenshots, etc. please see the new Q To-Do homepage at github.

Up to now Q To-Do, including the source code, was hosted within the sourceforge project of To-Do O. However, even while Q To-Do and To-Do O share the same file format, I think, this was somewhat confusing.

I created a new home for Q To-Do on github and moved all the Q To-Do code there. From now on the development of Q To-Do will only happen in the github repository.

Furthermore, I created a new home page for Q To-Do at github as well. There you can find more information about Q To-Do.

Posted in Announcements, My Applications, Q To-Do | Tagged , , , , , , , | 2 Comments

Packaging and Publishing MeeGo/Harmattan Applications for Mer/Nemo via OBS

MeeGo/Harmattan uses Debian-based packaging whereas Mer/Nemo uses RPM-based packaging. Additionally, there are also some differences with respect to using the OBS for publishing packages. This might lead to some confusion when one tries to package and publish packages for Mer/Nemo.

In this post I will explain the steps I did for packaging and publishing my MeeGo/Harmattan applications to Mer/Nemo the first time. I assume you are already using the MeeGo OBS for publishing your packages. Furthermore, the “Spectacle” utilities are required on your local computer.

Continue reading

Posted in Misc., Snippets | Tagged , , , , | Leave a comment

Identifying Dependencies when Developing for Mer/Nemo

I am currently working on packaging and publishing some of my applications for Mer/Nemo. Within that process I needed to lookup missing dependencies quite often. In this post I will write about some ways I found useful for looking up dependencies within Mer/Nemo.

Note that when defining dependencies for Mer/Nemo the naming scheme of some dependencies has changed as compared to MeeGo/Harmattan. If you have Spectacle installed you can find a list with the “changed” dependency names in the file “/usr/share/spectacle/pkgconfig-provides.csv”. There the new, preferred name for dependencies is the one surrounded in brackets in the final “pkgconfig(NewDependencyName)” entry. Spectacle will also notify you in case you are using a deprecated name.

When you are having trouble looking up required dependencies the “zypper wp” (“wp” for “what-provides”) command can be quite handy as well. E.g., assume your newly packaged app refuses to start because it is missing, say the QML module “QtMobility.systeminfo”. You could then identify the required file on a MeeGo/Harmattan installation or in MeeGo/Harmattan scratchbox like this:

[sbox-HARMATTAN_ARMEL: ~] > find /usr/lib/qt4 -iname "*systeminfo*"
/usr/lib/qt4/imports/QtMobility/systeminfo
/usr/lib/qt4/imports/QtMobility/systeminfo/libdeclarative_systeminfo.so

Knowing that you are looking for “libdeclarative_systeminfo.so” you can then use “zypper wp” to get the package name of the dependency (from within a running Mer/Nemo installation):

[root@localhost ~]# zypper wp libdeclarative_systeminfo.so
Loading repository data...
Reading installed packages...
S | Name                      | Type    | Version    | Arch    | Repository
--+---------------------------+---------+------------+---------+-----------
i | libdeclarative-systeminfo | package | 1.2.0-1.46 | armv7hl | mer-core

In the next post I will write about the general process I used for packaging and publishing my applications for Mer/Nemo. I post this here separately in order to keep the following post a little bit more focused on the actual packaging and publishing instead of cluttering it with too much information.

Posted in Misc., Snippets | Tagged , , | 1 Comment

QZeeControl in Ovi Store

QZeeControl for MeeGo/Harmattan can now also be downloaded from the Ovi store: http://store.ovi.com/content/269986

Please make sure to read and follow the usage instructions in order to have the best user experience.

Posted in Announcements, QZeeControl | Tagged , , , , | Leave a comment