Mosquitto is a lightweight MQTT broker that is suitable for embedded use. It also provides built-in support to persist and store messages which can be used to implement reliable communication even when the network is not stable. This post describes how to set up the persistent storage, what are the main parameters to tune it and how to troubleshoot the setup. Continue reading “How to set up persistent storage for Mosquitto MQTT broker”
Building a Bluetooth DAC with Raspberry Pi Zero W
My car comes with a built-in Bluetooth hands-free but unfortunately it does not support audio streaming. Luckily there is an AUX input available which uses a regular 3,5 mm jack. Perfect opportunity for a DIY project. I built the Bluetooth DAC using Raspberry Pi Zero W and a DAC hat. This post depicts the details of this project. Continue reading “Building a Bluetooth DAC with Raspberry Pi Zero W”
How to sign and verify using OpenSSL
Being able to verify that a piece of data originates from a trusted source (authenticity) and that it has not been altered in transit (integrity) is a common requirement in many use cases. It is needed for instance when distributing software packages and installers and when delivering firmware to an embedded device. Digital signatures allow the recipient to verify both authenticity and integrity of the received document. This blog post describes how to use digital signatures with OpenSSL in practice. First part describes what is a digital signature and then the second part shows how to use OpenSSL sign and verify functions to work with signatures.
Continue reading “How to sign and verify using OpenSSL”
Most if not all programmers nowadays are familiar with the concept of clean code. In short, the clean code principle means a development style that focuses on code that is easy to write, understand and maintain. Yet, it seems that often these same principles are not applied to the overall design. Continue reading “Don’t over-engineer”
Embedded development with Yocto and Rust
Customized Linux distribution and a safe systems programming language sounds like a very interesting combination for embedded development. That is what makes Yocto and Rust such a good match. So, I wanted to see how Rust projects could be cross-compiled with Yocto-generated toolchain and root filesystem. The steps are described in this post. Continue reading “Embedded development with Yocto and Rust”
Why junior devs should review seniors’ commits
Code reviews are a great practise to find mistakes, potential bugs and other issues overlooked by the code author. Reviewing improves the overall code quality, but it is also a great way to share knowledge and information. Junior developers’ commits should certainly be reviewed by more senior developers, but juniors should also be the reviewers. Here’s why. Continue reading “Why junior devs should review seniors’ commits”
Common misconception with C++ move semantics
Move semantics have to be one of the most prominent new features in C++11. It is also something that can be a source of misunderstandings if the underlying mechanics are not fully understood. The fact is that std::move does not actually move anything. Yet, its name would suggest otherwise. So, let’s clear up this misconception.
Continue reading “Common misconception with C++ move semantics”
Implementing REST client with Rust: an introduction to traits and generics
After reading the Rust book and writing about my initial experiences, I wanted a small practical project to familiarize myself with the language. So, I decided to write a REST client library. This post shows, step-by-step, how my initial design was refactored to be more robust and easy-to-use. Traits and generics are key concepts in these refactorings. The intent is not to cover the internals of the library in detail and also the basic syntax of traits and generics is not covered here. The Rust Book chapter 10 is an excellent resource for the latter.