Thursday, March 16, 2017

Retro computers

I started with computers in 1978 when we had a teletype in our high school and it accessed the mainframe in Princeton. We really didn't learn too much about computers but we were introduced and I got the bug. In College, the engineering departments used the Unix machines on the PDP11 (BASIC) and on a SBC 8085 (assembly language). I helped start the college's PC support and repair center. We supported IBM PC and Apple IIs. For my first computer, I purchased an Atari 800xl so I had a lot of background in different systems. And I spent a lot of time in the library (the internet before the internet) reading every computer magazine and book I could get my hands on. My first job I worked for an engineer firm and I learned about Microware OS9 (LI and LII), Flex and embedded computers. My next job, I worked network support and learned about a lot more computers (PCs, Unix and Mainframes).

So jump forward to the present. I've collected a lot of computers and I've given most to VCF at InfoAge in Wall, NJ. Now I've got a few more that I'm going to mix modern parts with the vintage to allow these machines continue to run. I've taken a liking to the Raspberry Pi W and Linux as the intermediary for the other computers. The older parts are getting harder to find, like floppies. I have plans to give at least one OS9 computer to VCF. OS9 is a multiuser, multiprocess, Unix like OS for the 6809 (and 68K). The good news is that I can get a connection to a Linux server instead of disk drives. I think I've found a way to do the same with my Atari ATR8000 with CPM, and I know I can do the same with the Atari 8 bit computers. I intend to share this with VCF so we can keep more systems running. I want folks to see and play with these computers. It will be a few months before I can get that far but I'll add it to the work pile.

Saturday, February 04, 2017

ESP8266 and OTA upgrades

An OTA (Over The Air) upgrade is not really a new idea. I've worked with Cisco routers for a long time and when we started getting flash file systems we were able to upgrade the firmware and keep a backup copy in case the new version caused too many issues. We'd update the firmware while the router ran and reboot at a convenient time to minimize downtime. While that's not OTA it was as remote as you could get. I had no idea where the equipment was but I could perform the upgrade from the comfort of my laptop at 3 AM. If we add WiFi to the mix it's now what I'm referring to as OTA. Similarly OTA upgrades on the ESP8266 will allow you to have 2 copies of the firmware. You can upgrade without having to physically remove the device from service. Which could be difficult if the ESP8266 is embedded into your house electrical or an appliance such as a dishwasher or garage door opener. I haven't attempted an OTA upgrade yet so I don't know if the device performs its normal functions while it's downloading. That might be a function of the device's firmware. It should be possible but this is still a micro-controller and it does have other limited resources (such as RAM). I'll need to take a look at that.

The reason for the interest in the OTA updates is that I have a bunch of the ESP8266 boards (Adafruit's Huzzah board, ESP01, ESP12, etc.) and they're in a number of devices I've found such as the Sonoff products, a couple of WiFi outlets I picked up at Walmart's and the loose ESP01s which I intend to use for serial to WiFi converters. The Adafruit Huzzah boards have the larger 4MB/32Mb chip (it's shielded so I can't see it). Many of the older devices have the 25Q40 SPI Flash chip (512KB = 4Mb). This is just large enough to support firmware with OTA, flash file system and the firmware image with MQTT support. Not much room there for a second firmware image. But by upgrading to something like a 25Q32 (4MB = 32Mb) there's more than enough room for even 2 copies of large firmware images. I've also poked around found someone using a 25Q128 chip (16MB = 128Mb). For now I'll stick with what I know works, the 25Q32 and keep an eye on the rest. I've also found a nice ESP8266 Memory Map. And finally one interesting note I found. It appears the on board SPI flash needs to support QIO mode and not SPI for the processor to run. Not sure why that is but I'll keep digging.

One thing not mentioned above is security. We'll we need to work on that. But as I understand it the MQTT support also supports secure protocols and login. I'll work with that and see where that takes me. The ESP8266's processor is 32bit so it has more than enough power to handle all the tasks I've listed so far. I'm really looking forward to using the ESP8266's to monitor and control my home. Having control via MQTT will make things easier and with the OTA updates it should make it pretty easy to build a device that's very easily added to a smart home with minimal configuration by the end user. I'll need to put further work into that but we'll were that takes us. It really looks like we've got all the parts that will make Smart Technology easy to use and secure. We'll see.