Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CAN FD decoder #109

Open
kanji2000 opened this issue Sep 5, 2017 · 13 comments · May be fixed by #539
Open

CAN FD decoder #109

kanji2000 opened this issue Sep 5, 2017 · 13 comments · May be fixed by #539

Comments

@kanji2000
Copy link

I really need 'CAN FD' decoder.
Could you please support it.

@Linjieqiang
Copy link

+1

4 similar comments
@DmitryD1
Copy link

+1

@abougouffa
Copy link
Contributor

👍

@heshanxingzhe
Copy link

+1

@1101459202
Copy link

+1

@CZZ187827
Copy link

我根据Can的写了一个CanFD的。

@wdim0
Copy link

wdim0 commented Sep 20, 2022

CAN-FD is more and more common nowadays. I'd like to use DSView to debug my CAN-FD project. It would be great to have CAN-FD decoder in DSView.

@abougouffa abougouffa linked a pull request Sep 20, 2022 that will close this issue
@abougouffa
Copy link
Contributor

@wdim0 @CZZ187827 @1101459202

I've integrated some of sigroks decoders into DSView from a while, I didn't get the time to test them all, the new CAN decoder supports CAN-FD.

I've just opened a PR, if you want to test the new decoder, you can clone from my fork https://github.com/abougouffa/DSView/tree/feat/decoders

@wdim0
Copy link

wdim0 commented Sep 25, 2022

@abougouffa

I've cloned your fork and tried it, but there's an error:
image

I've also checked the latest version of ".../libsigrokdecode4DSL/decoders/can/pd.py" on sigrok web
http://sigrok.org/gitweb/?p=libsigrokdecode.git;a=tree;f=decoders/can;h=a9b52f173e2ca7df101087af1da8e8e5e117402f;hb=HEAD

but the file has the same content (except one line at start in comment with copyright) and it produces the same error.
I'm afraid we have to wait until somebody with good "python + sigrok decoder architecture" skills will fix that.

Thanks anyway!

@abougouffa
Copy link
Contributor

@wdim0 You can try to replace these lines:

https://github.com/abougouffa/DSView/blob/feat/decoders/libsigrokdecode4DSL/decoders/can/pd.py#L517-L520

With:

if (self.matched & (0b1 << 1)):
    self.dom_edge_seen()
if (self.matched & (0b1 << 0)):
    self.handle_bit(can_rx)

It is the libsigrokdecode4dsl which is not up-to-date, compared with the upstream libsigrokdecode. I don't understand why they made their own fork, which is constantly far behind the upstream one, instead of depending on the upstream lib directly. There is a very good proposition in #428, but the response from DreamSourceLab's developer was kind of hostile!

@wdim0
Copy link

wdim0 commented Sep 27, 2022

@abougouffa
Yep! That's working!!
Thank you so much abougouffa

CAN-FD frame:
Screenshot from 2022-09-27 12-43-19

@RoopaPalyegar
Copy link

Hi, I am new here. I need to decode CAN-FD data. Critical stage of the proejct.
Can anyone offer any help?
I downloaded the zipped folder from "https://github.com/sigrokproject/libsigrokdecode"
Replaced "decoders" folder in my laptop with the 'decoders' folder from the downloaded zipped folder.
Replaced the 4 lines as suggested by @wdim0
But I get "Decoder Reported an error"

Capture

@abougouffa
Copy link
Contributor

abougouffa commented Jul 18, 2023

Hello @RoopaPalyegar

AFAK, CAN-FD is supported in the last 1.3.0 version. This hack was proposed for an older version.

EDIT: It seems that you are using PulseView! This discussion is intended for DSView.

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

Successfully merging a pull request may close this issue.

10 participants