All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
4.0.1 - 2020-04-17
- Update maintenance status to looking for a new maintainer.
- Properly initialize DCB structure on Windows. This fixes some non-functional devices. !97
4.0.0 - 2020-12-17
- Added
send_break()
toTTYPort
!69 - Enable
available_ports()
for Linux musl targets and those without thelibudev
feature enabled by scanning/sys/
for ports. !72 ENOENT
andEACCES
errors are now exposed asNotFound
andPermissionDenied
errors on Linux !80try_clone_native()
was added toCOMPort
andTTYPort
to complementSerialPort::try_clone()
but returning the concrete type instead. !85- Added
set_break()
andclear_break()
toSerialPort
!70
- Minimum supported Rust version is now 1.36.0 to support the
mem::MaybeUninit
feature. - The platform-specific
TTYPort
/BreakDuration
andCOMPort
are now at the root level rather than under theposix
andwindows
submodules respectively. - Opening
SerialPort
s now uses the builder pattern throughserialport::new()
. See the README for concrete examples. !73 SerialPorts
s are no longer opened with a default timeout of 1ms- Under linux, the
manufacturer
andproduct
fields ofUsbPortInfo
now take their values from theID_VENDOR_FROM_DATABASE
andID_MODEL_FROM_DATABASE
udev properties respectively, instead of theID_VENDOR
andID_MODEL
properties that were used before. When the_FROM_DATABASE
values are not available, it falls back to the old behavior. !86 - POSIX ports are no longer opened in exclusive mode. After opening they can be made exclusive via
TTYPort::set_exclusive()
. !98
- Raised the version specification for
bitflags
to 1.0.4. Previously it was set to 1.0.0, but this version ofbitflags
is actually incompatible with Rust 2018 style macro imports thatserialport-rs
requires. !83
- Removed the
serialport::prelude
module. Types should be explicitly imported or can be glob-imported from the root likeuse serialport::*
. !82
3.3.0 - 2019-06-12
- Added support for arbitrary baud rates on Mac OS X and iOS
- Minimum supported Rust version is now 1.31 to support using the 2018 edition of Rust.
- Upgraded
sparc64-unknown-linux-gnu
to Tier 2 support
3.2.0 - 2019-01-01
- Port enumeration is now supported on FreeBSD.
- Minimum supported Rust version changed to 1.24.1
- Made
aarch64-unknown-linux-musl
a Tier-2 supported target
- Fixed software flow control for POSIX systems (!54)
- Removed support for
x86_64-unknown-linux-gnux32
.
3.1.0 - 2018-11-02
- Added
bytes_to_read()
,bytes_to_write()
, andclear()
toSerialPort
. Also added example scripts for using them. - Added Tier 2 support for:
armv5te-unknown-linux-musleabi
- Added "libudev" feature to allow for disabling linking to
libudev
on Linux.
3.0.0 - 2018-07-14
- Arbitrary baud rates are now supported on BSDs, Linux, and Windows.
- Added Tier 1 support for
{i586|i686|x86_64}-unknown-linux-musl
- Added Tier 2 support for:
{arm|armv7}-linux-androideabi
i686-linux-android
{i686|x86_64}-unknown-freebsd
arm-unknown-linux-musleabi
armv7-unknown-linux-musleabihf
{mips64|mips64el}-unknown-linux-gnuabi64
armv5te-unknown-linux-gnueabi
{aarch64|mips|mipsel|powerpc64|powerpc64le|powerpc|s390x}-unknown-linux-gnu
{mips|mipsel}-unknown-linux-musl
x86_64-unknown-netbsd
- Added Tier 3 support for:
{aarch64|x86_64}-linux-android
aarch64-unknown-linux-musl
sparc64-unknown-linux-gnu
,x86_64-unknown-linux-gnux32
- Most port configuration methods now return a
Result<()>
. - Renamed
SerialPort::port_name()
toname()
.
- On Windows, the
port_name
field onSerialPortInfo
included an extraneous trailing nul byte character.
- The
BaudRate
enum was removed in favor of au32
.
2.3.0 - 2018-03-13
- Added
examples/hardware_check.rs
for use in debugging library or driver issues when using physical serial ports. - Added
SerialPort::try_clone
which allows for cloning a port for full-duplex reading and writing.
- Removed configuration caching for serial ports. The underlying implementations
for all platforms cached a configuration struct so that modifying the port
settings involved a single switch into kernel space. This has been removed so
now two system calls are needed for every configuration change. This is
probably a slight performance regression, but should allow the new
SerialPort::try_clone
interface to work as people expect.
TTYPort::into_raw_fd
will now work as expected. It previously closed the port so the returned file descriptor would be invalid.- 921600 baud is now supported on NetBSD and FreeBSD.
Unreleased, happened due to a user error using cargo-release
2.1.0 - 2018-02-14
impl FromRawHandle
forCOMPort
- Specific IO-related errors are now returned instead of mapping every IO error to Unknown. This makes it possible to catch things like time-out errors.
- Changed all baud rates to be reported as the discrete
BaudRate::Baud*
types rather than as theBaudRate::BaudOther(*)
type.
- Modem-type USB serial devices are now enumerated on OS X. This now allows connected Arduinos to be detected.
- Compilation on FreeBSD and NetBSD was fixed by removing the 921600 baud rates. These will be re-added in a future release.
2.0.0 - 2017-12-18
- USB device information is now returned in calls to
available_ports()
- Serial port enumeration is now supported on Mac
- Serial port enumeration now attempts to return the interface used for the port (USB, PCI, Bluetooth, Unknown).
BaudRate::standard_rates()
provides a vector of cross-platform baud rates.SerialPort
trait is nowSend
- Software license has changed from LGPLv3+ to MPL-2.0. This makes it possible to use this library in any Rust project if it's unmodified.
- Mac is now a Tier 2 supported platform
- Removed
BaudRate::from_speed(usize)
andBaudRate::speed -> usize
in favor of theFrom<u32>
andInto<u32>
traits. - Removed
available_baud_rates
in favor ofBaudRate::platform_rates()
as this has a more clear semantic meaning. The returned list of baud rates is now also correct for all supported platforms. - Removed
termios
dependency in favor ofnix
. This is a big step towards supporting additional platforms.
- Stop bits are now specified properly (had been reversed). Thanks to @serviushack (MR#9)
TTYPort::pair()
is now thread-safe.TTYPort::open()
no longer leaks file descriptors if it errors. Thanks to @daniel (MR#12)- Fixed compilation when targeting Android
1.0.1 - 2017-02-20
read()
now properly blocks for at least one character- Compilation now works on Mac
1.0.0 - 2017-02-13
- Various documentation/README updates
- Minor formatting fixes (from rustfmt)
- Platform-specific examples are now only built on appropriate platforms
0.9.0 - 2017-02-09
impl Debug
forCOMPort
exclusive()
andset_exclusive()
forTTYPort
port_name()
forSerialPort
impl FromRawFd
andimpl IntoRawFd
forTTYPort
pair()
forTTYPort
0.3.0 - 2017-01-28
open_with_settings()
to support initializing the port with custom settingsSerialPortSettings
is now publically usable being exported in the prelude, having all public and commented fields, and aDefault
impl.
TTYPort/COMPort::open()
now take aSerialPortSettings
argument and return concrete typesserialport::open()
now initializes the port to reasonable defaults- Removed all instances of
try!()
for?
SerialPort::set_all()
now borrowsSerialPortSettings
0.2.4 - 2017-01-26
- Report an Unimplemented error for unsupported unix targets
- Minor changes suggested by Clippy
- Reworked Cargo.toml to more easily support additional targets
- AppVeyor badge should now be properly displayed
0.2.3 - 2017-01-21
- Specify AppVeyor build status badge for crates.io
0.2.2 - 2017-01-21
- No changes, purely a version increment to push new crate metadata to crates.io
0.2.1 - 2017-01-21
- Specify category for crates.io
0.2.0 - 2017-01-07
- Added a changelog
- Added a getter/setter pair for all settings at once
- An error is thrown if settings weren't correctly applied on POSIX
0.1.1 - 2016-12-23
- Fixed compilation on x86_64-pc-windows-gnu target
- Added contributors to README
- Clarified license terms in the README
0.1.0 - 2016-12-22
- Initial release.