Hello, all. I went ahead and made an lwIP-based Ethernet library for the Teensy 4.1. Some details about it:
My current to do list:
I got this to a point where all my basic testing works. This project is still very much a work in progress, though, aren't they all?
Last point for now: Thank you CrashReporter and everyone who was involved with making that work!
Here's the link: https://github.com/ssilverman/QNEthernet
- This currently is not a complete drop-in replacement for the Arduino-style Ethernet API. (But it’s reasonably close.) The README details the differences. I haven't yet decided the direction I want to take, because I don't love the global variable-style approach, plus there are some things that are underspecified. This may end up being something completely different, or it may be similar; I haven't decided yet. Heck, maybe I look at how mbed does it...
- The polling function is set up internally via EventResponder to run inside yield(); no timers are used.
- I haven't tested it with the Arduino IDE; it probably won't work. You need to use PlatformIO for now.
- Use QNEthernet.h as the main include file.
- I use namespaces.
- lwIP version is 2.1.2.
- main.cpp is a hodge-podge testing playground from which you can glean information about how to use the API. It's very similar to the Arduino API. You'll note mDNS and an OSC parser, useful with the TouchOSC app — try it. Also note that you don't actually need to include any of the lwip headers; I'm just using them for testing inside some callbacks.
My current to do list:
- Tune lwIP. I could use some help with this. (@manitou, I know you've already done some tuning; I point to this in the README.)
- See if there's a way to improve DHCP response time. In my testing, it usually takes about 10-12 seconds to get an IP address.
- Decide how to restructure the internals, either for something different or to make it even more compatible with the Arduino API. For example, right now, EthernetClient is not copyable, only movable, having to do with how I made the insides mostly client-managed instead of server-managed.
- I haven't settled on a name.
I got this to a point where all my basic testing works. This project is still very much a work in progress, though, aren't they all?
Last point for now: Thank you CrashReporter and everyone who was involved with making that work!
Here's the link: https://github.com/ssilverman/QNEthernet
Last edited: