Floppy kiekjes uploader

Uit Hackalot - Hackerspace Eindhoven
Ga naar: navigatie, zoeken


Floppy kiekjes.jpg
Project Floppy kiekjes uploader
Name Floppy kiekjes uploader
Start 2019/04/07
End 2019/04/25
Contact peterder72
Website http://raspeter.space.hackalot.nl
Information System for uploading pictures from floppy to Kiekjes
Status Completed


Idea

Mr. bef0re has brought a nice Sony Mavic floppy camera to hackerspace. Floppy drives are always unstable, and it took some time to upload photos from camera to PC. After some talks, the idea to upload stuff from this cam to Kiekjes was born

Realisation

Raspberry Pi, the one hanging on the wall, has a floppy drive attached. It constantly checks for floppy disk every time spaceinvader makes a move. If found, it uploads stuff first to temp directory, then from temp directory to Kiekjes server.

Usage

Usage is pretty simple: you just insert the floppy disk into floppy drive. If everything goes as planned, some LEDs will light up. Their number is equal to number of files on floppy. All files will be deleted. So don't put weird floppies in. If anything goes wrong, the cross will be displayed and the script will retry to get photos.

Pixel Color Codes
Color Meaning What to do
White Yet to be processed Chill
Yellow Upload in process Chill
Green Successful upload Chill
Red I/O Error Try to re-insert floppy
Blue Photo received from camera, but uploading to server failed (Extremely rare) Manually SSH into Raspberry and look at what's wrong

Tech details

Script listens for specified symlink for device connection, after what it monitors the size of connected device. When it's not zero (floppy disk inserted), it processes data on floppy. All logs are in /var/log/syslog and in service status. Service is called floppy-reader. Script can take multiple parameters:

Parameters Description
Argument Description Default
-d, --debug Debug mode: moar logs False
-e, --export Photo storage /mnt/hackalot_smb
-t, --tempdir Directory for temporary storing photos /tmp/floppy
-s, --symlink Symlink to watch (specifies device to listen to) /dev/disk/by-id/usb-TEAC_TEAC_FD-05PUB
-m, --mount Mount point for floppy, when connected /mnt/floppy

Development

You can use this GitLab repo for contribution