Category Archives: Computer

Phpipam – Added Switch port Custom Field

Added custom fields to Phpipam, so i can remove my port sheet and administer everything in Phpipam. And to prepare for a Augmented reality project i want to create.

Howto add fields:
Go to the administrator menu on the right.
Select IP related management > Custom fields
Custom IP addresses fields press the plus sign
Give it a name and description.
I’m using varchar(10) at the moment
so i can enter switchname:port (media:4)

See below for a example: Using a QR code and the information, i want to display port information using a app.

Example Augmented switch ports

Dedup script v0.2

Update 20220510

Sorting out my fileserver, i had the need for a deduplication script.
Many files i’ve been copying from backup, clouds mobile devices and workstation. Inevitable to get many copies.

Below script walks a directory, using locate it tries to find files with same name. Using a md5sum it wil check if it is the same file, when found a simular file it stops searching, removes the one from the check-directory and checks the next one.

#!/bin/bash
# Copy this script to your to clean directory, 
# when you got a copy on your fileserver from this script
# then the copy in your clean dir will be removed also.
# Dont want that? change
# find -type f | 
# into
# find -type f | grep -v <nameofthisscript> |

# dont is current directory, skip these from locations
dont=$(pwd)
# Never start in /mnt ? uncomment below
# echo "$dont" | grep "^/mnt" && ( echo "start in tank" ; exit )

find -type f | while read file ; do
        filemd5=$(md5sum "$file" | cut -f1 -d" ")
        basenamefile=$(basename "$file")
        echo "searching $basenamefile"
        locate -i "/$basenamefile" | grep -v "$dont" | while read location ; do
        if [ -f "$location" ] ; then
                locatedfilemd5sum=$(md5sum "$location" | cut -f1 -d" ")
                if [ "$filemd5" == "$locatedfilemd5sum" ] ; then
                        echo "found same md5sum at $location"
                        rm "$file"
                        break
                fi
        fi
        done
done
# Remove empty dirs?
# find . -type d -empty -delete

Locate can be slow, sometimes it is better to put the locate DB in memory of on another fast storage system.

mkdir /ramdisk
mount ramfs -t ramfs /ramdisk/
cp /var/lib/mlocate/mlocate.db /ramdisk/ 

# change above script locate command
locate -d /var/lib/mlocate/mlocate.db -i IMG20191123.jpg

And remove empty directories?
Add below at the end of the script

find . -type d -empty -delete

C64 and SD2IEC

