New lwIP-based Ethernet library for Teensy 4.1

Just checking because I used your ieee 1588-2 branch for my AES67 4.1 implementation. I did modify it to include QoS capabilities. QNEthernet is awesome thanks so much for all your work.
Are your QoS capabilities in a public fork?
 
I just released v0.34.0. Here's the Changelog:
Markdown (GitHub flavored):
## [0.34.0]

### Added
* Added tests for some of the print utility functions and classes.
* Added the `QNETHERNET_ENABLE_PING_REPLY` macro to disable ICMP echo replies.
* Added a "Requirements" section listing some library requirements to
  the README.
* Added a `QNETHERNET_PROVIDE_GNU_VERBOSE_TERMINATE_HANDLER` configuration
  option for including our own version of
  `__gnu_cxx::__verbose_terminate_handler` for space-saving reasons.
* New `StreamDecorator` class that also does `printf` checking.
* Added `driver_restart_auto_negotiation()` driver function for restarting link
  auto-negotiation. This is useful for when EMF brings the link down. A new
  "EMF interference mitigation" section was also added to the Readme.
* Added `qindesign::network::util::isBroadcast(ip, localIP, mask)`.
* New `EthernetUDP::destIP()` for getting the destination IP address from
  a received packet.

### Changed
* Improved code style and structure.
* Made `NullPrint::availableForWrite()` return `INT_MAX` instead of zero.
* Changed `EthernetUDP::stop()` to not clear the current packet.
* Changed `DNSClient::hostByName()` functions to use a default value of
  `QNETHERNET_DEFAULT_DNS_LOOKUP_TIMEOUT` for the timeout parameter.
* Improved _SimplePing_ example to catch DNS lookup errors.
* Changed ping send enable macro to `QNETHERNET_ENABLE_PING_SEND`
  from `QNETHERNET_ENABLE_PING`.
* Updated to support C++11 and C11 compilers.
* Improved setting of `errno`.
* Added `printf` checking to `PrintDecorator`.
* Replaced function-like-macros with `static inline` C functions.
* Renamed `QNETHERNET_ENABLE_ALTCP_DEFAULT_FUNCTIONS` macro
  to `QNETHERNET_PROVIDE_ALTCP_DEFAULT_FUNCTIONS`.
* `EthernetUDP` and `EthernetFrame` now share some common circular buffer code
  in an internal utility class.
* Replaced macros in `EthernetClient` with inline functions.

### Fixed
* Fixed `EthernetUDP` internal packet clear to reset all variables.
* Now keeping any manually-set link UP state sticky so that the driver can
  choose not to set it to DOWN.
* Updated _Ping_ and _SimplePing_ examples to work with other systems by
  changing use of `elapsedMillis` to `unsigned long` plus calculations.
* Fixed `ConnectionManager::iterateConnections()` calls to not call
  `Ethernet.loop()` in the callback because that could potentially invalidate
  the iterator. Also added notes about potential iteration invalidation to the
  `iterateConnections()` and `iterateListeners()` docs.
* Fixed `EthernetClient` `read()` and `peek()` to return the correct value if
  not connected.

Highlights:
* Ability to disable ping replies
* Ability to restart auto-negotiation on the Teensy 4.1
* `isBroadcast(ip, localIP, mask)` utility function for testing IPv4 addresses
* Access to the destination IP for UDP packets
* C++11 and C11 compatibility

Link: https://github.com/ssilverman/QNEthernet/releases/tag/v0.34.0
 
Working fine for me still although I haven't added any of your new stuff yet. Oh come to think of it, Aduino 2.3.7 with Paul's beta6 didn't notify me to update, I saw email of this thread.
 
Working fine for me still although I haven't added any of your new stuff yet. Oh come to think of it, Aduino 2.3.7 with Paul's beta6 didn't notify me to update, I saw email of this thread.
The updates through the Arduino IDE don’t usually propagate for a day or so.
 
I just released v0.35.0. Here's the Changelog:
Markdown (GitHub flavored):
## [0.35.0]

### Added
* Added a ping call to the main program.
* Added `qindesign::network::util::steady_clock_ms` and
  `qindesign::network::util::arm_high_resolution_clock` classes that conform to
  the _Clock_ C++ named requirement. These can be used with the `std::chrono`
  API. The first provides a wrapper for `qnethernet_hal_millis()`. The second
  wraps the ARM DWT_CYCCNT cycle counter.
* Added printing chrono clock times to network-up in the main program.
* Added `qindesign::network::util::elapsedTime<Clock>`, a class similar to
  `elapsedMillis`, but uses a `std::chrono` Clock.
* Added support to the W5500 driver for interrupts via a pin.
* New _SimpleIPerfServer_ example. It just reads from a socket as fast
  as possible.
* Added `write(const void*, size_t)` convenience functions to all
  `Print`-like classes.
* New _ChronoClocks_ example that demonstrates how to use the new Clocks and
  `std::chrono` features.
