Hi, I’m Albert
This is where I post about projects and leanings from the past and present in the hope that someone else (my future self included) will find them useful. You can contact me on social media, or email at “mail” on this domain.
-
How to close an unresponsive SSH session
If you work on embedded Linux systems, those Docker container thingies, play around with Raspberry Pi or anything in between, you may occasionally find yourself on your main computer connected to the target via SSH when it suddenly hangs or gets rebooted, rendering your SSH session unresponsive. Sometimes when this happens, the SSH session gets disconnected automatically and you can start a new one. In other cases, the terminal with SSH open freezes and your usual hotkeys like ctrl + D do nothing. This is because ctrl + D key presses are usually transferred to the target and the disconnecting…
-
Strict Aliasing – yet another way for C-code to blow up
Recently, I got to learn about Strict Aliasing in C. It is yet another thing that can cause your C code work perfectly fine today and then blow up because of Undefined Behavior down the line. One example of what not to do is casting an array of uint8_t (like a payload from a communications protocol) into a struct (like the message you are receiving): A better way is to use memcpy: One reason this kind or “reinterpret cast” is not allowed is that you can’t be sure that accessing a field within the struct after typecasting will be a…
-
NB-IoT and LTE-M Covarage Maps
Here are some links to coverage maps for NB-IoT and LTE-M in Scandinavia. The GSMA also has a global deployment map here:https://www.gsma.com/iot/deployment-map/ Denmark Telia – https://www.telia.dk/privat/hjalp/dakning-og-drift/iot-dakningskort/ Finland Telia – https://www.telia.fi/asiakastuki/verkko/verkko/verkkokartta Norway Telia – https://telia.no/dekningskart Telenor – https://www.telenor.no/bedrift/iot/dekning/#map Sweden Telia – https://www.telia.se/privat/support/tackningskartor
-
Talk: Cellular Connectivity for IoT
In 2018, I had the great honor to speak at the NDC conference in Oslo. At the time, I was working with cellular connectivity for IoT at nordic mobile operator Telia, and I titled the talk accordingly. NDC is mainly a developer conference, so the talk was intended as an introduction to cellular IoT for the “Rasppberry Pi and Arduino crowd” that I anticipated would show up. I went into the difference between NB-IoT and LTE-M as well as between chips, modules and boards. Probably the best part however, if I may say so myself, was the last one, where…
-
LED bed light
I have been working on my own custom wakeup-light on and off for several years (part 1, part 2, part 3). After getting Philips Hue lights, however, I have not gotten around to setting it up in my new apartment. So recently, when the need came along, I figured the quarter round rod I used for that project might also make a pretty nice looking bed light. Version 1 I cut one of the old rods to length and taped it to the headboard to see how it would look: This could work! I borrowed the old driver board from…
-
Kodama Trinus 3D-printer upgrades
At work, we recently got the Kodama Trinus combined 3D-printer and laser engraver. I’m pretty happy with the overall quality of the printer so far, but for our use I immediately identified some areas of improvement: No power switch – the only way to turn the printer off is by unplugging the cord. No lights inside the enclosure – we got the additional enclosure, but it came without any lights inside. No network interface – you have to connect to the printer via USB directly or go get the SD-card. Also no way to control or monitor it remotely. So…
-
Alarm Clock v0.1.0
We wanted to try banning phones from the bedroom (you should try, I recommend it!). Clearly, a suitable hardware replacing the alarm clock app was needed. Having thought about building my own alarm clock for a while, I quickly determined it was not a viable option to just go buy one – there simply did not exist a model with all the features I had thought of and now needed to have, like for example: Weekly schedule (no alarm on weekends) Smarter snooze (configurable and longer) Integrated with wakeup-lights and the rest of the appartment Configurable from other devices Programmable/extendable…