<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="../assets/xml/rss.xsl" media="all"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Aigarius Blog (Posts about hardware)</title><link>http://aigarius.com/</link><description></description><atom:link href="http://aigarius.com/categories/hardware.xml" rel="self" type="application/rss+xml"></atom:link><language>en</language><copyright>Contents © 2026 &lt;a href="mailto:aigarius@gmail.com"&gt;Aigars Mahinovs&lt;/a&gt; </copyright><lastBuildDate>Sun, 30 Aug 2026 19:00:11 GMT</lastBuildDate><generator>Nikola (getnikola.com)</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>Half a year with iX3</title><link>http://aigarius.com/blog/2026/08/30/half-a-year-with-iX3/</link><dc:creator>Aigars Mahinovs</dc:creator><description>&lt;div&gt;&lt;h2&gt;Jumping a generation of electric cars&lt;/h2&gt;
&lt;p&gt;This February (2026) marks a full 10 years since I started working for BMW, and
a key employment bonus is the ability to drive a company car on special two-year
leasing terms. Just before the new year 2026 started, I said &lt;a href="https://aigarius.com/blog/2026/01/07/sedan-experience/"&gt;goodbye to my
latest company car&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Now this spring I was able to pick a new car, a car that I have been waiting for
and working on for the past ~5 years - the BMW iX3 Neue Klasse. It is a &lt;em&gt;very&lt;/em&gt;
special car for BMW and also for electromobility in general.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://aigarius.com/blog/2026/08/30/half-a-year-with-iX3/"&gt;Read more…&lt;/a&gt; (9 min remaining to read)&lt;/p&gt;&lt;/div&gt;</description><category>blog</category><category>car</category><category>Debian-planet</category><category>hardware</category><category>Ubuntu.lv-planet</category><category>work</category><guid>http://aigarius.com/blog/2026/08/30/half-a-year-with-iX3/</guid><pubDate>Sun, 30 Aug 2026 10:00:00 GMT</pubDate></item><item><title>Value of outreach and diversity to Debian</title><link>http://aigarius.com/blog/2026/03/23/value-of-outreach/</link><dc:creator>Aigars Mahinovs</dc:creator><description>&lt;p&gt;A question came up in private conversations, but the answer IMHO is useful
generally, so this is a repost. The question was generally on the topic of
divercity and outreach - if it does really help underpriviledged people to give
them some handout and hope that that somehow turns them into priviledged people?
IMHO this is an important question in current world environment in general and
to Debian in particular.&lt;/p&gt;
&lt;p&gt;IMHO It's not about making unprivileged people more privileged than current
contributors or about giving some kind of handouts.&lt;/p&gt;
&lt;p&gt;Just talking from my personal perspective, it is more about analysing where past
decisions (even perfectly reasonable ones) inadvertently created biases and
trying to figure out ways to balance them out over time so that we don't end up
missing good contributors just because they were, for example, unlucky with the
country of their birth.&lt;/p&gt;
&lt;p&gt;A simple example - think back a couple decades - where was the best place in the
world to learn how to develop free software in general and Debian in particular?
Where you had the largest chances of meeting an experienced developer in person
with enough free time who could show you the ropes and explain to you things
that are hard to put into documentation? I'd say those would be the campuses of
a bunch of technical universities in the USA, UK and the rest of Western Europe.&lt;/p&gt;
&lt;p&gt;If you were not attending a university, you were out of luck. If you were rural
in a smaller campus, you were out of luck. If you were on a different
continent - guess what? Still out of luck. Even Eastern Europe - so close, and
yet - out of luck.&lt;/p&gt;
&lt;p&gt;This made perfect sense and was a perfectly reasonable way to operate back
then - Western universities had the highest density of people who had both the
skill and the free time to contribute to free software. It was a no-brainer to
start there. It was not a mistake to do so. But it had side-effects.&lt;/p&gt;
&lt;p&gt;I was very lucky and persistent to overcome this out-of-luck situation, despite
the closest developers being 500-600 km away and across a sea and me operating
on actual dial-up Internet with barely enough money for a bus ticket, never mind
a sea ferry or a plane ticket. Or a laptop to take on such a plane. Thousands of
others around me, including many very competent software developers, did not
have that kind of luck and persistence and thus are not contributing to free
software or Debian at all.&lt;/p&gt;
&lt;p&gt;If we look back at the past, we can recognise that past decisions left whole
continents and also whole classes of people that were not given the opportunity
to learn how and why to contribute to free software and Debian. That is in the
end a realisation that there are many fine future developers out there who we
have not reached out to yet. At this point &lt;em&gt;that&lt;/em&gt; is a great untapped source of
new developers for the project. Opportunities in western universities will still
be there, noone wants to or can tear them down, but they also do not really need
investment of attention, time and money to keep being effective. But other
places do need that investment to start being effective. To start adding new
developers to the community.&lt;/p&gt;
&lt;p&gt;Outreach to diverse communities is in &lt;em&gt;our&lt;/em&gt;, selfish interests. Naturally we
still need to figure out how much effort is actually spent on that and evaluate
efficiency of different approaches. But in principle it &lt;em&gt;is&lt;/em&gt; what we want to do.&lt;/p&gt;
&lt;p&gt;(And also our knowledge might make their lives better, but that's a minor side
effect. /s)&lt;/p&gt;
&lt;p&gt;Questions? Feedback? Just ask
&lt;a href="https://bsky.app/profile/aigarius.com/post/3mhpsppg4fs2s"&gt;here&lt;/a&gt; or
&lt;a href="https://www.threads.com/@aigarius/post/DWORNr8iB9Y?xmt=AQF0y_tx8bqRwnwSm0BcMihG6z4TD-CNXgpYTRDkD73g1g"&gt;here&lt;/a&gt;.&lt;/p&gt;</description><category>blog</category><category>car</category><category>Debian-planet</category><category>hardware</category><category>Ubuntu.lv-planet</category><category>work</category><guid>http://aigarius.com/blog/2026/03/23/value-of-outreach/</guid><pubDate>Mon, 23 Mar 2026 10:00:00 GMT</pubDate></item><item><title>Sedan experience (BMW i5)</title><link>http://aigarius.com/blog/2026/01/07/sedan-experience/</link><dc:creator>Aigars Mahinovs</dc:creator><description>&lt;div&gt;&lt;h2&gt;Two years of midsize electric sedan experience&lt;/h2&gt;
&lt;p&gt;This February (2026) marks a full 10 years since I started working for BMW, and
a key employment bonus is the ability to drive a company car on special two-year
leasing terms. Just before the new year 2026 started, I said goodbye to my
latest company car. After driving the
&lt;a href="https://aigarius.com/blog/2022/06/29/long-travel-in-an-electric-car/"&gt;BMW i4&lt;/a&gt;,
I switched to the
&lt;a href="https://www.bmw.de/de/neufahrzeuge/bmw-i/i5/bmw-i5-ueberblick.html"&gt;BMW i5&lt;/a&gt;. In
terms of power, it was a downgrade as I switched from the maximum power i4 M50
xDrive (all-wheel drive, 600 hp) to the i5 eDrive40 (rear-wheel drive, 340 hp).
Did I regret that? Not for a single second! After driving 60,000 km in the last
two years with the BMW i5, I was really sad to let it go -- it was the best car
I have ever driven. Simple as that.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://aigarius.com/blog/2026/01/07/sedan-experience/"&gt;Read more…&lt;/a&gt; (16 min remaining to read)&lt;/p&gt;&lt;/div&gt;</description><category>blog</category><category>car</category><category>Debian-planet</category><category>hardware</category><category>Ubuntu.lv-planet</category><category>work</category><guid>http://aigarius.com/blog/2026/01/07/sedan-experience/</guid><pubDate>Tue, 13 Jan 2026 10:00:00 GMT</pubDate></item><item><title>Smart Shelly with Home Assistant</title><link>http://aigarius.com/blog/2023/04/13/smart-shelly-with-ha/</link><dc:creator>Aigars Mahinovs</dc:creator><description>&lt;p&gt;I am looking to improve my smart home installation as I plan to move to a new
appartment. I already have a well functioning
&lt;a href="https://www.home-assistant.io/"&gt;Home Assistant&lt;/a&gt; installation with a ton of
automations (like lights that automatically come on when light level outside
drops, that dim when it is time to go to sleep, robot vaccum that runs when
everyone is away and also automation that lets us know when CO2 levels are too
high and we should ventilate). We have colorful smart lights that can be dimmed
or can change colors as the mood strikes.&lt;/p&gt;
&lt;p&gt;However, one big problem that my setup currently has is that physical light
switches on the walls can not be used to control the lights (as in - if the wall
switch turns the light off, there is no way to turn it back on via Home
Assistant) and if the Home Assistant goes down (which does sometimes happen,
usually when I am away for a longer time) then it is really hard to control the
lights without it.&lt;/p&gt;
&lt;p&gt;So I've been searching for a holy grail: combination of smart (or smartified)
light switches on the walls and smart light bulbs (with colors and dimming) that
works with automations when Home Assistant is online &lt;em&gt;and&lt;/em&gt; also just works
directly to power lights on and off when Home Assistant is offline.&lt;/p&gt;
&lt;p&gt;And I think I have found a solution that will be acceptable for me. The solution
involves taking a normal dumb light installation, putting in smart light bulbs
(any that Home Assistant can manage) and then wiring in a
&lt;a href="https://www.shelly.cloud/en-de/products/product-overview/shelly-plus-1"&gt;Shelly&lt;/a&gt;
next to an existing dumb wall switch. For design consistency sake it would be
good if the wall switch is of impulse type (so only connecting the connectors
when the button is being pressed, like a doorbell button), but the setup should
also work for normal toggle wall switches with minimal changes. Some settings on
the Shelly and a custom
&lt;a href="https://shelly-api-docs.shelly.cloud/gen2/Scripts/Tutorial"&gt;Shelly script&lt;/a&gt; will
take care of offline functionality. Note: Gen1 Shelly devices do not have
scripting capabilities, you need a Gen2 device to do this, like the linked
Shelly Plus.&lt;/p&gt;
&lt;p&gt;So first I created a test setup to validate my design. I took an old extension
cable with a damaged wire, cut out the damaged part and split up the wiring to
make my test setup. It was really convinient to use the right tools - a simple
&lt;a href="https://www.amazon.de/-/en/dp/B0017MRD7I"&gt;cable stripper&lt;/a&gt;, a precise
&lt;a href="https://www.amazon.de/-/en/dp/B002BDNL4Q"&gt;wire stripper&lt;/a&gt; and
&lt;a href="https://www.amazon.de/-/en/dp/B00JB3U9CG"&gt;best wire connectors&lt;/a&gt;. Using the
right tools it was really easy, fast and also safe to just pull insulation from
the cable, split up the wires, clean off &lt;em&gt;exactly&lt;/em&gt; 10mm off the end of each wire
and push them into the Wago connectors to connect them together.&lt;/p&gt;
&lt;p&gt;The &lt;a href="http://aigarius.com/blog/2023/04/13/smart-shelly-with-ha/shelly_test.jpg"&gt;completed test setup&lt;/a&gt; is a bit janky, but it works and is
electrically safe (at least for testing purposes). The wiring is pretty clear
from
&lt;a href="https://kb.shelly.cloud/knowledge-base/shelly-plus-1"&gt;Shelly documentation&lt;/a&gt;
(which is also just printed on the front of the device itself). The only point
of clarification is that on the output side the Shelly is a &lt;em&gt;relay&lt;/em&gt; and not a
power provider, which means that when connecting Shelly to the wires going
towards your lights it is &lt;em&gt;not&lt;/em&gt; enough to just wire Shelly output one to lights
live wire and Shelly output zero to lights neutral wire. Instead you need to
connect you input neutral wire directly to your lights neutral (same as input
ground) and then wire the input live wire &lt;em&gt;trough&lt;/em&gt; the Shelly output contacts
(so input live to Shelly output zero and Shelly output one to lights live wire).
Except if you but a Shelly Plus 1PM, which has to measure power consumption and
thus &lt;em&gt;has to&lt;/em&gt; pass the whole device current trough itself to properly measure
it.&lt;/p&gt;
&lt;p&gt;When that is done, tested and plugged in you can use
&lt;a href="https://www.shelly.cloud/en-de/shelly-smart-control"&gt;Shelly app&lt;/a&gt; to connect to
your new Shelly device and make it join your WiFi network (or you can just use a
laptop or a phone to joint to the Shelly ad-hoc WiFi network and configure it
via its
&lt;a href="https://kb.shelly.cloud/knowledge-base/shelly-plus-1-web-interface-guide"&gt;build-in web UI&lt;/a&gt;).
When the Shelly is in your network you can continue to configure via the Web UI
and Home Assistant.&lt;/p&gt;
&lt;p&gt;Add the Shelly to your Home Assistant installation (it will automatically detect
a new Shelly device and promt to enable Shelly integration once the device shows
up in the local WiFi network). Add an automation to toggle the light state of
the connected smart bulb(s) (Service: Light toggle) when "First button button
down" event triggers on the Shelly. This will be the way the light state is
going to be controlled normally. It can also be useful to add an automation that
runs on Home Assistant start-up to ask all Shelly devices to turn outputs to on,
so that after recovery of Home Assistant after an outage you can&lt;/p&gt;
&lt;p&gt;In the Shelly web UI (after updating firmware, as usual) you'd want to
&lt;em&gt;disconnect&lt;/em&gt; output from input, set input type to button (assuming you have an
impulse button input, like I do) and configure the output to be powered on by
default when power comes back. And then you'll want to add
&lt;a href="https://gist.github.com/aigarius/4d89a025fa72e0e890efe6736b7670ca"&gt;this script&lt;/a&gt;
to your Shelly. You will want to adjust the URL to your Home Assistant instance
there. This script monitors if the Home Assistant is alive or not and if the
Home Assistant is not alive, then take the matters into its own hands and power
off and on the lights directly.&lt;/p&gt;
&lt;p&gt;I am sure there are many ways this can be improved and tweaked. I like the
flexibility this approach gives - I can cleanly program behaviour in Home
Assistant and also directly on the Shelly switches (without even having to flash
any custom firmware). This particular way is also quite scalable - if I have 10
Shelly switches in my home I can have exactly the same script and settings on
all of them - the link between the switch and the light(s) is done via physical
wiring and via automation settings in Home Assistant. The Shelly does not have
to know what smart lights (or other devices) are connected to it and how they
are supposed to be controlled.&lt;/p&gt;
&lt;p&gt;If you are using MQTT with Home Assistant, then Shelly can also speak directly
to MQTT instead and the online check becomes much more trivial because the
&lt;a href="https://shelly-api-docs.shelly.cloud/gen2/Scripts/ShellyScriptLanguageFeatures#mqtt-support"&gt;MQTT object&lt;/a&gt;
in the Shelly Script API has isConnected property.&lt;/p&gt;</description><category>debian</category><category>Debian-planet</category><category>hardware</category><category>Ubuntu.lv-planet</category><guid>http://aigarius.com/blog/2023/04/13/smart-shelly-with-ha/</guid><pubDate>Thu, 13 Apr 2023 11:30:50 GMT</pubDate></item><item><title>Ryzen 7000 amdgpu boot hang</title><link>http://aigarius.com/blog/2022/10/16/ryzen-7000-amdgpu/</link><dc:creator>Aigars Mahinovs</dc:creator><description>&lt;p&gt;So you decided to build a brand new system using all the latest and coolest
tech, so you buy a Ryzen 7000 series Zen 4 CPU, like the Ryzen 7700X that I
picked, with a new mother board and DDR5 memory and all that jazz. But for now,
you don't yet have a fitting GPU for that system (as the new ones will only come
out in November), so you are booting a Debian system using the new build-in
video card of the new CPUs (Zen 4 generation has a simple AMD GPU build-in into
every CPU now - great stuff for debugging and mostly-headless systems) and you
get ... nothing on the screen. Hmm. You boot into the rescue mode and the kernel
message stop after:&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code literal-block"&gt;&lt;span class="nv"&gt;Oct&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;16&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;13&lt;/span&gt;:&lt;span class="mi"&gt;31&lt;/span&gt;:&lt;span class="mi"&gt;25&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;home&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;kernel&lt;/span&gt;:&lt;span class="w"&gt; &lt;/span&gt;[&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;.&lt;span class="mi"&gt;128328&lt;/span&gt;]&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;amdgpu&lt;/span&gt;:&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;Ignoring&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;ACPI&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;CRAT&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;on&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;non&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nv"&gt;APU&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;system&lt;/span&gt;
&lt;span class="nv"&gt;Oct&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;16&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;13&lt;/span&gt;:&lt;span class="mi"&gt;31&lt;/span&gt;:&lt;span class="mi"&gt;25&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;home&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;kernel&lt;/span&gt;:&lt;span class="w"&gt; &lt;/span&gt;[&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;.&lt;span class="mi"&gt;128329&lt;/span&gt;]&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;amdgpu&lt;/span&gt;:&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;Virtual&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;CRAT&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;table&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;created&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;for&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;CPU&lt;/span&gt;
&lt;span class="nv"&gt;Oct&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;16&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;13&lt;/span&gt;:&lt;span class="mi"&gt;31&lt;/span&gt;:&lt;span class="mi"&gt;25&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;home&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;kernel&lt;/span&gt;:&lt;span class="w"&gt; &lt;/span&gt;[&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;.&lt;span class="mi"&gt;128332&lt;/span&gt;]&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;amdgpu&lt;/span&gt;:&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;Topology&lt;/span&gt;:&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;Add&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;CPU&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;node&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;That looks bad, right?&lt;/p&gt;
&lt;p&gt;Well, if you either ssh into the machine or reboot with
&lt;code&gt;module_blacklist=amdgpu&lt;/code&gt; in the kernel command line you will find in
&lt;code&gt;/var/log/kern.log.1&lt;/code&gt; those messages and also the following messages that will
clarify the situation a bit:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Oct 16 13:31:25 home kernel: [    4.129352] amdgpu 0000:10:00.0: firmware: failed to load amdgpu/psp_13_0_5_toc.bin (-2)
Oct 16 13:31:25 home kernel: [    4.129354] firmware_class: See https://wiki.debian.org/Firmware for information about missing firmware
Oct 16 13:31:25 home kernel: [    4.129358] amdgpu 0000:10:00.0: firmware: failed to load amdgpu/psp_13_0_5_toc.bin (-2)
Oct 16 13:31:25 home kernel: [    4.129359] amdgpu 0000:10:00.0: Direct firmware load for amdgpu/psp_13_0_5_toc.bin failed with error -2
Oct 16 13:31:25 home kernel: [    4.129360] amdgpu 0000:10:00.0: amdgpu: fail to request/validate toc microcode
Oct 16 13:31:25 home kernel: [    4.129361] [drm:psp_sw_init [amdgpu]] *ERROR* Failed to load psp firmware!
Oct 16 13:31:25 home kernel: [    4.129432] [drm:amdgpu_device_init.cold [amdgpu]] *ERROR* sw_init of IP block &amp;lt;psp&amp;gt; failed -2
Oct 16 13:31:25 home kernel: [    4.129525] amdgpu 0000:10:00.0: amdgpu: amdgpu_device_ip_init failed
Oct 16 13:31:25 home kernel: [    4.129526] amdgpu 0000:10:00.0: amdgpu: Fatal error during GPU init
Oct 16 13:31:25 home kernel: [    4.129527] amdgpu 0000:10:00.0: amdgpu: amdgpu: finishing device.
Oct 16 13:31:25 home kernel: [    4.129633] amdgpu: probe of 0000:10:00.0 failed with error -2
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;So what you need is to get a new set of
&lt;a href="https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git"&gt;Linux Kernel Firmware blobs&lt;/a&gt;
and upack that in &lt;code&gt;/lib/firmware&lt;/code&gt;. The tarball from 2022-10-12 worked well for
me.&lt;/p&gt;
&lt;p&gt;After that you also need to re-create the initramfs with
&lt;code&gt;update-initramfs -k all -c&lt;/code&gt; to include the new firmware. Having kernel version
5.18 or newer is also required for stable Zen 4 support. It might be that a
fresh Mesa version is also of importance, but as I am running sid on this
machine I can only say that Mesa 22.2.1 that is in sid works fine.&lt;/p&gt;</description><category>debian</category><category>Debian-planet</category><category>hardware</category><category>Ubuntu.lv-planet</category><guid>http://aigarius.com/blog/2022/10/16/ryzen-7000-amdgpu/</guid><pubDate>Sun, 16 Oct 2022 14:15:13 GMT</pubDate></item><item><title>Automation of embedded development</title><link>http://aigarius.com/blog/2018/03/23/automation-of-embedded-development/</link><dc:creator>Aigars Mahinovs</dc:creator><description>&lt;p&gt;
      I am wondering if there is a standard solution to a problem that I am
      facing. Say you are developing an embedded Debian Linux device. You want
      to have a "test farm" - a bunch of copies of your target hardware running
      a lot of tests, while the development is ongoing. For this to work
      automatically, your automation setup needs to have a way to fully re-flash
      the device, even if the image previously flashed to it does not boot. How
      would that be usually achieved?
    &lt;/p&gt;
    &lt;p&gt;
      I'd imagine some sort of option in the initial bootloader that would look
      at some hardware switch (that your test host could trip programmatically)
      and if that is set, then boot into a very minimal and very stable
      "emergency" Linux system, then you could ssh into that, mount the target
      partitions and rewrite their contents with the new image to be tested.
    &lt;/p&gt;
    &lt;p&gt;
      Are there ready-made solutions that do such a thing? Generically or even
      just for some specific development boards? Do people solve this problem in
      a completely different way? Was unable to find any good info online.
    &lt;/p&gt;</description><category>debian</category><category>Debian-planet</category><category>hardware</category><category>programming</category><category>Ubuntu.lv-planet</category><guid>http://aigarius.com/blog/2018/03/23/automation-of-embedded-development/</guid><pubDate>Fri, 23 Mar 2018 13:03:10 GMT</pubDate></item><item><title>Wireless photo workflow</title><link>http://aigarius.com/blog/2014/04/03/wireless-photo-workflow/</link><dc:creator>Aigars Mahinovs</dc:creator><description>&lt;p&gt;
      For a while now I've been looking for ways to improve my photo workflow -
      to simplify and speed up the process. Now I've gotten a new toy to help
      that along - a Panasonic FlashAir SD card with WiFi connectivity. I was
      pretty sure that build-in workflows of some more automated solutions would
      not be a perfect fit for me, so I got this card which has a more manual
      workflow and a reasonable API, so I could write my own.
    &lt;/p&gt;
    &lt;p&gt;
      Now I am trying to work out my requirements, the user stories if you will.
    &lt;/p&gt;
    &lt;p&gt;I see two distinct workflows: live event and travel pictures.&lt;/p&gt;
    &lt;p&gt;
      In &lt;strong&gt;both&lt;/strong&gt; cases I want the images to retain the file names,
      Exif information and timing of the original photos and also have embedded
      GPS information from the phone synced to the time the photo was taken. And
      if I take a burst of very similar photos, I want the uploading process to
      only select and upload the "best" one (trivial heiristic being the file
      size) with an ability for me to later choose another one to replace it.
      There would need to be some way of syncing phone and camera time,
      especially considering that phones usually switch to local time zone when
      traveling and cameras do not, maybe the original time the photo was taken
      would need to be changed to local time zone, so that there are no photos
      that are taken during the day, but have a timestamp of 23:45 GMT.
    &lt;/p&gt;
    &lt;p&gt;
      When I am in &lt;em&gt;Live Event&lt;/em&gt; mode I would like the photos that I take
      to immediately start uploading to an event album that I create (or choose)
      at the start of the shoot with a preset privacy mode. This assumes that
      either I am willing to upload via 3G of my phone or that I have access to
      a stable WiFi network on-site. It might be good if I could upload a scaled
      down version of the pictures during the event and then later replace the
      image files with full-size images when the even is over and I am at home
      in my high-speed network. I probably don't need the full size files on my
      phone.
    &lt;/p&gt;
    &lt;p&gt;
      When I am in &lt;em&gt;Travel&lt;/em&gt; mode, I want to delay photo uploading until I
      am back at the hotel with its high speed Wifi, but also have an option to
      share some snapshots immediately over 3G or random cafe Wifi. I am likely
      to take more photos that there is memory in my phone, so I would like to
      clear original files from the phone while keeping them in the SD card and
      in the cloud, but still keeping enough metadata to allow re-uploading an
      image or choosing another image in a burst.
    &lt;/p&gt;
    &lt;p&gt;
      Now I need to flesh out the technical requirements from the above and
      write an Android app to implement that. Or maybe start by writing this in
      Python as a cross-platform command-line/desktop app and only later porting
      it to Android when all the rought parts are ironed out. This will have an
      extra benefit of people being able to run the same workflow on a laptop
      instead of a phone or tablet.
    &lt;/p&gt;
    &lt;p&gt;
      Let's assume that this is written in a pretty flexible way, allowing to
      plug in backends for different WiFi SD cards, cloud services, plug-in
      points for things like instant display of the latest photo on the laptop
      screen in full-screen mode and other custom actions, what else would
      people love to see in something like this? What other workflow am I
      completely overlooking?
    &lt;/p&gt;</description><category>Debian-planet</category><category>hardware</category><category>idea</category><category>photo</category><category>travel</category><guid>http://aigarius.com/blog/2014/04/03/wireless-photo-workflow/</guid><pubDate>Thu, 03 Apr 2014 10:04:14 GMT</pubDate></item><item><title>Istabai.lv - installation</title><link>http://aigarius.com/blog/2013/02/17/istabailv-installation/</link><dc:creator>Aigars Mahinovs</dc:creator><description>&lt;p&gt;
      So, the price of heating my apartment has gone up significantly since last
      year and a lot of people have noticed the same trend. As a geek, I want
      not just any solutions, but geekiest solutions possible to that - enter a
      Smart Home system. The heating in my apartment is separated from all other
      apartments with a separate heat meter that measures both heating water
      flow and the temperature difference on the incoming and outgoing pipes, so
      if I reduce the heating consumption I will immediately see that in lower
      heating bills. This particular smart home system is very simple and made
      in Latvia and also relatively cheap, so I decided to give this a try.
    &lt;/p&gt;
    &lt;p&gt;
      The start was very simple - I filled out a form on
      &lt;a href="http://www.istabai.lv/" title="istabai.lv home page"&gt;their home page&lt;/a&gt;
      and got a call the next day to verify the specifics. They already knew my
      building and had experience installing there, so they offered me two
      options: I could have two thermal sensors and a radiator controller on
      each of the 3 radiators in my apartment or (seeing how my apartment is
      relatively small and well ventilated thus reducing the efficiency of
      per-room control) one thermal sensor and one radiator controller installed
      on a new valve that they would build into the heating pipe just outside my
      apartment. I chose the second option as that was cheaper, simpler and
      involved less installation for me. Also they offered a nice discount.
    &lt;/p&gt;
    &lt;p&gt;
      A plumber of my building installed the valve at some point during the day,
      I did not even have to be there or arrange anything special, it was all
      included in the main bill. Then the next day a friendly guy came by to my
      office and gave me three very cute boxes. The packaging was very, very
      Apple-like. The three devices were named 'mother', 'spy' and 'puller' -
      basically that is a base station, a temperature sensor and a radiator
      regulator - a wireless stepper motor.
    &lt;/p&gt;
    &lt;p&gt;
      The installation was straight forward - I connected the base station
      (something very similar to
      &lt;a href="http://www.apple.com/airportexpress/"&gt;this thin&lt;/a&gt; in size and
      looks) to Ethernet and power, went to the web address specified on the
      sticker on the base station, completed a registration process there,
      entered a code from the base of the base station into the website and it
      just found it. After that I pressed a button on the temperature sensor (a
      Zippo lighter sized box with a built-in Li-Ion battery rechargeable via
      microUSB once a year or so) and put that on a shelf. I secured it with
      some double-sided tape after the cat got to it once and played some hockey
      while I was away. The temperature sensor immediately showed up in the Web
      UI and I could assign it to a room.
    &lt;/p&gt;
    &lt;p&gt;
      The regulator installation was the most complex bit, but it was trivial as
      well - all I had to do was insert some AA batteries (helpfully included in
      the box, should last a couple years by their estimates), then go outside
      to the newly installed inlet valve, put this thing on, screw the thread
      with my hands and then push and hold a button for 10 seconds. After that
      the controller came to life, connected with the base station and started
      spinning the valve, testing its operational range I presume. The range is
      very good - you can see 13% signal in the screenshots - that is across the
      whole of the apartment, trough 3 solid walls and another 5 meters out in
      the hallway inside another wall.
    &lt;/p&gt;
    &lt;p&gt;
      As soon as that was done, the Web UI showed the controller and asked my to
      assign it to a room. So now I have 1 room defined with 1 temperature
      sensor and one controller. That is all that is needed.
    &lt;/p&gt;
    &lt;p&gt;
      &lt;a href="http://www.aigarius.com/blog/wp-content/uploads/2013/02/Screenshot-170213-213737.png"&gt;&lt;img alt="Temperature" class="alignnone size-full wp-image-9485" height="496" src="http://www.aigarius.com/blog/wp-content/uploads/2013/02/Screenshot-170213-213737.png" width="578"&gt;&lt;/a&gt;
    &lt;/p&gt;
    &lt;p&gt;
      From the charts I have already found out that at current inside/outside
      temperatures my apartment cools down at around 0.3 degrees C per hour and
      with current radiator settings it heats up by around 1 degree C per hour.
      I should turn the radiators up a bit thus increasing the rate at which the
      system is able to heat things up. Also I should try to re-inspect all
      possible cold spots to see why the cooldown speed is so high. I expected
      it to be lower. At least now I have real data to compare things.
    &lt;/p&gt;
    &lt;p&gt;
      &lt;a href="http://www.aigarius.com/blog/wp-content/uploads/2013/02/Screenshot-170213-213759.png"&gt;&lt;img alt="Temperature chart" class="alignnone size-full wp-image-9486" height="432" src="http://www.aigarius.com/blog/wp-content/uploads/2013/02/Screenshot-170213-213759.png" width="653"&gt;&lt;/a&gt;
    &lt;/p&gt;
    &lt;p&gt;
      At this point you can either fire up your web browser or a Android/iOS
      client on you mobile device to monitor and control the temperature of the
      apartment. But that was not enough for me - I opted for the PRO upgrade
      which includes the ability to program a weekly cycle of desired
      temperatures. The programming is limited and thus simple to do - there are
      three temperature modes: day, night and eco. The idea is that you have the
      night mode every night, then at some time during the day, you have the day
      mode (to wake up), then you switch to eco mode (when noone is home) and
      then in the evening you go back to day mode and later to night mode. There
      are separate sliders for each day of the week and temperature settings for
      each of the modes for every programmed room.
    &lt;/p&gt;
    &lt;p&gt;
      &lt;a href="http://www.aigarius.com/blog/wp-content/uploads/2013/02/Screenshot-170213-213820.png"&gt;&lt;img alt="Time zones" class="alignnone size-full wp-image-9487" height="686" src="http://www.aigarius.com/blog/wp-content/uploads/2013/02/Screenshot-170213-213820.png" width="539"&gt;&lt;/a&gt;
    &lt;/p&gt;
    &lt;p&gt;
      &lt;a href="http://www.aigarius.com/blog/wp-content/uploads/2013/02/Screenshot-170213-213835.png"&gt;&lt;img alt="Temperatures in zones" class="alignnone size-full wp-image-9488" height="218" src="http://www.aigarius.com/blog/wp-content/uploads/2013/02/Screenshot-170213-213835.png" width="554"&gt;&lt;/a&gt;
    &lt;/p&gt;
    &lt;p&gt;
      &lt;a href="http://www.aigarius.com/blog/wp-content/uploads/2013/02/Screenshot-170213-213847.png"&gt;&lt;img alt="Devices" class="alignnone size-full wp-image-9489" height="457" src="http://www.aigarius.com/blog/wp-content/uploads/2013/02/Screenshot-170213-213847.png" width="543"&gt;&lt;/a&gt;
    &lt;/p&gt;
    &lt;p&gt;
      Total investment so far - 210 Ls (or around 3 months worth of just heating
      bills). The experience of other users tells of 30-50% heating bill
      reduction, so this should pay for itself in 2-3 years. In addition I get a
      more stable and predictable temperature at home and some more geeky stuff
      to brag about - yay!
    &lt;/p&gt;
    &lt;p&gt;
      These guys have their work cut out for them - I have no idea how/of they
      do international orders, I would definately like to see more information
      in the web site about how my system is working (more temperature history,
      valve state history, wireless signal and battery history, mobile apps are
      a bit wonky - it feels like the mobile app does not respect the
      temperature set over the web and tries to reassert itself when opened and
      it often shows out-of-date temperature data with no indication that it is
      out-of-date + the mobile apps are missing charts.
    &lt;/p&gt;
    &lt;p&gt;
      All in all - this is a great start: easy, quite cheap and stylish home
      heating automation. Good work!
    &lt;/p&gt;
    &lt;p&gt;
      P.S. I am pretty sure they use Linux, but it is so packaged, that there is
      basically no way to confirm or deny that.
    &lt;/p&gt;
    &lt;p&gt;
      P.P.S. Also - check out this overnight chart, there is definitely some
      mode switch anticipation going on :)&lt;br&gt;&lt;a href="http://www.aigarius.com/blog/wp-content/uploads/2013/02/Screenshot-180213-090050.png"&gt;&lt;img alt="Overnight temperatures" class="alignnone size-full wp-image-9495" height="383" src="http://www.aigarius.com/blog/wp-content/uploads/2013/02/Screenshot-180213-090050.png" width="558"&gt;&lt;/a&gt;
    &lt;/p&gt;</description><category>Debian-planet</category><category>hardware</category><category>Ubuntu.lv-planet</category><guid>http://aigarius.com/blog/2013/02/17/istabailv-installation/</guid><pubDate>Sun, 17 Feb 2013 20:02:21 GMT</pubDate></item><item><title>Kā dabūt 100% ātruma drošību uz ceļiem</title><link>http://aigarius.com/blog/2012/11/11/ka-dabut-100-atruma-drosibu-uz-celiem/</link><dc:creator>Aigars Mahinovs</dc:creator><description>&lt;p&gt;
      Auto ātrums nav vienīgais avāriju, nāves, ievainojumu un materiālo
      zaudējumu cēlonis, taču tas ir šo seku reizinātājs (pat ja auto saslīd
      neuzmanības dēļ runājot pa telefonu, sekas tam būs jo smagākas, jo lielāks
      bija sākotnējais ātrums). Ja atrast veidu kā nodrošināt to, ka cilveki
      ievēro atļauto ātrumu, tad rodas iespēja gan palielināt atļauto ātrumu
      tajās vietās, kur tas ir jēdzīgi, gan arī atbrīvot policijas resursus citu
      pārkāpumu vai problēmu apkarošanai. Tāpēc būtu prātīgi atrast kādu
      vieglāku un drošāku veidu kā nodrošināt atļautā maksimālā ātruma
      ievērošanu netērējot tam pārāk lielus ceļu policijas resursus. Fotoradari
      ir labs pirmais solis, taču ar mūšdienu tehnoloģijām ir iespējams sasniegt
      arī labāku rezultātu.
    &lt;/p&gt;
    &lt;p&gt;
      Iedomāsimies mazu melnu metālisku kastīti, kas piemetināta auto šassijai,
      pieslēgta auto elektrosistēmai kā barošanas avotam (ar rezerves batareju
      iegšā) un sevī iegšā satur: integrātu System-on-a-Chip ARM mikroprocessoru
      ar integrētu GPS un GLONASS uztvērēju (kas līdzīgs SIRF Atlas IV),
      Bluetooth raidītāju un 1 Gb flash atmiņas. Pie liela izmēra ražošanas
      tādas iekārtas izmaksas varētu būt ap 20 Ls. Ar triviālu programmu šada
      iekārta var visu laiku, katru sekundi pierakstīt auto GPS koordinātes.
      Katra gada beigās, kad auto ir tehniskajā apskatē, CSDD var caur Bluetooth
      nolasīt visa gada vēsturi un izrakstīt sodu par visiem fiksētajiem
      pārkāpumiem. Šādas kastītes esamība un sodu apmaksa var būt par
      priekšnoteikumu TA iziešanai.
    &lt;/p&gt;
    &lt;p&gt;
      Tas arī viss. Pārējais jau ir implementācijas sīkumi un visādas izņemuma
      situācijas. Piemēram tas, ka ceļu policijai apstādinot auto uz ceļa derētu
      pārbaudīt, ka auto ir šī kastīte, pievienoties tai caur Bluetooth,
      pārbautīt autentiskumu, paprasīt kastītei vai tā nav bijusi izslēgta, kādi
      ātrumi bija pēdējo dažu minūšu laikā un tamlīdzīgi. Vai tas, kādai jābūt
      sodīšanas robežai, kādiem jābūt sodiem, kā viņus jāsummē kopā, kā izslēgt
      tos sodus, kas ir izrakstīti atsevišķi, kā izslēgt īpašos gadījumus un kā
      pārsūdzēt kļūdas.
    &lt;/p&gt;
    &lt;p&gt;
      Tā pati iekārta varētu visu laiku retranslēt GPS signālu caur Bluetooth,
      lai auto iekšienē navigācijas iekārtas vai telefoni varētu to signālu
      uztvert un rādīt precīzāku vietu un ātrumu.
    &lt;/p&gt;
    &lt;p&gt;
      Pie izšķirtspējas ap 1 sekundi šīs iekārtas dati būs ārkārtīgi noderīgi
      jebkuras auto avārijas izmeklēšanā - tās precīzi un pierādāmi fiksēs katra
      avārijā iesaistītā auto atrašanās vietu un ātrumu. Lai šo lietderīgumu
      palielinātu, iekārta var arī īslaicīgi glabāt pilno GPS informāciju par
      pēdējām dažam minūtēm un saglabāt to atmiņā, ja iekārtas paatrinājuma
      sensori sajūt strauju triecienu. Tā var arī atklāt auto, kas ir kādu
      notriekuši un tad aizlaidušies no notikuma vietas.
    &lt;/p&gt;
    &lt;p&gt;
      Tas gan nepalīdzēs pret: autozādzībām (zagļi ātri izdomā kā tādas lietas
      apiet, piemēram noņemot vienu kastīti un uzliekot jaunu tās vietā), citu
      likumu pārkāpumiem (grūti pierādīt kura persona ir bijusi pie stūŗes tajā
      brīdī) utml.
    &lt;/p&gt;
    &lt;p&gt;
      Auto ir privilēģija. Autovadītāja apliecība ir privilēģija. Tiesības
      atrasties uz publiskajiem ceļiem ir privilēģija. Sabiedrība ir tiesīga
      uzlikt apgrūtinājumus uz personām, kas grib izmantot šīs privilēģijas.
      Lidmašīnām melnās kastes un GPS transponderi ir obligātais aprīkojums,
      taču mūsdienās vairāk cilvēku mirst auto nekā avio avārijās.
    &lt;/p&gt;
    &lt;p&gt;
      Visticamāk šāda tipa iekārtas būtu vērts vispirms izmēģināt ar policijas
      auto. Policijas auto pirmajiem ir jāsāk ievērot visi CSN (izņemot brīžus,
      kad ir ieslēgtas attiecīgās bākugunis ar skaņas signālu) un šis būtu labs
      veids kā to nodrošināt, pie reizes pārbaudot arī jaunās tehnoloģijas
      dzīvē.
    &lt;/p&gt;</description><category>hack</category><category>hardware</category><category>latvian</category><category>legal</category><guid>http://aigarius.com/blog/2012/11/11/ka-dabut-100-atruma-drosibu-uz-celiem/</guid><pubDate>Sun, 11 Nov 2012 12:11:32 GMT</pubDate></item><item><title>Cloning or pre-configuring a batch of Android phones</title><link>http://aigarius.com/blog/2012/09/23/cloning-or-pre-configuring-a-batch-of-android-phones/</link><dc:creator>Aigars Mahinovs</dc:creator><description>&lt;p&gt;
      An interesting question popped up in my Twitter stream today - is there an
      Android alternative to
      &lt;a href="http://itunes.apple.com/lv/app/apple-configurator/id434433123?mt=12"&gt;Apple configurator&lt;/a&gt;
      (for iPhone, iPad and iPod Touch) that allows to create a bunch of
      identical Apple devices with some added configurations and applications.
      The best I could come up with is not as polished, but on the other hand
      much more powerful option - Nandroid backup and restore (also known as
      ClockworkMod Recovery backup).
    &lt;/p&gt;
    &lt;p&gt;
      To do this, you need a source phone and a bunch of destination phones. On
      the source phone a
      &lt;a href="http://www.clockworkmod.com/rommanager"&gt;ClockworkMod Recovery&lt;/a&gt;
      (CWR) must be installed (either via a root or via a bootloader unlock). On
      the destination phones you will either need to also install ClockworkMod
      Recovery or unlock the bootloader to allow the
      &lt;a href="http://wiki.cyanogenmod.com/wiki/Fastboot"&gt;Fastboot&lt;/a&gt; tool to
      work.
    &lt;/p&gt;
    &lt;p&gt;
      So the procedure then goes as follows:&lt;br&gt;1. Unlock the bootloader on
      the source phone (search for device specific info on how to do that)&lt;br&gt;2.
      Use &lt;code&gt;fastboot flash recovery filename.img&lt;/code&gt; to write a
      device-specific version of CWR to the recovery partition of the device
      (the phone must be in fastboot mode at that point)&lt;br&gt;3. Do whatever
      customisations you want to the source phone at this point. You can use
      custorm ROMs, install whatever applications, do whatever configuration,
      but I would suggest keeping everything in phone memory so you don't have
      to flash the SD card as well.&lt;br&gt;4. Reboot the source phone into CWR
      mode, use the backup option to create a full backup.&lt;br&gt;5. The backup
      will now be in the SD card of the source device. Copy that to the computer
      that you will use for creating copies.
    &lt;/p&gt;
    &lt;p&gt;
      For each destination phone:&lt;br&gt;6. Unlock the bootloader of the
      destination phone&lt;br&gt;7. Reboot the phone in the fastboot mode, connect
      it via USB to the copying computer&lt;br&gt;8. Flash all partitions from the
      backup using &lt;code&gt;fastboot flash ...&lt;/code&gt; commands, skip flashing the
      recovery partition if you don't want CMR on the destination device&lt;br&gt;9.
      Re-lock the bootloader (with &lt;code&gt;fastboot oem lock&lt;/code&gt;)
    &lt;/p&gt;
    &lt;p&gt;And you are done!&lt;/p&gt;
    &lt;p&gt;
      All the phones must be of the same model. And that model must support
      unlocking bootloader for this to work.
    &lt;/p&gt;
    &lt;p&gt;
      I prefer this method, because this way it is possible to create an end
      device without root, with a locked bootloader and without CWR thus
      providing some security as unlocking the bootloader wipes the device, so
      without specific hacking an attacker can not easily get access to system
      data on such device. It is also possible to do this with devices that do
      not have an boot unlock if there is a way to root the original firmware
      which allows to install CWR and go on from there, but that is
      significantly more complicated and time-consuming, so using devices with
      an ability to unlock the bootloader is much preferable.
    &lt;/p&gt;
    &lt;p&gt;
      However, before you go to all that trouble, it might be worth to consider
      if maybe for your particular use case it would be enough with the two
      commands from Android SDK - &lt;code&gt;adb install ...&lt;/code&gt; and
      &lt;code&gt;adb push ...&lt;/code&gt; to install applications or individual files on
      devices or &lt;code&gt;adb backup AppName&lt;/code&gt; and
      &lt;code&gt;adb restore ...&lt;/code&gt; to backup and restore one or more individual
      applications with all their settings. These options have the benefit of
      that they will work across different device models and that they do not
      wipe other data or applications from the devices.
    &lt;/p&gt;
    &lt;p&gt;
      As I could not immediately find a better way or even a detailed guide how
      to do this, I decided to write this post, so it would be easier for other
      people to find this information. If you know a better way, please do
      mention it in the comments section!
    &lt;/p&gt;</description><category>android</category><category>Debian-planet</category><category>google</category><category>hack</category><category>hardware</category><category>linux</category><category>nexus-s</category><category>Ubuntu.lv-planet</category><guid>http://aigarius.com/blog/2012/09/23/cloning-or-pre-configuring-a-batch-of-android-phones/</guid><pubDate>Sun, 23 Sep 2012 14:09:43 GMT</pubDate></item></channel></rss>