News for hackers. Stuff that matters.
Re:ESP32/ESP8266 Wi-Fi Attacks by Etheryte on Tuesday September 03, 2019 @12:14PM (#20868069)
For those unfamiliar with the topic, these two chips are by and far the most common wifi chips for DIY and are also very common in IoT devices. Due to cheap price ($2—$5 depending on the model) and very low barrier to entry technically, these devices are both very popular as well as very wide spread in those two categories.

These chips are the first hits for searches such as "Arduino wifi module", "breadboard wifi", "IoT wifi module", and many, many more as they're the downright easiest way to add wifi to something that doesn't have it out of the box.

I'm not sure how applicable these attack vectors are in the real world, but they affect a very large number of devices for sure.

Re:ESP32/ESP8266 Wi-Fi Attacks by Klathmon on Tuesday September 03, 2019 @12:20PM (#20868134)
They are also really capable processors on their own with some nice I/O, and they can be integrated to be really low power so things can run on battery power for months to years.
Re:ESP32/ESP8266 Wi-Fi Attacks by dleslie on Tuesday September 03, 2019 @03:07PM (#20869990)
For example: the ODROID Go is ESP32 based and emulates all major 8-bit platforms reasonably well; it's a niche favourite.
Re:ESP32/ESP8266 Wi-Fi Attacks by fyfy18 on Tuesday September 03, 2019 @09:29PM (#20873159)
Can they really last that long (on their own)? I looked into this when the ESP8266 first became popular maybe 4 years ago as I wanted to build WiFi temperature and humidity sensors. My calculations were that a set of AAA rechargable batteries (~2000mAh) would last a few days at most, with the device in deep sleep most of the time and waking up every 10 mins to take a reading and send it over WiFi.

Right now I'm looking to create smart blinds. The motors don't use that much power, but the issue is the MCU listening for commands. The ESP32 support BLE, but it's power consumption is still rather high, so batteries would only last a few days at most.

Re:ESP32/ESP8266 Wi-Fi Attacks by zaarn on Wednesday September 04, 2019 @03:53AM (#20874925)
Personal experience: I have a ESP32 that runs as a sort of weather station. It has a ~2000mAh battery and lasts almost 2 months, getting a data point once every 30 minutes. That is using the ESPHome to program it.

Even at once every 10 minutes, it should manage almost 3 weeks without requiring a recharge.

Some options that definitely help is to quicken the Wifi reconnect. ESPHome has options to disable AP scanning and doing a fast-and-dirty connect&send. Using MQTT also helped a lot compared to using HTTP.

The most important part is to reduce the on-time as much as possible. 30 seconds is still way above the lower limit that I can do. If you halve it you can double the amount of data points without additional energy by reducing the sleep time.

I'm working on replacing the battery with a solar panel and supercap to power it from ambient shadow light entirely, the numbers to agree that it is possible in my case. Would help to keep it alive in cold weather.

Re:ESP32/ESP8266 Wi-Fi Attacks by fyfy18 on Friday September 06, 2019 @12:09AM (#20892986)
Ah ha, that's good to know! Yeah in my case I had a small solar panel (a few quid of eBay, I guess around 1W) which was able to power it through a British winter (it did get direct sunlight though). I had some rechargable AAA batteries and just wired the solar panel in parallel with them.

After a few months it stopped working, I think some moisture got in and the DHT11 failed.

Re:ESP32/ESP8266 Wi-Fi Attacks by nielu on Wednesday September 04, 2019 @01:47AM (#20874352)
I was able to power ESP-12E based humidity and temperature sensor for about 6 months from 18650 cell. I've used deep sleep and 15 minutes intervals between readings.
Re:ESP32/ESP8266 Wi-Fi Attacks by Klathmon on Tuesday September 03, 2019 @09:40PM (#20873202)
Yeah, although it's a bit more involved than just getting any NodeMCU board.

A bare chip makes it much easier, and you need to balance what comes online and how long it sleeps to still work in your use case.

It's not all that easy in some cases, but it can be done. I've used [1] as a resource before in my own projects.

[1] https://github.com/z2amiller/sensorboard/blob/master/PowerSa...

Re:ESP32/ESP8266 Wi-Fi Attacks by Gibbon1 on Tuesday September 03, 2019 @09:46PM (#20873239)
Not totally sure about the ESP8266. I used a WiFly RN131 in a sensor product that woke up every 15 minutes and sent a reading. AA batteries lasted probably 18 months.

Biggest problem we found was enterprise networks would randomly kick you off if you were using DHCP. I think because they would assume that if you hadn't transmitted in five to ten minutes it meant you'd gone away. Using static IP fixed that.

Edit: Friend of mine that mucks with ESP8266's uses the low power timer to reset and wake the device up out of deep sleep. (Via a simple hack I think just connecting a timer pin to the reset).

Re:ESP32/ESP8266 Wi-Fi Attacks by Tempest1981 on Wednesday September 04, 2019 @03:48AM (#20874903)
Here's a cool project for farm telemetry: http://www.geekstips.com/two-esp8266-communication-talk-each...

Star-mesh topology, with batteries on the leaf nodes. Solar further in. Excerpt: "I’m expecting about 3 months at a 5min log interval using a 2000mAh lipo battery."

Re:ESP32/ESP8266 Wi-Fi Attacks by spyder on Tuesday September 03, 2019 @08:07PM (#20872678)
Yep. Just looking at one commercial product that's using it, the Sonoff wifi switch was bought by a lot of people:

on Banggood they show that they sold 242338 of them:

https://www.banggood.com/SONOFF-Basic-10A-2200W-WIFI-Wireles...

on Amazon the 4 pack listing has 548 customer reviews and there are other listings with hundreds of reviews and probably lot more people bought it than the reviews.

https://www.amazon.com/Sonoff-Remote-Control-Compatible-Andr...

It's used mostly for lights, fan, AC, heating, so not that much critical, but still lot of devices.

Re:ESP32/ESP8266 Wi-Fi Attacks by sixothree on Tuesday September 03, 2019 @01:59PM (#20869239)
I have a bunch of these around the house and garage. I never would have expected them to be secure against an attack.
Re:ESP32/ESP8266 Wi-Fi Attacks by baybal2 on Tuesday September 03, 2019 @12:30PM (#20868242)
I'd say Espressif has a near monopoly due to first comer advantage.

There are way, way more moneyed companies in the wifi MCU game, but I have not seen a single competitor chip outside sales demos yet.

Redpine had big dotcoms backing, but it seems that even they dropped the ball on them in favour of Chinese chipmakers. Amazon and Google recently reached out for MXCHIP and Espressif, and their Redpine based solutions never went beyond the tech demo stage.

Re:ESP32/ESP8266 Wi-Fi Attacks by solarkraft on Tuesday September 03, 2019 @12:44PM (#20868399)
Realtek has the RTL8710, which is a lot like the ESP8266 but with an ARM Cortex-M3 (while Espressif uses the rather obscure Xtensa architecture), which has the advantage of getting an LLVM toolchain for it, which means you can program it in Rust (while the ESPs are mostly limited to C).

The real advantage of the ESP8266 however is its raw popularity. It has an Arduino environment, tons of ready to run sketches, Basic, Javascript, Lua and Python interpreter environments and lots of interesting projects already done with it.

The ESP32 follows right in its foot steps with even more features, power and power saving features. Espressif really saw the market the DIY community means and did some minor tweaks to its policies to cater to it, which probably helped its popularity with commercial hardware makers as well.

Re:ESP32/ESP8266 Wi-Fi Attacks by baybal2 on Tuesday September 03, 2019 @01:07PM (#20868672)
I heard of Realtek,and took a look at it. It still comes with fever RF accessories on package, and thus grows your BOM. And their wireless docs and SDK as a whole are kind of obscure/"Taiwan style"

Plus, since it comes from "another China" it's subject to Chinese customs duty which negates whatever cost advantage it could have.

Re:ESP32/ESP8266 Wi-Fi Attacks by MrBuddyCasino on Tuesday September 03, 2019 @01:34PM (#20868935)
There is now a branch of LLVM that supports XTensa. You can run Rust code on an ESP, but it’s awkward.
Re:ESP32/ESP8266 Wi-Fi Attacks by monocasa on Tuesday September 03, 2019 @03:09PM (#20870014)
mrustc is a good option too.
Re:ESP32/ESP8266 Wi-Fi Attacks by danieldk on Tuesday September 03, 2019 @02:08PM (#20869352)
Realtek has the RTL8710, which is a lot like the ESP8266 but with an ARM Cortex-M3 (while Espressif uses the rather obscure Xtensa architecture), which has the advantage of getting an LLVM toolchain for it, which means you can program it in Rust (while the ESPs are mostly limited to C).

Any recommendations for good, affordable dev boards (say under 20Euro/USD), that are easily available?

(I have been playing with RobotDyn Blue Pills and Rust, but no wireless or Bluetooth connectivity.)

Re:ESP32/ESP8266 Wi-Fi Attacks by amock on Tuesday September 03, 2019 @03:13PM (#20870048)
I haven't tried it, but https://www.seeedstudio.com/RTL8710AF-WiFi-Board-p-2805.html looks like it might be what you're asking about.
Re:ESP32/ESP8266 Wi-Fi Attacks by emilfihlman on Tuesday September 03, 2019 @02:06PM (#20869326)
>I'd say Espressif has a near monopoly due to first comer advantage.

No. Espressif is used because it is _cheap_ and has relatively good support libraries. Just the chips/modules from other vendors are usually 15 to 20€ in single quantities while you can get an ESP8266 minimum development board (almost all normal arduino boards are minimum development boards) for like 3€.

Unless other vendors reach that same level, they will always stay back.

Re:ESP32/ESP8266 Wi-Fi Attacks by baybal2 on Tuesday September 03, 2019 @03:18PM (#20870103)
First comer advantage is huge.

I work with a mid sized engineering consultancy.

We began switching to ESP as our primary platform just around 2 years ago, just as wifi gadgets were starting to boom.

To date, we got 500 megs of MCU project in our repo. Though most of code is repetitive, there is no chance we will part with such a huge codebase.

Being able to complete a $200k project in a few weeks through code reuse, instead of few months is huge, and imagine how it is for bigger companies with own hardware. No chance anybody switching now.

Re:ESP32/ESP8266 Wi-Fi Attacks by emilfihlman on Tuesday September 03, 2019 @07:51PM (#20872582)
>First comer advantage is huge.

No. It was first comer advantage in affordable wifi MCUs since they existed just fine before but only as more expensive solutions as I mentioned. You can keep on claiming otherwise but the facts don't support you in claiming that there weren't wifi MCUs before.

Re:ESP32/ESP8266 Wi-Fi Attacks by ClumsyPilot on Tuesday September 03, 2019 @06:23PM (#20871868)
Why do you call it first mover advantage when there were wifi MCUs before it?
Re:ESP32/ESP8266 Wi-Fi Attacks by baybal2 on Tuesday September 03, 2019 @06:56PM (#20872135)
What was before were not MCUs as such, but a zoo of spi wifi + mcu "solutions" from rentier companies like broadcom.

Technically, and conceptually they were hopelessly behind an integrated WiFi MCU.

Re:ESP32/ESP8266 Wi-Fi Attacks by emilfihlman on Tuesday September 03, 2019 @07:53PM (#20872600)
You are wrong. There were many Wifi MCU solutions available before.

Espressif did not innovate in the technology space but in pricing and having enough documentation available that hackers could piece together an open source toolchain and libs for the chip.

Re:ESP32/ESP8266 Wi-Fi Attacks by emilfihlman on Tuesday September 03, 2019 @07:52PM (#20872588)
He's just wrong/in denial about it. Wifi MCUs existed just fine before ESP as you say, they just weren't affordable.