Skip to content

Fix PeakCAN listen-only configuration - #1104

Open
RMBmd wants to merge 1 commit into
collin80:masterfrom
RMBmd:fix/peakcan-native-listen-only
Open

Fix PeakCAN listen-only configuration#1104
RMBmd wants to merge 1 commit into
collin80:masterfrom
RMBmd:fix/peakcan-native-listen-only

Conversation

@RMBmd

@RMBmd RMBmd commented Jul 10, 2026

Copy link
Copy Markdown

Summary

Fix the Qt peakcan connection so that selecting Listen Only in SavvyCAN places the PEAK CAN controller into genuine hardware listen-only mode.

SavvyCAN currently encodes listen-only as bit 0 of QCanBusDevice::UserKey. The Qt PeakCAN backend does not consume that custom key, so the connection can still be initialized in normal active mode even though the SavvyCAN UI shows Listen Only.

An active CAN controller can acknowledge frames and emit active error flags even when the application does not intentionally transmit CAN frames. This makes the existing behavior unsafe for passive capture and can interfere with timing-sensitive diagnostic or programming operations.

Observed behavior

The issue was identified with the following setup:

  • An SM3 is the active UDS diagnostic/programming interface.
  • A PCAN-USB Pro is connected only to monitor traffic.
  • Both interfaces are connected to the same PC through a powered USB hub.
  • PCAN-View in native listen-only mode does not interfere with UDS programming-session entry.
  • SavvyCAN with Listen Only selected causes programming-session entry to fail.

This indicates that SavvyCAN's listen-only selection is not reaching the native PEAK controller configuration.

Root cause

SavvyCAN currently performs the following configuration:

if (bus.isListenOnly())
    sbusconfig |= EN_SILENT_MODE;

mDev_p->setConfigurationParameter(
    QCanBusDevice::UserKey,
    sbusconfig);

@RMBmd

RMBmd commented Jul 10, 2026

Copy link
Copy Markdown
Author

Hardware validation: PASS

The PeakCAN native listen-only fix has been compiled and validated on physical hardware.

SavvyCAN commit: 011062fd19dd9cb6bfd3f39311b007f72a290cfb
Platform: Windows x64
Qt: 5.15.2 MSVC x64
PEAK interface: PCAN-USB Pro
Qt backend: peakcan
CAN mode: Classic CAN
Active diagnostic/programming interface: SM3
Target: Infineon TC1782-based module

Results

Configuration UDS programming-session transition
SM3 without the additional listener Pass
SM3 + PCAN-View native listen-only Pass
SM3 + unpatched SavvyCAN with Listen Only selected Fail
SM3 + patched SavvyCAN with Listen Only selected Pass

Additional findings

  • The patched build received CAN traffic normally.
  • Enabling Listen Only no longer interfered with UDS programming-session entry.
  • The result matched the PCAN-View native listen-only baseline.
  • SavvyCAN application transmission remained blocked while listen-only was enabled.
  • The exact submitted PR commit was used for the test.
  • qmake, nmake, and windeployqt completed successfully.

Conclusion

Hardware testing confirms that the patch correctly configures and verifies native PCAN-Basic listen-only mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant