Arduino ESP32

Various tech news sites (see CNX-Software’s coverage here) are reporting Arduino’s release of an ESP32 enabled board in the Nano family.  Named the “Arduino Nano 33 IOT”, the module looks a little underwhelming at first glance (especially given its $18~20 price tag), but it may be worth digging a little deeper into the specs if you have some specific applications in mind.Arduino Nano 33 IOT

The board sports a u-blox “Nina” ESP32 (which we covered here at about this time last year as one of the few FCC certified ESP modules), providing WiFi and Bluetooth capabilities for the onboard Arm Cortex-M0+ SAMD21.  The board also has an LSM6DSL six-axis IMU and an ATECC608A cryptographic support chip, which are both directly accessible from the ESP32 via the I2C bus.  The connection between the SAMD21 and the ESP32 module is via the SPI bus.

That additional crypto chip gives the ESP32 (and the Nano) the ability to securely store up to 16 keys, certificates or encrypted data, as well as providing hardware support for:-

  • Asymmetric sign, verify and key agreement.
  • Symmetric SHA-256 & HMAC hashing and AES-128 encrypt/decrypt.
  • PRF/HKDF for TLS 1.2 and 1.3.
  • Secure boot support.
  • Random number generator.
  • A unique, 72-bit serial number.

At least some of these features are apparently already supported via the Arduino WiFiNINA library.

It may be a little early to pull out your credit card, though, as the module isn’t going to be shipping until July.

Advertisements

Son of YAESPK (Yet Another ESP Killer)

Seeed Studio have just announced another module based on the Winner Micro W600 ARM SOC.  This one is slightly more expensive than the previous two offerings, but does seem to be a much more sensible design for hobbyists and, with Seeed touting CE/FCC certification for it, attractive to those looking to produce WiFi enabled commercial products, too.W600 module. Picture courtesy of Seeed Studio.  It looks very similar to the ESP12 series modules, with an on-board, PCB antenna and castellated GPIO connectors on three sides of the board.  The metal RFI shield completely covers all of the components, with only the antenna showing externally.  On the version shown on the Seeed pre-order page, the silk-screen pin numbers are only on the bottom of the module and, given the size of the RFI shield, I wouldn’t expect that to change.

The pin-out also looks very similar to the ESP12, with two UARTs, I2C, H-SPI and I2S interfaces. W600 bottom, courtesy of Seeed Studio. Most of the pins share multiple functions and can also be used as standard GPIO or PWM outputs.  As noted with the previous offerings based on the W600, the processor is a single-core Cortex-M3 with 288KB of RAM and 1MB of on-board flash.  The SOC also features an on-board hardware cryptographic accelerator and an ISO/IEC “Smart-Card” 7816 interface.

In yet another echo of an ESP-based past, there is mention of an AT interface mode for communication between an external microprocessor and the W600.  The documentation available on the Winner Micro site does include a Linux based install guide for the GCC toolchain and an SDK User’s guide, along with several other useful PDF manuals, though.


W600 module pinout, courtesy of Seeed Studio.


The module is scheduled to be available for shipping from Seeed on May 22nd at $3.79 per unit, or $3.59 in quantities larger than 20.

 

The Beelink AP35 – Another budget, Intel-based box

Preface — The machine referred to in this article ships with Windows 10 Home Edition.  I won’t be using that OS, but will be describing some of the hardware and giving a couple of tips on getting BSD/Linux running.  As far as I know, Windows 10 will run just fine, straight out of the box.

tl;dr  —  Despite the sales blurb, the AP35 is NOT fanless.

Update —  Currently selling for €99.99 on www.cdiscount.com (France).

Update May 6th 2019 — What appears to be a bare-bones version of the same J3355-based system for just €79.99 (~$89.60), also from Cdiscount.


Although ESP8266Hints is obviously ESP8266-themed, one of the most popular pages on this blog is the one outlining my experiences with the Z83-II mini-PC, which I bought back at the end of 2016.  That machine, despite its diminutive size and “low-powered” Z8350 (quad-cored) CPU is still providing sterling service as a server on the house backbone network and was definitely a bargain (although I wasn’t too sure about that in the first few days following its arrival).  Based on that positive (in the end) experience, I decided to take the plunge once more and replace another machine which, although it still works, is getting long in the tooth and uses far too much electricity for the work it actually does (it’s also so old that many distributions are dropping support for that class of machine).

