| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
try different paths before using find_libary()
related to #518
|
| |
|
|
|
|
|
|
|
|
|
| |
IsChecked, unichr
- wxTerminal: update event handling. sending still with issues, only sending capital letters
fixes #443
fixes #444
|
|
|
|
| |
closes #408
|
|
|
|
| |
fixes #481
|
|
|
|
|
|
| |
use z for suspend instead
fixes #497
|
|\
| |
| | |
win32: Working CMD.exe terminal using Windows 10 ANSI support
|
| | |
|
| | |
|
| | |
|
| | |
|
|\ \
| | |
| | | |
posix: Fix custom baud rate to not temporarily set 38400 baud rates on linux
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
When using a custom baud rate on Linux these lines of code caused it
to push a 38400 baud rate setting down into the serial driver (even
if temporarily). It would correct this moments later, but we can
simply set the BOTHER value at this point. If other platforms have
a different default value for ispeed and ospeed when using a custom baud
rate, they can define BOTHER as well.
|
|\ \ \
| | | |
| | | | |
docs: Fix tiny typo in docs
|
| |/ / |
|
|\ \ \
| | | |
| | | | |
posix: Don't catch the SerialException we just raised
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
In Python3 we get double tracebacks for this error:
Traceback (most recent call last):
File "/home/chn/repo/pyserial/serial/serialposix.py", line 557, in read
raise SerialException(
serial.serialutil.SerialException: device reports readiness to read but returned no data (device disconnected or multiple access on port?)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "test/test_exceptions.py", line 26, in <module>
test_unexpected_eof()
File "/usr/lib/python3.8/unittest/mock.py", line 1348, in patched
return func(*newargs, **newkeywargs)
File "test/test_exceptions.py", line 21, in test_unexpected_eof
s.read()
File "/home/chn/repo/pyserial/serial/serialposix.py", line 566, in read
raise SerialException('read failed: {}'.format(e))
serial.serialutil.SerialException: read failed: device reports readiness to read but returned no data (device disconnected or multiple access on port?)
The patch moves the checking for EOF to after the IO block, resulting
in a much nicer traceback. This is the test script (Python3-specific):
from unittest import mock
import serial
import select
import os
@mock.patch('select.select')
@mock.patch('os.read')
def test_unexpected_eof(mock_read, mock_select):
s = serial.Serial()
s.is_open = True
s.fd = 99
s.pipe_abort_read_r = 98
mock_select.return_value = ([99],[],[])
mock_read.return_value = b''
try:
s.read()
except serial.SerialException as e:
if e.__context__: raise
if __name__ == '__main__':
test_unexpected_eof()
|
| | |
| | |
| | |
| | |
| | | |
related to #502
fixes #437
|
|\ \ \
| |/ /
|/| | |
chore: Dropping python 3.2 and 3.3
|
|/ / |
|
|\ \
| | |
| | | |
Add a backend for Silicon Labs CP2110/4 HID-to-UART bridge.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
These two chips implement UART access via a HID protocol, which can be
implemented purely in user space. The protocol is documented by Silicon
Labs AN434:
https://www.silabs.com/documents/public/application-notes/AN434-CP2110-4-Interface-Specification.pdf
The backend is implemented based on cython-hidapi
(https://github.com/trezor/cython-hidapi), making it OS-independent, if a
bit awkward.
|
|\ \ \
| | | |
| | | | |
Don't open port if self.port is not set while entering context manager
|
| | | |
| | | |
| | | | |
Co-Authored-By: keelung-yang <csoapy@gmail.com>
|
| |/ / |
|
|\ \ \
| | | |
| | | | |
Mac and bsd fix _update_break_state
|
| | | | |
|
| | | | |
|
| |/ / |
|
|\ \ \
| | | |
| | | | |
macOS: rework list_ports to support unicode product descriptors.
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This commit makes some changes to try to improve the behavior of
serial.tools.list_ports on macOS and to reduce the amount of magic
numbers in this code. These changes include a better adherence to iokit
function type declarations as taken from the iokit header files, as
well as switching all iokit calls to use UTF-8 encoding rather than
mac_roman.
The main functional change of this commit is that the devicename is
now retrieved through IORegistryEntryName, which avoids some weird
USB descriptor mangling that happens somewhere deep within the BSD
serial device subsystem in XNU. In particular, on serial devices, all
USB product descriptor characters that are not in the basic
alphanumeric set are replaced with underscores, which is silly as USB
descriptors are unicode strings. This mangling ONLY happens to the
product descriptor string, so the vendor and serial number strings do
not need to be handled differently than before.
|
|\ \ \
| | | |
| | | | |
rfc2217/close(): fix race condition
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
self._thread = None inside the thread itself as there may be a race-condition with the method close().
The method close() closes the socket, which stops the read loop. When the read loop stops, it set self._thread to None,
but if it set to None while close() is right between between the execution of "if self._thread:" and "self._thread.join()",
close() will raise an AttributeError.
Signed-off-by: Jerome Flesch <ext-jerome.flesch@flowbird.group>
|
|\ \ \
| | | |
| | | | |
Replaced RFC 2271 with 2217 in docs & comments
|
| |/ /
| | |
| | |
| | | |
Updated docs and comments incorrectly referencing 2271 (SNMP). No code change.
|
|\ \ \
| | | |
| | | |
| | | |
| | | | |
tools/list_ports_windows: Scan both 'Ports' and 'Modem' device classes
fixes #314
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Devices using the Window USB Modem driver use the Modem GUID instead
of the Ports GUID. Add the Modem class to the set of GUIDs to scan.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|\ \ \ \
| | | | |
| | | | |
| | | | |
| | | | | |
ryan-summers/rsummers/windows-usb-composite-device-support
[Windows] Serial number support for composite USB devices
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
|\ \ \ \ \
| |_|/ / /
|/| | | | |
reset_input_buffer() can hang on sockets
|
| | | | |
| | | | |
| | | | |
| | | | | |
the socket.
|
| |\ \ \ \
| |/ / / /
|/| | | | |
Catch up to the main fork
|
|\ \ \ \ \
| |_|/ / /
|/| | | | |
Add WaitCommEvent function to win32
|
|/ / / /
| | | |
| | | |
| | | | |
This is helpful when a user wants to wait for some kind of communication event. E.g. listening for parity errors, etc.
|
| | | |
| | | |
| | | |
| | | | |
fixes #372
|
| | | |
| | | |
| | | |
| | | | |
fixes #397
|
|\ \ \ \
| |_|/ /
|/| | | |
Add bytesize and stopbits argument parser to tcp_serial_redirect
|