Skip to content

Releases: ssilverman/QNEthernet

0.34.0

29 Jan 23:09

Choose a tag to compare

0.34.0 Pre-release
Pre-release

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.

0.33.1

06 Nov 01:20

Choose a tag to compare

0.33.1 Pre-release
Pre-release

Fixed

  • Added missing src/qnethernet/platforms/pgmspace.h file.

0.33.0

05 Nov 22:27

Choose a tag to compare

0.33.0 Pre-release
Pre-release

Added

  • Added a way to iterate over the internal TCP connection PCBs.
  • Added calls to Ethernet.loop() in more places.
  • Added setting errno to ENETDOWN in EthernetClass in more places where network initialization is checked.
  • Added setting errno to ENOSYS when some networking feature isn't implemented.
  • Added support for ping (ICMP echo).
  • Added two ping examples: Ping and SimplePing.
  • Added new configuration and default macros to qnethernet_opts.h:
    • QNETHERNET_ENABLE_PING
    • QNETHERNET_DEFAULT_PING_ID
    • QNETHERNET_DEFAULT_PING_TIMEOUT
    • QNETHERNET_DEFAULT_PING_TTL

Changed

  • Made qnethernet_hal_get_system_mac_address(mac) weak.
  • Made EthernetClass::hostByName(hostname, result) const.
  • Made qnethernet_hal_get_system_mac_address(mac) weak.
  • Improved code style and structure.
  • Changed errno value in EthernetClass::joinGroup(ip) if network is not initialized to ENETDOWN from ENOTCONN.
  • Updated lwIP to latest master (4599f551).

0.32.0

28 Apr 01:47

Choose a tag to compare

0.32.0 Pre-release
Pre-release

Added

  • Added qnethernet_hal_micros().
  • Added secure TCP initial sequence numbers (ISNs), enabled with the new QNETHERNET_ENABLE_SECURE_TCP_ISN macro. The default is enabled.

Changed

  • Changed some functions to take a void* instead of a uint8_t*.
  • Changed definition of TCP_MSS to be based on MTU instead of being a constant.
  • Updated LinkWatcher example to only print detectable details.

Fixed

  • Restored automatic entropy initialization when including qnethernet/security/RandomDevice.h. Calling qnethernet_hal_entropy() or qnethernet_hal_fill_entropy() will generate random values again without a prior call to qnethernet_hal_init_entropy() or RandomDevice::instance(). This also affects lwIP's internal LWIP_RAND().

0.31.0

13 Feb 08:46

Choose a tag to compare

0.31.0 Pre-release
Pre-release

Added

  • Added qnethernet_hal_fill_entropy(buf, size) for filling a buffer with random values.
  • Added EthernetClient::setConnectionTimeoutEnabled(flag) to enable or disable blocking with calls to connect(...) and stop(). This supersedes calls to connectNoWait(...) and close(). Also added isConnectionTimeoutEnabled().
  • Added templated versions of util::writeFully() and util::writeMagic() that use a break function that static_casts a given object to a bool.
  • Added EthernetClient::connecting() for determining if the client is still in the process of connecting during a non-blocking connect.

Changed

  • Remove internal uses of String from MDNSClass and replace them with char arrays.
  • Updated Mbed TLS version mentions to 2.28.9 from 2.28.8.
  • Made EthernetClient::isNoDelay() const.
  • Disallow compilation for Teensyduino < 1.59 because there's no support for casting a const IPAddress to a uint32_t or for equality-comparing them.
  • Replaced EthernetClient::writeFully(const char *, size_t) and writeFully(const uint8_t *, size_t) with writeFully(const void *, size_t).
  • Updated the file structure to put most sources underneath src/qnethernet/.
  • Changed EthernetClient::setConnectionTimeout(timeout) and connectionTimeout() to use 32-bit values.
  • Renamed qnethernet_hal_rand() and qnethernet_hal_init_rand() to qnethernet_hal_entropy() and qnethernet_hal_init_entropy(), respectively.
  • Changed the non-entropy version of the entropy functions in the HAL to use std::minstd_rand instead of std::rand() and std::srand().
  • Changed uses of "www.example.com" to "www.google.com" in the examples and tests.

