Floppy kiekjes uploader: verschil tussen versies

Uit Hackalot - Hackerspace Eindhoven
Naar navigatie springen Naar zoeken springen
k
k (Verouderd toegevoegd)
 
(8 tussenliggende versies door 3 gebruikers niet weergegeven)
Regel 1: Regel 1:
 +
{{Verouderd}}
 
{{Project
 
{{Project
 
|name=Floppy kiekjes uploader
 
|name=Floppy kiekjes uploader
Regel 4: Regel 5:
 
|end=2019/04/25
 
|end=2019/04/25
 
|contact=peterder72
 
|contact=peterder72
 +
|Picture=Floppy_kiekjes.jpg
 +
|URL=http://raspeter.space.hackalot.nl
 
|info=System for uploading pictures from floppy to Kiekjes
 
|info=System for uploading pictures from floppy to Kiekjes
 
|status=Completed
 
|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.
 +
{| class="wikitable"
 +
!colspan="3"|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:
 +
{| class="wikitable"
 +
!colspan="3"|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 [https://git.hackalot.nl/peterder72/floppy-kiekjes this GitLab repo] for contribution

Huidige versie van 14 mei 2024 om 14:01

Verouderd

De tekst op deze pagina is al een tijdje niet geupdate, als je er meer van afweet kun je de pagina updaten en deze melding verwijderen.

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