Canbus utilities (canutils) on Sabrelite

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Canbus utilities (canutils) on Sabrelite

2,892 Views
Giox79
Contributor I

Hello everybody.

I'm using a sabrelite revision D device, date 5/9/12 in order to test can interface.

I configured can on kernel and rebuilt canutils for my target application.

My problem is related to canutils.

While trying to dump data from can interface, I used the following commands

canconfig can0 bitrate 500000

ifconfig can0 up

./candump can0 -L

and everything works fine.

However when I try playing back  data to can0, using the command (the setup lines concerning canconfig  have already been performed):

     ./cansend can0 0CF00203#CC0000FFF00000EF

I receive the message:

write: No buffer space available

Furthermore I receive no message on the connected device (this is a working unit used for can sniffing, I'm sure it is ok).

Any help about what to check on the unit setup will be really appreciated.

Giovanni

Labels (1)
Tags (3)
0 Kudos
4 Replies

1,125 Views
EricNelson
Senior Contributor II

Hi Giovanni,

We don't do a lot of testing of CAN, but all of our tests involve using "ip link" to configure the "can0" device

to bring it up as a network interface.

There are some notes in this post that roughly mimic our testing:

     Re: How could i use the can1 of iMX6DL Sabreauto

I suspect that you're missing a step, like perhaps setting the baud rate.

0 Kudos

1,125 Views
Giox79
Contributor I

Hi Eric, thank you for your feedback.

I will further investigate my problem using the information in the link that you provided me, however, I think the issue is not related to forgetting set up of can speed.

In fact, when I execute the command

canconfig can0 bitrate 500000

ifconfig can0 up

./candump can0 -L

everything works fine, however if I write

canconfig can0 bitrate 500000

ifconfig can0 up

./cansend can0 0CF00203#CC0000FFF00000EF

I receive the proposed error. Therefore it seems something related only to the tx phase. Please note that the data read from first step are fine, since I have a device sending a specific can packet, and I read it fine.

If this provides you some further idea about my problem, please let me know.

I will inform you about any progress.

Best regards.

Giovanni

0 Kudos

1,125 Views
OtavioSalvador
Senior Contributor II

Are you using LTIB or Yocto Project?

I advice you to look at Yocto Project[1] as it has support for this board and offers an updated user-space application set.

1. FSL Community BSP

1,125 Views
Giox79
Contributor I

Thank you for your feedback.

Frankly speaking, I downloaded the tried both the canutils in the yocto project and the last one with similar results, however I will give a try to your suggestion.

Best regards

Giovanni

0 Kudos