Live data from Hacker News

Reverse engineering ESP32 Wi-Fi driver: the road ahead

esp32-open-mac.be

11–20 of 66 posts

Re: Reverse engineering ESP32 Wi-Fi driver: the road ahead

#12
post #2

Very cool project. I think efforts like these are among the most promising to get a FOSS WiFi cards. Because these WiFi-capable MCUs are: designed to be generally programmable, have quite a lot of open documentation, are available for purchase in both small and large quantities, have s availability over long time-frames (10 years), can tap into the larger community knowledge-base. This is in contrast to the more spec…

What do you mean by FOSS Wi-Fi cards? Aren't there lots of open source drivers for Wi-Fi cards?

They're talking about open-source firmware, I would guess.

Re: Reverse engineering ESP32 Wi-Fi driver: the road ahead

#13
Interesting. 53286 accesses is a lot, I wonder if some of this is writing firmware to another processor, or writing a table. Some may also be busy waiting on status bits.

It would be interesting to see what the minimal subset of the 53286 is, which can be automated using the Delta Debugging algorithm, but it would first be necessary to figure out if there were any necessary waits during the writing process. Also blindly deleting stuff may produce a system that, even if it works, isn't a good citizen of the RF spectrum.

Re: Reverse engineering ESP32 Wi-Fi driver: the road ahead

#14
post #6

So this appears to be a clean reversing effort, for what - legal reasons? Espressif Systems is a Chinese company and probably stole half the code in the firmware anyways. No one will blame you if you stick the stick the firmware in Ghidra.

First paragraph:

"This will enable features that the current, closed source ESP32 Wi-Fi implementation does not have, for example 802.11s mesh networking. It will also improve the auditability of the code."

Re: Reverse engineering ESP32 Wi-Fi driver: the road ahead

#15
post #6

So this appears to be a clean reversing effort, for what - legal reasons? Espressif Systems is a Chinese company and probably stole half the code in the firmware anyways. No one will blame you if you stick the stick the firmware in Ghidra.

>Espressif Systems is a Chinese company and probably stole half the code in the firmware anyways. So if an entity is Chinese we are sure they are thiefs.

The thing is, China as a culture does have a completely different attitude towards intellectual property. For them, copying is not theft, it's acknowledge of something's quality. Andrew "bunnie" Huang has written (at least) two articles with more details [1][2].

[1] https://www.bunniestudios.com/blog/2014/from-gongkai-to-open...

[2] https://www.bunniestudios.com/blog/2013/the-12-gongkai-phone...

Re: Reverse engineering ESP32 Wi-Fi driver: the road ahead

#17
post #6

So this appears to be a clean reversing effort, for what - legal reasons? Espressif Systems is a Chinese company and probably stole half the code in the firmware anyways. No one will blame you if you stick the stick the firmware in Ghidra.

First paragraph: "This will enable features that the current, closed source ESP32 Wi-Fi implementation does not have, for example 802.11s mesh networking. It will also improve the auditability of the code."

Mesh is such a cool technology that seems to be reserved to high end HW, and bringing it to ESP32 would be amazing!

Re: Reverse engineering ESP32 Wi-Fi driver: the road ahead

#18

Earlier quoted context omitted.

>Espressif Systems is a Chinese company and probably stole half the code in the firmware anyways. So if an entity is Chinese we are sure they are thiefs.

The thing is, China as a culture does have a completely different attitude towards intellectual property. For them, copying is not theft, it's acknowledge of something's quality. Andrew "bunnie" Huang has written (at least) two articles with more details [1][2]. [1] https://www.bunniestudios.com/blog/2014/from-gongkai-to-open... [2] https://www.bunniestudios.com/blog/2013/the-12-gongkai-phone...

> copying is not theft, it's acknowledge of something's quality

This is a common misconception. It is true that they don't think it is theft once it's widely available (even in underground community), but it's not because "copying is acknowledge of something's quality". This is one of the usual excuses.

A better phrasing would be: modern (post-1980s) Chinese people [1] care more about who is able to build the thing, not who is able to invent / design. They happily (and knowingly) steal your design and after a few iterations build it better and think it's totally legit because you failed to prevent them from stealing your design and you also can't build it better.

And the annoying part is, turns out, after copying all they can steal they surprisingly can invent, too.

[1] It's not yet a culture

Re: Reverse engineering ESP32 Wi-Fi driver: the road ahead

#19
I wonder if they use any of the decompiler tools that are available. There is decompiler support for the Xtensa esp32 instruction in ghidra version 11.0. I also guess that rev.ng, which uses QEMU as its disassembler, could be used for decompiling as QEMU has support for the Xtensa esp32 instructions as well.

My experience with decompilers is that are not 100% perfect and that the output often still needs a lot of clean-up. I tried rev.ng on a binary written in assembler that used a register based calling convention (not stack based) and rev.ng produced a huge file many times the size you would expect from the assembler input. It seems that decompiler can only do the most trivial step of the reverse engineering process.

Re: Reverse engineering ESP32 Wi-Fi driver: the road ahead

#20
post #2

Very cool project. I think efforts like these are among the most promising to get a FOSS WiFi cards. Because these WiFi-capable MCUs are: designed to be generally programmable, have quite a lot of open documentation, are available for purchase in both small and large quantities, have s availability over long time-frames (10 years), can tap into the larger community knowledge-base. This is in contrast to the more spec…

What would the performance be like though? Would you want to use a ESP32 for watching Videos? Would that be doable?
Post reply on HN