summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* osx: possible workaround for loading libraries on Mac OS 11518-osx-workaroundChris Liechti2020-09-151-2/+17
| | | | | | try different paths before using find_libary() related to #518
* docs: update CHANGESChris Liechti2020-09-151-0/+57
|
* examples: refactor wx example, use Bind to avoid deprecated warnings, ↵Chris Liechti2020-09-152-22/+17
| | | | | | | | | IsChecked, unichr - wxTerminal: update event handling. sending still with issues, only sending capital letters fixes #443 fixes #444
* loop: add out_waitingChris Liechti2020-09-141-0/+11
| | | | closes #408
* win32: extend RS485 error messagesChris Liechti2020-09-141-5/+5
| | | | fixes #481
* miniterm: fix double use of CTRL-T + sChris Liechti2020-09-142-2/+2
| | | | | | use z for suspend instead fixes #497
* Merge pull request #351 from cefn/masterzsquareplusc2020-09-141-2/+54
|\ | | | | win32: Working CMD.exe terminal using Windows 10 ANSI support
| * Manually wrap comment. Add note of Windows 10 compatibility.Cefn Hoile2018-06-081-1/+2
| |
| * Remove spurious newlineCefn Hoile2018-06-081-1/+0
| |
| * Added extra codes from miniterm_mpy.py and finalised setconsolemode shenanigans.Cefn Hoile2018-06-081-14/+40
| |
| * First proven version with minimal nav keysCefn Hoile2018-06-081-1/+27
| |
* | Merge pull request #519 from tim-nordell-nimbelink/masterzsquareplusc2020-09-141-2/+9
|\ \ | | | | | | posix: Fix custom baud rate to not temporarily set 38400 baud rates on linux
| * | linux: Fix custom baud rate to not temporarily set 38400 baud ratesTim Nordell2020-08-211-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Merge pull request #510 from SConaway/patch-1zsquareplusc2020-09-141-1/+1
|\ \ \ | | | | | | | | docs: Fix tiny typo in docs
| * | | Fix tiny typo in docsSteven Conaway2020-06-271-1/+1
| |/ /
* | | Merge pull request #494 from kalvdans/dont-catch-our-own-exceptionzsquareplusc2020-09-141-10/+12
|\ \ \ | | | | | | | | posix: Don't catch the SerialException we just raised
| * | | Don't catch the SerialException we just raisedChristian Häggström2020-03-301-10/+12
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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()
* | | refactor: raise new instances for PortNotOpenError and SerialTimeoutExceptionChris Liechti2020-09-1410-113/+115
| | | | | | | | | | | | | | | related to #502 fixes #437
* | | Merge pull request #500 from WisdomPill/dropping_older_pythonzsquareplusc2020-09-142-2/+2
|\ \ \ | |/ / |/| | chore: Dropping python 3.2 and 3.3
| * | Added .idea to .gitignore and dropped python 3.2 and 3.3Anas2020-04-172-2/+2
|/ /
* | Merge pull request #411 from Flameeyes/masterzsquareplusc2019-08-133-1/+278
|\ \ | | | | | | Add a backend for Silicon Labs CP2110/4 HID-to-UART bridge.
| * | Add a backend for Silicon Labs CP2110/4 HID-to-UART bridge.Diego Elio Pettenò2019-02-083-1/+278
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Merge pull request #371 from keelung-yang/masterzsquareplusc2019-08-131-1/+1
|\ \ \ | | | | | | | | Don't open port if self.port is not set while entering context manager
| * | | Use self._port to determine port instancezsquareplusc2019-02-111-1/+1
| | | | | | | | | | | | Co-Authored-By: keelung-yang <csoapy@gmail.com>
| * | | Don't open port if self.port is not set while entering context managerKeelung Yang2018-07-261-1/+1
| |/ /
* | | Merge pull request #367 from klanmiko/mac_break_ioctlzsquareplusc2019-08-132-10/+35
|\ \ \ | | | | | | | | Mac and bsd fix _update_break_state
| * | | move _update_break_state to platform specific baseKaelan Mikowicz2018-07-161-9/+9
| | | |
| * | | change break syscall number for bsd as wellKaelan Mikowicz2018-07-141-4/+18
| | | |
| * | | redefine TIOCXBRK to the correct syscall numbers for macKaelan Mikowicz2018-07-132-2/+13
| |/ /
* | | Merge pull request #364 from torque/macos-usb-product-descriptor-fixzsquareplusc2019-08-131-22/+55
|\ \ \ | | | | | | | | macOS: rework list_ports to support unicode product descriptors.
| * | | macOS: rework list_ports to support unicode product descriptors.torque2018-07-121-22/+55
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Merge pull request #386 from jfleschExtFlowbird/masterzsquareplusc2019-08-131-2/+1
|\ \ \ | | | | | | | | rfc2217/close(): fix race condition
| * | | rfc2217/close(): fix race-condition: when stopping the read loop, do not set ↵Jerome Flesch2018-10-031-2/+1
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Merge pull request #389 from lowell80/masterzsquareplusc2019-08-133-3/+3
|\ \ \ | | | | | | | | Replaced RFC 2271 with 2217 in docs & comments
| * | | Fixed transposed RFC 2217 (was 2271)Lowell Alleman2018-10-243-3/+3
| |/ / | | | | | | | | | Updated docs and comments incorrectly referencing 2271 (SNMP). No code change.
* | | Merge pull request #433 from keith-packard/masterzsquareplusc2019-08-131-6/+17
|\ \ \ | | | | | | | | | | | | | | | | tools/list_ports_windows: Scan both 'Ports' and 'Modem' device classes fixes #314
| * | | tools/list_ports_windows: Scan both 'Ports' and 'Modem' device classesKeith Packard2019-05-191-6/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | Merge pull request #414 from ↵zsquareplusc2019-08-131-2/+102
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | ryan-summers/rsummers/windows-usb-composite-device-support [Windows] Serial number support for composite USB devices
| * | | | Removing dependency on winerrorRyan Summers2019-02-131-3/+2
| | | | |
| * | | | Delinting changesRyan Summers2019-02-121-5/+5
| | | | |
| * | | | Updated parent traversal to check for root deviceRyan Summers2019-02-121-8/+21
| | | | |
| * | | | Added recursive search for device USB serial number to support composite devicesRyan Summers2019-02-121-2/+90
| | | | |
* | | | | Merge pull request #441 from NJDFan/masterzsquareplusc2019-06-211-1/+2
|\ \ \ \ \ | |_|/ / / |/| | | | reset_input_buffer() can hang on sockets
| * | | | Fixed flush_input_buffer() for situations where the remote end has closedRob Gaddi2019-06-201-1/+2
| | | | | | | | | | | | | | | | | | | | the socket.
| * | | | Merge pull request #1 from pyserial/masterNJDFan2019-06-2039-274/+711
| |\ \ \ \ | |/ / / / |/| | | | Catch up to the main fork
* | | | | Merge pull request #430 from ARF1/masterzsquareplusc2019-05-141-0/+10
|\ \ \ \ \ | |_|/ / / |/| | | | Add WaitCommEvent function to win32
| * | | | Add WaitCommEvent function to win32ARF12019-05-131-0/+10
|/ / / / | | | | | | | | | | | | This is helpful when a user wants to wait for some kind of communication event. E.g. listening for parity errors, etc.
* | | | threaded: "write" returns byte countChris Liechti2019-02-081-2/+2
| | | | | | | | | | | | | | | | fixes #372
* | | | docs: mention "seconds" in "send_break" and "__init__" docsChris Liechti2019-02-081-3/+3
| | | | | | | | | | | | | | | | fixes #397
* | | | Merge pull request #400 from smeng9/masterzsquareplusc2019-02-081-0/+16
|\ \ \ \ | |_|/ / |/| | | Add bytesize and stopbits argument parser to tcp_serial_redirect