2022-07-29

HifiBerry AMP2

Setup of a HifiBerry AMP2...on a Rapsberry Pi 2.

First attempt was with Volumio, as advised by a friend. Well that works, but I personally find the interface a horror, and I seem to lose control of the Pi since Volumio is a full OS that seems only accessible by web interface. No thanks.

Using Raspberry Pi OS:

- download Raspberry Pi OS lite (command line is fine)

- extract the image

- dd the image to the sd-card

dd if=/home/paul/2022-04-04-raspios-bullseye-armhf-lite.img of=/dev/sdb bs=1M

- mount it to enable ssh

touch /boot/ssh

- I also had to set a password for the pi user, since 'raspberry' was not accepted?

- Boot the Pi (the HifiBerry is still attached)

- ssh into the Pi 

apt update
apt upgrade
apt install vim
vi /boot/config.txt
#dtparam=audio=on
#dtoverlay=vc4-kms-v3d

# added by paul 2022-07-29 for HifiBerry AMP2
dtoverlay=hifiberry-dacplus
force_eeprom_read=0


Comment out the first two lines, add the last two. Check here for other HifiBerries.

Now, before using mplayer or something, LOWER THE VOLUME! Use a really low value, and gradually go up while playing music since the default is extremely loud.

amixer -c 0 sset Digital "20%"

Thanks for listening :)

2022-07-17

Vier bezoekjes van de voorbije maand

XPO Space

Zeker doen als je interesse hebt in ruimtevaart, er staan enkele boeiende objecten op ware grootte en dat geeft toch een andere indruk. De geschiedenis van de ruimtevaart wordt er goed in beeld gebracht, helaas gaat de rest van de XPO enkel over de Verenigde Staten, Rusland en een beetje ESA. Geen woord over de Indische, Japanse of Chinese ruimtevaart van de laatste tien-twintig jaren.

Er staat ook een foute schaal bij een Saturn V (1:144 ipv 1:72) en ze geven een nieuwe betekenis voor een 'dag' (op Aarde is een dag 24u, volgens XPO is een dag op de maan 14 Aardse dagen, maar dat moet 28 zijn gezien de nacht ook een integraal deel is van de dag).


Maagdenhuis Antwerpen

Het Maagdenhuis is enerzijds een standaard museum met schilderijen (ze hebben Pieter Paul Rubens, Jacob Jordaens en Antoon van Dyck!) en oude voorwerpen, anderzijds geeft dit museum duidelijk aan hoe de tijdsgeest kan veranderen.

Hier staat ook de houten Clara (helaas bestaat het restaurant met dezelfde naam niet meer).


Mayer van den Bergh Antwerpen

Mayer van den Bergh is wereldberoemd voor al wie 'de Dulle Griet' van Suske en Wiske heeft gelezen. Het schilderij met dezelfde naam van Pieter Breugel is gerestaureerd sinds ik het de laatste keer zag, en ja, het ziet er geweldig uit vandaag.

Behalve de schilderijen en de (soms heel oude) voorwerpen, vind ik hier ook de kamers zelf al de moeite om te bekijken.


Rockoxhuis Antwerpen

Voluit het Snijders&Rockoxhuis is boeiend als je graag oude schilderijen ziet. Je krijgt hier een ipad om informatie te lezen over alles wat er staat (of hangt), en dat vind ik veel beter dan een audioplayer omdat ik veel liever lees dan luister (of kijk).

Hier hangt het beroemde spreekwoorden schilderij van Pieter Breugel. Er staat nu een touchscreen bij dit schilderij dat alle spreuken verraadt... maar misschien is het leuker om er zelf een paar te ontdekken die vandaag nog gangbaar zijn.


2022-07-02

Scripting FreeCAD with Python

A wise person recently told me:

"Release early, release often!"

So here goes... I know a teeny-weeny bit of Python and have recently learned to enjoy FreeCAD. This morning I discovered that FreeCAD can be scripted using Python, so here's my first attempt. Any hints are welcome.

 

 

