Kurt Wachowski
75af3220b0
Driver: Block between read attempts
...
Driver:
* Refactored to limit accessibility of member fields;
Communication:
* readTask() now calls for a blocking wait;
2024-08-13 13:55:12 +00:00
Yasser Yassine
77928dc93d
Driver: Add general predicate parameter for waitForRx
2024-05-28 18:21:22 +00:00
Yasser Yassine
659fcf633c
Communication: Add pause feature
...
Removed redirect read
2024-05-23 21:23:45 +00:00
Jonathan Schwartz
63f0516318
Replace concurrentqueue with ringbuffer
2024-04-05 17:24:53 +00:00
Jonathan Schwartz
e0cef880f0
Firmio: Improve exit from Find loop
...
Device: Null check return from std::dynamic_pointer_cast
2023-10-03 16:24:28 +00:00
Jonathan Schwartz
32900ae263
Device: Add GetComponentVersions and GetSupportedFeatures commands
...
Driver: Fix re-open and failed open cases for TCP
Also enforces even length packets for the RED2, FIRE3, and FIRE3 FlexRay devices.
2023-05-08 21:07:43 +00:00
Kyle Schwarz
cd7b0b0a7b
Driver: PCAP: Properly handle RX timeout
...
If res == 0 the header and data will not be populated because no message
was RXed.
2023-03-29 00:51:38 -04:00
Kyle Schwarz
9b46d486cb
Driver: Add TCP support
...
Device: Close Driver in heartbeat thread on disconnection
2023-03-08 18:32:26 +00:00
Kyle Schwarz
f4e4a103ad
POSIX: PCAP: Check header & data before using
2022-12-19 03:03:12 -05:00
Paul Hollinsky
407ccccedd
Drivers: Ensure serial numbers are uppercase
...
This prevents mismatches if the device sends a lowercase
serial number, which may happen due to an oversight in
production.
2022-05-28 14:41:41 -04:00
Paul Hollinsky
91abf378f8
FirmIO: Use uintptr_t for 64-bit compatibility
2022-04-15 21:35:40 -04:00
Paul Hollinsky
d45d708446
FirmIO: Stable communication
2022-03-27 23:57:44 -04:00
Paul Hollinsky
2dd91325e6
FirmIO: Initial commit
2022-03-27 18:10:24 -04:00
Paul Hollinsky
781fc2c034
Drivers: Decouple from devices
...
This allows us to better implement alternative drivers
for devices, such as for device sharing servers or
talking to CoreMini processors within the same device.
2022-03-27 14:30:31 -04:00
Paul Hollinsky
96f18dcfd6
PCAP: Don't use pthread_cancel on Linux
...
It is not necessary and can cause a crash in libunwind
2021-12-08 14:30:02 -05:00
Paul Hollinsky
ac77fe2b56
POSIX: PCAP: Use EthernetPacketizer
2021-09-23 21:31:59 -04:00
Paul Hollinsky
c847d68f3c
POSIX FTDI: Count LIBUSB_ERROR_IO as a disconnection
2021-09-20 19:30:59 -04:00
Paul Hollinsky
16b88b7787
macOS: PCAP: Fix typo
2021-07-05 23:55:22 -04:00
Paul Hollinsky
02c14aeb35
macOS: PCAP: Add code necessary for device discovery
...
You will still need chmod_bpf or similar to find devices
2021-06-17 21:07:22 -04:00
Paul Hollinsky
37d06807e4
POSIX: PCAP: Update inferface name to match Windows implementation
2021-06-15 19:09:13 -04:00
Paul Hollinsky
19aabdfacf
POSIX: PCAP: Cancel after pcap_breakloop() to EINTR out of poll()
...
This is necessary as pcap_breakloop() does not actually wake the
thread from blocking operations, such as poll.
2021-06-10 15:17:43 -04:00
Paul Hollinsky
78e3eb18df
Drivers: Rename STM32 to CDC ACM
...
This is much more descriptive of what the driver actually is
2021-05-04 22:37:16 -04:00
Paul Hollinsky
6d22b1e001
POSIX: STM32: Check re-enumeration by inode
...
This is much more stable than waiting for a set amount of time
We still timeout at 5s, if we see that being hit it can be increased
2021-05-04 22:22:30 -04:00
Paul Hollinsky
622c5ee57a
POSIX: STM32: Handle re-enumeration when changing modes
2021-04-27 21:12:59 -04:00
Paul Hollinsky
b7ce9819bd
POSIX STM32: Handle large write payloads failing with O_NONBLOCK
2021-04-23 17:06:16 -04:00
Paul Hollinsky
bb7719d185
POSIX Drivers: Clear disconnected status when closing
...
This allows us to properly re-open if we were
previously disconnected.
2021-04-23 16:59:48 -04:00
Paul Hollinsky
92790330f1
macOS: STM32: Fix device finding for newer versions of the OS
2021-03-22 16:07:51 -04:00
Kyle Schwarz
33a84bf8ce
PCAP: Switch to pcap_dispatch()
2020-11-17 15:05:14 -05:00
Paul Hollinsky
e5920417ff
POSIX: FTDI: Use libusb include directory
...
This allows for the same include to be used on macOS
2020-10-08 21:09:45 -04:00
Kyle Schwarz
a5b27a15b0
Allow disconnections to be signaled by drivers
...
This allows for disconnections to be detected quickly
where possible.
It also makes sure other driver errors aren't thrown
in the event of a disconnection.
2020-10-08 17:38:10 -04:00
Paul Hollinsky
9dc4b302ef
POSIX: PCAP: Enable if permissions are set, with a warning otherwise
...
On Linux, raw packet capture requires CAP_NET_RAW (or root).
If we can't capture raw packets, we will not be able to find/connect to
devices over ethernet.
2020-09-14 11:51:15 -04:00
Paul Hollinsky
a325d8a12b
PCAP: Send initial requests from the interface MAC
...
This allows the device to respond directly to us
2020-09-01 15:53:45 -04:00
Paul Hollinsky
c48995520f
POSIX: FTDI: Report warnings and retry on libftdi errors
2020-09-01 15:15:36 -04:00
Paul Hollinsky
5db07102aa
PCAP: Listen for ICS_UNSET_MAC
...
On newer firmware, the device will address the PC directly after
EnableNetworkComm. Before this, it will set the destination MAC to
00:FC:70:FF:FF:FF.
2020-08-27 12:24:35 -04:00
Paul Hollinsky
b5c9443fc8
POSIX: PCAP: Ensure packets get captured
...
No packets were being captured with a timeout of 0
2020-08-27 12:24:35 -04:00
Kyle Schwarz
7cd008a003
Switch to non-blocking I/O for STM32
...
STM32 can latency is not as good as it could be when it is synchronous due to read() timeouts,
so switch to asynchronous reading with select().
2020-08-25 16:14:47 -04:00
Kyle Schwarz
4cd897badd
Fix deadlock with Driver::write
...
Use a spin lock to recheck the queue size until it has room to push.
2020-08-14 16:57:52 -04:00
Kyle Schwarz
afda617894
Remove trailing white-space
2020-08-11 13:42:13 -04:00
Paul Hollinsky
2079037ae4
POSIX FTDI: Nicer error message for when device is in use
...
Commonly, the device is being used by another libicsneo program
(icsscand, maybe) or passed through to a VM.
2020-06-24 22:15:22 -04:00
Paul Hollinsky
25f079b5c6
POSIX FTDI: Fix a bug where closing device successfully returned an error
2020-06-24 20:59:53 -04:00
Paul Hollinsky
38e24d7641
Refactor ICommunication/Transport => Driver
2020-03-09 14:09:27 -04:00
Paul Hollinsky
ef34959c91
STM32 device finder for Darwin
2020-02-14 23:18:34 -05:00
Jeffrey Quesnelle
5112e1d2f9
fix building for macos
2019-08-06 17:14:12 -04:00
EricLiu2000
3358241abe
Reordered error downgrading, order of going offline, and renamed locks
2019-08-06 10:32:19 -04:00
EricLiu2000
f41b5c4a79
Removed cancellation of error downgrading after closing, was causing read access violations.
2019-08-01 14:07:42 -04:00
Paul Hollinsky
511a724252
POSIX FTDI: Improve performance by setting the latency timer
2019-07-26 17:46:24 -04:00
EricLiu2000
66126b2b61
Downgraded non-user thread errors to warnings
2019-07-24 13:22:17 -04:00
EricLiu2000
f45bd6772f
Builds and runs on both windows and ubuntu
2019-06-25 13:20:49 -04:00
EricLiu2000
50dba62a89
Event refactor builds on Windows
2019-06-24 17:59:45 -04:00
EricLiu2000
965679c370
Added error checking and removed some redundancy from device isOpen()
2019-06-13 16:01:35 -04:00