Tag Archives: hardware

Little USB password paster

When using Spice and VNC to virtual machine consoles, and remote consoles like idrac and ilo, it is not alway possible to copy-paste.

When doing maintenance it is a annoyance to type a super strong and long password by hand, Prone to typing errors, timeouts. And following lockouts.

So i wanted to auto type the password.

First solution was to bind a little bash script to a key combination.

#!/bin/bash
# Usage: make a keypress shortcut to this script
# activate shortcut, and the script wil give you 10 seconds to click and focus remote console window.
# It pastes the password, and you can press enter to login
# ( you can use xdotool also to press enter for you )
sleep 10
xdotool type "SUP3Rl00000ngandcompl3xpasswo0d@#@#@#%$%$%%$-you-cant-type-me-without-erors"

I’ve bound this to a key combination on my workstation.

gsettings set org.gnome.settings-daemon.plugins.media-keys custom-keybindings "['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/']"
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/ name 'passpaste'
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/ command '~/bin/passpaste.sh'
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/ binding '<Super>p'

This works, but only where this script is installed.
So not on colleagues machines, workstations with windows, and the super secret admin/root account sits in a file.

So i made a password key, which count be behind lock and key.

Using a digistump, a push-button and a resistor, the passpaster was born.

Program to flash on the digistump

#include "DigiKeyboard.h"
void setup() {
  DigiKeyboard.sendKeyStroke(0);
  DigiKeyboard.delay(1000);
}

void loop() {
  if (digitalRead(0) == HIGH) WorkPass();
  if (digitalRead(1) == HIGH) LtPass();
}

void WorkPass() {
  DigiKeyboard.print("SUP3Rl00000ngandcompl3xpasswo0d@#@#@#%$%$%%$-you-cant-type-me-without-erors");
  DigiKeyboard.println();
  DigiKeyboard.delay(50);
  setup();
}

void LtPass() {
  DigiKeyboard.print("secondlongpasswordifyouareusingtwobuttons");
  DigiKeyboard.println();
  DigiKeyboard.delay(50);
  setup();
}

Plug the Digispark into you machine, it wil emulate a HID device (Keyboard).
Get your remote console into focus, press button .. presto!

TODO:

  • 3D print a little case
  • pin protect?
  • rotary + display? (Like below)

It would be nice to have something like:

Rotary encoder 1 – selects which password to paste
Rotary encoder 2 – (1-255) does a encryption method on the password
Display shows : Password #32 – Crypt # 88
So you can have for example 255 passwords with 255 encryptions .. which to use when? Only you know.

Above can’t be done with a Digispark, so i’ll have to use a Arduino Pro Mini or a equivalent

Brother printer hack’s

Cartridge not recognised?
Just replace chip! With a original one

UPDATE: Maybe there is a counter in there, had a cartridge which wouldn’t work anymore ?!?

Cartridge saying .. i’m empty, but still visible ink?

Just tape up above part!

Note: there are many solutions found on the web, like opening the lid and pressing two buttons to get into a reset menu. Or Cold start your printer without cartrides 5 times to reset stored ink levels.

These are only the things I found

Portable Squeeze Server

Update : https://www.henriaanstoot.nl/2022/05/26/portable-logitech-media-server-again/


Below is a picture of my mobile LMS server i used in my car.
I only had radio and a CD player, i’m not a radio man .. folk, pipes and audiobooks


At the time i was working for Dutch Railways, imagine me walking with this blinky leds thingy, though the railway station …

It consisted of a dual port usb charger, a usb hub to power the drive, the rpi wasn’t strong enough. Thumbdrives where small in capacity, so i had to use a spinning disk harddrive.
It was only a raspberry 1, in a case i had designed and lasercutted at Fablab Utrecht.

Now you can get rid of the Usb hub and harddrive using a small but with large capacity sdcards.

I could charge the thing in my car, and when i got home, it would connect to my home wifi network, sync-ed my MP3’s and turn off.

My first raspberry Pi

Today i got my first Raspberry Pi!

Many followed

The first-generation Raspberry Pi Model B was released in February 2012, followed by the simpler and cheaper Model A.

Later i bought the Pi2, Pi3, Pi4 and the Zero’s

I like the little buggers! I’ve used them for many projects.

Aloha gave me a banana pi to try, and i’ve tried the orange pi.

Aparantly i already registered at the raspberry store 2012-02-14.
28 of May i got a “activation code” to order

Now (2023 .. all shops out of stock )

Working on the NS train displays

Working to get the Dutch Railways Signs working.

I was working on the backend, but frequently was asked to help working on the boards.

I can’t post any other pictures, because they are revealing to much information

I’ve worked on the boards, backend and a peer2peer VPN solution

Restricted Content
To view this protected content, enter the password below:

