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

Stub implementation #36

Open
benpye opened this issue Aug 12, 2019 · 2 comments
Open

Stub implementation #36

benpye opened this issue Aug 12, 2019 · 2 comments

Comments

@benpye
Copy link

benpye commented Aug 12, 2019

Hey,

I'm really happy I've stumbled on this project. I want to use an ESP8266 to send/receive raw ethernet frames. There's currently the esp-raw project, it hacks about with lwip's netconn object to hook functions and works, but is obviously not perfect.

I have been wondering what it would take to stub out the lwip calls from the wifi stack so that we can just send/receive our own ethernet frames and ignore everything else. This is achievable with the RTOS SDK however I'd like to try and use my device as an SDIO slave which is not supported with the RTOS SDK.

@d-a-v
Copy link
Owner

d-a-v commented Aug 15, 2019

With this project and arduino core,

  • you can send raw ethernet frames using new_linkoutput()==netif->linkoutput(). You'll have to put your data into an lwIP's pbuf that will be released by the wifi firmware once sent
  • you can intercept every received packet using phy_capture function like in this example: netdump,
    or by using lwIP's hooks for unmanaged protocols

@benpye
Copy link
Author

benpye commented Aug 17, 2019

@d-a-v whilst that is certainly an option I suppose it isn't my ideal state. I would like to - if possible - eliminate lwip entirely. Part of this excercise is an attempt to minimize the amount of unsafe code running in my project - I plan to use the ESP8266 forwarding raw ethernet frames - but then use smoltcp on another (ARM) MCU where I can use Rust. It's for that reason I would like to try and get a stub implementation, sufficient to satisfy the WiFi blobs but no real functionality beyond that.

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

2 participants