You are browsing as a guest. Sign up (or log in) to start making projects!

7h 0m logged

ok, i pretty much got everything workin except the switch - ill go from good to bad, alright ?

so now my login page fully works and can be deployed by the ESP32 (its in the flash), and also storing API keys - im using something called LittleFS to store them even when there is no power

Basically this is the boot sequence :

Boot sequence (main.cpp)

  1. Serial + OLED init — boots and shows “booting…”
  2. LittleFS init — mounts the flash filesystem where the vault file lives
  3. WiFi starts immediately — creates the ApiKEY access point at 192.168.4.1. Web server starts serving the login page. Works before any PIN is entered.
  4. Vault check — opens /vault.dat, reads the 4-byte magic number APIK to see if a vault exists
  5. If no vault (first boot): waits for you to create a PIN via serial (or buttons once wired). Creates an empty vault, encrypts it, saves it to flash.
  6. If vault exists: waits for PIN via serial (or you can just use the web UI instead)
  7. Loads vault — tries to decrypt with the entered PIN
  8. BLE keyboard starts — advertises itself as “ApiKEY” bluetooth keyboard

WiFi / Web UI (web.cpp)
The ESP32 is a WiFi access point — your phone connects directly to it, no router needed.

  • SSID: ApiKEY, password: apikey123
  • Serves a dark-themed web page at 192.168.4.1
  • Login page → enter PIN → Manage page → add/delete/view keys
    The key change we just made: the web login actually tries to decrypt the vault with whatever PIN you type (handleLogin calls loadVault). So the web UI works independently — you don’t need to enter the PIN on serial first. If the decryption succeeds, it sets authenticated = true and stores the PIN for later re-encryption.

And for once, everything works like its supposed to (please don’t let thisn be a jinx) - I know right ? it has to be a miracle !

Now comes the bad part.

So after i was done with all this, i started on tryna add the switch. I luckily had brought 2 from xHain, but i unfortunatelty did NOT know how they worked.
Luckily i had a Multimeter, and unfaltering determination (for now)

I basically started poking the pins until something went beep, then tried angling and pressing the switch, while still hunting beeps.
Let me tell you, this was grueling - i only got 2 hands, and i had to hold :

  • multimeter red needle on to a tiny pin
  • multimeter black needle on to an even smaller pin sob
  • the switch thats smaller than my fingernail so that it stops wiggling and turning
  • the actual switch part thats smaller than idk i dont gotta comparison here - and i gotta angle it without turning the whole switche

Man, i wish i had 5 hands. Evolutions such a bitch, why not let us all have 6 hands with 10 fingers ?

Anyway, even after doing all that and poking every single pin or pad or anything even remotely shiny on the switch with the pin i finally moved on to the second switch and it beeped first try. FIRST TRY.
turns out my first switch was broken, and the second wasn’t. Yeah.

It probably died of agressive poking.

Anyway, i then was ready to connect the switch, but guess what ? i ran out of solder, and the damn thing uses SMD pads. And for some damn
reason i dont got a hot glue gun.

sigh

you’ve gotta be kidding me.

Im gonna go to the makespace tmrw, and then solder it on

SOOOO .. im basically done with everything except adding the switch, testing my keyboard, and making a case for it !

Now the next thing to decide is if im making the thing wireless - its really not that hard, the ESP does all the actual hard stuff for me - all i would have to do is add a power source.
I still want to keep it low profile tho, since this is gonna go on my keyring - we’ll see.

0
2

Comments 0

No comments yet. Be the first!