The script creates a (very flat) cube, attaches four smaller flat cubes that serve as tenons, and then cuts out four small cubes that act as mortises. It ends by creating four simple copies of this piece, forming a four-piece puzzle.

The next step is to automate the inclusion of an SVG file on the surface of these pieces.

2022-05-15

Three books

 Two books about The Witcher and eentje over onze maatschappij.



 

I never played The Witcher game, but I did see the TV-series' first season in the months before Covid-19. The books are about the same characters, Geralt, Ciri, Yennefer and the others, but the story details differ from the TV-series. I saw the second season before I read any of the books.

Some dialogues are identical in both books and TV. And yes, the books also mix time periods! Anyway, so far these books are entertaining and I will definitely read more (I got eight, which is all of them I think).


While looking for wine in Antwerp I came across a 'Books & Wine' store. I did not find the wine I was looking for so I bought this book.

Bart Verhoeven is een millennial (een dertiger vandaag) en geeft zijn kijk op onze maatschappij. Hij slaat met momenten de nagel op de kop en het was leuk om typische Gen X observaties te lezen, maar dan geschreven door een snotneus. Het boek mocht ook 250blz langer zijn.

Hier en daar had ik wel mijn bedenkingen, zo kon ik me niet identificeren met de 'typische mens' in het begin van het boek. Ik laat immers mijn gsm achter als ik de stad in ga (het is rustgevend om offline te zijn in First life) en heb bijna nooit een smartphone bij.


2022-05-14

Three books

An emotional book about shame, a historical book about Constantinople and an interesting take on prehistory (and society).

 

Three book covers
 

Brene Brown has a world famous Ted talk, though I must admit I didn't really understand it back in 2010. But when a beautiful South American lady gives you a book, then you read it. I read this in the summer of 2019 I think, before Covid-19.

This book about vulnerability, about shame, gave me a lot of insight in human behaviour, including my own. I did not realise how important shame was in life. Thank you Brown for writing this.

 

Lost to the West was upvoted on Hackernews as an interesting read. I was not disappointed. The book is about the East Roman Empire, on which we did not spend much time in school. We studied Egypt, Greece and Rome in detail, but only the Western part of Rome until the split in East and West Roman Empires. School only mentioned that the Eastern Empire lasted for 11 centuries, but that was it.

Some people may find this book with 1100 year history of emperors boring, there is a lot of repetition, but the message is intriguing. Constantinople, now Istanbul, and sometimes called Byzantium, really did shape Western Europe. This empire is at least as important as the Greeks and the (West)Romans to the current society in Europe.


The Sapiens book has been recommended to me by several people. I like prehistory a lot, it's my favorite time period. The book is interesting, and really easy to read, but is it science? I don't know. It's a good book though!

 

2022-04-17

Scary car software updates

I have a user account (yes really) in a Hyundai Kona electric car.

A while ago there was a software update and now the owner cannot play radio (or any other music) through the car when Bluetooth on her smartphone is active. The car demands that music is played through the smartphone?!

Disabling Bluetooth on the smartphone solves this problem, but then phone calls are not handsfree?! The owner never accepted the new EULA for the update...

Yesterday I drove the car with my user account and was confronted with the new EULA. I decided to read it, but even though my account is in English (and the other account is in Dutch), this EULA was presented in French?!

I declined this EULA (the choice was 'agree' or 'disagree' in English even though the text was in French). The car immediately said "Audio Off". I could not open the "radio" menu on the screen, and also could not access the "media" menu to play the songs that I had been playing in that car from a USB stick since this summer?!

I find this very scary. 

Luckily I don't "own" a car. But can it even be considered "owning" if features can be disabled by the manufacturer?!

2022-02-17

Three books

 One book about science, one book about spying and eentje over mensen.

Three books

