How can I setting CAN driver interface. Topic is solved

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
Post Reply
hoangkhai68
Posts: 4
Joined: Thu Jul 01, 2021 10:00 am

How can I setting CAN driver interface.

Post by hoangkhai68 »

Hi everybody,
I am using RasPI4 to install DietPI and trying to use the CAN module for PI. But the system can not boot up the can0 interface. For Rasbian, I was successful to do it, but with DIetPI OS, it so hard to do. This is way I did for PI with Rasbian :
https://harrisonsand.com/can-on-the-raspberry-pi/

Need some help from people.
So many Thanks
User avatar
trendy
Posts: 343
Joined: Tue Feb 25, 2020 2:54 pm

Re: How can I setting CAN driver interface.

Post by trendy »

Dietpi is essentially some scripts on top of a Raspbian installation. So whatever you can do in Raspbian you can do in Dietpi as well.
User avatar
Joulinar
Posts: 5148
Joined: Sat Nov 16, 2019 12:49 am

Re: How can I setting CAN driver interface.

Post by Joulinar »

probably I2C would need to be activated in dietpi-config
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
hoangkhai68
Posts: 4
Joined: Thu Jul 01, 2021 10:00 am

Re: How can I setting CAN driver interface.

Post by hoangkhai68 »

trendy wrote: Thu Jul 01, 2021 2:56 pm Dietpi is essentially some scripts on top of a Raspbian installation. So whatever you can do in Raspbian you can do in Dietpi as well.
But I can not understand why it not work . I did exactly what I can do in Rasbian.
hoangkhai68
Posts: 4
Joined: Thu Jul 01, 2021 10:00 am

Re: How can I setting CAN driver interface.

Post by hoangkhai68 »

Joulinar wrote: Thu Jul 01, 2021 10:39 pm probably I2C would need to be activated in dietpi-config
The CAN shield I use, need an SPI interface to work.
User avatar
trendy
Posts: 343
Joined: Tue Feb 25, 2020 2:54 pm

Re: How can I setting CAN driver interface.

Post by trendy »

hoangkhai68 wrote: Fri Jul 02, 2021 2:45 am But I can not understand why it not work . I did exactly what I can do in Rasbian.
On which step does it fail?
hoangkhai68
Posts: 4
Joined: Thu Jul 01, 2021 10:00 am

Re: How can I setting CAN driver interface.

Post by hoangkhai68 »

trendy wrote: Sat Jul 03, 2021 6:22 pm
hoangkhai68 wrote: Fri Jul 02, 2021 2:45 am But I can not understand why it not work . I did exactly what I can do in Rasbian.
On which step does it fail?
After I fill some configs to the /boot/config.txt then Reboot. But the PI can not recognized the CAN interface or CAN hardware. It must be like this :
Image
But it NOT.
And after the PI rebooting, I already to check [ dmesg | grep SPI ] , the result is nothing, that's mean the PI cannot initial SPI.
User avatar
Joulinar
Posts: 5148
Joined: Sat Nov 16, 2019 12:49 am

Re: How can I setting CAN driver interface.

Post by Joulinar »

just to give it a try, did you enabled I2C inside dietpi-config?
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Post Reply