Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please open source this library #2

Open
Juul opened this issue Dec 17, 2016 · 80 comments
Open

Please open source this library #2

Juul opened this issue Dec 17, 2016 · 80 comments

Comments

@Juul
Copy link

Juul commented Dec 17, 2016

Having an open source WiFi MAC on such an affordable device would be extremely useful for experimenters and researchers.

If you are worried about people disregarding the WiFi standard then that is already possible with other devices.

The existing open WiFi drivers for cheap routers such as the AR9xxx driver that exists for the Omega2 $5 OpenWRT-compatible micro-router is easily configurable in ways that are harmful, outside of the WiFi specification, and illegal in various countries.

Software Defined Radios allow complete control over the WiFi MAC and PHY and these devices are getting cheaper every year.

Many devices already speak other non-WiFi protocols on the same 2.4 GHz frequencies as WiFi and standards-compliant WiFi devices knows how to handle the interference.

If you open source the WiFi MAC then the rest of the world can help improve your firmware to make it the best microcontroller WiFi MAC available.

Given all of this I do not understand why you would keep the WiFi MAC closed.

@igrr
Copy link
Member

igrr commented Dec 19, 2016

Open sourcing the upper MAC layer is certainly on our roadmap.

This does require a fair amount of developer time though, because large codebase has to be refactored, cleaned up, and documented. At this point we see more benefit in spending developer resources on those many features missing from the ESP-IDF. As the ESP-IDF gets more feature complete, we will invest more time into MAC layer clean up and open sourcing.

@Juul
Copy link
Author

Juul commented Dec 19, 2016

Well that's great news!
You don't really need to clean up and refactor before releasing. As the open source mantra goes: Release early, release often. Having something is so much better than having nothing :)

@ghost
Copy link

ghost commented Dec 19, 2016

If you release what you have now, we'll figure it out. We can even help you out! The point of having an open codebase is to have a constructive, bidirectional relationship with your users instead of releasing software for mere consumption.

@Spritetm
Copy link
Member

The problem mostly is that what we have now isn't designed to be released and has developed some ball-of-yarn qualities. We need time to separate the bits of the MAC that we can open-source from the lower layers that need to stay closed because they contain IP-related sensitive information. As you can see, well, everywhere else in esp-idf, we're absolutely not against having a constructive and bidirectional relationship with our users; it's one of the reasons you see a gazillion commits to the esp-idf master branch and not a closed release full of binaries every x time! We just ask you to be patient on this one, we know it's a highly requested feature but due to the nature of the thing, we can't just throw it out in the open, sorry.

@Juul
Copy link
Author

Juul commented Dec 19, 2016

What would it take to open source the entire thing? Could we crowdfund however much it would take to buy the IP-protected parts free? How much would that cost and with whom would we negotiate?

@Spritetm
Copy link
Member

I can't say... I'll pass it on, see if that is an option.

@Spritetm
Copy link
Member

Sorry, just got a response; unfortunately in this case throwing money at the problem isn't going to help.

@ESP32DE
Copy link

ESP32DE commented Mar 15, 2017

Dear espressif

I am now at same thinking.

i do not want further more time wait for fixing things in the lib.
we are helpless if we build productive things on the way to LIBS
that are outdated or not fixed.

please open the libs that we can develope on Open Source way.

best wishes
rudi ;-)

@dobegor
Copy link

dobegor commented Jul 11, 2017

@igrr Sorry to bother you here, but can we get some status update on upper layer open sourcing process? This is essential for a production-grade systems built with ESP32. Thanks in advance.

@danielinux
Copy link

I am hearing rumors saying Espressif will never open source this library. That's a shame, especially because the company is just riding the open source wave to spread within the community.

All I can say, they only care about selling hardware along with their proprietary, closed-source, bad quality software.

All in all, great marketing play. Well done!

@igrr
Copy link
Member

igrr commented Sep 6, 2017

Folks, indeed the process is a long one, but we are taking steps in opening parts of these libraries. Since this issue was opened, significant portion of rtc library was released, and recently ets_timer implementation was opened as well. In the foreseeable future, some parts (such as the PHY library) are going to stay closed source. But the supplicant and eventually upper MAC layer will be opened. Thank you for your patience and understanding.

@kaofishy
Copy link

Does this apply to the Bluetooth part as well? Since BLE shares pretty much the same Phy as NRF24L01 it would be interesting to bypass the protocol stack to ease interoperability.

@flo90
Copy link

flo90 commented Oct 25, 2017