Beer crate bottle counter

Post in 2002 due to screenshot .. dont know when i build it, some years before.

Using 24 pushbuttons and a IO expander, i could count the bottles in a crate. Probably used something like a hef4067 ??

Now i probably use a weight sensor or a beer cap counter using a webcam image.

Notification to email and shopping list printer.

Web Interface

Every bottle had to be placed back upside down so the opening of the bottle would not press down on the button. Later i used springs which could hold a empty bottle elevated above the button. The weight of a full bottle would press on the button.

Web part Dopcounter (screenshot at top of page)

<HTML><HEAD><TITLE>dopDB.counter running @ fash's place</TITLE></HEAD><BODY bgcolor=white text=black>
<?
if ($show){
print "<a href='index.php'>Show Last</a>";
}
else {
print "<a href='?show=1'>Show All</a>";
}
?>
<CENTER>
<?
$db = mysql_connect("localhost", "user", "pass");
mysql_select_db("dopDB",$db);
// store voor bargraph
$store=0;
$result2 = mysql_query("SELECT max(timestamp) FROM counter",$db);
$maxtimestamp = mysql_fetch_array($result2);
$result = mysql_query("SELECT * FROM counter",$db);
while ($myrow = mysql_fetch_array($result)) {
$lenght=strlen($myrow[1]);
if ( $lenght = 24)
{
if ($maxtimestamp[0] == $myrow[0] || $show)
 {
 $row1= substr("$myrow[1]", 0, 6);
 $row2= substr("$myrow[1]", 6, 6);
 $row3= substr("$myrow[1]", 12, 6);
 $row4= substr("$myrow[1]", 18, 6);
 $row1 = str_replace("1","<td><img src='dop.jpg'></td>",$row1);
 $row1 = str_replace("0","<td><img src='dopl.jpg'></td>",$row1);
 $row2 = str_replace("1","<td><img src='dop.jpg'></td>",$row2);
 $row2 = str_replace("0","<td><img src='dopl.jpg'></td>",$row2);
 $row3 = str_replace("1","<td><img src='dop.jpg'></td>",$row3);
 $row3 = str_replace("0","<td><img src='dopl.jpg'></td>",$row3);
 $row4 = str_replace("1","<td><img src='dop.jpg'></td>",$row4);
 $row4 = str_replace("0","<td><img src='dopl.jpg'></td>",$row4);
 print "<TABLE border=15 bgcolor='#aaaaaa'><TR>";
 print $row1;
 print "</tr><tr>";
 print $row2;
 print "</tr><tr>";
 print $row3;
 print "</tr><tr>";
 print $row4;
 print "</tr><table>";
 }
$dopcounter=str_replace("0","",$myrow[1]);
$totaldop=strlen($dopcounter);
if ($maxtimestamp[0] == $myrow[0] || $show)
 {
print "<P>";
print date('l dS of F Y H:i:s',$myrow[0]); 
print "<BR><H1>$totaldop bottles left</H1>";
 }
$store = $store + 1;
$storetotals[$store]=$totaldop;
if ($totaldop < 6 && $maxtimestamp[0] == $myrow[0])
 {
 print "<BR>Time to buy some beer again!<BR>";
 }
}
else
{
print "numba bottles error! check code!";
}
}
?>

<table border=0>
<tr>
<?
$storebck=$store;
if ($storebck > 50){ $store=$storebck-50; } else { $store=0; }
while ($store <= $storebck){
print "<td bgcolor=#efefff width=10 valign='bottom'>";
$double=$storetotals[$store]*2;
print "<img src='bar1.gif' width=15 height=$double></td>";
$store = $store +1;
}
?>
</tr>
<tr>
<?
if ($storebck > 50){ $store=$storebck-50; } else { $store=0; }
while ($store <= $storebck){
print "<td bgcolor=#efefff width=10 valign='bottom'>";
print "$storetotals[$store]</td>";
$store = $store +1;
}
?>
</tr>
</table>
</BODY></HTML>

Old hardware projects unsorted – till 2000

Will add to this page … when dates are unsure

1997-2000 somewhere – Hardware webcounter

Build a hardware webcounter (it was a thing back then) , i used below schematic. Wanted to use huge 7 segment displays but never got around it to buy the large ones.. It was easily converted to multiple segments. I think i used 4 and pulses where send via a parallel port.

Old webcounter schematic

The three (my case four) buttons are to get the counter in sync with my real counter which was a CGI script. It generated html code with took numeric images and displayed these on a page, the state was stored in a file. No numbers where send to the counter, only a pulse. So no synchronisation! Not the way to do this nowadays!

Joystick recorder

I designed a joystick movement recorder for a school project.

You could record movement, and press a button to start recording. (and starting the game) It was not really usable. Because, it needed a higher recording rate, a game which always reacted to the player in the same manner. Only made a half proof of concept.

