Skip to content

ESP32 and where we are now

Back a year ago, Hackaday found a Basic Interpreter Hidden In Esp32 Silicon (by Elliot Williams).  Documentation now exists at Read the Docs.

Now, for comparison, consider the TRS 80 Model I “introduced by Radio Shack on August 3, 1977….The initial price was $599.95, which included a typewriter-style (not membrane) keyboard, monitor, and cassette recorder. … It ran a Zilog Z80 at 1.77 MHz and came with 4K of RAM, and a 4K ROM of what was called Level I BASIC.” The display was 16 lines of 64 characters or 128×48 graphics. The cassette interface could run at up to 500 baud. 

Now consider the ESP32. It has 448 KB of ROM, 520 KB SRAM, another 8 KB of clock SRAM, and 1 K bit of one time write chip parameter memory. In addition to this, a basic system often has another 4 MB of external flash memory for program storage. See an Overview of ESP32 features. What do they practically mean?  That means this chip has 112 times the TRS 80 fixed memory, 130 times the working memory, and some extra. The external program storage would hold about 24 floppies worth of data.

There are three processors in the chip. Two are 32 bit and run at 240 MHz. The serial I/O will run at 960,000 baud. The third CPU is a special low power processor designed for long battery life while calling for the main processors and the radio only as needed. The two main processors run at 135 times the speed of the TRS 80 and handle four times the data on each cycle. The low power processor in its most battery saving but still alive mode still runs at nearly five times the TRS-80 speed.

And an ESP 32 ready to go can be had for under $10. Add in a power supply, keyboard, and display and you have an outlay less than a tenth the cost of a TRS 80 without considering inflation.

Torvalds priorities say a lot about success

At the Register: Linus Torvalds on security: ‘Do no harm, don’t break users‘ By Simon Sharwood — “Fixing for the sake of security alone means ‘all your work was just masturbation’

Torvalds was angry that developers wanted to kill dangerous processes in Linux, a measure that would have removed potential problems but done so in ways that users may not have enjoyed.

His long post on the matter suggested to security practitioners that “’Do no harm’ should be your mantra for any new hardening work.”

“And that ‘do no harm’ may feel antithetical to the whole point,” Torvalds adedd. “You go ‘but that doesn’t work – then the bug still exists.’ But remember – keep your eye on the endpoint, and that this is just the first step. You need to not piss off users, and you need to not piss of developers.”

Torvalds’ post explained his view that “… the number one rule of kernel development is that ‘we don’t break users’.”

“Because without users, your program is pointless, and all the development work you’ve done over decades is pointless.”

This is a story about the ‘big picture’ and understanding the reason for your efforts. Linus appears to have a good grip on this and that may be a major factor in why Linux is as popular as it is.

Self defense and Parakeets: Culture and history speaking

Two stories uncovered today provide a lot of insight into who we are and how we got that way.

One is about The American Indian foundation of American gun culture by David Kopel. This is on Wapo in the Volokh Conspiracy, a lawyer’s blog so it’s got reader harassment and bias to watch out for. The essay is based in part on Nicholas J. Johnson, David B. Kopel, George A. Mocsary & Michael P. O’Shea, “Firearms Law and the Second Amendment: Regulation, Rights, and Policy,” 2nd edition (Aspen Pub. 2017).

What today is called “American gun culture” is founded on American Indian arms culture. The convergence of Europeans and American Indians produced a new, hybrid arms culture. Although that culture has changed over the centuries, we can still find in 21st century arms culture the influence of the Anglo-Indian convergence along the 17th century Atlantic seaboard.
 …
So one effect of the Anglo-Indian encounter was to foster a culture of widespread household gun ownership and widespread arms carrying. This was very different from conditions back in England, where the government was certainly not ordering people to always carry guns to the weekly (and mandatory) Church of England services.

The need for survival, both in protecting property and in obtaining food, were paramount concerns for the early settlers. Kopel notes a number of factors from history and tradition that evolved into what we see in the American variant of Western Culture today.