Hi @igrr.
I am currently writing my master thesis about energy saving in IEEE802.11. Beside other hardware I want to explore possibilities of the ESP32. But to do so, I need access to the wpa supplicant e.g. to restore key material and skip handshaking after deep sleep. The already implemented modem sleep gets close to another feature I need, except that I want to turning the modem off and on by myself instead of periodically. Do you see any problems doing so and can you tell me and all other people the current status? Maybe it would be a nice Christmas present opening the parts you announced ;-).
Thanks in advance!

@stern0m1
Copy link

Any updates from espressif? I would also love for the wifi stack to be open source.

@igrr
Copy link
Member

igrr commented Dec 27, 2017

@stern0m1 no specific updates at the moment, but some parts of the supplicant (WPA2 and WPS) are planned to be open sourced in release 3.1.

@stern0m1
Copy link

Thanks.
Off topic, but would the esp-now framework allow me to capture action frames not originating from another esp8266?
Is there any other way with the current sdk to capture action frames from a different device?
Promiscuous mode doesn't capture enough of the frame...

@igrr
Copy link
Member

igrr commented Dec 27, 2017

No, esp-now is built upon vendor IE, so it doesn't let you receive any extra packets.

@stern0m1
Copy link

If esp-now wouldn't filter by vendor I would be able to receive a command from an iPhone with one click. Direct without establishing a network.

This is another example of the benefits of open sourcing...

I have spent many hours/days trying to figure out a way to receive a command on the esp8266 from an iPhone with one click.

Any ideas?
Thanks

@FlorianMickler
Copy link

Is it possible to open things up enough to route the timings of the wlan-ap master beacons out in order to do some time synching on them? That would be awesome and a big feature. (Multi Room Audio, Spatially separated Microphone Arrays...)

@hargathor
Copy link

Any update on the open source release process ? Is this still in the roadmap of the 3.1 at least for the Wifi Part ?

@igrr
Copy link
Member

igrr commented Jan 30, 2018

Parts of WPA2 and WPS source code are planned to be open sourced in 3.1.

@akshar001
Copy link

@igrr thank you for everything may we know when will mac layer library will be open sourced?

@igrr
Copy link
Member

igrr commented Jun 8, 2018

Recently WPA2 and WPS code has been moved to IDF. Next we plan to move more of wpa_supplicant code into IDF, but the exact scope for the next step is not determined yet. I will update this issue once more concrete plans are in place.

@akshar001
Copy link

@igrr sure we will wait for your update on this issue now? thanks

@chrismerck
Copy link

After years of struggling with dodgy WiFi drivers, the embedded systems community finally has a vendor who is committed to delivering transparency and quality in their WiFi software! The open-sourcing that has already occurred (particularly in wpa_supplicant) made a huge difference in the confidence that product designers can put in ESP32. Keep it up!

@jult
Copy link

jult commented Sep 1, 2018

Yes, open source this, please. I've just gotten 4 of Gosund's 220V switches, it's using this lib internally. I don't trust it on my WLAN without locking it out and putting it in a VLAN. Source needs to be audited.

@moefear85
Copy link

moefear85 commented Apr 5, 2022

Jamming is not a rocket science. And neither computer one. You even don't need to write signle line of code.

Actually, writing a single line of code is the easiest in many cases. You can't do it with a broomstick, so any alternative is most likely not easier, nor necessarily targeted, nor the point. The point I was trying to make is that when you're already making iot projects, having a very simple way to fully control the wifi antenna, will definately lead to alot more annoyance/interference in the functionality of any nearby devices, whereas without that access, then there is far less likelihood that people will have the motivation or the capability (inadvertent or otherwise), to actually affect nearby communications beyond hogging bandwidth by doing alot of streaming.

Intentionally jamming is of course very easy.. just remove the magnetron from a microwave and power it. Done.

that is not easier, nor as cheap as flashing an app that intentionally or unintentionally ends up jamming communications elsewhere, the likelihood of which would increase if given easy access to the lowest wifi layer.

Anyways, I agree with the Non-Disclosure opinions... that's also mostly likely. But then espressif is at a disadvantage if all the alternatives are allowed to disclose it, and they are, as for the nRF I hear it's wifi stack is fully documented at the register access level.

@uis246
Copy link

uis246 commented Apr 5, 2022

Actually, writing a single line of code is the easiest in many cases.
that is not easier, nor as cheap as flashing

What is easier? Open door of microwawe oven and press button?
Or buy devboard, buy programmer, wait months unti everything arrive, soldier pin headers, connect board to programmer, connect programmer to pc, program it and only then you can jam your wifi, because for jamming someone's else there is not enough power to overcome thick walls?