Drawing images using lasers

For another school project i wanted to be able to draw figures using a laser. One of my teachers fixed a meetup for me with a guy attending university in Enschede. He was using lasers to scan miniscule objects using a laser in groves something resembling a longplayer record.

I wanted to use two DACs to control the movement of two mirrors.
But i’d had to take into account the speed of the movement and the weight of the mirrors, else images where distorted.

He gave me a schematic which used:
2 controllabe video disc mirrors, light split glasses and amplifier part.

Previous project with Oscilloscope drawings helped, with understanding those problems.
https://www.henriaanstoot.nl/1992/01/01/oscilloscope-graphics-using-a-amiga-bonus-vectrex/

I’ve still got the components, except for the high grade laser i lend from a friend.
But a simple laser pen should suffice

Made a webinterface for my DIY webcam

Using a steppermotor controller with two motors. A video capturing device (videoblaster) and a mini B/W camera.

  • Up/down/left/right and diagonal
    • Red double speed green single speed
  • Reset view
  • 2 Presets with save and recall
Setup with parallel cable

Written software in html and some CGI scripts.
Perl and C.

#include <asm/io.h>

# C Code for moving left

int main(int agrc,char agrv[])
{
  int i,wachten;
  int richting1[8]={0x27,0x2d,0x1c,0x0d,0x03,0x09,0x38,0x29};
  int richting2[8]={0x29,0x38,0x09,0x03,0x0d,0x1c,0x2d,0x27};
  ioperm(0x378,3,1);
  ioperm(0x37a,3,1);
  wachten=100;


for (i=0; i<=7; i=i+1)
        {
        outb(richting2[i], 0x378);
        outb(1, 0x37a);
        usleep(wachten);
        outb(0, 0x37a);
        usleep(wachten);
        outb(1, 0x37a);
        usleep(wachten);
        }

 return(0);
}
#!/usr/bin/perl
# Perl CGI script 

# Uses 204 no content trick to stay on same page
use LWP::Simple;
my $img = get ('http://10.1.0.1/cgi-bin/left.cgi');
print "Status: 204 No content\n\n";

Streaming video was done using progressive JPG push.
Later i used the capturing command in the loop below.

#!/bin/sh

# push jpg, and update after 1sec
# output mime header

echo Content-type: multipart/x-mixed-replace;boundary=--WebcamRules\n
echo
echo --WebcamRules

# create stream

while true; do
   echo Content-type: image/jpeg
   echo
   cat /var/lib/httpd/htdocs/webcam.jpg
   echo
   echo --WebcamRules

   sleep 1
done

Steppermotor card was using a parallel port.

Aluminum machined part by Joost

Old skool Home Automation & GPC

The date of this post is when we worked on GMC’s GPC, but i’ll post some other own made hardware related to domotica.

GPC Original Page: https://gpc.metro.cx/gpc/README

This DIY home automation was written by GMC in C.
Later we made little microcontroller prints, which could control/switch lights and more.

PIC16x84

We uses GPASM as assembler

One of my schematics
What is this?
=============

 This is the Global Premises Control package. It is intended to be a
complete solution to the DIY home automation. It provides you with a
daemon which will centralize all control functions, and some custom
programs for sound, remote control and things like that.
 The first steps to realizing the goal was made by Koen Martens. He wrote
the first daemon and made the first support programs. Other people got
interested and ported the GPC package to their homes. Since then it seemed
wise to coordinate development to prevent from having three different
versions of the package. It is currently under development and is far from
complete.

History
=======

 15-03-98 - The first initiative
	    With the help of Henri Aanstoot and Marco Geels the first
	    cables were mounted in the ceiling at Waalstraat 136. This
            involved re-dedicating some high voltage lines for the low 
	    voltage used by GPC equipment.
	    The next few days Koen Martens spend his time writing software
	    to switch on the lights (which was not possible without
	    software anymore :). This software was very rudimentry and 
	    did not feauture the daemon yet.
 28-03-98   Version 1.0 was born.
	    The need for a global way to control the premises arose, and
	    Koen Martens decided to write a daemon which would control the
	    input and output lines, with support programs for the logic.
	    This resulted in global, the gpc daemon. 
	    Running on different servers there were programs to control
	    lights and lightswitches (light_control), sound (sound) and
	    the alarm clock (wakeup). 
 10-06-98   Version 2.0 (r0.2.0) was born. 
	    The support programs containing any logic had vanished,
	    instead the daemon had all the logic encoded in it.    
 03-07-98   Version 2.0 still.
	    - Added remote control receiver code.
 29-11-98   GPC r0.3.0
	    - Started coordinated development
 11-12-98   GPC r0.3.1
	    - Security support included, providing a (basic) interface
	      for protecting variables with passwords on a security level 
	      clearance basis.
	    - Global notify protocol added, clients can now register one
	      or more variables. This makes the old (0.3.0) polling method
	      obsolete thus reducing the network load dramatically.
	    - Logging library added.