I finished "Lost in Math" by Sabine Hossenfelder last month. It is a story of her interviewing scientists that try to find order in (mainly) the smallest of elements. The gist is that while there is a lot of (mathematical) beauty in science (think how nice the atoms are for example), that most scientists are distracted by beauty while there is a real possibility that breakthroughs are going to be ugly (e.g. the standard model of Fermions and Bosons).

 

I am late to the party for reading "Permanent Record" by Edward Snowden. He tells his life story, from his first connection to the Internet, to being a 'document manager' in the NSA. The first half of the book is predictable, the second half is exciting. I learned that he never meant to go to Russia, he just got stuck at the airport in Moscow because the USA had revoked his passport.

Strange world though, I grew up with Russian dissidents fleeing to the *free* West. Today Snowden (and Assange in a way) are making the reverse journey.


In het derde boek "De meeste mensen deugen" van Rutger Bregman zit ik nog maar aan blz 70, maar ik wou toch al een citaat meegeven; blz 28:

"Koningen en dictators, gouverneurs en generaals denken dat gewone mensen egoïstisch zijn, omdat ze dat zelf zo vaak zijn. Ze gebruiken grof geweld omdat ze iets willen voorkomen dat zich alleen in hun eigen fantasie afspeelt."

Yep, niet alle koningen uiteraard, maar ook heel wat managers, vrees ik.

EDIT: Dit boek is zeker de moeite om te lezen. Het geeft een originele kijk op een tiental zeer bekende psychologische experimenten. Helaas komt het allemaal wat sensationeel over; boeiend en leuk dus, maar misschien niet correct.

2021-10-24

Reading books

This post is meant to encourage me to read a bit more (paper books). By the way, I thought I was reading four books simultaneously, but when I put them next to each other it turned out to be seven.

Form left to right (writer-title(year) pages read-total pages):

Daniele Benedettelli - Creating Cool Mindstorms NXT Robots(2008) 24-575
Leo Tolstoj - Oorlog en Vrede(1869, NL translation 1973) 115-462
Dirk De Wachter - De kunst van het ongelukkig zijn(2019) 35-101
Allen/Fonagy/Bateman - Mentaliseren(2008/2019 edition) 30-368
LEGO and philosophy(2017) 56-226
Charlie Mackesy - The Boy, the mole, the fox and the horse(2019)
Michael Collins - Carrying the Fire(1974) - finished

Personal goal: finish at least three more of these before 2022.

I just finished Michael Collins - Carrying the Fire and it took me five weeks, which I consider a bit too long for a 470-ish pages book. It was a very good book though. If you're into space travel, then I would definitely recommend it. It also proves how the Sixties was vastly different to today, for example of the fourteen astronauts selected in 1963, four died during training. Two of the nine also died. Such numbers are unacceptable in 2021, even for 'dangerous' jobs.

The Daniele Benedettelli book is about programming Finite State Machines using Lego robots. I don't know much about programming, but this looks like fun. Thing is I need to build some Lego robots (like this one) to continue this book.

And I probably need to start from page 1 again in War and Peace because of the many characters that I forgot.

Some other books that I read the past three years are:

Celestin-Westreich/Celestin - Observeren en Rapporteren
Dick Swaab - Ons creatieve brein
Dirk De Wachter - Borderline Times
Dirk De Wachter - De wereld van De Wachter
Etienne Vermeersch - Over God
Etienne Vermeersch - Provencaalse gesprekken
Jan Van de Craats - Basisboek wiskunde
Jude Woodward - The US vs China
Paul Verhaeghe - Autoriteit
Paul Verhaeghe - Identiteit
Randall Munroe - Thing Explainer
Randall Munroe - What If
Rebecca Smethurst - Space, 10 things you should now
Robert Bly - De Wildeman
Terry Goodkind - Law of Nines
Terry Goodkind - Severed Souls
Terry Goodkind - The first Confessor
Terry Goodkind - The Omen Machine
Terry Goodkind - The Third Kingdom
Terry Goodkind - Warheart
Thomas D'ansembourg - Stop met aardig zijn