Even if you are right and jamming is hard, communication is still harder, so in the world without open wifi docs jammer is even have higher chance to be implemented.

After all nothing stops from going to shop and buying jammer for about 2-3 euros which is even cheaper than esp+programmer or 8-12 euros to buy jammer for 5GHz, 2.4GHz, 1.8GHz, 800 MHz and 433 trash heap.

So flashing some evil-evil firmware is not the easiest nor the cheapest way of jamming.

@uis246
Copy link

uis246 commented Apr 5, 2022

as for the nRF I hear it's wifi stack is fully documented at the register access level.

Wifi SoC with fully documented registers I know is Atheros' one.
Nordic Semi have public docs of BLE(and ANT+, Thread, Zigbee) registers, they don't have wifi at all, but they say they will start producing wifi chips soon.

@sherinds
Copy link

Hi @igrr
I have downloaded the latest release of idf v4.3.4
I am looking at the folder 'components/esp_wifi
What level of details are exposed here? Is there any documents regarding this?

@devrim-oguz
Copy link

Alongside WiFi, their mesh code is also closed-sourced. Making it very hard to find problems. It is time we start to reverse-engineer everything ESP related.

@Matheus-Garbelini
Copy link

@devrim-oguz you can try using my reverse engineering (patching) framework: https://github.com/Matheus-Garbelini/esp32_firmware_patching_framework

You can explore symbols of a compiled firmware of a ble mesh program with ghidra (including ROM space) and then use a python script which updates the compiled ELF file to hook custom callback functions to addresses of your choice or substitute some instructions to others.

@Kobunteki
Copy link

jack will say no.

@ESP32DE
Copy link

ESP32DE commented May 25, 2023

in 2023 again :)

please open source this library

we want start now - legal - with build linux driver for the esp32-s3

thank you

@ESP32DE
Copy link

ESP32DE commented May 25, 2023

local ping @igrr
...done!

want ping www now . - )

image

@uis246
Copy link

uis246 commented May 26, 2023

in 2023 again :)

please open source this library

we want start now - legal - with build linux driver for the esp32-s3

thank you

Does it work with rf phy directly through registers?

@ESP32DE
Copy link

ESP32DE commented May 26, 2023

in 2023 again :)
please open source this library
we want start now - legal - with build linux driver for the esp32-s3
thank you

Does it work with phy directly through registers?

... this try happens on this path asap next time -

@redfast00
Copy link

Open sourcing this library (or at least the MAC part) would also enable the community to add support for 802.11 extensions, for example 802.11s (mesh networking on the MAC layer).

@BlueTailCat
Copy link

Will libwapi.so support wapi-cert auth mode? if not, can you opensource it or give some interface let us implement it?
And When scan hotspot, it can display wapi-psk, but cannot display wapi-cert.

@redfast00
Copy link

If the goat does not come to the milking shed, the milking shed will come to the goat! We started reverse engineering the ESP32 802.11 MAC and PHY layer, see https://zeus.ugent.be/blog/23-24/open-source-esp32-wifi-mac/.

The open-source implementation can currently connect to an open access point and send UDP packets. The goal is to have a completely open-source implementation of the PHY and MAC layer: at the moment, we still do the radio initialisation using the Espressif libraries. After the initialisation is done, we kill the proprietary wifi FreeRTOS task, replace the interrupt with our own interrupt and only run open-source code from then on.

As for legalities, we're in the clear, since the blobs are licensed under the Apache 2.0 license, see https://opensource.stackexchange.com/a/9568

I invite you all to read the blog post, and then maybe collaborate on reverse engineering or re-implementing wifi functionality.

@IEatCodeDaily
Copy link

+1

Having an open source WiFi MAC on such an affordable device would be extremely useful for experimenters and researchers.

I really want to implement FTM-Broadcast outlined by this paper. Unfortunately the ftm session code is hidden behind the API call.

@redfast00
Copy link

Progress report: we are now able to connect to an open AP, and use the regular ESP32 networking API, so you can now write for example a HTTP server (previously, the UDP packets were hardcoded).

We're currently working on radio initialization to be able to entirely remove the binary blobs; this is going smoothly. See also https://esp32-open-mac.be/ for progress reports, blogs posts and a post where I built a cheap (~300 EUR) Faraday cage with data passthrough. All code is in https://github.com/esp32-open-mac/.

@uis246
Copy link

uis246 commented Apr 11, 2024