Parakeets, problem analysis and the beauty of inconvenience is about disruption for growth.

In his 2014 book Being Mortal, Atul Gawande tells the story of how Dr. Bill Thomas, a medical director at a nursing home in upstate New York, improved the experience of residents by challenging conventional elder care practices. Thomas believed that no matter how good the standard of medical care, the nursing home was failing its residents in three key areas: Boredom, Loneliness, Helplessness.

If they didn’t address these, the residents’ quality of life would suffer, with a knock-on effect on their physical health.

His solution started with 2 dogs, 4 cats and 100 parakeets.

This wasn’t a comfort pets introduction. It was an obligation disruption.

Residents were given the opportunity to adopt and name the parakeets. They could volunteer to walk the dogs and look after the cats. He followed up by encouraging staff to bring their children into the workplace and make noise. He replaced ‘safe’ and easy-to-maintain artificial plants with real ones that took more effort. He added vegetable gardens which needed tending.

Reading between the lines of Gawande’s account, it could be argued that Thomas wanted the introduction of these things to be difficult and disruptive. He did it in such a way that problems were inevitable, insisting that it happen all at once and with little warning. As a result, the staff and residents bonded together in solving the resulting challenges and a shared sense of humour over the temporary chaos.
 …
The story inspired me to think about how breakthrough moments in product design often result from: Outside perspectives. New metrics. Shared purpose.

There’s a lot of insight there from many different directions. The Nursing Home management goal at its most basic is calm, order, and structure. That can conflict with its mission of patient health and vitality. The rewards for one are easy and comfortable; for the other difficult and challenging. 

Headless via VNC

Headless machines need a head somewhere. A barebones text terminal run via a serial port is the base option. A remote graphics desktop gets into the virtual machine and full access territory. Faster networks and more capable computers and graphics have made the full desktop option feasible enough that Raspbian takes very little to set it up. How to Set Up Easy Remote Desktop Access in Linux by Jack Wallen gets into the Ubuntu and Fedora situation and explains a few things that help fill in the current state of the technology.

Linux is a remarkably flexible operating system. One of the easiest means of understanding that is when you see that, given a task, there are always multiple paths to success. This is perfectly illustrated when you find the need to display a remote desktop on a local machine. You could go with RDP, VNC, SSH, or even a third-party option. Generally speaking, your desktop will determine the route you take, but some options are far easier than others. Once you understand how streamlined modern desktops have made this task, your remote administration of Linux desktops and servers (with GUIs) becomes much simplified.

Here’s the Raspberry Pi documentation on Virtual Network Computing.

Sometimes it is not convenient to work directly on the Raspberry Pi. Maybe you would like to work on it from another device by remote control.

VNC is a graphical desktop sharing system that allows you to remotely control the desktop interface of one computer (running VNC Server) from another computer or mobile device (running VNC Viewer). VNC Viewer transmits the keyboard and either mouse or touch events to VNC Server, and receives updates to the screen in return.

This one also has step by step instruction based on the Real VNC software. Here’s Instructable’s Setting Up a VNC Server on Your Raspberry Pi and at Adafruit, too.

As Wallen notes, there are a number of options and you can find more about them by a bit of research. Here’s a discussion on the Raspberry forums about the best VNC server to use. It’s another technology where you can experiment to see how it works without too much trouble or expense.

Guide to the Galaxy for Mobile App Developers

freetechbooks.com has posted Don’t Panic: Mobile Developer’s Guide to The Galaxy, 17th Edition.  

More than 20 writers from the mobile community share their know-how in dealing with topics such as accessibility in mobile apps, UX design, mobile analytics, prototyping, cross-platform development, native development, mobile web and app marketing.

It is an easy to read rundown about what is going on with app development for mobile devices. At 325 pages there is enough meat to make a full meal yet it isn’t over-burdened with specification and datasheets. The graphics are rather cute but they don’t hinder the presentation.

