Torque

Forums

Forums

Guest  

Show or hide header
Welcome Guest, posting in this forum require registration.




Torque » Torque OBD ECU Scanner » Torque Discussion / Ideas » Canbus sniffer to Torque

Pages: [1] 2
Author Topic: Canbus sniffer to Torque
Mikescotland
Member
Posts: 4
Post Canbus sniffer to Torque
on: December 30, 2021 (GMT)

Hello
I have some raw data from canbus sniffer, however I have no clue how to import them into torque pro.
For instance
0x60D ?> 003618 00 41 7C 02 00
Where
003618 is État capteurs divers (4)
41 is Température extérieure (3)

(3): mesuré en °C (soustraire 40)
(4): bit 23 = coffre ouvert
bit 22 = porte arrière droite ouverte
bit 21 = porte arrière gauche ouverte
bit 20 = porte avant droite ouverte
bit 19 = porte avant gauche ouverte
bit 18 = (FP) feux de position allumés
bit 17 = (FC) feux de croisement allumés
bit 14 = (CD) clignotant droit allumé
bit 13 = (CG) clignotant gauche allumé
bit 11 = (FR-AL) feux de route allumés (ou appel de phare)
bit 10 = clé en position marche
bit 9 = clé en position accessoire
bit 8 = (PA) feux de brouillard avant allumés
bit 5 = condamnation des portes enclenchée
bit 4 = condamnation du coffre enclenchée
bit 2 = (FBA) feu de brouillard arrière allumé

And let’s say I’d like to read status of
bit 22 = porte arrière droite ouverte

How to tackle this problem?

Sorry for French, that’s a French car.

piemmm
Administrator
Posts: 6623
Post Re: Canbus sniffer to Torque
on: January 2, 2022 (GMT)

Hi!

This looks like you’ll need to put the adapter into monitor mode as it is not a simple ‘request, response’ PID (where you issue the request for the PID you want, and then get a response)

You’ll need to find the PID for the sensor you want which you can then add into the ‘manage extra PIDs’ part of the app that lets you add your own PID requests to get information

Monitor mode is a special mode and isn’t great when trying to use it in a mixed-mode environment. It’s something that the app will be able to do (there is already some support) though it may not be fast because of the switching to/from both modes

rgwynnjones
Member
Posts: 26
Post Re: Canbus sniffer to Torque
on: January 9, 2022 (GMT)

I too would very much like to see Torque be able to simply listen for CAN messages and decode signals via settings in an extended pids file or better yet, work with DBC files directly.

I could happily forgo OBD protocol with it’s overhead, slow update rate and extra load on the CAN bus and it’s simply not needed on many applications e.g. EVs, E-Boats, Powerwalls etc.

Would it be possible to have a monitor mode, where there is no switching back to OBD? That would work very well.

It would also let Torque compete with some other apps that ahem, already support this. Direct support for DBC files would leap Torque ahead of the ones I am aware off. There is plenty of DBC decoding code out there on github.

piemmm
Administrator
Posts: 6623
Post Re: Canbus sniffer to Torque
on: January 9, 2022 (GMT)

Hi!

Ok I’ll look into this next week as I’m now on a feature release cycle (so I get to make lots of changes)

