April 17, 2016 by Ilia Baranov
Software update time! Been working on getting the basic backbone of the software working, and so far things have been going really well. Things we have learned this session:
- No need for public-private keys. They are slow to compute, complex, and don’t offer much benefit over a shared secret in our application. Thus, we are using AES 128, and it can do one encrypt-decrypt session (64 bytes of data) in 749526 cycles. This is (at 160MHz) 4.7ms.
- ESP8266 works really well with mixed AP and client mode, and is able to do non-disruptive scans. This means the device can do mesh network in a fairly reliable way.
- Being able to upload updates to firmware and content over the air is CRUCIAL. The serial updating is slow, and un reliable. The code is made to auto-update via a webpage.
- The ESP8266 SPIFFS system is really nice! Easy to use, easy to update.
Over architecture for system startup now looks like this:
- ESP8266 boots, loads Meshcom firmware
- Starts AP mode, tries to connect to wifi (for testing, updating, timekeeping)
- Shows user HTML page, asks for login details
- When user sends message, uses shared key, encrypts, and sends TCP packet with header info (containing device data, target, TTL, etc
- Background functions (using the timer library) routes other packets, updates public info, etc.
Code has been updated, and contains some helpful functions (for Windows) for auto updating content, etc. Check it out! https://github.com/meshcom/software