As posted before ( https://www.henriaanstoot.nl/2022/04/09/c64-plus-drive-running-again/ ) i’ve got a little gadget which emulates a C64 diskdrive.

The SD2IEC connected

I’ve been using this for a while now, and i’m really impressed by it. It just connects to the Serial Din of your C64, draws power from the Cassette port. … And even looks like a mini drive!

I’ve been converting Disks to images as well as runnig previously converted D64 images on a real C64 again.

Also the internet provides loads of images to run again.

Converting and running:

  • For real floppy to image i used a empty image file. Made my real original drive device number 9, and used Dracopy (also below)
  • Image running on your real C64, just put a D64 disk image on your SDcard.

There is a disk selector and run program you can use. (See below)
Also you can use the buttons for disk swap/change.

FB64 tool to select a D64 image to start
Dracopy

MPF-1B – Z80 Training kit

One from my collection: A training kit for learning to write machine language.

Update: 20220514 – Save and Load a program
Update: 20220829 – Mad-1 computer runaway movie

A little example, life programming a little machine code.

ORG 1800
0E 80              ; LD C,0
21 C0 00           ; LD HL,00C0
CD E4 05           ; CALL 0X05E4
0E 01              ; LD C,0
21 00 01           ; LD HL,0100
CD E4 05           ; CALL 0X05E4
C3 00 18           ; JMP 0X1800

Found this cameo in the movie “Runaway”

Using a tape and COMX-35 cassette player, i can store and retreive programs

Old Skool saving a program
And loading a program

Above i mentioned a Runaway Cameo .. well there is a MAD-1 system cameo also. (Which also i in my collection)

GNS3 Testing with Mikrotik

All my Mikrotiks are running production, so i need a virtual environment

sudo add-apt-repository ppa:gns3/ppa
sudo apt update                                
sudo apt install gns3-gui gns3-server

git clone https://github.com/GNS3/ubridge.git
cd ubridge
sudo apt-get install libpcap-dev
make 
sudo make install

reboot

nohup gns3server &
gns3

edit > preferences 
qemu 
qemu vms
New and select chr-6.48.6.img

New project > select vm

NOTES

ping not working? use even number interfaces (8)

garbled output? .. Answer (Y/N) with N when starting telnet. Or turn off and on again. 

C64 Tape found

Tape i found yesterday

I found a cassette tape yesterday. I was really curious .. dont remember making this.

Connected a tape drive to my C64 and tried to get the damn thing to read the tape.

Commodore tape drive

Got stuck on READY’s with no programs. Being a little rusty into using C64 i tried:

  • L+shiftO
  • shift break
  • LOAD”$”,8
  • LOAD”$”,8,1
  • LOAD”*”,8

Maybe there was a turbo loader used?
Maybe my tape unit wasn’t aligned?

Tried multiple tape units, couldnt find a Tape Head Alignment Program like:

So i used another method to see if data was recoverable.

Using UberCassette or AudioTap

Above are two examples with uses recorded wave files and calculations to generate the original written bits!

Recorded the tape to mono wav file using a generic linux recording application.

ubercassette taperecording.wav mytape.tap 

Started to build a Drawbridge

For my amiga i started to build a floppy disk reader/writer using a arduino.
I found a superb project by rob smith.
It uses only a arduino pro and a FTDI USB to serial breakout board, to raw read and write disks.
I wanted to convert my own created amiga disks to PC image to use in a emulator like vice.

http://amiga.robsmithdev.co.uk/instructions/promini

I’m not going to copy his website, with all instructions. Only my personal experiences.

Starting with … don’t use a IDE cable, and start soldering .. it is a diskdrive cable .. connector doesn’t fit! ..

Getting components and flashing arduino … no brainer

How many vlan’s are enough?

Many years ago i started segmenting my network using vlans.

In 2022 i started to reconfigure my lab and using a lot more Mikrotik switches.
So how many … is to many, because i always overdo stuff.

Well .. is 9 to many for home environments?

  • default vlan – did’t bother to configure
  • old DMZ .. to be migrated
  • DMZ – my servers live here
  • Wifi personal workstations – Mobiles and laptops .. macaddress limited
  • IOT – only arduino’s, raspberries and other hardware live here
  • Personal workstations – UTP connected workstations with less networking limitations
  • LAB – My lab environment, Ovirt virtualisation for fun and manage access to servers in dmz
  • Storage – my SFP enabled all-flash storage
  • Management – really tight restricted access to management interfaces (switches/routers/storage/ILO)

Hard to manage? All those vlan’s? .. Sure, but i learn a lot!
(Not really .. when you got the basics down, more of the same.
Hardest part? .. not cutting-off connections/switchports you are using!)

Working Amiga 500

Got a working amiga again. \o/ woot
Needed to replace Paula chip, cleaning and some TLC.

Modulator
Chip donor

Scart cable i’ve got is one without the resistors, so my monitor isn’t detecting the signal.
Using a A520 modulator works. At least RF, don’t know why RCA/composite video isn’t working.

Even a memory expansion and second drive (5.24 inch) are working.

One of the first disks i tested

To do:

  • Fix something to get disk images from and to my pc.
  • (My old catweasel card only fits in a ISA slot which i don’t have any more)
  • I was wrong .. i’ve got a IV Catweasel .. PCI it is
  • Fix scart
  • Fix my Action Replay, which i soldered into a non working state apparently .. 🙂
  • Get a better mouse!
Catweasel IV

Disks to convert:

  • Personal text files from ages ago
  • My first seka demo
  • My oscillator drawing program
  • Other assembly source files

Got another one running today also: