0

I'm trying to monitor a can bus through socketcan with Python. I'm taking as a reference the can4python package.

Since I want to continuously acquire data from the can socket, I'm thinking of using BCM sockets since it handles this on the Kernel level. In the can4python package I can only find periodic CAN transmission but no periodic can frame reception.

Is it possible to do this with can4python? If not is it possible to do it with BCM sockets in general?

Thank you for your help.

Yazly
  • 13
  • 3

1 Answers1

0

Just create a thread in Python that continuously reads CAN frames from the socket. If there are CAN frames you're not interested in just setup a CAN filter, so that SocketCAN subsystem would deliver only the required frames.

can4python project seems to be abandoned. Take a look at python-can project that is actively maintained.

yegorich
  • 4,653
  • 3
  • 31
  • 37