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.
- Make the UI easy to use. After a lot of flailing, we settled on using HTML (with javascript + CSS) as our rendering engine. This means that developers can just write the interface in normal HTML, and that gets us an easy way to render buttons, images, etc. This means we can get this working right now, with a laptop, without waiting for hardware components (screen, etc). Downside is: We will have to write an HTML rendering engine to display the data on the built in screen, which will be tricky, but reasonable if we target a small subset of HTML features. Here is what it currently looks like:
- 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
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.