Releases: ssilverman/QNEthernet
Releases · ssilverman/QNEthernet
0.12.0
Added
- Added a way to disable and enable Nagle's algorithm. The new functions are
EthernetClient::setNoDelay(flag)
andisNoDelay()
. - 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 (ofEthernetFrameClass
) that is used similarly toEthernetUDP
. - New
RawFrameMonitor
example. - New
EthernetUDP::send(data, len)
function for sending a packet without having to usebeginPacket()
/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()
tostatic size_t
. It was non-static andint
. - Updated
enet_output_frame(frame, len)
to check if the system is initialized.
Removed
- Removed
EthernetClass::sendRaw(frame, len)
because there's a newEthernetFrame
API with asend(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
Added
- Implemented
EthernetClass::setMACAddress(mac)
. - Added
EthernetServer::maxListeners()
,EthernetClient::maxSockets()
, andEthernetUDP::maxSockets()
so user code doesn't need to guess. These areconstexpr
functions that return the compile-time constants from the lwIP configuration. - Added
EthernetServer::port()
for returning the server's port. - Added
EthernetClass::setHostname(hostname)
andhostname()
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
(inbegin(ip, mask, gateway)
andsetMACAddress(mac)
) to ensure that a static IP won't get overwritten by any previously running DHCP client. This also obviates the need to callEthernet.end()
before re-callingbegin
.
0.10.0
Added
- Added a way to send raw Ethernet frames. The new function is
EthernetClass::sendRaw(frame, len)
. - Added new sections to the README:
- "Sending raw Ethernet frames", and
- "How to implement VLAN tagging".
- Added calls to
loop()
inEthernetClient::connected()
andoperator bool()
. - Added
EthernetUDP::beginMulticast(ip, localPort, reuse)
, wherereuse
controls the SO_REUSEADDR socket option. - Added
EthernetClass::joinGroup(ip)
andleaveGroup(ip)
for joining and leaving a multicast group. - Added a "How to use multicast" section to the README.
Changed
- Changed
kMTU
type to besize_t
everywhere. - Added
stdPrint
as anextern
variable toQNEthernet.h
and moved it to theqindesign::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
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 tostop()
. - 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
, andEthernetUDP
to use the newDNSClient
class for DNS lookup and DNS server address setting.
0.8.0
Added
- Added a check that
Entropy
has already been initialized before callingEntropy.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.- Added a "Content-Type" header to the response,
- It now looks for an empty line before sending the response to the client,
- Added the ability to use a static IP,
- Added client and shutdown timeouts, and
- 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
Added
- The Boolean-valued link state is now
EthernetClass::linkState()
. - Added a
_write()
definition so thatprintf
works and sends its output toSerial
. Parts of lwIP may useprintf
. This directs output to a newPrint *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()
inEthernetServer::accept()
andavailable()
to help avoid having to have the caller remember to call loop() if checking connectivity in a loop. - Added a call to
end()
in theQNMDNS
destructor. - Added a new externally-available
Print *stdPrint
variable forprintf
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.
- FixedWidthServer
- LengthWidthServer
- ServerWithAddressListener
- SNTPClient
Changed
EthernetClass::linkStatus()
now returns anEthernetLinkStatus
enum. The Boolean version is nowEthernetClass::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 callloop()
before returning. This should obviate the need to callflush()
after writes and the need to callloop()
if writing in a loop. (flush()
is still useful, however, when you've finished sending a "section" of data.) - Changed
EthernetUDP::parsePacket()
to always callloop()
.