Live data from Hacker News

Unveiling secrets of the ESP32: creating an open-source MAC layer

zeus.ugent.be

41–50 of 157 posts

Re: Unveiling secrets of the ESP32: creating an open-source MAC layer

#41

What kind of programmer does one need to work with ESP32? I bought jlink for stm32 thinking that's the ultimate programmer for all my needs, however it does not claim compatibility with esp32.

A usb cord to your computer. Flash the firmware with whatever you want. Check out WLED if you have wifi.

Re: Unveiling secrets of the ESP32: creating an open-source MAC layer

#42

I wasnt aware of this wifi blob. This feeds a tiny paranoia I have at the back of my head when dealing with esp32/espressif. I have dozens of esp32s around and I love them, but Espressif is 100% Chinese. Im uncomfortable with what I read that every company of significant size in China automatically requires CCP party members to be involved in the company at a high level. So Im very happy to hear people such as these…

I restrict my esps to local network only absolutely no internet access for them. No trust for Chinese products from Chinese companies

> No trust for Chinese products from Chinese companies

That's fair but Espressif is wayyyyyyy more open than ANY Western chip maker. The entire framework and toolchains are open-source for one thing. You get listings and sometimes pseudo-code for the internal ROMs (though no code). You get full access to datasheets, technical reference, and sdk documentation. Everything in their SDK is documented. You even get help on github. All of that accessible to anyone anywhere at any time.

Contrast that to the last time I worked with Nordic in a professional manner, I had to sign NDAs to get the full documentation and toolchain. Their toolchain contained binary blobs that when inquired about you get told "don't worry about it ;)" which is shockingly frustrating when a crash occurs in them and you're left trying to work around it. And if you're not a professional you're basically SOL and left with half-baked community toolchains, when they exist for a particular chip.

Re: Unveiling secrets of the ESP32: creating an open-source MAC layer

#43

Earlier quoted context omitted.

Are we talking lightweight servers like minihttp and shizaru, mid-level lighttpd , or big-ass Apache and nginx?

We're talking lighter than minihttp and shizaru - instead of a separate process on an OS, you'd use library that allows your firmware to respond to http requests, but that still allows you to run all the relatively complex UI/UX code on the user's computer or phone, with the microcontroller only handling the physical functionality; and reduces the need to have and manage more physical buttons/lights/screens/etc on th…

Oh, that's pretty neat. Basically trimming the server down to the routing itself.

    1. accept HTTP
    2. check for valid endpoint
    3. if yes, do thing and exit
    4. if no, 'error'
Client side has fancy UI for essentially templating per-HTTP request or command sent to the device.

I guess the only issue I see is you'd need some sort of firewalling or security. Otherwise any rando could fire HTTP requests at the thing and make it do stuff.

How would you structure this on the device's side? If a webserver's too big, then I imagine an init system is also too big.

Re: Unveiling secrets of the ESP32: creating an open-source MAC layer

#44

What kind of programmer does one need to work with ESP32? I bought jlink for stm32 thinking that's the ultimate programmer for all my needs, however it does not claim compatibility with esp32.

They do have a boot loader that speaks uart, but are also compatible with jtag and openocd. However, I haven’t needed to burn the pins on jtag because they’ve implemented a gdb stub over uart, including the ability to trap interrupts and dump into a paused gdb session. It’s not ideal, but it’s pretty impressive from a preexisting tools perspective.

This doesn’t really answer your question, but it feels like it’s worth mentioning.

Re: Unveiling secrets of the ESP32: creating an open-source MAC layer

#45

What kind of programmer does one need to work with ESP32? I bought jlink for stm32 thinking that's the ultimate programmer for all my needs, however it does not claim compatibility with esp32.

I’ve actually found that ESPHome is sufficient for most basic use cases

Re: Unveiling secrets of the ESP32: creating an open-source MAC layer

#46

I think bl602 shares the wifi rf/mac layer with esp32. There is a monitor mode implementation here https://github.com/stschake/bl60x-wifimon/

No, it doesn't. I know with 100% certainty ESP WiFi hardware is developed in-house and not shared. I think BL602 uses CEVA IP, not sure about that, but it certainly is not shared with ESP chips.

Sprite, how will Espressif react to this effort to open-source wifi? Will it help by releasing wifi phy documentation? Will it add DRM to block future efforts?

(sprite_tm works at Espressif)

Re: Unveiling secrets of the ESP32: creating an open-source MAC layer

#47
post #45

What kind of programmer does one need to work with ESP32? I bought jlink for stm32 thinking that's the ultimate programmer for all my needs, however it does not claim compatibility with esp32.

I’ve actually found that ESPHome is sufficient for most basic use cases

The question then is where have you found ESPHome to fall short?

Re: Unveiling secrets of the ESP32: creating an open-source MAC layer

#48

I wasnt aware of this wifi blob. This feeds a tiny paranoia I have at the back of my head when dealing with esp32/espressif. I have dozens of esp32s around and I love them, but Espressif is 100% Chinese. Im uncomfortable with what I read that every company of significant size in China automatically requires CCP party members to be involved in the company at a high level. So Im very happy to hear people such as these…

Wifi is easy... there's no way to send anything undetected, since you control the routers, etc. GSM->5G modems are a lot harder to debug... maybe now in recent years with cheaper SDRs, but a lot harder then wifi. And not sure why you'd be afraid of CCP, we saw the wikileaks, USA does a lot of similiarly bad stuff too and even got caught doing it... and if you live in a "western" country, USA has much easier access to…

You are assuming you have full insight into what the board is capable of.

Re: Unveiling secrets of the ESP32: creating an open-source MAC layer

#49
post #5

I can attest to the challenges of the section on Dynamic analysis on real hardware and the struggles of attenuating signal interference on the ESP. Anyone have a recommendation on conducting fabric for RF isolation as briefly mentioned in the article or resources on the subject of rf isolation/Faraday cages for microcontrollers?

Not directly answering your question, but on preventing emission in the first place (and the best video I've ever seen on electrical engineering): https://www.youtube.com/watch?v=ySuUZEjARPY

Re: Unveiling secrets of the ESP32: creating an open-source MAC layer

#50

What kind of programmer does one need to work with ESP32? I bought jlink for stm32 thinking that's the ultimate programmer for all my needs, however it does not claim compatibility with esp32.

They have a built in serial bootloader. Most dev boards don't need anything, they come with a USB-to-serial adapter. Some of the new ones even have the USB part integrated on chip.

If you use a bare module then you need a basic 3.3V serial adapter and maybe a jumper wire to ground pin 0 to enter programming mode.

You can also do stuff with JTAG, which will let you use a debugger, but that's not mandatory. Espressif sells a dirt cheap one. I think maybe you can use your jlink for that with some fiddling but I'm not certain.

Post reply on HN