Moving on

In the autumn of 2017, me and my family moved down to Berlin for a month to start the infotainment software part of MBition. We were a handful of people at Mindspace in Mitte. I’ve never done so many interviews in my life – and I’ve never had the opportunity to get to know so many great people.

Fast forward to today, and we have grown to over 400 people in the project and are about to deliver an amazing product. The architecture team has grown from a one man team consisting of me, into one of the best groups of engineers I’ve ever worked with.

We wanted to change the world. We could not change everything, but I feel that we are bringing improvements to the project, as well as building a better foundation for future work at Mercedes Benz. I very much want to buy the first car with the MBient platform in it, as I know it will be an amazing product.

This has been a fantastic journey and one of the most challenging, but also rewarding, parts in my career. However, all things must come to an end. I’m sad to leave, but I’m also happy to say that I’m staying with the project as a part of the MBition Advisory Council. I’m happy not to go to Berlin twice a month, but I’m already missing the city, so I’m glad that I know that I will come back.

There are so many I’d like to thank and mention so I cannot begin to try to list you all – I’ll just forget someone. You know who you are! Keep up the great work and let’s meet the next time I’m in town!

Sharing dimensions

Continuing my adventures in FreeCAD, I now had to design a top to my Raspberry Pi enclosure. The FreeCAD people were friendly and told me to checkout spreadsheets.

However, since I already started down another path, I decided to name my constraints. Something I picked up from a random YouTube tutorial I cannot seem to find again.

Having done so, I can then refer to the name in a formula and thus, reuse the old value.

Now, let’s see how the lid will fit. :-)

FreeCAD-ing

I just got myself a 3D printer. It is my second one – I built a reprap back in 2013 – but this one is slightly more convenient to use. I went for the Creality CR6-SE. It works good enough for me out of the box, even though 3D printing is a topic where you can spend infinite time tweaking things.

I used to use OpenSCAD to create my models, as it maps well to my way of thinking (i.e. coding). However, I’ve decided to take some time to learn some new skills and this time around I went for FreeCAD.

FreeCAD is a free, as in freedom, parametric CAD program with a vibrant community. I’m new to CAD – parametric or not – so this is a learning experience for me.

I decided to create a case for my Raspberry Pi and PiTFT based home automation control panel shown in the video below.

To make this happen I first drew the important parts of the Raspberry Pi and the PiTFT hat, to be able to check that the case actually fits the contents. Then I dove into the creation of an enclosure.

The process of sketching, padding, rinse, and repeat is easy and somewhat tedious. I bet there are lots of ways to optimize this. E.g. by parametrize some dimensions to avoid having to “hardcode” them into each sketch. I guess smarter people can share some reference points between sketches too, e.g. to align the holes in the Raspberry Pi to the pegs and peg feet. I’ll learn this the next time around.

Having designed a bottom half, I decided to test fit it, so time to slice it up and then print it. Yes, I use the slicer that came with the printer, as I don’t want to tinker with the printer, but rather with the things I print.

Slicing the bottom of the case

Below, you can see the end result from the first test fitting. Hopefully the picture below shows something that fits as I bravely wrote this while printing. If not, then I really learned something, because I made a mistake.

Update! Turns out I made a 1mm mistake towards the bottom. The two HDMI connectors and the audio port project out more than I expected. Apart from that it sort of works. Now I’m printing v2 with 0.5mm thicker walls and the necessary adjustments to fit the ports.

Book Review: Cross-Platform Development with Qt 6 and Modern C++

I recently received a review copy of the Cross-Platform Development with Qt 6 and Modern C++ by Nibedit Dey available from Packt. I find it interesting to read books on Qt in the midst of a major version shift, as many of the underpinnings of Qt are revisited and updated by the development teams.

In his book, Nibedit balances between the newer technologies used, e.g. CMake, function reference based signals and slots, etc while referring back to Qt 5 (and even Qt 4) practices such as QMake, the SIGNAL and SLOT macros, and more. This gives a good context to the reader, which is good for the reader, as older practices still are used in older Qt-based codebases.

The book is divided into blocks with increasing depth and complexity. This makes it a good read for the beginner, as well as the more experienced used of Qt. Either you start from the beginning and get introduced to both widgets and QML, or you can dive straight into the more advanced topics such as the model-view concepts.

What I particularly like about the book is the focus on the cross-platform capabilities of Qt. This is how Qt was started, and something that is often lost these days. Qt is more than a UI toolkit and the real strength is the ability to use a single code base to build native applications for the major desktop (and some not so major) as well as the major mobile platforms. This is a reoccuring theme throughout the book where it starts by installing the Qt development environment on all major platforms, discusses how to setup Qt for mobile development, as well as for how to deploy Qt applications in all these scenarios.

There are other highlights too such as the chapter on testing, discussions on profiling and optimizations, and other topics not commonly found in this type of book.

What could be said to be missing is any content on embedded device development, 3D tooling and classes, the design focused tooling, and more. But Qt is such a broad topic these days that it would be impossible to cover it all in a single book.

