I’ve been using a micro-controller to automatically dim lights according to the time of day and ambient light conditions. At some point, I decided it would be easier to tinker with if I just used a raspberry pi, logged into it, and edited a python program.
This doesn’t work: The pi basically can’t do PWM – when you change the value, the light visibly flickers. It’s not an easy thing to do without dedicated timer hardware.
Back then to a little micro-controller eval board, then…
What if I can have it both ways? All but the most primitive REPL is going to be a bit heavy for devices that typically have 10s of Ks or RAM, but a remote REPL that injected code into a byte code interpreter could be feasible.
I haven’t found anything quite like this, but a great starting point is Picobit scheme. I’ve got it running on one of these. You can see my port here. I’m busy adding remote debugging support. At the moment I’ve only got as far as getting the compiler to emit a source code map for the byte code.
Another thread of investigation I’m following is porting Bletchley to Scheme. I’m interested in that because it’s easy: Bletchley is S-Exp based, and I could embed a small scheme interpreter like Tiny Scheme or Chibi Scheme to make Bletchley available in a C based environment.
This sounds like an article about evaluating Scheme interpreters, So why the title?
Bletchley is a very good basis for secure communication in this context: It’s flexible key management could be used to limit the authority of any one actor in the system. Master keys need never get any where near the internet, but time limited keys could always be issued in emergencies, to expedite recovery, for example.
It seems reasonable to assume a version of Bletchley can run in Picobit.
S3 is a tiny TCP/IP stack implemented in Scheme, that already runs in Picobit, so that’s the rest of the communication infrastructure covered.
Running communication code in the safe environment provided by a virtual machine is a great way to keep smart meters secure, and Picobit is small enough to be almost un-noticeable in terms of hardware cost.
S3 is a tiny TCP/IP stack implemented in Scheme, that already runs in Picobit, so a lot of the infrastructure is already present.
In addition, Picobit’s VM is tiny. Formal verification techniques could quite easily be used as a means of QA.