question

samuel-brucksch avatar image
samuel-brucksch asked

Connecting to a can bus device from custom code

Hi,

i want to connect to a non supported BMS via can bus with 250k baudrate. So as far as i read i can't use the BMS bus as that one has a fixed baudrate of 500k. So i guess i have to use one of the VE.Can interfaces, to connect to that devices.

Can i just use one of the VE.Can interfaces and access them from code (any code sample available, e.g. in python)?

Sample projects or real life projects, that already do something like that would be really appreciated. I can do all the coding myself, just need some hints and guidance.

Thanks!
Samuel

BMSVE.Can
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

1 Answer
johanndo avatar image
johanndo answered ·

Have you looked in github?

There are CAN bms and serial BMS examples I think, you may look in the Cerbo code itself for the Ve.Can service...

vecan-dbus I think...


This may be also of some use....

https://github.com/kwindrem/VeCanSetup

https://github-wiki-see.page/m/victronenergy/venus/wiki/RaspberryPi-CAN-Interfaces

2 comments
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

samuel-brucksch avatar image samuel-brucksch commented ·

Thanks for your response. I'm on a Cerbo and i can see that can0 and can1 are listed in

root@einstein:~# cat /etc/venus/canbus_ports
can0
can1

Also dbus-spy lists it:

com.victronenergy.vecan.can0

So the question now is how to access it. I will check if I can find more info in the victron repository, I already searched a bit but did not find anything which would help me to setup a CAN connection.

I'll check again, but if anyone has already built a project with CAN let me know.

0 Likes 0 ·
Show more comments

Related Resources

Additional resources still need to be added for this topic

Victron VE.Bus BMS product page

Victron 3rd party BMS compatibility page