All in all, this is a recommended read!

Time for PineTime

I just recieved my PineTime and set it up with GadgetBridge on my Android device. So far it has been a pleasant experience.

The unboxing experience was good. Inside a very anonymous brown cardboard box was a white box with the device.

The device itself was nicely presented. Under the clock is a tiny users manual and a charging dock.

My device was shipped with version 1.2 of the InfiniTime firmware, so I’m one release behind. I ordered the sealed device (because the price is amazing), but I already am itching to get coding.

Some highlights:

  • Just works!
  • Snappy UX
  • Some cute phone apps included

Left to do:

  • Get the heart rate sensor reading over to GadgetBridge
  • Is there a way to clear the notifications on the clock?
  • More watch faces and apps!

All in all, this was more then I expected and I’m really looking forward to playing with it (and hopefully not brick it…)

XmlListModels in Qt 6

I had a look at a small XmlListModel based project of mine and started migrating the code from Qt 5.12 to Qt 6.2. The code ports pretty cleanly, but there are some caveats to be aware of.

As I’m lazy, I started by changing the imports from 2.12 to 6.2 and tried running the code. The first changes I had to make was to change the import from QtQuick.XmlListModel to QtQml.XmlListModel. I also learned that the import statement no longer requires a specific version to be specified – I’m not sure if I’m a fan of that quite yet.

The second change was that XmlRole has been renamed to XmlListModelRole, and that it no longer has a query property, but an elementName and attributeName property. I guess that saves Qt from having to implement support for XPath queries, and in my use-case (and most others), this should still be enough.

The last change I had to made was to silence a warning. It is no longer encouraged to connect objects directly to signals in QML. In my case, it was animations triggered by the onAdd and onRemove signals in a model. The trick is to declare the animation (in my case, a pair of SequentialAnimation instances, separately. Provide an id for them, and then call start on that id in the signal handler.

All in all, a quite pleasant migration experience with only superficial API changes to handle. All logic could be used as is. Nice!

Upgrading NextCloudPi

So I finally got around to upgrading my NextCloudPi to version 20 with the hub and all. I really like it so far.

It also seems that I bumped into a know issue. All of a sudden I could not upload files over 8kB. It turns out that for some reasons the sys_temp_dir in /etc/php/7.3/php.ini had shifted from my USB media (a portable HDD) to the default location (/var/www/nextcloud/tmp) during the upgrade. After a quick move back to /media/USBDrive/data/tmp, everything is back to normal.

I found the solution over at the nextcloud forums.

foss-north 2021 – Speakers and Call for Papers

TL;DR; Call for Papers closes on Sunday. Join foss-north 2021 and be a part of a great speaker line-up!

When planning foss-north, we always pre-announce some speakers early on. This helps set the tone of the conference, show sponsors that we have contents, and – interestingly – also increase the number of submissions to our call for papers.

This year is a bit special due to COVID-19 and the conference will be our third virtual installment, but we are still hoping to bring together great people and contents.

This year we have four pre-announced speakers who I’m very excited about. We have everything from stories from how the Internet is kept safe, how to use open source methods in your organization, how industry verticals collaborate around open source, all the way to how to write a Linux kernel driver.

So, in no particular order, I give you…

Anne-Marie Eklund Löwinder who will talk about signing the Internet root zone.

This will be the story from when Anne-Marie worked as Crypto Officer and attended the cermonies around DNSSEC. How do we protect the secrets that are used to protect the Internet itself.

Isabel Drost-Fromm who will talk about how to use the open source way beyond open source. By applying inner source principles, the magic that makes open source work can be used inside an organization too.

These are aspects such as sense of ownership, independence, and so on. If developers are willing to work for fun on open source, how do we create the same joy at work.

Leslie Hawthorn who will talk about strategic open source engagements for vertical markets. This is about how to work openly within an industry vertical and not a single component or project.

This is interesting from a foss-north perspective, as this is a conference about everything and nothing. I guess that makes it a horizontal event. How can vertical organizations meet to identify shared cross-cutting aspects.

Marta Rybczynska will give a talk appropriately titled Into the Jungle, about writing Linux kernel drivers.

In this talk we will look at writing a Linux network driver from scratch, diving into the deep end and learning how to swim.

The Call for Paper is still open until Sunday, so if you have a topic that you want to discuss, make sure to get your contribution in!

One more week of CfP

Usually foss-north takes place ~April. This year, foss-north 2021 will be virtual. We shifted the date to the end of May to try to make it possible to at least go hybrid and have some sort of conference experience, but in light of the current COVID-19 situation and the pace of the roll-out of the vaccination programmes, we decided for a virtual event.

One of the benefits of going virtual is that it is a lot easier to attend – both as a speaker and as audience. For those of you who want to speak, you have one week left to submit a talk proposal to the Call for Papers.

To register a talk requires you to log in using oauth via either github or google. We are working on adding more login alternatives, but as with many volunteer run efforts, time is the current limiting factor. If you feel that this is a blocker, please reach out to me over email and we can sort it out.