Development
===========

 The development is done on the following beta sites:

 - Subnet
	Location	: Waalstraat 136, Enschede, Netherlands
	Site coordinator: Koen Martens AKA gmc (gmc@freemail.nl)
	Site description: Single floor appartment
			  3 occupants (1 human, 2 rats)
			  P60 32MB RAM running linux
			  486 8MB RAM running FreeBSD
			  486 8MB RAM running linux
			  DEC Writer
			  WYSE terminal
			  The 486 linux machine has the daemon, and is 
			  hooked up to the premises.
			  The P60 has a sound card and a RC receiver.
 - Lip-on-ice
	Location	: Lipperkerkstraat 321, Enschede, Netherlands
	Site coordinator: Willem-Jan Faber AKA aloha AKA xtz ( And Henri Aanstoot AKA Fash)
			  (w-jfaber@freemail.nl)
	Site description: Three floor house
			  Four occupants (3 male, 1 female)
			  Connected to three other premises.
			  Computer list not yet in!
			  
 - Venom
	Location	: P. Mondriaanstraat ??, Almelo, Netherlands
	Site coordinator: Sebastiaan Smit AKA venom (wssmit@freemail.nl)
	Site description: Three floor house
			  Three occupants
			  4 computers

 If you would like to join the development, mail me at gmc@freemail.nl.


In progress
===========

 The following projects are in progress right now:
	- A script language to describe the control logic for the daemon
		Koen Martens
	- An cgi interface for the http connectivity
	- Support for sharing variables on multiple daemons

Usage
=====

 Use is for your own risk. We can not be held responsible for any damage
resulted from running any of this software.
 Keeping that in mind, usage is very simple but work needs to be done on
the documentation :)

DIY door sensor using a bend CDROM and a sensor i got

I’d would send a signal to our computers and playing a sound sample on our sound system. Also a IRCbot named (lampje) would mention “Backdoor open” in our own channel. (We where running our own IRC servers, interconnected .. because we can. A average of 3 Clients per server sound the way to go .. LOL )
Lampje the IRCbot also controlled the livingroom light and more.

Hardware scroller

I came across a really old post from 1996.
It was from a good friend of mine Martin.

It was a while before this post, which was by Fido mail, that he came to our house with a great idea. (1993)

FidoNet is a worldwide computer network that is used for communication between bulletin board systems (BBSes). It uses a store-and-forward system to exchange private (email) and public (forum) messages between the BBSes in the network, as well as other files and protocols in some cases. (Dial-up!)


He took a record player and connected leds to it. Connecting this to a C64 and synching the speed of rotation and the output, he wanted to display text on this.

Probably this was the mistery tape i mentioned here:

So he did the most of the programming, i made a version of my own and added a sync bit to it. This enabled it to get the scolling text more “in place”

Some pictures from Sepp’s website

--- Terminate 3.00/Pro
 * Origin: Sepp Mail Development Department (2:283/334.13)

Ä Mail van en voor mij ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄBewarenÄ
Msg  :  781     [1-3089]                   Loc
From : Martin ********                     02-Apr-96  00:59:51  2:283/334.13
To   : Henri Aanstoot                                           2:283/334
Subj : Hardware scroller
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄSEPP.INTERESSANTÄ
* Written in: TUKKER=PROAT
Ha die Henri!
 MM>> Heb je de laatste KIJK al gezien??? Die eikels hebben onze 8-ledjes-
 MM>> hardware-scroller na zitten maken, alleen scrollt-ie bij hunnie niet
 MM>> in de vorm van een cirkel, maar hebben ze mijn ruitenwisserversie
 MM>> gebruikt... En het enige wat-ie doet is de tijd aangeven...
 HA> Bah, wat een na-apers.
Ja, vreselijk...

 HA> Maar die van ons was toch beter!
Inderdaad... kunnen ze nog wat van leren... :-)

 MM>> Btw is jouw prototype nog operationeel??? De mijne niet, omals de
 HA> Nee, ik wil heb eigenlijk opnieuw bouwen! (was ik al een tijdje van plan)
Met full-colour LEDs, 16 hoog???

 MM>> elastiekjes die ik heb gebruikt in de loop der tijd helemaal poreus
 MM>> We moeten maar weer eens iets compleet revolutionair nieuws uitvinden,
 MM>> ik heb nog wel een paar innovatieve ideejen...
 HA> Als je gaat kijken wat ze allemaal van mijn gejat hebben .......
Nou, vertel...

To the loo,

Martin ********