monitor mode may be problematic over bluetooth (the data rates may well be excessive which could cause issues when you’ve got a 500kbit canbus and anything bluetooth-wise from 100kbit to 3mbit (dependant on phone, os, time of day, phase of moon, etc)

piemmm
Administrator
Posts: 6623
Post Re: Canbus sniffer to Torque
on: January 10, 2022 (GMT)

This will be coming in the next beta.

piemmm
Administrator
Posts: 6623
Post Re: Canbus sniffer to Torque
on: January 19, 2022 (GMT)

Hi!

The beta is now on Google Play!

This is now complete and DBC files can be imported in the PID editor. If you want pure canbus monitoring then select the new ‘canbus monitor’ protocol from the dropdown in the vehicle profile (otherwise Torque will use a hybrid approach where both OBD2 and canbus monitoring happens)

Mihail Zenkov
Member
Posts: 9
Post Re: Canbus sniffer to Torque
on: January 22, 2022 (GMT)

Hi!

I will try to create a simple ODC for my car:

VERSION ""

BS_:

BU_: XXX

BO_ 1502 MMI_BCM_CANHS_R_01: 8 XXX
 SG_ LeftFlashingIndicatorStatusDisplay: 0|1@0- (1,0) [0|1] "" XXX
 SG_ RightFlashingIndicatorStatusDisplay: 1|1@0- (1,0) [0|1] "" XXX
 SG_ LowBeamDisplay: 6|1@0- (1,0) [0|1] "" XXX
 SG_ HighBeamDisplay : 7|1@0- (1,0) [0|1] "" XXX
 SG_ Dump0 : 0|8@0- (1,0) [0|255] "" XXX
 SG_ Dump1 : 8|8@0- (1,0) [0|255] "" XXX
 SG_ Dump2 : 16|8@0- (1,0) [0|255] "" XXX

I can successfully import it into Torque (1.2.25) but it always shows zeros. I tried both modes – hybrid and monitor.

I am using Chinese ELM327 v1.5 USB. It works correctly on my car in Torque. I think monitor mode should also work since I’m already using pyren’s bus_monitor.py (https://gitlab.com/py_ren/pyren/-/blob/master/pyren/bus_monitor.py).

In the bus_monitor log I have “5DE 8 05 02 40 00 00 00 00 02” every 100ms so I think my DBC file must be correct.

Any idea what I should try?

piemmm
Administrator
Posts: 6623
Post Re: Canbus sniffer to Torque
on: January 22, 2022 (GMT)

Hi!

I’ll have a look at it tomorrow and see what’s up – you’ll want monitor mode as hybrid may be too slow on clone adapters (monitor mode should be nice and quick though!)

Edit: had a look tonight anyway – think I found the issue but need to test some more tomorrow

piemmm
Administrator
Posts: 6623
Post Re: Canbus sniffer to Torque
on: January 23, 2022 (GMT)

Hi!

Found a couple of issues and they should now be fixed – I’ll try to get this into the 1.12.8 beta update in a bit!

Mihail Zenkov
Member
Posts: 9
Post Re: Canbus sniffer to Torque
on: January 24, 2022 (GMT)

Both modes work (hybrid is slower than monitor as expected). Thanks!

But I found a few issues:

1. PIDs imported from DBC is cleared from list every time as OBD2 protocol is changed in profile.

2. Torque ignores whole DBC if it has multiple spaces as delimiter. Not sure is this violates DBC standard or not, but I see an example that uses multiple spaces for alignment: https://docs.openvehicles.com/en/latest/components/vehicle_dbc/docs/dbc-primer.html#create-dbc-file

piemmm
Administrator
Posts: 6623
Post Re: Canbus sniffer to Torque
on: January 24, 2022 (GMT)

Hi!

Thanks for the feedback – I’ll have a look at those dbc issues and try to get any changes into the next beta. I’ve just completed a(very, very, basic) exporter for them as well which is handy for the editor(and tester) that I’m making :-)

piemmm
Administrator
Posts: 6623
Post Re: Canbus sniffer to Torque
on: January 24, 2022 (GMT)

Hi!

Also – check that your vehicle profile isn’t ticked in the advanced settings to manage seperate PID lists (or they get cleared when you change profiles!)

I’ve checked this and it is saving and changing PID lists correctly when you switch between profiles that have this enabled and disabled

Mihail Zenkov
Member
Posts: 9
Post Re: Canbus sniffer to Torque
on: January 24, 2022 (GMT)

I have this problem only with PID from DBC. PID from CSV not cleared.

piemmm
Administrator
Posts: 6623
Post Re: Canbus sniffer to Torque
on: January 24, 2022 (GMT)

Hi!

Hm – I’m not able to replicate this here – it’s possible that I’m either not doing the same as you, or have already fixed it as part of updating different parts of the DBC handling. I’ve tried with several profiles (mixed mode, none, dbc only+dbc only) and it seems to be working ok

If you could check in the next beta update and let me know if it’s still not working I’ll have to see what I’m missing

piemmm
Administrator
Posts: 6623
Post Re: Canbus sniffer to Torque
on: January 25, 2022 (GMT)

Hi!

Updated to 1.12.10 this morning – there’s a few DBC changes in there as well, mainly to do with showing the CAN pid lists in a better format and the export (which works, but isn’t finished, so don’t expect it to make sense just yet until the editor is done)

Mihail Zenkov
Member
Posts: 9
Post Re: Canbus sniffer to Torque
on: January 26, 2022 (GMT)

I still have this issue on 1.12.10. I recorded a video with it: https://disk.yandex.by/i/lLqbnDsuViTJLA

Mihail Zenkov
Member
Posts: 9
Post Re: Canbus sniffer to Torque
on: February 2, 2022 (GMT)

Checked 1.12.36 – problem remained. I can reproduce it differently – just exit Torque (“Quit” in menu) and start it again – all PIDs from DBC are gone, PIDs from CSV are in place.

piemmm
Administrator
Posts: 6623
Post Re: Canbus sniffer to Torque
on: February 2, 2022 (GMT)

Hi!

Thanks – I’ll be having another look at this today to see if I can reproduce the issue

Edit: Reproduced the issue – appears to be a release-build issue so I can now get this fixed

piemmm
Administrator
Posts: 6623
Post Re: Canbus sniffer to Torque
on: February 2, 2022 (GMT)

Hi!

This is now fixed – it was a build-time issue which is now sorted out (a couple of other small bugs as well may have had this issue too)

The fix will be in the 1.12.40 jar (to be released shortly) edit: now released

Mihail Zenkov
Member
Posts: 9
Post Re: Canbus sniffer to Torque
on: February 4, 2022 (GMT)

Checked 1.12.46 – problem fixed, thanks!

But I found a few other issues )

1. DBC PIDs don’t always work – “clear list” and import DBC again helps.

2. Expressions like “7|16@0+” don’t work. I think “7|16@0+” should read first and second byte (most significant byte first). “15|16@0+” – work but incorrect – read first and second byte, but should read second and third . “7|8@0+” – works correctly.

3. Is it possible to parse and show text value on display? For example:

BO_ 426 ETC_CANHS_R_01: 4 XXX
 SG_ ETCModeCustomerRequest        : 27|2@0+ (1,0) [0|3] "" XXX

VAL_ 426 ETCModeCustomerRequest 3 "" 2 "2wd" 1 "4wd" 0 "Auto" ;

4. Data logging from DBC PIDs doesn’t always work – I see zeros in logs (but I have correct value on display).

Pages: [1] 2
WP-Forum by: Fredrik Fahlstad, Version: 2.4
Page loaded in: 0.072 seconds.

  Follow me on twitter