Skip to content

Releases: ssilverman/QNEthernet

0.12.0

08 Jan 18:21
Compare
Choose a tag to compare
0.12.0 Pre-release
Pre-release

Added

  • Added a way to disable and enable Nagle's algorithm. The new functions are EthernetClient::setNoDelay(flag) and isNoDelay().
  • Implemented EthernetServer::availableForWrite() as the minimum availability of all the connections, or zero if there's no connections.
  • New AppWithListenersTemplate example.
  • Added EthernetClass::operator bool() for testing whether Ethernet is initialized.
  • Added a new way to send and receive raw Ethernet frames. There's a new EthernetFrame instance (of EthernetFrameClass) that is used similarly to EthernetUDP.
  • New RawFrameMonitor example.
  • New EthernetUDP::send(data, len) function for sending a packet without having to use beginPacket()/write()/endPacket(). It causes less overhead.

Changed

  • Changed EthernetUDP::flush() to be a no-op.
  • Reduced lwIP's MEM_SIZE to 16KiB from 24000.
  • Split MDNSClass::addService() into two overloaded functions: one with three arguments and one with four. No more defaulted TXT record function parameter; the three-argument version calls the four-argument version with NULL for that function.
  • Updated keywords.txt.
  • Updated SNTPClient example: Removed unneeded includes, made the packet buffer a global variable, and added setting the RTC and time.
  • Changed EthernetClass::mtu() to static size_t. It was non-static and int.
  • Updated enet_output_frame(frame, len) to check if the system is initialized.

Removed

  • Removed EthernetClass::sendRaw(frame, len) because there's a new EthernetFrame API with a send(frame, len) function.

Fixed

  • Fixed the length check when sending raw Ethernet frames to exclude the FCS field. It checks that the length is in the range 60-1518 instead of 64-1522.
  • Fixed check_link_status() to check if Ethernet is initialized before trying to access the PHY.

0.11.0

14 Dec 09:26
Compare
Choose a tag to compare
0.11.0 Pre-release
Pre-release

Added

  • Implemented EthernetClass::setMACAddress(mac).
  • Added EthernetServer::maxListeners(), EthernetClient::maxSockets(), and EthernetUDP::maxSockets() so user code doesn't need to guess. These are constexpr functions that return the compile-time constants from the lwIP configuration.
  • Added EthernetServer::port() for returning the server's port.
  • Added EthernetClass::setHostname(hostname) and hostname() for setting and getting the DHCP client option 12 hostname.
  • Added EthernetClass::maxMulticastGroups() constexpr function.
  • Added a "Write immediacy" subsection to the README that addresses when data is sent over a connection. It's under the "How to write data to connections" section.

Changed

  • Changed the default DHCP client option 12 hostname to "teensy-lwip".

Fixed

  • Stop the DHCP client when restarting Ethernet (in begin(ip, mask, gateway) and setMACAddress(mac)) to ensure that a static IP won't get overwritten by any previously running DHCP client. This also obviates the need to call Ethernet.end() before re-calling begin.

0.10.0

18 Nov 21:40
Compare
Choose a tag to compare
0.10.0 Pre-release
Pre-release

Added

  • Added a way to send raw Ethernet frames. The new function is EthernetClass::sendRaw(frame, len).
  • Added new sections to the README:
    1. "Sending raw Ethernet frames", and
    2. "How to implement VLAN tagging".
  • Added calls to loop() in EthernetClient::connected() and operator bool().
  • Added EthernetUDP::beginMulticast(ip, localPort, reuse), where reuse controls the SO_REUSEADDR socket option.
  • Added EthernetClass::joinGroup(ip) and leaveGroup(ip) for joining and leaving a multicast group.
  • Added a "How to use multicast" section to the README.

Changed

  • Changed kMTU type to be size_t everywhere.
  • Added stdPrint as an extern variable to QNEthernet.h and moved it to the qindesign::network namespace.
  • Changed transmit data buffers to be 64-byte aligned, for "optimal performance".
    See: IMXRT1060RM_rev2.pdf, "Table 41-38. Enhanced transmit buffer descriptor field definitions", page 2186.
  • Updated lwIP to v2.1.3.
  • Changed EthernetUDP::beginMulticast to release resources if joining the group failed.
  • Increased MEMP_NUM_IGMP_GROUP to 9 to allow 8 multicast groups.

