If over half the payload is QNEthernet, have you explored reducing the feature set included with the underlying lwIP stack? For example, removing TCP or reducing the number of possible sockets (all protocols), or even...
`EthernetFrame` is for raw Ethernet frames (probably not what you want here), `EthernetUDP` is for IP-based UDP, and `EthernetClient` is for IP-based TCP.
I'm curious, why are you using `new` to create `EthernetClient`s instead of, say, having a list of them already created? For example:
std::array<EthernetClient, EthernetClient::maxSockets()> connList;
// Or...
The behaviour of those functions is documented here: https://www.arduino.cc/reference/en/libraries/ethernet/
This disambiguation might also help (QNEthernet README):...
I went ahead and filed the issue: https://github.com/ssilverman/QNEthernet/issues/40
I also fixed the problem. Thanks for reporting it.
(For future reporters: Please file an issue in the repo; I may or may not see...
QNEthernet is explicitly not designed for asynchronous use.
See here: https://github.com/ssilverman/QNEthernet/issues/39#issuecomment-1550481187
And here:...
Note that AsyncWebServer (and its AsyncTCP dependency) doesn’t really use QNEthernet; it uses the library’s included lwIP stack (it’s what QNEthernet uses under the covers). My opinion is that those “Async” libraries...
In theory, QNEthernet can run from a single thread, but it's not designed for being used from multiple threads or contexts (one example is some access from an ISR and some from somewhere else). I also find that...
Pro tip: when pasting code, use the "" tags (or the "#" button), and that will keep the spacing and formatting. It's hard to follow when all the leading spacing is missing. (Yes, cut and paste into an IDE that reformats...
Which Ethernet library are you using? Are you able to post your whole program? What error message are you seeing? Is that “no data available” message being printed on the Teensy side or on your PC?
I suspect that...
Here's my general project structure:
1. Main loop() loops through a list of mini "programs" that execute their own loop(). I don't use threading because it can kill performance. For example, I have an LED refresh...
Are you looking to write one yourself or find an already-made one? If the second, contact me privately; I've made several that are used in commercial projects. If the first, can you describe the difficulties you're...
Sorry, I meant in QNEthernet. I don’t see how that would increase complexity, unless you’re using the randomly-generated local port as some sort of ID or something? (Or something else I’m not thinking of.) I was...
You might be able to get away with a single UDP socket instead of two. You can use a single UDP socket for listening on one specific port, and that same socket for sending to arbitrary locations.
I know it's last minute, but I'm hosting one again now. We'll be talking "better Ethernet throughput," per a request.
Update: I had to step away for a little bit; I'm back now.
@beermat - Thank you for the question. I'll begin by summarizing my mental model of the library:
1. It's an Arduino API-style layer on top of lwIP, with the assumption that all network functions are performed from the...
I just released v0.21.0. The changes:
### Added
* Added `EthernetClass::linkIsCrossover()` for checking if a crossover cable
is detected.
* Added entropy-based random number functions, `entropy_random()` and
...
Can you be more specific? I don't understand the question. Do you mean just how you enable VLAN things in general?
Update: Did you mean "setting up VLAN"?
The function signature of `LWIP_HOOK_VLAN_SET` can be found here:
https://github.com/ssilverman/QNEthernet/blob/24c1177975b0ce27604d5b5f209366f17247c8ac/src/lwip/opt.h#L3024
See also `LWIP_HOOK_VLAN_SET`...
Making a structure’s or class’s members volatile disables the ability to use the members as non-volatile; this is not desired. The correct approach is to add volatile-labelled functions, which tells the compiler to...
I don’t agree that elapsedMillis is volatile-safe unless its internal `unsigned long ms` variable is also volatile. It’s true that `millis()` is volatile-safe, but elapsedMillis is not.
Both its assignment operators...
I'm not seeing `volatile` in teensy4/elapsedMillis.h (or in teensy3's version). Am I missing something?
I was going to suggest these other alternatives:
1. C++'s const_cast<>() can remove volatility, but knowing...
Those two Ethernet libraries you mention don’t work with the W5500 hardware. They work with the built-in PHY and the Ethernet Kit. Having said that, maybe you were planning on using the Ethernet Kit?
I can tell you...
You can also see the failure sometimes in the unit tests. Sometimes one of the tests fails to acquire a DHCP address and sometimes the UDP test fails because it doesn't receive an SNTP response within 20 seconds. To run...
Hello, all. I'm seeking some assistance, from anyone that might be so inclined, with an issue I just can't seem to solve when resetting QNEthernet.
I've noticed it myself before. A bunch of discussion about it can be...
I made a branch of QNEthernet that does TDR: https://github.com/ssilverman/QNEthernet/tree/tdr
The DP83825I PHY chip on the Teensy 4.1 has some extra features, such as the ability to do TDR tests. (Side note: it can...
Have you considered using the Ethernet Kit to use Teensy 4.1’s built-in Ethernet PHY? The QNEthernet library, for example, lets you change a number of settings and sizes. I’ve personally successfully used dozens of...
I understand. In any case, I wrote a write-up of how to do this if anyone needs: https://github.com/ssilverman/QNEthernet/blob/d46986e6fef40e9be2e88db56d50239bb0d1b80c/README.md#configuring-macros-using-the-arduino-ide...
Yeah, I decided to do two things: rely on the now-supported printf, and split stdPrint into stdoutPrint and stderrPrint, along with a new QNETHERNET_ENABLE_CUSTOM_WRITE macro.
In PlatformIO, in order to get `IntervalTimer` to compile, this might be needed in your platformio.ini file:
build_unflags = -std=gnu++14
PlatformIO's platform/teensy/builder/frameworks/arduino.py file sets...
I just released 0.20.0. The changes:
### Added
* Added `EthernetFrameClass::size()`, for parity with `EthernetUDP`.
* Added internal entropy functions to remove the _Entropy_ library dependency.
* New...
The problem
I need to add compiler options to a project to enable some features. For example, QNEthernet needs the `QNETHERNET_ENABLE_RAW_FRAME_SUPPORT` macro defined in order to enable the raw frame feature. To try...