This time, the story didn’t start particularly well.  Gearbest not only mishandled my order, but also managed to leave their order database completely open to every unknown nasty and their dog at exactly the same time. [Hint:  If you have a Gearbest account, now would be a good time to change your password, if you haven’t already].

The Beelink AP35 wasn’t the first choice on my shopping list, nor was it the second.Makers label.  I ended up waiting more than a month for this unit to be pushed out of the warehouse door because Gearbest were unable to deliver either of the first two.  However, once it was marked as shipped, it made record time in transit and arrived on my doorstep just five days later.

My first impressions were, “Goodness, that’s small!”.  It is really tiny.  When I go back and look at the pictures in the sales blurb, it’s very obvious that they are composites and not a real photograph of the actual unit itself (look a little closer at the shot with the AP35 in front of two desktop monitors, for instance).AP35, pen and USB key for scale  The dimensions given in the description are accurate and looking at the close-up images of the unit itself you can gauge the overall size by comparing the USB and RJ45 ports to the width of the case (my photo of the unit, to the left, has a pen and a USB key for real-world scale).  You need to ignore all of the spurious size prompts in the composite, sales photos to get a realistic idea of the actual size.

Because the case is made entirely of plastic, it’s also extremely light.

In the “Main Features” section of the sales blurb (just above the specifications), the very first line is:-

“● Excellent heat dissipation performance, through the heat dissipation of the casing, achieving zero noise, giving you a quiet and comfortable environment”

Notice that I just mentioned that the casing is entirely plastic, which isn’t particularly known for its heat transfer characteristics.  Well, I can confirm that the “heat dissipation” and “zero noise” claims are complete and utter bollocks.  This system has a cooling fan strapped to the CPU heatsink.  It seems to run all of the time, but the speed is normally fairly low, increasing with higher CPU loads.  By the standards of something like a gaming PC, it is fairly quiet …but it is certainly not silent (even now, when it’s brand new).

CPU heatsink, showing fan

This may not be a big deal for many people, but I have to admit that I wouldn’t have bought this unit if I’d have known that it used a fan.

As you can see from the photo [click on it to see the full-size version], the heatsink and fan actually sit in the top of the case and blow the hot air out through the slots above the HDMI and RJ45 ports.  It’s not such a bad design, but I was surprised to find it in such a small case.

To counter the unpleasant surprise of the fan, when I first powered the unit on, I had two pleasant surprises.  First, there was a prompt across the bottom of the power-on splash screen with the instructions “DEL for set-up, F7 for boot menu”.  Yay!  That’s an improvement over the Z83-II, anyway.  Secondly, the BIOS is much, much more versatile than the Z83-II and, if anything, has too many settings and sub-menus (it was a relief to find that, for instance, it was possible on this machine to set-up for auto power-on after a power fail).  Both of these improvements meant that I didn’t get stuck in the “I’m going to run Windows, no matter what!” loop that the Z83-II suffered from and was able to boot Linux, OpenBSD and FreeBSD with no problem (although installing was a different matter).

Immediately after the warm and fuzzies from the BIOS though, the pendulum swung back in the other direction.  I found that the internal 64GB eMMC wasn’t recognized by most non-Windows OSes.  I fooled around with this for much too long.  FreeBSD-12 was the best candidate I could find to access it, but having successfully installed onto the eMMC, I found that reboots weren’t reliable; more often than not, the system just completely lost track of the eMMC (with timeout errors) and dropped into the “mountroot” prompt.  I’ve tried various “quirk” settings, but all without any lasting success.


mmc0: CMD13 failed, RESULT: 2
mmc0: Card at relative address 2 failed to set HS200 timing
mmc0: CMD7 failed, RESULT: 1
mmc0: Card at relative address 2 failed to select
mmcsd0: Error reading EXT_CSD Timeout
device_attach: mmcsd0 attach returned 6

I got sick of mucking around with that fairly quickly and decided to take advantage of the available 2.5″ SSD/HDD mounting point in the base of the unit.  [WARNING — Only a 7mm height drive will fit].  I slapped in a Crucial BX500 120GB SSD (the SATA cable is already attached to the mother board of the AP35, with the flying end taped down to the bottom panel of the case, so be gentle when opening it).  The BIOS (and FreeBSD) saw the new drive immediately and the install was completed in just a few minutes (no reboot problems so far and none really expected with a standard SATA drive).

The SSD fits very snugly into the bottom of the unit, although there’s very little clearance between the disk and the components on the motherboard.  The fan is actually on the other side of the motherboard, so I’d be wary of installing spinning rust in this cramped location due to possible heat problems.