Most of it non-fiction apparently. I really enjoyed 'Borderline Times' and both books of Paul Verhaeghe and Dick Swaab. I couldn't really get into Robert Bly or Thomas D'Ansembourg (but collaborative communication gives me a lot of insight in people).

2021-07-03

VRT radio streams en reklame

De VRT radio streams, zoals deze (http://icecast.vrtcdn.be/radio1-high.mp3) hebben sinds kort de neiging om reklame te spelen als je ze start. Niet altijd, maar wel regelmatig.

Zonet (21u en enkele seconden) wou ik naar het nieuws luisteren , maar er begon reklame te spelen. Ik laadde de stream opnieuw en de reklame begon opnieuw (terwijl het nieuws bezig was, maar dat kreeg ik dus niet).

Een paar dagen geleden had ik dat ook al met de Radio 1 stream, telkens reklame als je de stream start. Dit is irritant.

Tijd dus om het script aan te passen en de eerste 60 seconden van de stream te muten. De cronjob om het nieuws te spelen kan dan een minuut eerder starten.

 

UPDATE 2021-09-15: dit werkt

#!/bin/bash

export HOME=/var/www
pkill mplayer

mplayer -volume 0 -slave -input file=/var/www/master http://icecast.vrtcdn.be/radio1-high.mp3 &

sleep 60

echo volume 100 1 > /var/www/master
exit

2021-05-25

Vaccinated

Got my first Covid-19 vaccine shot today, and apparently also a new wireless device on my home network:




2021-05-19

Tide bestek (Deel 2)

Elf jaar geleden blogde ik over mijn Tide bestek. Bij deze een update.

Ik weet totaal niet waarom dit mij nu weer boeit, misschien omdat dit in de jaren 70 ons thuis bestek was? Toch zou ik graag de ontbrekende vleesvork, minivork en vismes hebben, wie wil ruilen?

Hier twee foto's van wat ik nu heb: (De inleg van de vleesvork, het kleinste vorkje en het vismes zijn copyright S.R.)

De geschiedenis van dit bestek: Het was te krijgen via premiebons die bij Tide waspoeder zaten in de jaren 1950 (en jaren 60?). Er bestaat een FB-groep voor Tide bestek, maar ik zit niet op FB. Veel kans hebben ze daar meer foto's en ruilmogelijkheden.

 

UPDATE 2021-05-20: Joepie 6 dessertvorkjes

UPDATE 2021-06-21: Danku Laura C. voor de vleesvork in uitstekende staat. Foto hieronder van deze grote Tide vork naast het grote mes (in mindere staat).


 

 

 

Nu enkel de vismesjes nog...

 

EDIT 2022-02-28: foto achterkant voor Hans


 

 

 

 

2020-06-07

tmux black

tmux upgrade from 2.8 to 3.0...

# invisible separators
set-option -g pane-border-fg black
set-option -g pane-border-bg black
set-option -g pane-active-border-fg black
set-option -g pane-active-border-bg black

becomes

set -g pane-border-style bg=black,fg=black
set -g pane-active-border-style bg=black,fg=black

as mentioned in the changelog.

2015-05-11

new data center

My new data center is under construction (two Raspberry Pi 2 and one Raspberry pi model B).


2015-04-24

Raspberry Pi case with Lego

In case you want to build a Raspberry Pi case out of Lego, here is mine.


2015-03-26

black beer

There is always room for beer (linky).







Inglorious Quad : excellent !
Oesterstout: excellent !
Embrasse: very good.
Zumbi: excellent !
Barbe Noire: very good.

2014-09-06

Vagrantfile (this is just a bookmark)

This is my (thank you Abel) current Vagrantfile to quickly create a number of servers with two extra disks and three extra network cards:

VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
 config.vm.provider :virtualbox do |vb|
  vb.customize ["storagectl", :id, "--add", "sata", "--name", "SATA" , "--portcount", 2, "--hostiocache", "on"]
 end
 (1..3).each do |i|
  config.vm.define "server#{i}" do |node|
   node.vm.hostname = "server#{i}"
   node.vm.box = "hfm4/centos7"
   config.vm.box_check_update = true
   node.vm.network :public_network, ip: "10.1.1.#{i}", netmask: '255.255.255.0'
   node.vm.network :public_network, ip: "10.1.2.#{i}", netmask: '255.255.255.0'
   node.vm.network :public_network, ip: "10.1.3.#{i}", netmask: '255.255.255.0'
   config.vm.provider "virtualbox" do |v|
    v.name = "server#{i}"
    v.memory = 512
    v.cpus = 1
    v.customize ['createhd', '--filename', "server_#{i}a.vdi", '--size', 8192 ]
    v.customize ['createhd', '--filename', "server_#{i}b.vdi", '--size', 8192 ]
    v.customize ['storageattach', :id, '--storagectl', 'SATA', '--port', 1, '--device', 0, \
'--type', 'hdd', '--medium', "./server_#{i}a.vdi"]
    v.customize ['storageattach', :id, '--storagectl', 'SATA', '--port', 2, '--device', 0, \
'--type', 'hdd', '--medium', "./server_#{i}b.vdi"]
   end
  end
 end
end


2014-05-19

Reserved DNS TLD's .invalid ?

I (wrongly) assumed that using a .local domain would never bother the root dns servers. It does (about 1500 q/sec).

So I read the relevant rfc's (2606 and 6761) where it clearly states:

...caching DNS servers SHOULD, by
default, generate immediate negative responses for all such
queries.  This is to avoid unnecessary load on the root name
servers and other name servers...
 
So I did a small test with the most recent bind9 in Debian as a caching only server, and it turns out it sends .local .localhost .example and .invalid to the root name servers ?! Only .test has an immediate response.


root@debian7:~# tcpdump port 53 -l | grep NX &
[1] 5699
root@debian7:~# tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes

root@debian7:~# nslookup
> server 127.0.0.1
Default server: 127.0.0.1
Address: 127.0.0.1#53
> linux-training.local
09:22:15.932194 IP f.root-servers.net.domain > 10.0.2.15.46669: 49328 NXDomain*- 0/6/1 (656)
09:22:15.997731 IP j.root-servers.net.domain > 10.0.2.15.47262: 43556 NXDomain*- 0/6/1 (669)
Server:         127.0.0.1
Address:        127.0.0.1#53

** server can't find linux-training.local: NXDOMAIN
> linux-training.localhost
09:22:23.099452 IP e.root-servers.net.domain > 10.0.2.15.60696: 22464 NXDomain*- 0/6/1 (673)
Server:         127.0.0.1
Address:        127.0.0.1#53

** server can't find linux-training.localhost: NXDOMAIN
> linux-training.test
Server:         127.0.0.1
Address:        127.0.0.1#53

** server can't find linux-training.test: NXDOMAIN
> linux-training.example
09:22:42.124036 IP e.root-servers.net.domain > 10.0.2.15.7293: 8476 NXDomain*- 0/6/1 (661)
09:22:42.141847 IP e.root-servers.net.domain > 10.0.2.15.15481: 31139 NXDomain*- 0/6/1 (671)
Server:         127.0.0.1
Address:        127.0.0.1#53

** server can't find linux-training.example: NXDOMAIN
> linux-training.invalid
09:22:49.660427 IP e.root-servers.net.domain > 10.0.2.15.60321: 15655 NXDomain*- 0/6/1 (671)
09:22:49.753120 IP l.root-servers.net.domain > 10.0.2.15.63563: 48281 NXDomain*- 0/6/1 (671)
Server:         127.0.0.1
Address:        127.0.0.1#53

** server can't find linux-training.invalid: NXDOMAIN


So I visit the root dns server stats and notice the top queries (in queries/second):

1 .com 3500
2 .net 2500
3 .local 1400
4 . 1100
5 .home 1100
6. (.com base 64)
7 .org 400
8. .belkin 300

The top five queries for BRU01 (a Belgian root name server) are a surprise:

1 .home 240
2 .localhost 53
3 .local 50
4 .com 19
5 .ru 12

(.be is negligible with 0.4 queries/second)


cheers,
paul

2014-05-16

Coffee or Tea ? Yes!

When people ask me:
"Do you want coffee or tea?" (*)
Then I answer:
"Yes."

... and most assume that I want to be funny, but I don't. I just don't care which of the two (coffee or tea) you give me, I am happy with both.

Turns out I am a hacker.

(*) Do you want spaghetti or rice ? Yes!
(*) Leffe or Chimay ? Yes!
(*) Can I see you tonight or tomorrow ? Yes!


It gets worse when questions contain all possible actions:
(*) Should I stay or should I go?
(*) Can I keep the book or do you want it back ?
(*) With or without sugar ?
 You just gave me all possible options ?! What kind of trickery questions are these ?!

;-)

2014-04-19

Vagrant: Creating 10 vm's with 6 disks each

Hello lazyweb,

the Vagrantfile below works fine, but can probably be written simpler. I've been struggling to create variables like "servers=10" and "disks=6" to automate creation of 10 servers with 6 disks each.

Drop me a hint if you feel like creating those two loops.


paul@retinad:~/vagrant$ cat Vagrantfile
hosts = [ { name: 'server1', disk1: './server1disk1.vdi', disk2: 'server1disk2.vdi' },
          { name: 'server2', disk1: './server2disk1.vdi', disk2: 'server2disk2.vdi' },
          { name: 'server3', disk1: './server3disk1.vdi', disk2: 'server3disk2.vdi' }]

Vagrant.configure("2") do |config|

  config.vm.provider :virtualbox do |vb|
   vb.customize ["storagectl", :id, "--add", "sata", "--name", "SATA" , "--portcount", 2, "--hostiocache", "on"]
  end

  hosts.each do |host|

    config.vm.define host[:name] do |node|
      node.vm.hostname = host[:name]
      node.vm.box = "chef/centos-6.5"
      node.vm.network :public_network
      node.vm.synced_folder "/srv/data", "/data"
      node.vm.provider :virtualbox do |vb|
        vb.name = host[:name]
        vb.customize ['createhd', '--filename', host[:disk1], '--size', 2 * 1024]
        vb.customize ['createhd', '--filename', host[:disk2], '--size', 2 * 1024]
        vb.customize ['storageattach', :id, '--storagectl', "SATA", '--port', 1, '--device', 0, '--type', 'hdd', '--medium', host[:disk1] ]
        vb.customize ['storageattach', :id, '--storagectl', "SATA", '--port', 2, '--device', 0, '--type', 'hdd', '--medium', host[:disk2] ]
      end
    end

  end

end

2014-01-15

The grand Windows vs Linux fight

A lot of muggles are convinced there is some big battle going on between Microsoft and Linux. They are wrong.

Truth is that only a minority of very noisy wannabe-Linux users see this as a fight. I imagine this loud minority as people who once installed Ubuntu but actually spend most of their time playing games on Windows.

The reality is that most organizations use Microsoft on the Desktop and a lot of them also have one or more products like MS Active Directory, MS Exchange or MS Sharepoint.

But every other computer runs a form of Unix, very often this is Linux:
- the millions of servers from Facebook, Google, Twitter, ...
- millions of DSL modems
- more than a billion Android phones
- 98 percent of the 500 largest supercomputers in the world
- Lego robots
- space station laptops
- (in Belgium specifically stuff like the bbox and digibox etc)
- tablets, routers, firewalls, NAS devices (aka "external harddisks"), stock exchanges, radar control, gps navigation and much more

There was no battle, there is no fight, there will never be a Linux vs Windows. They are just different things, Microsoft is used for end user intranet, Linux for servers and all other devices.

(*) Sure there is also iPad, iPhone and Mac, I know that.