Fixed

  • Now using (void) instead of () for all C function declarations because () doesn't mean "no parameters" in C.
  • Fixed driver_unsupported's driver_init(void) parameters to be empty.

0.30.1

23 Nov 23:30

Choose a tag to compare

0.30.1 Pre-release
Pre-release

Fixed

  • Fixed wait-for-close for non-altcp connections.

0.30.0

21 Nov 17:06

Choose a tag to compare

0.30.0 Pre-release
Pre-release

Added

  • Added a SimpleHTTPClient example.
  • Added a way to get the driver capabilities: EthernetClass::driverCapabilities() and driver_get_capabilities(dc).
  • Added a way to get the library version: EthernetClass::libraryVersion().
  • New QNETHERNET_DO_LOOP_IN_YIELD configuration macro for indicating that the library should attempt to hook into or override yield() to call Ethernet.loop().
  • New version of receiveQueueSize() in EthernetUDP and EthernetFrame that returns the number of unprocessed packets or frames.
  • Added droppedReceiveCount() and totalReceiveCount() to EthernetUDP and EthernetFrame.
  • Added driver_set_link_speed(speed) and driver_set_link_full_duplex(flag).
  • Added EthernetClass::renewDHCP().
  • Added EthernetClass::interfaceName().
  • Added setOutgoingTTL(ttl) and outgoingTTL() functions for modifying and accessing the TTL field, respectively, in the outgoing IP header, to EthernetClient and EthernetUDP.
  • Added EthernetUDP::receivedTTL() for retrieving the TTL value of the last received packet.
  • Added "Compatibility with other APIs" section to the README.

Changed

  • Separated setting the MAC address from driver initialization.
  • Changed the netif name to "en0".
  • Added macro-gated calls to Ethernet.loop() after any yield()s in case an overridden version doesn't call this. This affects:
    • DNSClient::getHostByName()
    • EthernetClass::waitForLink()
    • EthernetClass::waitForLocalIP()
    • EthernetClient::connect()
    • EthernetClient::stop()
  • Updated example yield() implementation notes for non-EventResponder versions.
  • Changed setReceiveQueueSize(size) to setReceiveQueueCapacity(capacity) and receiveQueueSize() to receiveQueueCapacity() in both EthernetUDP and EthernetFrame.
  • Updated QNETHERNET_ENABLE_RAW_FRAME_LOOPBACK behaviour to also check for the broadcast MAC addresses.
  • Added FLASHMEM to some driver functions.
  • Changed EthernetClass and MDNSClass hostname() function to return a const char * instead of a String.
  • Now always setting the DNS in EthernetClass::begin(ip, mask, gateway, dns), even if it's zero.
  • Use rename instead of end-then-start when the netif has already been added, in MDNSClass::begin(hostname).
  • DHCP is started when just the IP address is the "any" address instead of all of the IP address, netmask, and gateway.
  • begin(ip, mask, gateway, dns) now always sets the DNS address.
  • Ethernet.broadcastIP() now returns 255.255.255.255 if Ethernet is not initialized.

Removed

  • Removed EthernetClass::isLinkStateDetectable() in favour of the driver capabilities.
  • Removed get_uint32(ip) utility function because a static_cast<uint32_t>() is sufficient.

Fixed

  • Fixed iperf v2 tests by commenting out per-block settings compare.
  • Fixed restarting the netif by also bringing the link down.
  • Fixed a bug related to closing a TCP socket when using altcp.

0.29.1

09 Aug 16:12

Choose a tag to compare

0.29.1 Pre-release
Pre-release

Fixed

  • Fixed being able to process more than one incoming frame in a row in the driver.

0.29.0

05 Aug 03:30

Choose a tag to compare

0.29.0 Pre-release
Pre-release

Added

  • Added protected access to the internal std::FILE* stream in the StdioPrint utility class.
  • Added more unit tests:
    • test_ethernet:
      • test_server_zero_port
      • test_server_accept
      • test_server_construct_int_port
  • Added printf format string checking for Print-derived classes. As of this writing, Teensyduino (1.59) and other platforms don't do compiler checking for Print::printf.
  • Added more support for errno. Appropriate functions will set this after encountering an error.
  • Added tests for the Arduino-API begin(...) functions.
  • Added a way to utilize an externally-defined driver.
  • Added driver_is_mac_settable() to the driver API. This checks if the MAC address can be set.