The price is right and it’s easy to read and you can skim over sections that don’t go your direction. — well worth adding to your e-reader to check out in slack time.

The Amazing $1 microcontroller – a treasure chest for building modern electronic devices

The Amazing $1 microcontroller by Jay Carlson — “A new series that explores 21 different microcontrollers — all less than $1 — to help familiarize you with all the major ecosystems out there.” It is a good overview of what is out there for the electronics guiding much modern equipment as well as a guide to what counts and what doesn’t for these components. 

It’s time for a good ol’ microcontroller shoot-out. …

I wanted to explore the $1 pricing zone specifically because it’s the least amount of money you can spend on an MCU that’s still general-purpose enough to be widely useful in a diverse array of projects. …

Arm started out as a personal computer microprocessor when Advanced RISC Machines formed a joint venture between Acorn, Apple, and VLSI Technology to manufacture 32-bit processors for the Acorn computer. While Arm cores have grown in popularity as microprocessors for battery-powered systems (they are almost certainly powering your smartphone), Arm moved into the microcontroller sphere as well — the ARM7TDMI-S was probably the first Arm core that was used in microcontrollers — i.e., processors with completely self-contained RAM, flash, and peripherals. The Atmel AT91 and ST STR7 were probably the first microcontroller parts designed with an Arm core.

It’s important to understand the history of Arm because it explains a serious feature of Arm microcontrollers that differs substantially from the 8051 (the other multi-vendor architecture that dominates the field): Unlike the 8051, Arm is just a core, not a complete microcontroller. …

And that’s what I want people to think about as they walk away from this. If you’re an Arduino hobbyist looking where to go next, I hope you realize there are a ton of great, easy-to-use choices. And for professional developers and hardcore hackers, perhaps there’s an odd-ball architecture you’ve noticed before, but never quite felt like plunging into — now’s the time.

It’s an exciting time to be involved with electronics — whatever parts you choose to pick up, I hope you’ve enjoyed learning about what’s out there, and can get inspired to go build something great. Definitely leave a note in the comments below if you’ve got something to contribute to the discussion!

It’s rather in the TL; DR camp but that D in this case should be a “Do” rather than a “Don’t.” Carlson covers many aspects of microcontroller choice including part specifications to development environments and boards to debugging to compilers. Do explore this corner of low cost, general purpose, electronics development with Jay.

ten years on and a lot of small (and some big) steps

How I would explain a decade of web development to a time traveler from 2007 by Ivan Zarea 

Today we have many more of them than we did 10 years ago, and that comes with new challenges. We wear computers on our wrists and faces, keep them in our pockets, and have them in our fridges and kettles. The cars are driving themselves pretty well, and we’ve taught programs to be better than humans at pretty much every game out there — except maybe drinking.

See that dust cloud in the rear view mirror? Ivan can help you see what’s in it.

Ubuntu 17.10 (Artful Aardvark) adjustments and workarounds for the Beta

October is around the corner so a new Ubuntu version is getting ready. See the Release Notes. The control buttons for each window are moved back to the right top after seven years and Unity has been replaced by Gnome 3.26 so you might be a bit discombobulated by user interface changes. The standard issue image won’t include a 32 bit version so you’ll need to download the Lubuntu or other flavor if you are restricted to older hardware like the EEE PC I’m using for the hamshack PC.

Wayland is replacing X. You can “echo $XDG_SESSION_TYPE” at the command line to see what you are running. Wayland comes with some obnoxious security, too. If you want to sudo gvim or gparted, you get errors unless you “xhost -si:localuser:root” first. This is about getting some applications that need root access up to date on the new, and supposedly more secure, methods for doing that. You can still switch back to X if you’ve got problems with Wayland. So far Wayland is more promise than reality and doesn’t offer much in terms of noticeable improvement. It’s promise is what will happen as it keeps developers happy with such things as its differences in security and graphics models.

