401 points · by bishopsmother · 3y ago · 125 comments
Other companies like TI and STMicro had their own cheap WiFi/BLE MCUs but their devkits used to be too expensive for hobbyists and students. But the Chinese startup behind the ESPxx chips made sure that their devkits were cheap enough for hobbyists and students and through that influence they now also dominate the professional industry.
* integrated WiFi/BT with no/near zero extra engineering needed
* generous amount of RAM/Flash so you can afford to be sloppy
* SDK making it fast to get to the "the wifi is working and I can get on with my development"
* momentum from ESP8266 that already (due to same "super cheap with wifi") had a chunk of market.
Even now in middle of chipaggedon you can get WIFI/BT breakout board for like $3-5. That's not "just" "cheap enough for hobbyist breadboard", that's cheap enough to get the whole product built around.
I think partly due to how cheap WiFi/BT has become the likes of Zigbee didn't got as popular as they probably should, between licensing costs it was just cheaper for IoT companies to not touch it, even if it would make more sense in places.
1. Vendors want Cloud control over the product, they want it to phone home. Zigbee is built for Local Control
2. Consumers prefer "hub free" products that just "work", They are willing to give up privacy, security and possible performance issues for that convenience. They do not think or care about what will happen when their shitty comcast service breaks for the 100th time this year, or if the IoT vendor is hacked, they want to pull out of the box, and have an app connect it in 2 seconds via a QR Code so they can blink the light quickly and not have a fuss about with a hub.
WiFi is better than Zigbee at both of these things. Zigbee is beter for home automation where you want Local Control, and security. Local control and security has been losing that battle though the tide seems to be turning lately (I hope )
This is tptally wrong - I need to control Ikea Lights, Xiaomi smart vacuum and use Aquara to control blinds and a third company for radiator valves - well guess what, you are going to need 4 separate hubs and the only way they can talk to each other is through the internet.
It doesn't matter how much money you spend, Iot shit is not inter-compatiable and no one company makes everything.
It went from hackaday being lol you can use this WiFi module like a MCU. To why would you ever do anything else?
Actually, the major benefit is the ability to use higher level languages or interpreted languages such as python and js. It also allows for more complex network stacks and protocols.
> Boufallo Lab BL616/BL618 is a 32-bit RISC-V wireless microcontroller with support for 2.4 GHz WiFi 6, Bluetooth 5.2 dual-mode, and an 802.15.4 radio for Zigbee, Thread, and Matter designed for IoT applications. [1]
Boufallo chips are becoming available on Pine64 products (Ox64, Star64, Pinecil) [2].
[1] https://www.cnx-software.com/2022/12/29/boufallo-lab-bl616-b... [2] https://www.pine64.org/2022/11/15/november-update-tuned-in/
Both cheap and profiting from the big community.
I'll buy an Ox64 (the ability to run Linux interested me), but Espressif isn't giving up easily. A few years ago, when Espressif was in more of a niche, it would've been an advantage to not have to use their weird Xtensa instruction set. But nowadays most toolchains have apparently added support and it's not a big problem anymore.
128Mb Ox64 SBC - $8 USD https://pine64.com/product/128mb-ox64-sbc-available-on-decem...
16Mb Ox64 SBC - $6 USD https://pine64.com/product/16mb-ox64-sbc-available-on-decemb...
Both currently out of stock, schedule restock in January 2023.
“640KB of RAM” is all you ever need in a great range of use cases that isn't currently well explored, and ESP8266/ESP32 serves that market very well with Arduino IDE integration and affordable devkits.
e: added absolutely necessary positivity to languages, sorry!
Even Apple AirTags (nRF52832 to be precise).
https://www.ifixit.com/News/50145/airtag-teardown-part-one-y...
Let's remember that when the ESP8266 came out, it was basically the only WiFi MCU you could just use. Maybe there were others, but they had no community, so Espressif won out for the makers. And the makers went on to ... make ... IoT devices.
As for power consumption, yeah, Nordic is pretty good. I feel like Silicon Labs is often the primary pick for low power.
When you’re trying to squeeze every dollar out of a BOM, the cheapest chip that gets the job done is going to win. The TI and STM parts were more expensive and less available, so they did not win.
The landscape is slowly evolving, though. Espressif is getting a reputation as the Raspberry Pi of IoT MCUs: Easy to get started and everyone knows about it, but too many people are trying to use it in places where it’s not really the right tool for the job.
A few years ago I’d hear “can’t you just use a Raspberry Pi…” from people who knew just enough to be dangerous. Now it’s “can’t you just use an ESP32…”
They're not great if you're coming from solely-software land, but their SDK and dev experience (you can just use the Arduino IDE for a gentler learning curve, step up to FreeRTOS, esp-idf, or go more bare-metal) is still leaps and bounds ahead of competitors, like the STM32CUBE cluster fuck...using their Hal was the only time in my life where deleting whitespace in C code could break a build. If the developer experience is awful, it doesn't matter that the STM32 chips perform better per second and per watt than an ESP32.
With STM32 they often have 3+ different kinds of timers (advanced, basic, sometimes also low-power). Instead of having one chapter about all of them and saying this and that feature is only available in TIM1, they will copy&paste the 100+ pages chapter for every kind of timer... They must be auto-generating this stuff somehow.
edit: The NRF52 docs and architecture are much nicer than both (the registers seem to be designed by a programmer not a hardware person).
The rest of the industry failing to learn from how Microsoft came to dominance by basically ignoring piracy among students and private individuals.
Who have long offered their software free or heavily discounted for students because then they would demand that software when they entered the workforce and businesses would pay out the nose for it.
Not at all, at least not professionally. Mostly mocked and avoided professionally. But prosumer and hobbyist, it’s probably the most popular. They are fun to prototype with and use around the house but I would never stake my business on them.
What exactly is your problem with them? The chips are fairly capable and the newest ones have transitioned to RiscV in case you're unaware. Sure I wouldn't use them for anything serious realtime but that rarely requires wifi/ble anyway so not sure why you'd pick an ESP to begin with for that :)
I've bought several things specifically because they use esp32 and I can flash Tasmota or EspHome on them. In fact it's a far bigger factor than price.
is that true? it wasn't a couple of years ago.
[0] https://www.espressif.com/sites/default/files/financial/Espr...
Generally IoT devices make an outbound connection to a server and use MQTTS for bi-directional data flow, because of the difficulty of inbound connections due to firewalls, NAT etc. But this has some downsides in that you have to run an MQTT server, each device is doing it's own TLS (which uses a lot of ram and increases firmware size on an ESP32), and MQTT doesn't really have end-to-end message confirmation.
It seems like a better way would be for each esp32 device to be in a wireshark network and to be running it's own HTTP webserver (which is easy to do with the SDK). Therefore any device can be sent a message from the server using a simple POST request to its ip address, and can send messages to the server using the servers HTTP api. It's much easier to test HTTP api's than mess about with MQTT, and individual devices don't need to do SSL because all data between the devices and server is encrypted by wireguard.
I suspect there's something I've overlooked, I think addressing individual devices could be difficult if you only know their IP addresses.
MQTT, aside from being pubsub, has more functionality that is especially useful in IoT though: robust sessions with LW&T to monitor onlineness, and retained topics to deliver messages as devices come online again
I agree that it's easier to test HTTP but lots of IoT stuff plays nicely with mqtt.
The only ones I've messed with before were from Adafruit, but they are all 3g which is, afaik, completely decom'd now.
i've noticed that if your phone doesnt get full signal in the spot you want to place the router at all times of the day, a cheaper router usually doesnt stand a chance of getting a good signal without an external antenna
the ones where you can attach an external antenna with a wire lead are usually easier to position in just the right spot for full bars, and they just seem 'hardier' of the bunch, but you need the antenna, tradeoffs
For current cellular technology, the keywords to look for are LTE-M [0] and NB-IoT [1]. Most of these types of dev boards aren't cheap. Particle makes a 65 USD board [2] and they seem to have a free tier for cellular data access.
[0] https://en.wikipedia.org/wiki/LTE-M
[1] https://en.wikipedia.org/wiki/Narrowband_IoT
[2] https://store.particle.io/collections/ethersim/products/boro...
It's usually nRF52 series in use there. Maybe the ESP32s with Thread or Bluetooth LE, although I'm not familiar with that.
I enjoy WireGuard and it's tooling but in this case TLS seems like the better, battle tested option without any significant downsides if all you are doing is HTTP anyways...
Certification also works differently: TLS (and OpenVPN) rely on Certificate Authorities while WireGuard relies directly on the public key of hosts. This has implications in how trust is managed in the network.
MQTT over TLS is pretty standard, and supported out of the box by virtually all clients/brokers. I suspect the same is true for AMQP.
Some time ago I did a set of benchmarks of MQTT+TLS vs MQTT+WireGuard. Although I was rooting for WireGuard to blow TLS out of the water, the overall bandwidth requirements are quite similar. Under normal conditions WireGuard overhead is a bit higher than TLS, though various network pathologies can swing things the other way. The main one being roaming: if the client frequently switches networks, WG tends to handle this far more gracefully than TLS (not surprising given the underlying design and protocols).
In short, TLS can actually be made to work really well in a context like this - I jotted some notes on an optimal setup here: https://medium.com/p/b880285da526
Beyond this, there are some really interesting efforts to unify MQTT and QUIC - from an architectural perspective I feel like that’s the future for IoT comms. (https://www.emqx.com/en/blog/getting-started-with-mqtt-over-...)
Once connected - use it to tunnel traffic back to network.
Anything else would work though (telegram/cloudflare tunnels/...), It's just what I would use.
Another thing that comes to mind is if you're building a device that jumps wifi networks a lot. WG makes roaming networks pretty seamless, though I'm kinda struggling to think what an actual use for this might be.
Edit: Thinking about it more, you could use it as the backbone of some kind of cross-network mesh system. A bunch of distributed devices connected to their respective local wifi network but then form a common network over WG and are able to route packets. Maybe you could bridge the endpoints to Bluetooth or some other RF protocol as a mesh with the Internet as the backhaul but not having to think about the local network. This sounds pretty wild but would be fun to play with.
Even then, it's technically open but it's using UDP so it's not like it'll show up in port scans or anything.
I’m currently planning on installing a second small home-server at my parents place as a backup target. I thought about an easy, energy efficient way to turn it on and off. My current plan was using a raspberry pi but it would have been a bit overkill. So this is perfect. I already have a wireguard setup between my home server, laptop, smartphone and a cheap rented VM that acts a a router. I can just add the ESP to it know and use either the serial Interface of just a digital out connected to the power pin.
Is there a performant hardware platform which is openwrt compatible and has a single pair of input/output ethernet ports? I seem to remember an Intel device that worked for this, let me see if I can dig up the link
EDIT: I think I was remembering the Intel Compute Stick, which was discontinued in 2020: https://en.wikipedia.org/wiki/Intel_Compute_Stick
Which machines are you referring to?