cryptaesthesia
WIP door system for Hack42
See also
https://github.com/revspace/doorduino/ https://revspace.nl/Doorduino
Firmware for the MCU in the door
Setting up
Build and flash the firmware (todo: explain how).
Connect to the SpaceDeur wifi network, with password SpaceDeur#42.
Goto the wifi section, and connect to your network.
Targets
This repo contains multiple targets, and they have the following purposes:
- door_serial: the door firmware, flashed through serial
- door_ota: the door firmware, flashed through the network (ip is settable with the env variable:
PLATFORMIO_UPLOAD_PORT). - mksecret: firmware with the ability to flash ibuttons
Compiling all targets
This repo contains multiple targets, to compile them all run: pio run -e door_serial -e door_ota -e mksecret.
Serial flashing
Flash the door by running pio run -e door_serial -t upload from the root of the repo.
OTA flashing
Wifi must be setup before the door can be flashed via OTA.
Set the ip address of the door with the environment variable PLATFORMIO_UPLOAD_PORT.
Than flash the door by running pio run -e door_ota -t upload from the root of the repo.
For production purposes, set the password in the platformio.ini -> common -> ota_wachtwoord to the correct value.
Monitoring
To see the output of the serial monitor, run: pio run -t monitor.
To serial flash and open the monitor, run: pio run -t upload && pio run -t monitor.
Wiring
Please see the wiring diagram.
Usage
Updating keys
curl -X PUT --data-binary "@data.txt" -H "Content-Type: text/plain" -v http://webuser@webpass:192.168.42.8/api/v1/set_keys