* Added `EthernetClass::linkInfo()` to replace `linkSpeed()`,
  `linkIsFullDuplex()`, and `linkIsCrossover()`.
* Implemented setting link speed, duplex, and auto-negotiation in Teensy 4.1 and
  W5500 drivers.
* Added `driver_reset_phy()` driver function for resetting the PHY.
* Added to `DriverCapabilities`:
  * `isAutoNegotiationSettable`
  * `isPHYResettable`
* Added call to `qnethernet_hal_deinit_entropy()` in `RandomDevice` destructor.
* Added `RandomDevice::entropy()` to match `std::random_device::entropy()`.
* Added `qindesign::security::random_device` to mimic `std::random_device`.
* New _ElapsedTime_ example that shows how to use the new `elapsedTime` utility.

### Changed
* Improved _Ping_ example by always sending, even if a send fails. It was
  stopping on error.
* Changed some sizes to `size_t` instead of `int`:
  * `writeFully(client, data, len)` example in the Readme
  * `EthernetClass::kMACAddrSize`
  * `EthernetClass::maxMulticastGroups()`
  * `EthernetClass::dnsServerIP(index)`
  * `EthernetClass::setDNSServerIP(index, ip)`
  * `DNSClient::maxServers()`
  * `DNSClient::setServer(index, ip)`
  * `DNSClient::getServer(index)`
  * `EthernetClient::maxSockets()`
  * `EthernetFrame::maxFrameLen()`
  * `EthernetFrame::minFrameLen()`
  * `EthernetServer::maxListeners()`
  * `EthernetUDP::maxSockets()`
  * `MDNSClass::maxServices()`
* Changed `EthernetClass::begin(mac, timeout)` return type to `bool` from `int`.
* Robustness changes:
  * Removed all implicit conversions
  * Handle all return values in some way
  * Reduced the number of #defines in favour of constants, enums, and static
    inline functions
* Changed `MDNSClass` to use `std::string` instead of the Arduino `String`.
* Updated examples to be more consistent with each other.
* Changed drivers to always loop until a frame can be sent instead of returning
  `ERR_WOULDBLOCK` or NULL.
* Marked _IPerfServer_ example as "Under Repair".
* Now excluding the FCS (Frame Check Sequence) from all frame length-related
  definitions and use.
* Made dramatic improvements to the W5500 driver with much better buffering and
  how it waits to send frames.
* Updated the W5500 driver's `driver_deinit()` function to power down the PHY.
* Updated drivers to change link settings and get link info as a group. See the
  new `LinkSettings` and `LinkInfo` structs.
* Changed all definitions of, uses of, and references to max. and min. frame
  length to exclude the FCS (frame check sequence).
* Made `QNETHERNET_ENABLE_PING_SEND` on by default.
* Updated _SNTPClient_ example to use `settimeofday()` to set the time.
* Updated _RandomNumbers_ example to use new
  `qindesign::security::random_device` class.

### Removed
* Removed from `EthernetClass` (and replaced with `linkInfo()`):
  * `linkSpeed()`
  * `linkIsFullDuplex()`
  * `linkIsCrossover()`

### Fixed
* Fixed `EthernetClass::ping(ip, ttl)` to return -1 if sending the ping failed.
* Fixed _RawFrameMonitor_ example tag interpretation to split at <=1500 and
  assume values in the range 1501-1535 are a type.
* Fixed setting an incorrect register in the entropy module (Teensy 4).
* Changed `DNSClient` to not ignore a zero timeout. This had caused a potential
  use-after-scope.
* Added better checks in the driver output for any buffer copy errors.
* Now checking for NULL buffer arguments in `write()` of `EthernetUDP`
  and `EthernetFrameClass`.
* Fixed `MDNSClass`:
  * Ensure there's final NULs after copying some strings.
  * Avoid undefined casting between `void*` and a function pointer.
  * Added some NULL argument checking.
* `DNSClient` no longer ignores a timeout of zero. This was causing a potential
  use-after-scope.
* Fixed the entropy module (Teensy 4) to not depend on a possibly stale `errno`.
* Clarified in the `EthernetServer` and `EthernetUDP` docs that the `beginXXX()`
  functions are non-transactional in that they call `end()` or `stop()` first.
* Fixed connection and listener iteration to first take a snapshot of the lists
  so that it's not possible to change the lists while iterating over them.

Highlights:
* std::chrono-compatible Clocks
* New elapsedTime<Clock> utility
* New examples:
* SimpleIPerfServer that just reads as fast as possible. IPerfServer is currently "Under Repair".
* ChronoClocks
* ElapsedTime
that demonstrates the new elapsedTime<Clock>
* New LinkSettings and LinkInfo concepts that group all the link settings and information
* New qindesign::security::random_device mimics std::random_device
* Changed some int sizes to size_t sizes
* MDNS now uses std::string instead of String
* Dramatic improvements to W5500 driver
* Ping-send is now enabled by default

Link: https://github.com/ssilverman/QNEthernet/releases/tag/v0.35.0
 
Last edited:
Back
Top