Skip to content

Add extra logging to understand which ECU-s are on the bus#47

Draft
gunicsba wants to merge 6 commits into
AgOpenGPS-Official:developfrom
gunicsba:ECU-logging
Draft

Add extra logging to understand which ECU-s are on the bus#47
gunicsba wants to merge 6 commits into
AgOpenGPS-Official:developfrom
gunicsba:ECU-logging

Conversation

@gunicsba
Copy link
Copy Markdown
Contributor

There are some cases where we have conflicts.
In theory our TC should be the highest prioirty on the bus. We definitely have a bug in the address claim.
Printing the existing ECU-s should help to understand this problem better.

@gunicsba
Copy link
Copy Markdown
Contributor Author

@sujandumaru
Copy link
Copy Markdown

I reviewed the patch, and it looks like this PR now covers more than ECU logging: diagnostics, TC status/version behavior, and some DDOP handling. Are you mainly opening this PR as diagnostic-only work to understand the bus/address-claim problem, or do you want it to also look at the address-claim behavior and become the fix for issue #36?

As a first step, I’m wondering whether #36 should be handled by detecting other Function::TaskController ECUs on the bus and warning the user when our TC cannot claim/keep the TC role.

@gunicsba
Copy link
Copy Markdown
Contributor Author

Hello @sujandumaru !

nice to see your interest.

Yes we have a few annoying bugs that I'd like to figure out.

Sometimes we need to reboot the screen / implement so it recognize our TC. When we join the bus late we're not always recognized. Hence I started to move towards TC V4 features (that could happily live with TC V3 implementation).

Other TC on the BUS && address conflict:
We currently fail to "evict" them and I'm trying to find a test case inhouse...
Open-Agriculture/AgIsoStack-plus-plus#685

But some systems doesn't allow to associate priority to TC. I think the above PR might help with some cases.

@sujandumaru
Copy link
Copy Markdown

Thank you @gunicsba for the clarification. That makes sense, and these sound like useful areas to investigate.

I looked through the added logs, and they seem very helpful for understanding the late-join / recognition cases. For the address-conflict side, even though part of it may depend on Open-Agriculture/AgIsoStack-plus-plus#685, I’m wondering if we could add a few more logs to better understand how our TC is claiming/connecting on the bus:

  1. Log our own TC NAME and preferred address before address claiming starts.
  2. Dump all visible ECUs even when TC address claim fails, before returning false, so we can see whether any control function is already using our preferred TC address.
  3. Log the actual address after our TC claims one, so we can tell whether it differs from the initial preferred address.

Would that be useful for narrowing down the address-conflict cases?

Copilot AI added a commit that referenced this pull request May 31, 2026
…ionPayload exchange from PR #47

- Settings: add get/set_tc_version, get/set_language_code, get/set_country_code with JSON persistence
- MyTCServer: accept configurable TaskControllerVersion (default SecondEditionDraft)
- app: initialize tcFunctionalities announcing TC-BAS + TC-SC (1 boom / 64 sections)
- app: create tcServer with version and locale from settings
- app: drive bidirectional VersionPayload exchange via ProcessData PGN callback
@gunicsba
Copy link
Copy Markdown
Contributor Author

@sujandumaru I started to split the changes from this PR into several smaller dedicated PR-s.

The logging part I've not done yet as I think we should do a fresh start for those and implement these messages how you described.

Before making any functions:
List the CF-s on the BUS.
Try to make the functions.
List the CF-s on the BUS (which should include our own internal CF-s at this point)

Each should include the number, manufacturer.

There must be a periodic WARN message if there's a TC on the bus that made us not be able to claim the preferred address. (To be honest we should be able to set a priority for our own TC but this is something I've not seen in Valtra, Massey Ferguson, Fendt. However John Deere TC allows to set a priority so there we might be able to fight for the right address.) For now I'd keep ours as-is.

gunicsba pushed a commit that referenced this pull request Jun 1, 2026
* Carry forward tcFunctionalities, TC version/locale settings, and VersionPayload exchange from PR #47

- Settings: add get/set_tc_version, get/set_language_code, get/set_country_code with JSON persistence
- MyTCServer: accept configurable TaskControllerVersion (default SecondEditionDraft)
- app: create tcServer with version and locale from settings

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
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.

2 participants