Linux

tracking bugs in complex systems ..

Written by  on March 6, 2018

Some weeks ago I’ve replaced the case of the ‘catcam’. A Raspberry Pi 3 which was running for 1.5 years without interruption with the nice script & python-upload triggered by a cronjob. And now the device freezes. Still running, but neither accessible via SSH nor VNC (of course, if SSH is not working ..).
I left the case open; removed the camera; upgraded kernel and Raspbian: nothing helped.
My last guess is that the camera stopped working. But to be sure I want to let the RPi3 long-time with temperature-logging. So … we need a simple program:

executed like this, because else the output is buffered up to 4 or 8 kByte:

and the content of the textfile is something like:

backup your Raspberry Pi-sd card

Written by  on February 28, 2018

Newer versions (8.24+) of coreutils dd have also a progress-option, but not the one bundled with the current distribution ..
add param: “status=progress”

banner generator: figlet (online)

Written by  on February 11, 2018

Ok, most of the times your classes and functions shall be commented.
So, let us decorate a bit: your wish shall be my command 😉
I had just remembered the good old toolkit to generate banners!

url: http://patorjk.com/software/taag/

I need a new mp3-player: why not buy again a (used) Sansa Clip+ and Rockbox it?

Written by  on November 18, 2017

Guide is still valid.
Downloading the firmware-binary and running the Rockbox-installer (now at version 3.14) under Linux was not a problem.

Five minutes later I got a “new” working player. Still prefer it to the (smart-)phone while doing fitness.

proper rename-scheme for digiKam

Written by  on October 28, 2017

The Olympus-cam has no nice way to set an immediate scheme for the filename, so I transfer the files to the PC and fire up digiKam:

Fun fact: since it is based on KDE –> Qt, it also uses the same formatting for DateTime like Qt. Horay 🙂

Addendum: to fix the annoying “no klauncher found”-message and the invisible thumbnails after some certain apt-get-upgrades, just run

again.

Need to fake some incoming packets?

Written by  on October 26, 2017

Try Packet Sender (available for all major OS: I used the portable version for Windows as well as the AppImage for Linux (I love that AppImage-idea. Already the third OSS which was packaged like this instead of a *.deb or as pure source ..)) to emulate the sending of some UDP-datagrams to test one of my programs. And it works really neatly.
You’ve got a tidy window with some textfields for receiver, type and content, a “fire away”-button, some repeat-ability. Nice!
On the receiving end we all know Wireshark. But the emulation was (at least to me) before some big black hole.

Yes, I know, there would be as well sendip. But at work I barely could make a Cygwin work. Not to speak about some dynamic “oh, I load more packages on the fly from the internet”-possibility, meh.
But for those interested: short tutorial for sendip.

proCreator version 0.1 is ready!

Written by  on October 22, 2017

url: https://github.com/marcelpetrick/proCreator

Clone, build (preferrably with QtCreator 4.x and Qt 5.9), run. A short howto in the readme describes how to use it.
After applying some restructuring, I got rid of some classes, simplified the code for reading the directory-content and for filtering. Kudos to the Qt-library!*

* Three slogans I like to stick to:
– Keep it simple (and stupid).
– Don’t re-invent the wheel.
– Functionality first.

Addendum: the proCreator was used now to revive two projects for which only source-code, but no “make-files” (pro, qbs, mpc, cmake ..) existed. It did its job 🙂

proCreator: another helper for legacy Qt-projects

Written by  on October 21, 2017

Ok, today at work I ran into the problem that for a Qt-project we have the code, the binaries and an awkward buildsystem (mpc). But I don’t want to process first the mpc and then fire up Visual Studio and wait for hours until the whole solution has been build. I want to use QtCreator! <3 So, there was never a real pro-file. The project consists of about ten classes, some forms and one ressource-file. Not much, possible to tinker it manually into a self-generated pro-file. Which can be processed then by QtCreator or qmake. (Hint "ls -X" is helpful for sorting by filetype.) But: why not delegate this to a small tool? First I thought about bash, then ... "maybe something better, like Python" ... and then ... why not Qt itself? So, please have a look at https://github.com/marcelpetrick/proCreator, which is half-way done. Outputting works. Just input-grabbing has to be implemented. Should be ready by sunday 🙂

Will keep you updated.

Enforce HDMI with 1920×1080 on Raspberry Pi 3 and Raspbian

Written by  on August 6, 2017

Ok, we have a brand new RPi, an SD-card with the latest Raspbian, some brand new monitor with HDMI-input only.
Everything is set up, the power plugged in, one LED shines, another one, then “no signal” on the monitor.
0. SSH-access not possible due to the fact that because of those botnet-takeovers of RPi in the past the default access was disabled for fresh images.
1. Wifi with VNC also impossible, because how to set the Wifi-credentials if you can’t see something?
2. VGA not possible due to hardware-limitations.
Great 🙂 I love when soft-/hardware does not work out of the box :’)

After a while of tinkering I remembered that I had to enforce the HDMI-ouput on the first RPi (the one for the catcam).
Can be set inside /boot/config.txt (leafpad is the current default editor on Raspbian).

Prepare an SD-card for Raspberry Pi (3)

Written by  on July 30, 2017

Download latest Raspbian-image:
* https://downloads.raspberrypi.org/raspbian_latest

Install etcher:
* add “deb https://dl.bintray.com/resin-io/debian stable etcher” to /etc/apt/sources.list
* “sudo apt-key adv –keyserver hkp://pgp.mit.edu:80 –recv-keys 379CE192D401AB61”
* “sudo apt update && sudo apt install etcher-electron”

Use etcher .. (I think this step is self-explanatory).

20190807: etcher for Win (10): https://github.com/balena-io/etcher/releases/ – also as portable version