ESP32-C5: Espressif’s First Dual-Band Wi-Fi 6 MCU
espressif.com
espressif.com
Speaking of which, Nordic bought out that WiFi startup late 2020 but have been silent on their WiFi mcu since
Some benchmarks on the earlier ESP32-C3 at https://hackaday.com/2021/02/08/hands-on-the-risc-v-esp32-c3... ; it seems it has the same core as the new ESP32-C5 except it's clocked at 160 MHz instead of 240 MHz. Extrapolating those ESP32-C3 benchmark results out to 240 MHz would suggest it's a bit spiffier than a single core Xtensa ESP32 but not enough to catch the dual core xtensa.
I would assume that the wifi stack is hardware scheduled on that core with dedicated scratch ram, and that the rest of the cache and cpu cycles are granted to the user visible core only while not needed. I think a whole lot of applications didn't use the second xtensa core on the earlier parts.
The cores were even named Core0 - PROtocol and Core1 - APPlication in the initial ESP-IDF design, where the core affinity model was going to be more strongly enforced (thankfully they backed off on this idea and now it is fully configurable SMP).
why? You as a user get 2x less computing power and celebrate it because vendor saved on licensing?
And yes, I know about SPI PSRAM, but it has quite a bit of downsides.
It would be interesting to have a secure communication channel that is simpler than TLS. OTOH I guess we can just wait and the RAM will get cheaper.
It's always possible that another device hacks its firmware update, and leave a payload that then hacks a NAS or something, but that's a fair tradeoff to have devices that don't phone home to some server that could vanish at any time, considering that it's pretty unlikely unless you buy really bad no name stuff.
Plus, it can be very easily prevented by just not having a firmware update that can be accessed without a physical connection or button.
A lot of this stuff doesn't need updates regularly. It's just a light bulb. It doesn't have to be secure against people on the same network.
The cloud stuff is the stuff that gets obsolete or gets hacked, so it should go through a separate hub.
You may want to look into the Matter standard, which already takes security into account and provides some non-certificate based security options. Such devices should integrate well with current and upcoming home automation products from tech giants like Google and Apple. Implementing it from scratch seems very very complicated, but it seems there are premade examples available for ESP32 and other such devices. As an added bonus, Matter can work over other physical protocols such as Bluetooth LE and 802.15.4 + Thread which may take some of the load of your WiFi routing.
My limited understanding of encryption/TLS and playing with microcontrollers, these devices can't have the full list of root certificates that we would have access to with our browsers / on linux. So you can't just go out and use any SSL/TLS certificate, you have to flash into the device either the signature of the cert you will use, or the root of trust you expect to use for the next X years.
Just look at Azure IoT Hub documentation right now:
> During a TLS handshake, IoT Hub presents RSA-keyed server certificates to connecting clients. Its' root is the Baltimore Cybertrust Root CA. Because the Baltimore root is at end-of-life, we'll be migrating to a new root called DigiCert Global G2. This change will impact all devices currently connecting to IoT Hub. To prepare for this migration and for all other details
It seems to me, that if you have these problems anyway, you might as well use Authenticated symmetric encryption - it is perfectly feasible to give each device a unique key, and you could use that until the end of days with much lesser requirements on the hardware. LoraWan uses symmetric equipment only.
Also, in the case of Fridge temperature monitoring, I don't even care if someone else can snoop on the data - I only care that the device is sending data to the real server, and not an imposter, so something like HMAC should work for that.
Without that, you might as well just use HTTP and stop pretending it's secure.
You can feed the lower bits from a ADC converter into a hash algorithm. You can feed the RSSI readings from the radio as well. And finally newer embedded processors and some radio transceivers have built in random number generators. Helps to to flash each device with a unique random seed too.
The RNG problem can be solved relatively inexpensively by dedicated hardware for good enough RNGs (all you really need is enough floating voltage to seed a PRNG and it should probably work well _enough_ in practice). Because of the limited data throughput of many IoT solutions, it's quite difficult to capture enough traffic to reverse the state of the RNG compared to desktop applications where you can capture many gigabytes of data per second.
Symmetric keys also work well if you can figure out secrets management. Managing many secrets can quickly become a pain, though, so it really depends on what kind of devices you use and how many.
But yes, I think most IoT data is pretty worthless for attackers, so it can probably be sent without encryption. If you hack into my network to monitor the temperature of my room then I don't know what to tell you, there are probably better targets out there.
If they all go to a hub, all you have to do is update the hub, plus, the hub can do stuff like local alerts.
Symmetric encryption is probably the way to go for use cases that directly connect.
I wish there was something like an IPv9 (7 and 8 are probably taken!) with 48 byte addresses and a fixed layout. 8 byte ISP identifier, 4 bytes customer, 2 bytes subnet, 2 bytes device, and 32 bytes for a public key hash.
No more certificates, no more insecure LAN connections, just IP that's always secure no matter what as long as you have the right address, and even if you change ISPs you keep the key part of the address.
I imagine establishing the connection requires more RAM, but thats an event that can just use stack space, freeing it all up again when the connection is established. (assuming nothing async).
The MQTT overhead with the right security layer on top (i.e. 0-RTT TLS with extra checking on the backend to prevent replay attacks) should be quite minimal. There's a computational overhead for calculating the keys of course but the algorithm itself shouldn't need too many extra bytes. Similarly, CoAP + DTLS also lends itself to quite little network overhead.
And SPI ram cannot be used for stacks, so it’s incredibly limiting on your program architecture.
But in general, 802.11ax is orthogonal to 'non-stop battery-based connectivity', so we'll have to wait and see how well that works out.
(Assuming they ship this one, and assuming anyone will be able to buy one in the next 2 years or so.)
Absent a proper 'how to join the local Wi-Fi network' story, IoT connectivity is converging around LoRaWAN anyway.
As I said, I like the 5GHz support, but spinning it as 'power efficient' is a reach.
Just checked & my 2 year+ old APs do support it according to Asus website (Asus RT-AX92U)...so can't be that uncommon
If you buy a battery powered IoT doorbell and it's box claims a battery life of 1 year, but then the battery is dead in a week because your router doesn't support the right 802.11 extensions, are you going to blame the router maker or the doorbell?
Has to start somewhere & seems like good progress
Lots of ZigBee stuff, lots of ESP8266-based WiFi stuff (which generally requires a crummy phone app to perform the initial WiFi setup), and a bit of Insteon stuff hanging on despite whatever the heck is going on with the company.
It’s very much being used! Just might not be that obvious.
Even if you aren't a blockchain fan, Helium[1] is still alive and well. It is helping spread LoraWAN even further. I live in central KY and have several helium networks near me. Never in a million years did I expect blockchain to end up on farms in Central KY, but here we are.
Other WiFi features which allow power savings like APSD (802.11e) have widespread support too.
[1] https://www.espressif.com/en/news/ESP32_C6 https://news.ycombinator.com/item?id=26758050 (179 points, 110 comments)
I am looking forward to their ESP32-H2 in order to get Zigbee functionality.
Between these chips and Micropython (and other easy-to-use-on-microcontrollers languages), they are making home developed IOT devices easy to create.
It was originally created for https://www.home-assistant.io, but has morphed into its own thing entirely.
Wouldn't Wi-Fi 6 require relatively expensive IP licensing? (Assumption.)
Then it becomes a problem for those that use Espressif chips.
I'm pretty sure there is a large volume of cheap/crap wifi controlled things being sold in EU/US by at least somewhat reputable retailers with Espressif chips inside.
This is more of a shitty router problem, but if everything is dual band this problem will go away.
The new models have all been RISC-V-based. I wonder if the multi-core situation for RISC-V is somehow more difficult or more expensive, and Espressif is having trouble justifying doing it?
And S models still use tensilica CPUs, but that will change over time.
what does this mean, if you dont mind me asking?
I’ve got a fair few and can’t think what I’d want 5ghz for, but every time I ask why people want a particular feature I’m impressed with that people are doing.
This lets you go 5-only, and that's big for some settings.
I live in an apartment. Not even a super dense tower or anything, just a townhome style complex where everyone has their own garage and front door. From where I sit right now my phone can see nine networks on 2.4G channel 1 alone. 6 and 11 are around the same.
I want everything I can get running on the 5 GHz band and in the future the 6 GHz band. I've been holding off on new APs to upgrade from 802.11ac until I can get ones that support 6 GHz.
What measurable benefit do you expect from moving to 5Ghz?
Networks simply existing causes traffic, the beacon frames that advertise SSIDs are always transmitted at the lowest speed supported by the network, which on 2.4GHz consumer gear almost always means 1mbit/sec 802.11b. (this is the one actual real world benefit to disabling SSID broadcast, eliminating the small interruptions caused by beaconing).
Also keep in mind that 2.4GHz interference isn't just WiFi, it's also Bluetooth and decades worth of cordless phones, RF remotes, gamepads, keyboards, mice, etc.
Anyways, I use Ubiquiti gear at home, and one of the nice features it has is logging channel activity. On 2.4GHz channel 11 the utilization never goes below 25% and hits 75% regularly during peak home WiFi times. I have three smart lightbulbs and a bed on 2.4GHz at the moment, these devices have literally double digit megabytes of activity over months, so the traffic on the band isn't me.
On 5GHz channel 161 on the other hand I have three laptops, two tablets, two phones, two TVs used almost exclusively for streaming, and with all that my average channel utilization is below 10% with the spikes beyond that base level almost entirely correlates with activity of my devices.
---
I don't know what the actual real world difference is, but it's not exactly hard to make the case that moving devices to bands with shorter range and more available spectrum is a good thing for reducing the inadvertent interference caused by modern consumer tech.
Now in my use case I needed to deploy some cheap wireless devices to do things like queuing, automation, camera tally lights, etc. but couldn't because of that restriction, since many devices (Raspberry Pi, ESP32) only supported 2.4GHz. I ended up using the RTL8720DN or devices that contain it such as the Seeed Wio Terminal.
(Correction: ESP32-S2 has no bluetooth at all, see dontknowmuch's response).
By the way in my earlier post I forgot USB. Everyone thinks USB is bad, BT is worse than IP stack + wifi + USB combined.
To which you may say, just buy a cheaper USB cable. That’s fair, but a homebrew CNC maker could have just bought one of the shelf as well. Part of the fun is making something exactly as you want it, the only trade offs personally imposed.
Adding WiFi to all the things is somewhat of a gimmick, but gimmicks are fun. ESP chips are fast, cheap, and easier to program than alternatives. In many cases for hobbyist use the competitor is a Raspberry Pi which is nearly always overkill.
Irrigation system driving valves through H-bridges
Relays driving ceiling fans
IR blasters (actually an additional feature of the previous relay drivers)
PIR sensors
Expansion of a smoke detector to send a push notification to my mobile
Garage door opener
Security cameras
(Quite a few are ESP8266 rather than 32's, depending on power and i/o lines required)