Using Beaglebone Black PRU with prussdrv on 4.1.x kernels

It took me a while to figure it out, so here some quick notes if you want to upgrade from Debian wheezy with 3.8.x kernels to the Debian jessie image for the Beaglebone Black, which comes with a 4.1-series kernel:

  1. Make sure to use the prussdrv enabled kernel instead of the default TI kernel, which uses PRU remoteproc infrastructure:
    aptitude install linux-headers-4.1.18-bone-rt-r19
    (or whatever’s newest, otherwise install below might complain about missing headers)
    cd /opt/scripts/tools
    git pull
    ./ --lts-4_1 --bone-rt-channel

  2. It’s also solid advice to follow the instructions from Put your .dts file into src/arm/ and ./ will do things automagically

  3. The important part: After booting your newly installed kernel, and even having recompiled your 3.8 dts file with the updated dtc tool from step 2, you might encounter this friendly message in dmesg after trying to load it:
    pruss_uio 4a300000.pruss: No children
    And trying to go ahead anyway, any call to prussdrv_open() will return -1. Take inspiration from: and simply add the pins from your pinmux section again to the pruss fragment (whereas before you could get away with just having them in the pinmux fragment). It should work now!
Posted in development, tinkering | Leave a comment

Mac Permission Problems

If you’re trying to access a Windows Server 2008 R2 (it’s probably the same with older/newer versions) file share with your Mac and you’re seeing this error:

The folder Documents can’t be open because you don’t have permission to see its contents.

then check whether this problem occurs only if you’re trying to use column view or Cover Flow. (You might have to reconnect a few times to learn how to trigger it reliably.) If so, you might be missing the “Execute” permission – apparently “Read” is not sufficient.

Posted in tinkering | Tagged , , | Leave a comment

Stuck Evolution Calendars

If you have some calendars in Evolution which won’t disappear when you try to delete them, you can use gconf-editor (or gconftool-2 from the command line) to delete those calendars from the configuration. The information about your calendars is being stored in the key /apps/evolution/calendar/sources. Probably best to do it with Evolution closed.

Posted in tinkering | Tagged , , | Leave a comment

Synergy on Gnome/Fedora

Quick note: If you use Synergy to control multiple machines with the same keyboard/mouse combo and your keyboard layout doesn’t work properly on the client, try matching the list of available layouts on both machines. In my case I had USA Alternative International and German on the server, and on the client would get only US input. When I added USA Alternative International to the list (German was the default), it started working like a charm. (All of this on Gnome and Fedora 14, but I suspect it should work on Ubuntu/Debian/… just as well)

Posted in tinkering | Tagged , , | Leave a comment

Synology USB Station 2

For several reasons – ranging from severe lack of space to urgent need of proper backup procedures – I finally bought one of these nice 2TB external hard drive monsters. In order to make it thoroughly geeky, I also installed a nice and shiny NAS in my home network. Of course it had to be hackable, so the choice was obvious: Get the cheapest thing I could lay my hands on! 😉 Ok, I kid, but it’s not too far from the truth. Luckily, both requirements combined very well, and now I’m the proud owner of a Synology USB Station 2. Never heard of them before, but so far I’m quite content – enabling remote access (Telnet or SSH) is easy as pie, and although the web interface has been slimmed down (presumably because they don’t want to discourage sales of the more capable sister models they sell), it is pretty easy to customize the system.

To supply the system with some of the omitted binaries I simply downloaded the Firmware of the Synology DS-211j (which uses the same CPU arch) and put them in the right places (most of the stuff is in /usr/syno/). Start scripts (e.g. to restart crond, which accepts a modified crontab only then) are in /usr/syno/etc/rc.d/. It’s pretty hackish right now, yes, but I want to see whether it works reliably long-term before I invest too much time into doing everything properly (see below).

Sadly, installing Optware (as thoroughly documented for the more expensive models) doesn’t seem to be as easy for the USB Station 2 right now. Maybe I can get to that later and help those that may be already working on it.. I haven’t yet encountered a reason why it wouldn’t work.

I will follow up with a post in the future on how the solution works out in the long term 😉

Posted in tinkering | Tagged , , | Leave a comment

Improve WordPress Twitter Tools hashtag detection

I’m currently using Twitter Tools (a WordPress plugin) for the sidebar on this blog. I noticed that it doesn’t detect all hashtags correctly and subsequently every second hashtag wouldn’t be converted to a correct link to Twitter. Fortunately Stockoverflow saved the day again with some nice suggestions about the best RegEx for hashtags. So here is my quick’n’dirty fix (for Version 2.4 of Twitter Tools):

$tweet = preg_replace_callback(
  , create_function(

The highlighted line contains the new RegEx which should detect hashtags almost exactly as on itself. I suspect the same problem might exist for matching usernames, but so far I hadn’t problems with it and you know the old wisdom, don’t fix what ain’t broke 😉

Posted in development | Tagged , , | Leave a comment

List of installed Android Apps with PhoneGap

PhoneGap is a project that aims to package WebApps (think HTML5, Javascript, JQuery, …) into native Apps for all the major mobile platforms. In contrast to just using the App in the web browser on your device it allows you to access native functionality (e.g., accelerometer, contacts, geo location, …) via Javascript from within the WebApp. You can even extend this with your own plugins – Boris Smus has an excellent introduction to PhoneGap Plugin Development over at his blog.

Since I needed to get a list of installed Apps on an Android device for a little project I’m currently working on, I have extended his example a bit. In case anyone also needs it – here’s the required code, Java part first:

else if (action.equals("getAppList")) {
  Intent i = new Intent(Intent.ACTION_MAIN, null);
  List appList = this.ctx.getPackageManager().queryIntentActivities(i, 0);
  JSONArray apps = new JSONArray();
  JSONObject info = new JSONObject();
  for (ResolveInfo appInfo : this.ctx.getPackageManager().queryIntentActivities(i, 0)) {

  return new PluginResult(PluginResult.Status.OK, apps.toString().replace("'", "\\'"));

You will have to put all that as the last else if case into the execute()-method of your Plugin-extending class (assuming some programming knowledge here ;)). The last line is a little black magic voodoo – I had problems with some Apps’ name containing a ‘, which threw the JSON Parser into hissy fits, but it’s not quite the most elegant solution. Proceed with caution.

You will also need this Javascript somewhere in your Plugin initialisation file:

AppList.prototype.getAppList =
function(params, success, fail) {
  return PhoneGap.exec(function(args) {
  }, function(args) {
  }, 'AppList', 'getAppList', [params]);

This code snippet assumes your Plugin is namend AppList, so change that into whatever your actual name is.

Well, if I haven’t forgotten to add anything here and you integrated those code snippets successfully to your project, you should be able to call the method as follows:

function getAppList() {
  return window.plugins.applist.getAppList(
    function(data) { // success
      return jQuery.parseJSON(data);
    }, function() { // error
      return false;

Again, be aware that this example uses the plugin name of AppList, don’t forget to change that. Hopefully, you now have your list of Applications! Of course, this should be extended for other platforms as well to make it truly ‘PhoneGap-y’, but at least we have Android covered now 😉

Posted in development | Tagged , , , , | 3 Comments

Once again, it’s time.. set up a simple blog where I can dump interesting stuff so I will find it later on. Let the fun begin!

Posted in meta | Leave a comment