Progress report: we are now able to connect to an open AP, and use the regular ESP32 networking API, so you can now write for example a HTTP server (previously, the UDP packets were hardcoded).

We're currently working on radio initialization to be able to entirely remove the binary blobs; this is going smoothly. See also https://esp32-open-mac.be/ for progress reports, blogs posts and a post where I built a cheap (~300 EUR) Faraday cage with data passthrough. All code is in https://github.com/esp32-open-mac/.

Wow, great job. This is really impressive.

@devrim-oguz
Copy link

Progress report: we are now able to connect to an open AP, and use the regular ESP32 networking API, so you can now write for example a HTTP server (previously, the UDP packets were hardcoded).

We're currently working on radio initialization to be able to entirely remove the binary blobs; this is going smoothly. See also https://esp32-open-mac.be/ for progress reports, blogs posts and a post where I built a cheap (~300 EUR) Faraday cage with data passthrough. All code is in https://github.com/esp32-open-mac/.

You guys are awesome for doing this

@redfast00
Copy link

I will be giving a talk at the Gulaschprogrammiernacht 22 conference in Germany (https://cfp.gulas.ch/gpn22/talk/TZXJBW/) about this. Feel free to come if you're interested!

@Frostie314159
Copy link

+1. I'm aware, that Espressif likely can't open source the lower parts of the stack for IP reasons. I also get the argument of preventing people from making deauthers. It was however extremely trivial to just patch out the check preventing the transmission of any frames. I'm also pretty sure, that Espressif could open source the upper parts of the stack, since they are evidently ported from FreeBSD. Nordic's WiFi stack is open source as well, except for the lowest layers.
IMO, having access to the MAC would make the esp32 a great tool for wireless experiments, by removing the hoops, through which we have to jump now.

@redfast00
Copy link

I will be giving a talk about this at the RIOT Summit 2024 in Austria (https://summit.riot-os.org/2024/blog/speakers/jasper-devreker/). September 5th or 6th, free entrance. Feel free to come if you're interested!

@redfast00
Copy link

The recording from the talk is available: https://www.youtube.com/watch?v=sGdD8XWTM2Y

@ESP32DE
Copy link

ESP32DE commented Sep 13, 2024

in 2024

again and again.
open the binary LIB - this makes no sense in the opensource

we run on each espressif factory problem on a big wall of silent.
espressif/esp-idf#14540
there is no coordination between the groups of internal * external.

the factory firmware should run without problems on a new product. no indications that what, what does not work or is restricted. no note as an enclosure that 138240 baud are necessary because 48 MHz are installed. we are slowly but surely getting tired of the long search and trial and unanswered problem reports that cost a lot of time. sorry guys but now it's close to the end. I am sorry.

i actually expect people to take it seriously and to heart when products are delivered also that the Factory FW is tested and goes only with QM over the product to sales! I am sorry again.

when a new product is highly advertised with new standards ( Dual Wifi 5GHz ) and advertisements, the factory firmware should be put through its paces. why doesn't anyone dedicate themselves to this? what should we check and run on the ESP32-C5 with Dual WiFi 6 , the LED flashing works, great, but the WiFi 6 5GHz not as expected. there is silence, ducking away, persevering. i don't want to know what money this group devours, burns, who deliver such shameful factory firmware. every 5th grader can do that better if you make the sources available to him. my 5ct. and that's it. espressif should finally understand that it does more harm if you are constantly silent - than admitting mistakes.

last but least :

open the binary blobs and we can work byself on this problems.
and it doesn't cost you a cent - the community is free - then give it to us!
otherwise just leave out all this nonsense that it is open source and for the community - it's not!

in the end, it frustrates. and you get goosebumps. i'm also slowly but surely running out of patience for something like that. then it should have been. then better an end with horror than a horror without end. @igrr

and enter

@redfast00
Copy link

I would like to make it clear that ESP32DE is not affiliated with the esp32-open-mac project in any way. While the esp32-open-mac project would like some support from Espressif (mostly documentation or being able to ask the engineers some questions), we know we're not entitled to anything, and are already very grateful that the blobs are released under an open source license that allows reverse engineering.

@ESP32DE these rude comments/rants don't contribute in any way towards building or releasing an open source Wi-Fi driver, and are likely even counterproductive: by acting rudely towards Espressif employees, you discourage work or support from them on this. Could you please remove the comment or move it to somewhere more relevant?

@ESP32DE
Copy link

ESP32DE commented Sep 13, 2024

I would like to make it clear that ESP32DE is not affiliated with the esp32-open-mac project in any way. While the esp32-open-mac project would like some support from Espressif (mostly documentation or being able to ask the engineers some questions), we know we're not entitled to anything, and are already very grateful that the blobs are released under an open source license that allows reverse engineering.

@ESP32DE these rude comments/rants don't contribute in any way towards building or releasing an open source Wi-Fi driver, and are likely even counterproductive: by acting rudely towards Espressif employees, you discourage work or support from them on this. Could you please remove the comment or move it to somewhere more relevant?

heyja @redfast00 WoW 👍

switch on OT

How do you come to the conclusion that I have something to do with your project and justify that I have nothing to do with your project in any way?

I have been speaking for myself and my concerns since 2013 - not for you or others. And I confirm to you that I have nothing to do with your project in any way. This has been going on here since 2013 :)

How do you come to the conclusion that this issue belongs to you alone and take the right to manage it?

Do you really seriously believe that reverse engineering only started since your project announcement quote: "If the goat does not come to the milking shed, the milking shed will come to the goat" quote end in December 2023?

And no, I'm not going to start a fight here and start a war of words.

Just read my statement, it doesn't concern you personally and it's not directed at you personally, nor at your project, nor at anything else that could have anything to do with you as property, but at the binary blob that we've been discussing since August 2013 - where were you then? There were no espressifers, no repos or gits. There were just a handful of people who got together to form an LTD ... in Hong Kong and have been doing engineering ever since ... what is now called Espressif Systems -

But all of this doesn't contribute to the matter, just like your statement and your accountability and now my statement to yours. The latter is solely yours personally to me directed post in public and will only happen once. I think I've told you everything I needed to say. I actually didn't want to write back, not just because it's just a "test of strength" but because it's completely off topic, doesn't contribute anything to the problem here and just bores people here.

And no, I won't answer any questions for your project if you have any on this topic. See how you get on :)

Can we get back to the topic now?

Thank you very much! Have a nice day too. "One more direct address like that and you'll be blocked" no, you won't hear that from me - that's nonsense. But I'm just not going to respond to such postings anymore, I'm just going to keep quiet, which doesn't mean that I'll accept it and put up with it. You just rise above it. No arrogance, but calm in the box.

switch off OT

@jack0c
Copy link
Collaborator

jack0c commented Sep 14, 2024

@ESP32DE
First and foremost, I apologize on behalf of the Espressif.
There are no reasons to make our customers or developers to “run on each espressif factory problem on a big wall of silent.”
There are no reasons do FW test before released.
There are no reasons to do so many changes without any documents.
We will fix all of issues you face in the progress first, and consider what we can do in the test and documents to solve the problems other developers may be faced.
But I still hope that you can understand in this regard: we have been making developments and adjustments, and there are still some issues with the code.

Again, I apologize for this issue.

@redfast00
Copy link

Progress update: instead of also porting FreeBSDs 80211 stack (the way Espressif chose), we've started writing a new MAC stack in Rust. It can currently scan channels for beacon frames and connect to a pre-defined open network. There is an integration with ESP-NETIF, so once the ESP32 connects to the network, you can ping it/send HTTP requests/...

We've also reverse engineered the 80211 RX filters (https://esp32-open-mac.be/posts/0008-rx-filter/), so now the ESP32 doesn't have to process all packets that are in the air just to drop 90% of them.

@mickeyl
Copy link

mickeyl commented Oct 18, 2024

That's amazing! Sounds like the open source process could render in a technically better solution then… ;-)

@redfast00
Copy link

redfast00 commented Dec 22, 2024

Progress updates: we've implmented a SoftAP mode. There is now also a Wi-Fi stack completely written in Rust that already implements STA mode, including scanning (made by @Frostie314159). He also started implementing AWDL (Apple Wireless Direct Link). @mjwells2002 reverse engineered the Nintendo DSi PictoChat protocol and started using our library to implement a transmitter that can send pictures. I've started reverse engineering the Wi-Fi cryptography acceleration used in WPA and so far it works; there should be another blog post about it soon.

@Frostie314159 and me are giving a talk about reversing the ESP32 Wi-Fi hardware at the Chaos Communication Congress (https://fahrplan.events.ccc.de/congress/2024/fahrplan/talk/C38ZK7/). They've given us a big room, so there appears to be a lot of interest in having an open source Wi-Fi stack. The talk will be recorded, but if you're there, come say hi :) If you want to meet up, you can contact us via the Matrix linked on https://esp32-open-mac.be/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests