I changed the repo to consolidate both the door nodes and the Raspberry Pi bridge node. The Readme clearly needs to be fixed for markdown (It was late) and probably somebody not related to the project can walk through it with me and tell me where they are confused..
The hardest part was the complete lack of documentation on AES128 encryption and how the nodes talk to each other. There are three ways to use the nodes and i'm repeating them below for posterity.
- Nodes at the door just get power and are on their own. All need AES128 encryption same firmware
- Portal node. This is plugging in the bridge into the computer, opening their software, and well guessing at node views, encryption, this is also best way to flash firmware, clear NVparams (basically flashable params on the chip). Main way to update firmware, see nodes, upload software (even remotely).
- SnappyConnect, is connecting to the bridge node from a computer but with no Portal software. You get access to full PYTHON, web etc.. and basically connect via USB to the bridge rf266 node and that gives your computer script access to every node on the network. All the nodes right now have the same exact software. Their hardware address is the only difference to determine which door (it's hardcoded so nothing to do on our end. just get it on the server with a door name).
ALL nodes need same firmware with AES128 and all need to have encryption on as described in the Readme..
Somebody feel free to volunteer to clean up the readme. Like I said I combined the schematic, door nodes and bridge raspberry pi nodes ALL need to be flashed with AES128 firmware, same version, and same encryption keys.
The one little trick is that that the bridge (raspi node) python script needs to set the NVparam id, and key each launch. Ask me or VolBracht for the key, sample_auth.json file format is in there.
That's it. what's left is getting the MosFet circuits with pull-up resister on the gate tested, and ordered. and i'd like to replace the mechanical relays in each door with these. Might also need to inverse the code on door nodes for lowering the pin instead of going high on door unlock since using the inverter will always be high and Mag doors need to ALWAYS be on unless you unlock the door.
Ok well quick update that's it. Look at readme and schematics for me and come find me for questions. Hardware will be put back in door and tested on next lab visit.