question

cbscpe avatar image
cbscpe asked

CAN Bus is named NAME_PH in Venus OS 2.92

After installing Venus OS 2.92 on a Raspberry Pi 3B+ and installing the necessary software to support the waveshare single channel the interface was named NAME_PH and not can8 as expected. Except for the strange name the device is working correctly and is communicating with the Pylontech BMS

Venus OS
2 |3000

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

18 Answers
gexle avatar image
gexle answered Ā·
Hi

It's also the case for me that the name I entered was not taken over.

Is maybe a mistake.

Thanks
2 |3000

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

cbscpe avatar image
cbscpe answered Ā·

I just renamed VeCanSetup.rules in /etc/udev/rules.d to VeCanSetup.rules.save to disable the udev rule for the spi0.0 and now it shows as can0 (still not the expected can8 but much better), I need to dig into the udev config to find the correct syntax for this to be named can8 as it should

2 |3000

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

jeroen avatar image
jeroen answered Ā·

oh please do me a favor next time and mention that you are hacking around with Keven his scripts...

1 comment
2 |3000

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

cbscpe avatar image cbscpe commented Ā·
I did not understand your answer, what do you mean by hacking around? I just removed it so to speek in order to let the default behaviour of naming take place.
0 Likes 0 Ā·
Kevin Windrem avatar image
Kevin Windrem answered Ā·

Should be fixed now. VeCanSetup v3.3 just released. Just rerun the setup script after the package updates. A reinstall should be fine to update the name. If not, you'll need to redo the configuration.

2 |3000

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

cbscpe avatar image
cbscpe answered Ā·

i tried to update the package via package manager but the name was still wrong, then I removed and re-installed the package using the SetupHelper, still the service name is still NAME_PH and the interface name is DEVICE_PH, manually changing the rule manually to the content of the repository on github changed the name to NAME1_PH and DEVICE1_PH.

2 |3000

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

gexle avatar image
gexle answered Ā·

Hello Kevin

The problem with the name doesn't seem to be solved yet, does it?

I have the same name in it Name_PH

1 comment
2 |3000

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

Kevin Windrem avatar image Kevin Windrem commented Ā·
Yes, it should be fixed.

I suggest you delete the configuration from within VeCanSetup and add it back in.

0 Likes 0 Ā·
gexle avatar image
gexle answered Ā·

Hello Kevin

User -> cbscpe write but what others see post before?


Hi That means I uninstall the VeCanSetup under the Venus GX interface, see picture, then restart the Venus OS and then I reinstall VeCanSetup using the Install button and then start the setup under SSH with the command (( /data/VeCanSetup/setup )) or Canbus interface? Thanks

1668625102700.png



1668625102700.png (29.7 KiB)
2 |3000

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

Kevin Windrem avatar image
Kevin Windrem answered Ā·

Donā€™t need to uninstall the package. Just run the setup script, select install the replace the config for your interface

2 |3000

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

gexle avatar image
gexle answered Ā·
Hello KevinCan you check is that ok?

Choose action from list above or (cr) if done with changes: a
Enter interface: h
CAN'T ADD HAS INTERFACE - ports not available


1 comment
2 |3000

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

gexle avatar image gexle commented Ā·

1668761173878.jpeg

Bild

0 Likes 0 Ā·
1668761173878.jpeg (129.3 KiB)
gexle avatar image
gexle answered Ā·

This is not OK or?
1668762209261.jpeg



See you is this OK?

1668761952300.jpeg



1668761952300.jpeg (147.4 KiB)
1668762209261.jpeg (129.3 KiB)
2 |3000

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

Kevin Windrem avatar image
Kevin Windrem answered Ā·

You are only allowed ONE hat. You must delete the existing one before you can add a new one.

2 |3000

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

gexle avatar image
gexle answered Ā·
Hi

I did that, see the last picture at the bottom, is that correct?

1668794121582.png

Is it possible to test the CanBus or the CanHat module with a command or something, unfortunately I don't have a Pylontech US5000C yet, it hasn't been delivered yet!
Can one assume that based on the picture showing the installation, everything is ok, i.e. the module is recognized etc. and is running?

1668794121582.png (432.9 KiB)
2 |3000

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

Kevin Windrem avatar image
Kevin Windrem answered Ā·

You should see can8 in the Settings / Services menu if everything is set up properly.

Apparently candump doesn't see CANbus hat activity, or it may be that since I have no traffic candump simply has nothing to report.

2 |3000

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

gexle avatar image
gexle answered Ā·

Hello Kevin See You

THIS is also OK?


The Can8 is then found automatically or by the Pylontech??
Or how should I imagine that?

Why is the can installed with can8 and not with can0 or something.

Thanks

1668845998368.png


1668845998368.png (20.4 KiB)
2 |3000

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

gexle avatar image
gexle answered Ā·

@cbscpe


Hi

may I disturb you?

Why is the can installed with can8 and not with can0 or something?

Does the whole thing now work for you according to the installation with the CanHat
https://www.waveshare.com/rs485-can-hat.htm
1 comment
2 |3000

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

Kevin Windrem avatar image Kevin Windrem commented Ā·
The logic behind can8, 9 and 10+ is described in the ReadMe.

The issue is that as of v2.90, Venus OS automatically detects USB-connected CANbus adapters and begins assigning them at can0. This will most likely conflict with can0 as used for a CANbus hat. The first one discovered will function, the next ones will not. Assigning hats to can 8 and 9 and USB CANbus adapters starting at can10 avoids any conflicts.

There is also a problem with dual-channel CANbus hats in that the channel to can port is random. Sometimes spi0 connects to can0 and sometimes it connects to can1.

VeCanSetup also allows naming the ports to avoid confusion when there is more than one CANbus port.

With USB-connected CANbus adapters, you can probably do without VeCanSetup and let Venus OS automatically configure them. (Scan-based interfaces are not supported with auto configuration and are not recommended since they can drop packets.)

Without VeCanSetup, you would need to manually install the overlay calls in /u-boot/config.txt and optionally manually create rules to fix spi0 to can0, etc. But that is certainly an option and your only choice if you really want your interface on can0.

0 Likes 0 Ā·
gexle avatar image
gexle answered Ā·

Hello Kevin

Thanks now I understand with can8 why that is! I have the Waveshare CanHat module 12000Mhz Crystal see picture. So there are no problems anyway, as I said, everything is recognized, etc. see my screenshots above.

There shouldn't be any problems with the Pylontech and BMS

Thanks

1668964756733.png



1668964756733.png (423.6 KiB)
2 |3000

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

Holger Watermann avatar image
Holger Watermann answered Ā·

Be careful to remove the solded Terminator from the Waveshare CAN Hat if your Bus is already terminated!

It is labeled as 120 ohms and sits near the can-connector.

2 |3000

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

cbscpe avatar image
cbscpe answered Ā·

This is strange, I upgraded to Venus OS 2.93 which put a new VeCanSetup.rules in udev rules and then the device name was again set to NAME_PH. So I decided to re-install the VeCanSetup, but to my surprise after uninstalling the package the CAN Bus interface was still there, now named CAN0 and the Battery was immediately detected. Any idea what happened here?

1 comment
2 |3000

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

Kevin Windrem avatar image Kevin Windrem commented Ā·

The weird name was a problem a long time back due to a bug in VeCanSetup. You need to make sure the latest VeCanSetup is installed then run it's setup script from the command line, delete the configuration and reenter it.

As of v2.9-something, Victron included automatic configuration of USB CANbus ports (other than slcan). So VeCanSetup is optional now. VeCanSetup provides port naming and insures CANbus ports are always attached to the same interface. It is also needed for CANbus hats on Raspberry PI platform.

0 Likes 0 Ā·

Related Resources