The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,861 other subscribers

Archive for the ‘Raspberry Pi’ Category

(53) Introducing the “Lab in a Box” Concept – Patrick Titiano & Kevin Hilman, BayLibre – YouTube

Posted by jpluimers on 2019/08/13

Related: Introducing The “Lab in a Box” Concept (ELC-E-2017-Prague).pdf

Via:

–jeroen

Read the rest of this entry »

Posted in Development, Hardware, Hardware Development, Hardware Interfacing, Power User, Raspberry Pi, Software Development | Leave a Comment »

No IPMI? Use a Raspberry Pi to remotely control the power of your computer

Posted by jpluimers on 2019/07/12

Interesting project: [WayBack] WtRPM: A Web-based (Wt) suite to power up/down your computers – mupuf.org

It hooks a RaspberryPi to your ATX power supply.

Via: [WayBack] gpio – Use Raspberry Pi to control PC’s power switch – Raspberry Pi Stack Exchange

–jeroen

Posted in Development, Hardware Development, Hardware Interfacing, Raspberry Pi | Leave a Comment »

Powering Raspberry Pi – schematics

Posted by jpluimers on 2019/06/13

Reminder to self to check out these schematics and find out how I got them in the first place.

Related: UPS Pico in Raspberry Pi as CD changer in pre 09/2002 E46 BMW 320i touring, “switchless nicd nimh battery charger circuit diagram”

–jeroen

Read the rest of this entry »

Posted in Development, Hardware Development, Raspberry Pi | Leave a Comment »

On my reading list: stuff on U-Boot, Device-Tree, etc

Posted by jpluimers on 2019/05/08

For my reading list:

It might be that Mender 1.7 and up support OpenSuSE:

via:

DTB = Device Tree Blob

–jeroen

Posted in Development, Hardware Development, Raspberry Pi, Software Development | Leave a Comment »

Smart idea: powering a stack of Raspberry Pi using 2.1mm barrel connector splitter…

Posted by jpluimers on 2019/02/20

Smart idea by [WayBacktinspin/rupy: Async. HTTP & NoSQL Distr. VHost PaaS at [WayBack687474703a2f2f686f73742e727570792e73652f636c75737465722e6a7067 (480×640):

Apart from one part I found on Amazon, most parts (and more if you want to built it for instance inside a case) can be obtained from [WayBackDC : Adafruit Industries, Unique & fun DIY electronics and kits, see the pictures and links below.

I think [WayBackpower supply options for multiple PIs – Raspberry Pi Forums got inspired by this or vice versa.

Posted in Development, Hardware Development, Raspberry Pi | Leave a Comment »

Raspberry Pi and relays – follow up on Having one Raspberry Pi reset another Raspberry Pi through relay or transistor

Posted by jpluimers on 2019/02/12

I did some more research because of Having one Raspberry Pi reset another Raspberry Pi through relay or transistor.

  • [WayBackHow To Add a Reset Switch To Your Raspberry PiRemoving and replacing the USB power cable puts undue wear and tear on your Raspberry Pi, particularly the power port itself. What the system really needs is a reset switch, but sadly none was included.
  • Grove Relay board:
    • has two versions; the V1.2 schematic adds a XC6206P302MR voltage regulator to regulate 3V through the relay coil and an extra 47k Ohm pull-down resistor.
    • has a trigger on high supporting a voltage of 3V, so it works with the Raspberry Pi 3.3V GPIO pins.
    • is “normal open”, so suits the reset scenario (connect on trigger) well.
    • has no “normal closed” header, so if you need that, you’re out of luck
    • does not have optocouplers:
      • Be careful with high voltages on supplies that differ from the one powering your Raspberry Pi
        • It’s fine for resetting another Raspberry Pi powered from the same source
      • The relay is rated 250V ~ but I’d be careful (I’m not sure if this is mains electricity 250V RMS or 250V peak; if the latter, it would be suitable to 175V RMS (approximately 250/1.42 volt).
  • An excellent description (sans optocoupler) on how to connect a relay to power, ground, signal-input and both outputs is at [WayBack/Archive.is] gpio – How to add isolation between raspberry pi and relay board? – Raspberry Pi Stack Exchange (thanks [WayBack] ppumkin).
  • Many 5V optocoupler (or optical-isolator, see video below) based relay boards work fine with the 3.3V GPIO pins from the Raspberry Pi.
    If they don’t, then there are two basic solutions:

    1. Easiest: solder an extra resistor next to the signal input of about the same value (so the voltage drop over it halves), see for instance [WayBack] Controlling a relay board from your RPi · foosel/OctoPrint Wiki
    2. Harder: put an extra transistor in between to pump up the voltage to 5V, see one of the schematics below.

Details of the above can be found from the below links and images from those links.

There is also an Android App with a RaspberryPi distribution that allows you to operate relays:

Finally there are USB relays, shown way down in this post.

Often these are part of some home automation (domotica), IoT, or other, so these are relevant too:

Read the rest of this entry »

Posted in Development, Hardware Development, Raspberry Pi | Leave a Comment »

Raspberry Pi cannot be woken up by WOL, but it can send, and there is Whack-on-LAN

Posted by jpluimers on 2019/01/17

Cool stuff if you want to make your own WOL devices out of spare parts.

From old to new:

They can be woken up by anything sending magic WOL packets, including Raspberry Pi (which cannot be woken up by them, though you could use a Whack-on-LAN for that).

Basically the Raspberry Pi cannot be woken up with WOL because of a few reasons:

  1. The ethernet chip is connected over USB so it cannot pass the WOL result further on.
  2. If it could, there still is no BIOS to process the WOL result.
  3. When it is halted but has power, the CPU isn’t active. The GPU is, but cannot process the WOL.

It can be a WOL server though: [WayBackRaspberry Pi As Wake on LAN Server: 5 Steps (with Pictures)

–jeroen

Posted in Development, Ethernet, Hardware Development, Network-and-equipment, Power User, Raspberry Pi, Wake-on-LAN (WoL) | Leave a Comment »

Some ideas to show a Google Calendar on a TV using a Raspberry Pi and HDMI output

Posted by jpluimers on 2019/01/10

Using OpenSuSE Tumbleweed E20 on Raspberry Pi 3: accessing the enlightenment desktop over VNC after automatic logon I wanted to buy an on-line read-only diary to help my mentally retarded brother see what his next few days are going to be like.

He increasingly has difficulty handling a paper agenda and has an agenda with 30 minute blocks like [Archive.isbol.com | Bureau Agenda 2017 – 1 dag per Pagina | 0041560163422 | Boeken (and the [Archive.is] picture on the right), but actually he needs 15 minute blocks during some portions of the day.

We call that kind “bureau agenda” which I think translates well into “desk diary”.

They were quite different from the agendas I used to have at school (:

[WayBack[Zonder titel] Rijam agenda 1983/84 verzamelen? Stripcatalogus op Catawiki

For most school mates, they were more like this:

Had je een O’Neill of ging je voor De Familie Doorzon? De oude agenda’s uit je middelbare schooltijd zijn de verpersoonlijking van je eigen puber-ik. Afgelopen weekend startte in het Nationaal Onderwijsmuseum in Dordrecht de toffe tentoonstelling Grow Up over die vuistdikke, volgeplakte agenda’s.

[WayBackSchoolagenda vol sentiment | Go with the Vlo

Anyway, some ideas I initially had are below.

This is what I actually did:

Two things for the future:

Initial thoughts

Raspberry based:

Chromecast based:

–jeroen

Read the rest of this entry »

Posted in Development, Google, GoogleCalendar, Hardware Development, JavaScript/ECMAScript, JSFiddle, LifeHacker, Power User, Raspberry Pi, Scripting, Software Development | 2 Comments »

OpenSuSE Tumbleweed on RaspberryPi 3: adding ” modprobe.blacklist=vc4″ to the kernel commandline was a lot tougher than I hoped for.

Posted by jpluimers on 2019/01/08

I run most of my Raspberry Pi systems headless, so I was a bit surprised that OpenSuSE tumbleweed on a Raspberry Pi 3B didn’t show anything on my HDMI monitor after I installed KDE after it switches away from text-mode boot output.

[WayBackHCL:Raspberry Pi3 – openSUSE suggests to

I see HDMI output in U-Boot, but not in Linux

The upstream Linux graphics driver for the Raspberry Pi has problems with a few monitors. The same applies to the 7″ LCD displays. In those cases, please fall back to the efi frame buffer console by passing the following into the kernel command line:

 modprobe.blacklist=vc4

However, it does not explain how to modify that “the kernel command line”.

Searching for obvious ways via “Raspberry Tumbleweed Kernel Command Line” got me to for instance

which all suggest editing /boot/cmdline.txt, however that file does not exist:

# ls -al /boot
total 34624
drwxr-xr-x  6 root root     4096 Jul 23 21:05 .
drwxr-xr-x 24 root root     4096 Jul 16 02:02 ..
-rw-r--r--  1 root root       65 Jul 16 12:42 .Image-4.4.76-7-default.hmac
-rw-r--r--  1 root root        0 Jul 16 16:56 0x75b762d5
lrwxrwxrwx  1 root root       22 Jul 16 16:34 Image -> Image-4.4.76-7-default
-rw-r--r--  1 root root 14878208 Jul 16 12:20 Image-4.4.76-7-default
-rw-r--r--  1 root root  3217519 Jul 16 12:20 System.map-4.4.76-7-default
lrwxrwxrwx  1 root root        1 Jul 16 02:00 boot -> .
-rw-r--r--  1 root root     1725 May 24 20:11 boot.readme
-rw-r--r--  1 root root     2405 Jul 16 16:56 boot.scr
-rw-r--r--  1 root root     2333 Jul 16 16:56 boot.script
-rw-r--r--  1 root root   152522 Jul 16 08:39 config-4.4.76-7-default
lrwxrwxrwx  1 root root       12 Jul 23 16:13 dtb -> dtb-4.11.6-1
drwxr-xr-x  3 root root     4096 Jul 23 16:13 dtb-4.11.6-1
drwxr-xr-x  5 root root    16384 Jan  1  1970 efi
drwxr-xr-x  7 root root     4096 Jul 24 18:27 grub2
lrwxrwxrwx  1 root root       23 Jul 16 16:34 initrd -> initrd-4.4.76-7-default
-rw-------  1 root root  8080932 Jul 23 21:05 initrd-4.4.76-7-default
-rw-r--r--  1 root root   288571 Jul 16 12:42 symvers-4.4.76-7-default.gz
-rw-r--r--  1 root root      377 Jul 16 12:42 sysctl.conf-4.4.76-7-default
-rw-r--r--  1 root root  1484762 Jul 16 16:56 unicode.pf2
drwxr-xr-x  2 root root     4096 Jul 24 09:05 vc
-rw-r--r--  1 root root  7282031 Jul 15 07:00 vmlinux-4.4.76-7-default.gz

There are other config.txt files:

# find / | grep config.txt
/boot/efi/config.txt
/boot/vc/config.txt

However, these seems to be unclear which of the two is actually used and what options can be set at all: [WayBackRaspberry Pi • View topic – aarch64 on Pi3.

So the quest continues, as a lot of settings can be applied in these files:

Setting “modprobe.blacklist=vc4”

I’ve temporarily given up on the /boot/config.txt editing, but continued searching for “modprobe.blacklist=vc4”, which lead to a few interesting results:

All of those suggest adding modprobe.blacklist=vc4 to the grub configuration. The second post actually has the most elaborate steps for this, which I’ve paraphrased into:

  1. As root, edit /etc/default/grub (make a backup first)
  2. Search for the variable GRUB_CMDLINE_LINUX
  3. Add the modprobe.blacklist=vc4to the end of the variable initialisation (ensure there is a space before it and you keep the terminating double-quote)
  4. Re-generate the grub configuration file used at boot time (make a backup first): grub2-mkconfig > /boot/grub2/grub.cfg

This solved my problem: no text output on HDMI.

Note that in order to get graphical output, you need to install any of the non-JeOS images. Installing just kde+kdm and dependencies isn’t enough to get the X server going.

–jeroen

Posted in Development, Hardware Development, Raspberry Pi | Leave a Comment »

Testing SMTP from the console on Linux, BSD and Mac OS: swaks and smtp-cli Perl script clients

Posted by jpluimers on 2019/01/03

Testing SMTP using telnet is tedious as you have to remember the commands and responses in the SMTP protocol. It gets even harder when doing SMTP AUTH, as then you have to base encode a bunch of strings [WayBackHow to Test SMTP AUTH using Telnet [Wiki] | NDCHost

Luckily there is a Perl script swaks: [WayBackSwaks – Swiss Army Knife for SMTP which does ESMTP and LMTP as well as TLS.

The funny thing is that the repository at jetmore/swaks: Swaks – Swiss Army Knife for SMTP only has the readme, but the not the script which you can get from [WayBack] swaks.pl.

Despite that, most Linux distributions have an installation package.

[WayBackswaks for OpenSuse is in the [WayBacknetwork repository, so for Tumbleweed (actually: Factory) on Raspberry Pi you need to perform this:

zypper addrepo http://download.opensuse.org/repositories/network/openSUSE_Factory_ARM/network.repo
zypper refresh
zypper install swaks

On Mac OS X it is even easier: if you have the homebrew package manager installed, you just install the [WayBackswaks formula using the [WayBack] swaks.rb script:

brew install swaks

Note there is also the smtp-cli Perl script which I mentioned before at Fake/Mock SMTP servers and services for use during development, which also does TLS, but few environments have ready built packages for them. If you still want to try it out:

For SMTP AUTH:

swaks -tls --to jeroen.wiert.me@pluimers.com --from jeroen.wiert.me@pluimers.com --server smtp.xs4all.nl --auth-user username

Which prompts for the password, then outputs like this:

=== Trying smtp.xs4all.nl:25...
=== Connected to smtp.xs4all.nl.
<- 220 smtp-cloud3.xs4all.net ESMTP ESMTP server ready -> EHLO rmbpro1tbjwp
<-  250-smtp-cloud3.xs4all.net hello [188.206.68.219], pleased to meet you
<-  250-HELP
<-  250-AUTH LOGIN PLAIN
<-  250-SIZE 157286400
<-  250-8BITMIME
<-  250-STARTTLS
<- 250 OK -> STARTTLS
<- 220 Ready to start TLS === TLS started with cipher TLSv1:DHE-RSA-AES256-SHA:256 === TLS no local certificate set === TLS peer DN="/OU=Domain Control Validated/OU=PositiveSSL Wildcard/CN=*.xs4all.nl" ~> EHLO rmbpro1tbjwp
<~  250-smtp-cloud3.xs4all.net hello [188.206.68.219], pleased to meet you
<~  250-HELP
<~  250-AUTH LOGIN PLAIN
<~  250-SIZE 157286400
<~  250-8BITMIME
<~ 250 OK ~> AUTH LOGIN
<~ 334 ############ ~> anA=
<~ 334 ############ ~> ############################
<~ 235 ... authentication succeeded ~> MAIL FROM:<jeroen.wiert.me@pluimers.com>
<~  250 <jeroen.wiert.me@pluimers.com> sender ok
 ~> RCPT TO:<jeroen.wiert.me@pluimers.com>
<~  250 <jeroen.wiert.me@pluimers.com> recipient ok
 ~> DATA
<~ 354 enter mail, end with "." on a line by itself ~> Date: Wed, 19 Jul 2017 09:09:57 +0200
 ~> To: jeroen.wiert.me@pluimers.com
 ~> From: jeroen.wiert.me@pluimers.com
 ~> Subject: test Wed, 19 Jul 2017 09:09:57 +0200
 ~> Message-Id: <20170719090957.052207@rmbpro1tbjwp>
 ~> X-Mailer: swaks v20170101.0 jetmore.org/john/code/swaks/
 ~> 
 ~> This is a test mailing
 ~> 
 ~> .
<~ 250 smtp-cloud3.xs4all.net accepted mail mXA71v00C4jr6ac01XA9Bo for delivery ~> QUIT
<~  221 smtp-cloud3.xs4all.net ESMTP closing connection
=== Connection closed with remote host.

–jeroen

Posted in *nix, *nix-tools, Communications Development, Development, Hardware Development, Internet protocol suite, Linux, openSuSE, Power User, Raspberry Pi, SMTP, SuSE Linux, Tumbleweed | Leave a Comment »