It looks like mount.cifs has had a default SMB protocol version change which might mess up mounting windows shares. This doesn’t bother nautilus access via its ‘Other Locations -> Networks’ but it will bother autofs which I use to access the network storage. I am not sure if this is the old Netgear NAS that doesn’t understand the newer protocols or is a bug in mount.cifs but I regained access by adding “vers=1.0” to the mount options. This gets, again, into security issues (I think). Nautilus uses Fuse filesystem access which is a ‘user space’ technique. CIFS is a kernel involved standard file system mount which means it needs special attention to owner, group, and user permissions and how they meld into the Windows type permissions set up by the NAS. 

Otherwise, things are looking good. 

Bitcoin seduction

It started with an observation based on the Equifax fiasco by Hao-Kai Pai: Defanging identity fraud by verifying identities – “part of the damage here stems from organizations assuming that Social Security Numbers are secret … another part of the problem is that some businesses are startlingly lax about confirming who they are extending credit to.”

That is a core issue in Bitcoins which brings up What you need to know about Bitcoins. This list of advantages includes this howler: “buyers are protected against merchants who may want to charge extra for a lower cost service.” That one is a red flag that socialist ideologies are at the top of the list. Another “advantage” asserts “Bitcoins are provided alternatives to major common currency catastrophes such as getting lost, frozen or damaged.” If you lose your key, you’ve lost your account and if someone steals your key, the steal your account. Anonymity is also asserted as a desirable feature and the implications of this in a properly functioning society needs very careful consideration of its implications.

The fact is that these ‘currencies’ depend upon identity assured via cryptographic means. The security depends upon what you know that others don’t – your private key. What you know that nobody else does is a rather poor basis for establishing identity. Anything that can be photographed needs a chain of authority. What you have is a bit better. This is why a smart phone with an address or telephone number assigned to you and backed by trusted networks is gaining popularity as a means of identity confirmation. But then, what you have can be stolen.

There are a lot of problems with this schema for electronic value transfer. aantonop is a zealot’s YouTube channel that acknowledges problems and rationalizes them by the fact that the phenomena is just getting started and solutions are being found. Those are mostly technical. The hidden ideological basis, though, is a fundamental flaw that is not subject to technical solution. 

But it is interesting that everybody knowing everything (except your private key) is a hallowed virtue of crypto-currencies in light of the fracas about the Equifax exposure of everything for everyone to know.

Magic. What would it cost then?

Apple did their big show to sell the next iteration of improvements and enhancements. That raises the usual cheers and jeers as well as a few questions and concerns. One is: Do “THEY” Really Say: “TECHNOLOGICAL Progress Is Slowing Down”? — 

Consider the 256 GB memory iPhone X: Implemented in vacuum tubes in 1957, the transistors in an iPhoneX alone would have:

  • cost 150 trillion of today’s dollars: one and a half times today’s global annual product
  • taken up a hundred-story square building 300 meters high, and 3 kilometers long and wide
  • drawn 150 terawatts of power—30 times the world’s current generating capacity

That’s why it’s magic. You can pull out some feature and extrapolate it back to some phenomena, like cost, but then you realize there’s much more to the equation that made was is possible now not only infeasible but also impossible then. There is a chain of growth in between that cannot be skipped. 

Movies provide an interesting source of study for this awakening. Consider Star Trek with its Tricorder and Communicator and how these compare to the modern smart phone. That comparison not only has to be in functionality but also in user interface. Or look at the display changes from panels of indicator lights to CRT’s to modern flat screens in movies over the years. Then there’s the whole field of fantasy and dreaming about what might be and what happens when that hits actuality of human needs and purposes dealing with stuff that gets the job done versus stuff that gets in the way.

The big deal this time around is facial recognition. That, for some, is a gross intrusion into personal privacy. Technology seems to bring about this idea that one can be anonymous in any social context. Oxymoronic?