Commit Graph
11 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
Generoso Cesaro cb2725e6c4 Added canlogserver CAN remote capture 2023-11-17 16:21:38 +01:00
Chris Whiteford c6c2869124 Support for getting live data from a CANserver 2023-01-22 11:31:41 -05: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
Bertrand c49783a55b adding socketcand support 2021-02-23 09:38:19 +01:00
Collin Kidder ee287eac4b Add two new external libraries. SimpleCrypt is used to encrypt passwords, QMQTT is an MQTT
library that I was able to integrate into the codebase so there aren't any external
dependencies. Both external projects have their own open source licenses. Those licenses
are included. Also in this commit is some preliminary work to start adding MQTT support to SavvyCAN.
2020-08-05 20:24:02 -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
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
Collin Kidder ac976643f4 Further work to get more buses working on the GVRET/M2RET devices 2017-10-22 20:15:18 -04:00
canpadawan 4553dd59ee new connection interface 2016-06-15 18:22:39 +02:00
canpadawan 80719b253b add lock free queue 2016-06-15 18:18:56 +02:00