As a plus for the adventurous, there are two slots available  (in the area which my SSD Detail of motherboard showing mSATA slotsnow occupies) which look like mSATA to me.  I don’t have anything to hand which would fit those, so I can’t comment on how well (or even if) they work and the support posts, along with the silkscreen outlines on the motherboard, left me wondering whether perhaps only one slot could be used at a time.  If you have experience using this type of “stepped” mSATA connector, please do leave a comment as to how well they perform and how those two support pillars are meant to work.   …and reader Carey Bishop sorted that out for me (and everyone else) when he noticed this additional information on Banggood’s sales page for the AP35:-

Additional information courtesy of Banggood.com
Additional information courtesy of Banggood.com

Carey also included a couple of links to boards which would fit in those slots (see the comments section at the bottom of the page).  The mini-PCIe only accommodates half height cards, which explains the support-post placing.  Thanks for that, Carey!

Anyway, once FreeBSD was installed on the SSD, it had absolutely no problem finding and using the 802.11ac WiFi and connecting to our 5GHz router, so another Intel AC3165 WiFi/Bluetoothplus point there.  The on-board WiFi/Bluetooth module is an Intel AC3165.  So far I haven’t got around to testing the Bluetooth functionality, but the fact that the WiFi works so well is a good omen.  Note that the two (internal) antenna cables are seriously gunked onto the module, which makes moving the motherboard around a little difficult.

The large connector to the right of the AC3165 in the photo is the motherboard end of the SATA lead for the internal SSD.

So far, so good.  The machine has been running flawlessly (but not silently …did I already mention that?) for the last week or so and I’m quite happy with its performance.  I’ll no doubt be updating this article with newer information as I attempt to transition it to the intended application on our home backbone, but here’s the short summary, so far:-

Pros:-

  • Compact enough to fit into a very small space.
  • Lightweight, so easily portable.
  • Comes with two HDMI cables, one short and one longer, as well as a wall/monitor mounting kit and screws.
  • Comes with two, unpopulated internal slots; one 50x30mm mSATA and one half-height 30x27mm mini-PCIe.
  • Comes with a SATA cable and mounting (with screws) for an internal 2.5″ HDD or SDD.
  • Normal (rather than cut-down) BIOS available.
  • Boot/BIOS prompts automatically displayed at power-on.
  • Dual-band (Intel 3165) WiFi with internal antennas.
  • Four USB-3.0 ports.
  • Cheap (currently selling for $140 with free shipping).

Cons:-

  • Not fanless and not silent.
  • The internal eMMC doesn’t appear to be very well supported by operating systems other than Windows-10 at this point in time.

 

Bottom Lines

As you can see, there really aren’t that many cons.  All in all, I think this is very good value for the price.  The quality of the build is also good, considering the price point.

There are several use cases that spring to mind for something this cheap and so compact.  One example would be a low-cost diskless node; the GbE interface should provide plenty of throughput and the BIOS does seem to allow PXE boot.  Another use would be as a low-cost desktop — if you happen to already have a decent monitor,keyboard and mouse set left over from an older machine, this system would be an excellent way to get a younger member of the family going with newer hardware on a slim budget.

Would I buy another one?  Probably not, but that’s because of the specific issue of the system not being fanless.  If the idea of it having a fan doesn’t bother you, then I’d certainly recommend this little system as being excellent value for money.


Additional OS Info —  NomadBSD 1.2, a FreeBSD-12 based distribution intended for use from a USB key, was released a few days ago and, because the OS doesn’t attempt to install itself on your machine (it runs from and stores config info to the USB key), it’s actually a pretty good candidate for testing out the real-world, desktop performance of your new machine.  Be sure to select “console frame buffer” and not “auto” from the set-up wizard though (auto seems to screw up frame buffering, but the console setting works fine, even with videos).

“dmesg” Info — Linux (Ubuntu), FreeBSD-11 and FreeBSD-12 (NomadBSD) dmesg files are available here, for anyone who’s interested.


† —   Anglo-Saxon/Middle-English (slang) – Used frequently to mean “nonsense“.


 

ESP32 + W5500 — Simple Working Example

