Commit Graph
21 Commits
Author SHA1 Message Date
RefuhrandClaude Opus 5 3ae429ae48 feat: add gs_usb support on Windows
candleLight, CANable, CANnectivity and cantact adapters speak gs_usb. On
Linux and macOS the kernel driver exposes them as SocketCAN interfaces, so
SavvyCAN already reached them through Qt SerialBus. Windows has no such
driver, which left those adapters unusable there.

Add a GSUSBConnection that talks to the hardware directly over WinUSB:

- one connection per physical device, one SavvyCAN bus per CAN channel
- CAN FD including BRS, plus RTR, extended IDs and error frames
- known good bit timings for 16/48/80/160/170 MHz device clocks, with a
  generic solver for clocks the tables do not cover
- hardware timestamps, unwrapped across the 32 bit rollover and anchored
  to the host clock so they line up with the rest of SavvyCAN

gs_usb multiplexes every channel over a single USB bulk IN endpoint, so a
single reader thread drains it and hands frames to the connection thread in
batches, coalescing the wakeups. That keeps one producer on the lock free
queue, which the tx echo path already writes to.

Device scans skip adapters that a live connection holds. candle_dev_open()
shares the file handle and queues read URBs immediately, so probing a device
in use would consume frames the open connection is waiting for.

connections/candle_api is an unmodified copy of the candle Windows API, LGPL
3.0 rather than MIT and only compiled into Windows builds. See its README for
provenance.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XZnuZJ7zc3e8hk6C8bGDZN
2026-07-29 09:25:32 +02:00
werner 60b0e65a18 Implemented connection save with speeds and can fd at least for bus 0. 2025-02-13 20:21:15 +01:00
maciek16c 2bf0782946 CAN-FD 2023-11-22 15:23:38 +01:00
maciek16c 190d51ae90 LAWICEL CAN-FD support, CAN-FD data rate selection 2023-11-22 14:39:36 +01:00
Generoso Cesaro cb2725e6c4 Added canlogserver CAN remote capture 2023-11-17 16:21:38 +01:00
Collin Kidder aada0daf55 Add a fix for GVRET serial devices on MacOS 2023-09-13 20:55:19 -04:00
Chris Whiteford c6c2869124 Support for getting live data from a CANserver 2023-01-22 11:31:41 -05:00
Collin Kidder 64220d613a Fix for MacOS and GVRET Serial Devices
A previous commit caused any device with a . in the name to be treated as a network device. This is not correct as MacOS will name many usb serial devices with dots in the name. Hopefully this makes the behavior correct in all cases now.
2023-01-05 20:31:10 -05:00
Collin Kidder 7678a498db Merge branch 'master' of github.com:collin80/SavvyCAN 2022-10-04 19:59:46 -04:00
Collin Kidder 9ebbaca668 Add a new connection type - Lawicel. It works for some devices, not
all. More development needed but this is a start. Also added ability
to set serial speed and bus speed in the device setup which may be
useful for other connection devices too.
2022-10-04 19:48:11 -04:00
Ahmed Sheimy 1c87008970 Update canconfactory.cpp
restore network connection was not working because it was detected as serial by this modification it is working
2022-08-05 18:32:45 +04:00
Bertrand c49783a55b adding socketcand support 2021-02-23 09:38:19 +01:00
Collin Kidder 2da2855bfa A bit more work on MQTT support. It can actually connect to an MQTT broker now. 2020-08-05 21:53:21 -04:00
Collin Kidder e7e65b7216 Fixed up a bunch of compiler warnings.
There should be no functional difference, just less noise when compiling
2019-08-08 21:15:51 -04:00
Collin Kidder b7bb37048b Enabled ability to use any QT SerialBus driver in SavvyCAN. Now
PeakCAN, ValueCAN, SocketCAN, and J2534 should all work.
2018-10-21 11:50:24 -04:00
Jackson Smith 22e1fe64d7 Fix Serial Ports with dots
Added bool passed to GVRETSerial to indicate when to use TCP,
rather than infering from port name.
2018-06-14 22:17:56 -04:00
Collin Kidder 60abd15461 Added a mode for TCP/IP network connection to a GVRET compatible device (ESP32RET supports this) 2018-04-17 20:01:53 -04:00
Andre Hartmann 1dd59ed73c SocketCan: Rename to SerialBusConnection
QtCanBus is not limited to SocketCAN, it also supports various
Windows CAN adapters directly.

Also, add the term Connection to describe the inheritance
hierarchy better.
2017-11-25 17:27:19 +01:00
canpadawan 893aab5600 renamed socketcan class 2016-06-16 13:59:06 +02:00
canpadawan 6d20a0665d add a factory for the different connection types 2016-06-15 18:25:58 +02:00
canpadawan 80719b253b add lock free queue 2016-06-15 18:18:56 +02:00