Commit Graph
103 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
Collin Kidder 286df56895 Merge branch 'master' of github.com:collin80/SavvyCAN 2026-05-14 21:03:14 -04:00
Collin Kidder 035b65243b Remove old custom firmware sender and replace it with AI designed UDS firmware sender. Not tested AT ALL.
Committing merely to give a baseline for further changes
2026-05-13 20:46:53 -04:00
lexcibien 06a7bc555b renaming and working with qt creator 2026-03-06 20:55:34 -03:00
Antonio 708940110e Fix icons output dir 2024-10-27 18:43:06 +01:00
Collin Kidder c5a9c719cc Add an application icon to Windows build 2024-08-20 21:42:34 -04:00
Sebastian Kuzminsky 41b5afbb0e make qmake check Qt version
This provides a more helpful compile-time error
message, hopefully preventing issues like #727
(https://github.com/collin80/SavvyCAN/issues/727).
2024-05-23 10:59:33 -06:00
Collin Kidder 0c84b6998f Partial implementation of a more generic and multi-threaded version of
the frame sender. Now a simplified interface is attached to the main
window as well. Doesn't necessarily work just yet...
2024-02-12 21:20:54 -05:00
Alexey Esaulenko a6cd2f1baa Update required C++ standard to C++17 (needed by [[fallthrough]] statements) 2024-01-19 14:33:40 +04:00
Collin Kidder 3824111eb9 Merge branch 'master' of github.com:collin80/SavvyCAN 2023-11-21 21:03:51 -05:00
Generoso Cesaro cb2725e6c4 Added canlogserver CAN remote capture 2023-11-17 16:21:38 +01:00
Collin Kidder dda3109f60 Added a new dialog that helps to construct triggers for custom frame sender. Reworked custom sender window in anticipation of new functionality for triggers and modifiers 2023-09-24 21:38:04 -04:00
Collin Kidder 51ba7a2e76 Add a new window that can be used to bridge two CAN buses with
selective ID forwarding.
2023-02-22 21:06:23 -05:00
Chris Whiteford c6c2869124 Support for getting live data from a CANserver 2023-01-22 11:31:41 -05:00
Collin Kidder edc210c336 Only code clean up to remove many warnings. There should be no changes
to program operation.
2022-12-05 19:33:47 -05:00
Andy Huska 6e4aac467b Merge pull request #5 from collin80/master
Getting latest from upstream
2022-10-09 08:48:21 -07: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
Andy Huska 47d63c6296 duplicate works! multiplexed signals are not copied at this time
need to learn more about them first

need to do clean up and corner case handling
2022-09-22 18:04:27 -05:00
Andy Huska 27b58552df rebase working but definitely needs clean up for all the whatifs 2022-09-21 18:04:11 -05:00
Chavdar Kirov 8b0d5bd023 Support for reading Wireshark files
Detection of Wireshark files implemented

Guard statements for build on Linux

pcaplite added

Wireshark support works on Windows

pcap support on Lunux fixed

Build warning fixed

Update pcaplite.cpp

Cleanup

Removed extra define
2022-01-29 17:44:07 +02:00
Lucidiot 7af544e03f Allow overriding PREFIX on qmake
I tried to build SavvyCAN for Alpine Linux and ran `qtmake-qt5 PREFIX=/usr`. I got errors because Alpine's packaging tool does not allow placing any files in `/usr/local`; it turns out the prefix I set was ignored because `isEmpty(PREFIX)` was not directly followed by a block, so the block statement gets treated as a separate statement and the `isEmpty` just does nothing.
2021-09-24 00:32:28 +02:00
Collin Kidder 1f421c5d2c Added hex labeling option to graphs in flowview and frame info windows, a few tweaks for potential QT6 support 2021-09-06 19:25:59 -04:00
Chris Whiteford 51c25f0072 Support dragging and dropping of files onto app icon
Tested on macos and windows.  Drag and drop files onto either the dock icon or task bar icon once SavvyCCAN is running
2021-05-25 11:39:24 -04:00
bigoulours 1754809969 fixing opengl32 lib for g++ and msvc in windows
this has been bugging me when merging my branches, since I compile in Qt using mingw...
now it should work with both compilers under windows
2021-02-24 08:46:40 +01:00
Bertrand 52c18f23ba changing back to opengl32.lib for appveyor 2021-02-23 11:50:15 +01:00
Bertrand c49783a55b adding socketcand support 2021-02-23 09:38:19 +01:00
Bertrand a5dbf5a2a6 changed lib for windows build 2021-02-23 08:13:55 +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 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 a5b7410629 Add tracking of DBC editing in order to warn when exiting without saving, add sorting to DBC routines, add a new screen that allows one to compare two DBC files for changes/differences. 2020-07-29 20:45:36 -04:00
Collin Kidder c89bc43795 Added more functionality for new DBC editing system. Tweaked graphics of CANDataGrid a bit. 2020-07-22 19:15:16 -04:00
Collin Kidder fc6dc4ea55 Vast reworking of DBC editing system.
Currently not functional but the overall graphical layout is more or less complete.
2020-07-19 20:29:14 -04:00
Collin Kidder b52ca69363 Update travisci config to use new help files (hopefully), fix up some
missing dependencies for linux
2019-08-18 18:56:09 -04:00
mjuhanne 428b19c5c4 - Save DBC file configuration when changed, and restore it when restarting the application (no need for manual entry everytime app is launched)
- Add GMLAN 29bit filtering feature. In addition to J1939 matching, it is now possible to match DBC messages using only the Arbitration Id (bits 14-26 of CAN Address), since  Priority id (higher bits) and Sender Id (lowest 13 bits) are not relevant when interpreting the CAN message content. This allows to use the excellent GM Global A DBC files on https://github.com/commaai/opendbc. Just remember to select the "GMLAN" matching criteria on DBC File manager.
- Add "Filter labeling" feature. Using loaded DBC files, it matches the filter Ids with DBC messages and shows them in filter windows. Labeling works in the main window (no need to set "Frame interpret" on, since this is a separate feature), as well as in Flow view, Frame data analysis, Playback and Fuzzzing windows. This makes it so much easier to concentrate on those CAN messages that matter. To use this feature, select global "Label filters using messages from DBC files" on Main Configuration page, and then enable the feature on individual DBC files (on DBC file manager) as needed. This is needed if there's overlap in CAN addresses between DBC files, and because the filter labeler cannot tell apart anymore which Filter ID is associated to which bus, it might label them incorrectly. But usually it's ok to just enable the labeling with all the DBC files.
- In Frame data analysis window, in addition to J1939 decoding show also GMLAN (Priority bits, Arbitration Id, Sender Id) decoding.
- FilterUtility static class used for centralized ListWidgetItem creation and for other helper functions
- DBC handler: To allow setting bus numbers even before connection is configured, do not enforce "valid" bus numbers
2019-08-11 23:16:02 +03:00
Collin Kidder 2ec1a56670 Hopefully working TravisCI config for all three platforms 2019-08-07 20:31:03 -04:00
Collin Kidder 7fbf19ad59 More TravisCI fixes 2019-08-04 17:19:40 -04:00
Collin Kidder 408dcc9c69 Fixes to PRO file to hopefully fix TravisCI build 2019-08-04 16:23:40 -04:00
Collin Kidder 164d5adadb Added a new window - Temporal Graph which shows all frame IDs and the
time stamp when they came in. Shows the temporal relationship between
all frames.
2019-05-05 11:52:32 -04:00
Collin Kidder ec49413f61 Major revamp of the connection window. Hopefully it is more clear and
intuitive now.
2019-03-05 21:25:32 -05:00
Collin Kidder 576a6c87c5 Add preliminary version of a new data visualization idea in the
sniffer window.
2018-12-27 23:31:26 -05:00
Collin Kidder c60eac7364 Add support for loading BLF files. Only loads CAN frames at this point. 2018-02-08 20:47:13 -05:00
Collin Kidder 9302c18c33 Integrated help into the system. Most all the sub-screens that are actually complete
and working have integrated help now. Press F1 to bring up help for a given window.
2017-11-30 21:02:16 -05: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
Andre Hartmann 380e3c9da2 Project: Remove unneeded scope
Qt 4 is not supported at all, as the project requires QtSerialBus.
2017-11-25 17:26:56 +01:00
Collin Kidder 3bf19fdbc4 Moved a lot of the frame playback window functionality to a new class. This allows the functionality to be run
on a separate thread. The performance is a lot better and "use original timing" is now reasonably accurate.
2017-11-08 20:38:19 -05:00
Collin Kidder 29c0798cd5 Fix compiling on Windows 2017-08-25 12:53:10 -04:00
Collin Kidder 470b8d3b0c Removed dependency on QScintilla, switched to jsedit
QScintilla was *EXTREMELY* overkill for what I really needed. It also
created problems for people trying to compile the source. The new
solution is much easier to compile and use.
2017-08-06 21:23:11 -04:00
Collin Kidder 439ac4fcc4 Update to V169 - Now compiles under QT 5.9 (LTS). Fixed some warnings,
switched to using system QTScintilla library on Linux. This prevents
you from needing to compile it yourself, added preliminary support for
three buses with a GVRET device (for Macchina M2 boards)
2017-07-06 21:30:55 -04:00
Collin Kidder 4cf2dd1435 Merge pull request #82 from AgnosticPope/master
Fix Compile/build on Ubuntu 14.04
2017-07-06 21:02:56 -04:00
Collin Kidder 2af1204cdd Additional work on UDS - now UDS scan window can get results from UDS
handler instead of trying to do it all itself.
2017-05-16 21:50:54 -04:00