Over the past couple of days, in the course of answering questions on the popular article on adding an ethernet port to the ESP8266, I found myself putting up a link to some new code for a work-in-progress project which simply replaces the ESP8266 with an ESP32 (which seems to make a lot of sense, given the falling cost of the ESP32 modules, nowadays).  ESP32 + W5500 moduleWhile that project is for an ESP-Now gateway, it seemed like there was a need for a nice, simple test and verify project where people can do a minimum of work with the hardware (an ESP32, a W5500 module, some jumper leads and a breadboard) and get a working result in a reasonably short time.  I’d said in various places that it shouldn’t take too much work to modify the code for the ESP-Now project to handle any of the examples shipped by default with the Arduino Ethernet library, so that’s what I’ve done.

Here’s the code (along with the pinouts in the README) for the simple “UdpNtpClient” example, munged very slightly to work with the ESP32Output exampleAll it does is connect to an NTP server, retrieve the current timestamp and display the UTC time.  This is basically a 30-minute project to produce a working demostration of an ESP32 using hard-wired Ethernet.

The configuration uses a static IP and network setup (router/gateway, netmask and DNS), as the original ESP8266 project seemed to have problems with DHCP (and quite honestly, I just haven’t gotten around to trying it with the ESP32 version, yet …let me know how it goes if you do).  All of the configuration options are in the “local_config.h” file.

The original library example code uses a single NTP server, “time.nist.gov”, which seemed a little anti-social to me, so I’ve added several of the more popular geographical pools into the config file and updated the default target to be the main “pool.ntp.org”.   You should choose the one closest to you (unless you’d like to see how unreliable bare UDP really is, in which case you might like to try “antarctica.pool.ntp.org”  —  apologies if you’re reading this from McMurdo Station 🙂 ).

 

 

‘nuther New Kid almost on the Block

If you’ve been following techie news this week, you’ll probably have already seen the photos featuring the grungy soldering around the new “Chip-7” (and if you haven’t, here’s CNXSoft’s coverage).  Hackaday also covered the new chip, as part of Mike Szczys’ series on his trip to China.  Mike also produced an excellent interview with Ivan Grotkothov (probably better known to folks here as “igrr”) at Espressif, for Hackaday podcast (#11 — the interview with Ivan starts at the 44-minute mark).  The interview included just a couple of tidbits of extra information on the chip:-

  • It has more pins than the existing ESP32 and they will be predominantly GPIOs.
  • The power requirements and the overall performance won’t be too much different from the existing chips, but…
  • …it will be good value and a worthwhile improvement.
  • It will support Flash and PSRAM‡ on the carrier module.
  • The photo shows an engineering sample, so no firm date for release (or pricing), yet.

In addition, Jeroen “Sprite_tm” Domburg dropped in to leave a comment on the Hackaday page that the current, full title of the chip is actually “Chip 7.2.2”, but since that’s only an engineering label, we can expect it to change before the actual release, anyway.


‡ – Pseudo-Static RAM  – A dynamic RAM chip with on-board refresh circuitry which appears as static RAM to the processor.

Recent Updates (March 1st, 2019)

Otto Winter has been continuing his updates to esphome with improvements to the set-up wizard and the addition of min/max settings for rotary encoders (esphome enables you to add an ESP8266 or ESP32 to Home Assistant without writing any code).

Theo Arends has been working on reducing stack space usage in Sonoff-TASMOTA to fix some intermittent crashes.  If you’re having issues, please upgrade to version 6.4.1.18 or greater (see this post for more details).

Phil Bowles has been updating the API documentation and examples for his esparto rapid development framework for the ESP8266 (available as an Arduino IDE library; write concise, working code with no setup() or loop() functions).

Xose Pérez has made lots of changes to his espurna replacement firmware for ESP8266 devices over the past few weeks, with support for more than twenty new products added and the incorporation of many fixes (both from Xose himself and submitted by an ever-growing community of users).

Rich Heslip has published an ESP32 project, “Motivation Radio BLEMIDI”, to add WiFi and Bluetooth functionality to Eurorack based modular synthesizers.  The hardware for this module is also open source and available from a separate repository, courtesy of Jim Matheson.

 

TASMOTA exceptions and watchdog resets

Just a quick note on recent TASMOTA changes.  Theo has been pushing out some updates over the past couple of days to fix an intermittent stack overflow problem which has cropped up with some combinations of hardware and TASMOTA firmware.  The issue seems to manifest itself with TASMOTA versions 6.4.1.16 and 6.4.1.17 and some devices which do load current monitoring (eg:- the NX-SP201 series, double-outlet smart switches).  Initial indications are that executing a “status 0” command at exactly the same time as the current monitor is updating can run the device out of stack space.

Bottom line… update to release of 6.4.1.18 (or greater) if you’re seeing these symptoms.