Changed

  • Updated and improved PixelPusherServer example.
  • Call qnethernet_hal_get_system_mac_address(mac) in the unsupported driver's driver_get_system_mac(mac) implementation. This enables MAC address retrieval for more platforms when communication isn't needed; Teensy 4.0, for example.
  • Turned the internal MAC address into an optional and simplified the Ethernet constructor. This change should make it easier to initialze a MAC address from a custom driver.
  • Changed Arduino-API non-DHCP begin(...) functions to return bool.
  • Improved driver logic so that lwIP options can be included in the driver headers.
  • Improved OSCPrinter example to use the UDP data directly.
  • Renamed driver_set_mac_address_allowed() to driver_set_incoming_mac_address_allowed().
  • Changed driver_proc_input(netif) to return a pbuf*.

Fixed

  • Fixed EthernetServer::port() to return the system-chosen port if a zero value was specified.
  • Fixed EthernetUDP::stop() to leave any multicast group joined when starting to listen on a multicast address.
  • Fixed MAC address restore if an Arduino-API non-DHCP begin(...) call fails.
  • Fixed EthernetClient::read() and peek() to return -1 instead of 0 when there's no internal state.
  • Properly initializing multicast filtering so that it happens before igmp_start(), which sets up the all-systems group.

0.28.0

15 May 03:44

Choose a tag to compare

0.28.0 Pre-release
Pre-release

Added

  • Added raw frame loopback support and a QNETHERNET_ENABLE_RAW_FRAME_LOOPBACK macro to enable.
  • Added a fourth step to the MbedTLSDemo example instructions: modify the config.
  • New EthernetFrameClass functions: destinationMAC(), sourceMAC(), etherTypeOrLength(), and payload().
  • Consolidated all the hardware abstraction layer (HAL) functions into one place: qnethernet_hal.cpp.
  • New NullPrint and PrintDecorator utility classes in the qindesign::network::util namespace.
  • Added driver_is_link_state_detectable() function to the driver. This is for detecting whether the hardware is able to read the link state.
  • Added EthernetClass::isLinkStateDetectable() to detect whether the driver is capable of detecting link state.
  • Added setOutgoingDiffServ(ds) and outgoingDiffServ() functions for modifying and accessing the differentiated services (DiffServ) field, respectively, in the outgoing IP header, to EthernetClient and EthernetUDP.
  • Added EthernetUDP::receivedDiffServ() for retrieving the DiffServ value of the last received packet.
  • Added EthernetFrameClass::clear() for clearing the outgoing and incoming buffers.

Changed

  • Updated the Mbed TLS version in the README and comments to 2.28.8 (was 2.28.6).
  • Updated mbedtls_hardware_poll() in MbedTLSDemo example for other platforms.
  • Renamed QNETHERNET_ENABLE_CUSTOM_WRITE to QNETHERNET_CUSTOM_WRITE.
  • Improved the PixelPusherServer example.
  • The address-changed callback is now called for independent IP address, netmask, and gateway changes.
  • Improved link function documentation for linkStatus(), linkState(), and isLinkStateDetectable().
  • Updated EthernetClient::setNoDelay(flag) to return whether successful.
  • Add another 2 to MEMP_NUM_SYS_TIMEOUT option for mDNS, for a total of an additional 8. Timeout exhaustion was still observed with 6. Why 8 and not 7:
  • Updated EthernetClient::connect() to return a Boolean value. (The function signatures don't change; they still return an int.) This matches the new definition at Ethernet - client.connect().
  • Changed EthernetClient::connectNoWait() return types to bool.

Fixed

  • Improved marking of unused parameters.
  • Fixed up use of __has_include(), per: __has_include (The C Preprocessor)
  • In mDNS, ensure there's at least an empty TXT record, otherwise the SRV record doesn't appear.
  • Make the alternative yield() implementation extern "C".
  • Fixed EthernetUDP data copy for zero-length outgoing packets. pbuf_take() considers NULL data an error, so only copy the data if the packet's size is not zero.