Removed

  • Removed mention of the need to re-announce mDNS and adjusted the docs accordingly.

Fixed

  • Changed receive data buffers to be 64-byte aligned.
    See: IMXRT1060RM_rev2.pdf, "Table 41-36. Receive buffer descriptor field definitions", page 2183.
  • Changed TA value in ENET_MMFR register to 2, per the chip docs.
  • Multicast reception now works. Had to set the ENET_GAUR and ENET_GALR registers appropriately.

0.9.0

25 Oct 02:32
Compare
Choose a tag to compare
0.9.0 Pre-release
Pre-release

Added

  • Added example that uses client.writeFully() to the "How to write data to connections" README section.
  • Added EthernetClient::close() for closing a connection without waiting. It's similar to stop().
  • Added DNSClient class for interfacing with lwIP's DNS functions.
  • Added a "DNS" section to the README.

Changed

  • Renamed the "How to write data to clients" README section to "How to write data to connections".
  • Increased the maximum number of UDP sockets to 8.
  • Updated EthernetClass, EthernetClient, and EthernetUDP to use the new DNSClient class for DNS lookup and DNS server address setting.

0.8.0

10 Oct 08:14
Compare
Choose a tag to compare
0.8.0 Pre-release
Pre-release

Added

  • Added a check that Entropy has already been initialized before calling Entropy.Initialize().
  • Added a "How to write data to clients" section to the README that addresses how to fully send data to clients.
  • Added EthernetClient::writeFully() functions that might help address problems with fully writing data to clients.
  • Added a new "Additional functions not in the Arduino API" section to the README.
  • Added EthernetClient::closeOutput() for performing a half close on the client connection.

Changed

  • Updated the ServerWithAddressListener example. It's more complete and could be used as a rudimentary basis for a complete server program.
    1. Added a "Content-Type" header to the response,
    2. It now looks for an empty line before sending the response to the client,
    3. Added the ability to use a static IP,
    4. Added client and shutdown timeouts, and
    5. Added a list to the description at the top describing some additional things the program demonstrates.
  • In EthernetClass::end(), moved setting the DNS to 0 to before DHCP is released. This ensures that any address-changed events happen after this. i.e. the DNS address will be 0 when an address-changed event happens.

0.7.0

22 Sep 10:01
Compare
Choose a tag to compare
0.7.0 Pre-release
Pre-release

Added

  • The Boolean-valued link state is now EthernetClass::linkState().
  • Added a _write() definition so that printf works and sends its output to Serial. Parts of lwIP may use printf. This directs output to a new Print *stdPrint variable. It has a default of NULL, so there will be no output if not set by user code.
  • Now powering down the PHY in enet_deinit().
  • Added calls to loop() in EthernetServer::accept() and available() to help avoid having to have the caller remember to call loop() if checking connectivity in a loop.
  • Added a call to end() in the QNMDNS destructor.
  • Added a new externally-available Print *stdPrint variable for printf output, both for lwIP and optionally for user code.
  • Added the ability to set the SO_REUSEADDR socket option when listening on a port (both TCP and UDP).
  • Added four examples and a "note on the examples" section in the README.
    1. FixedWidthServer
    2. LengthWidthServer
    3. ServerWithAddressListener
    4. SNTPClient

Changed

  • EthernetClass::linkStatus() now returns an EthernetLinkStatus enum. The Boolean version is now EthernetClass::linkState().
  • The EthernetLinkStatus enum is no longer marked as deprecated.
  • Updated EthernetClient output functions to flush data when the send buffer is full and to always call loop() before returning. This should obviate the need to call flush() after writes and the need to call loop() if writing in a loop. (flush() is still useful, however, when you've finished sending a "section" of data.)
  • Changed EthernetUDP::parsePacket() to always call loop().