Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no CAN-bus under Services; can0 DOWN ! #16

Open
gerd-git opened this issue Dec 25, 2022 · 9 comments
Open

no CAN-bus under Services; can0 DOWN ! #16

gerd-git opened this issue Dec 25, 2022 · 9 comments

Comments

@gerd-git
Copy link

Hi,
I don't see "CAN-bus" under "Services".

I can see it here, but DOWN:

root@raspberrypi2:~# ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,DYNAMIC,UP,LOWER_UP> mtu 1450 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
    link/ether b8:27:eb:e4:e8:96 brd ff:ff:ff:ff:ff:ff
3: can0: <NOARP,ECHO> mtu 16 qdisc noop state DOWN mode DEFAULT group default qlen 10
    link/can
4: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,DYNAMIC,UP> mtu 1450 qdisc pfifo_fast state DOWN mode DORMANT group default qlen 1000
    link/ether b8:27:eb:b1:bd:c3 brd ff:ff:ff:ff:ff:ff
5: ll-eth0@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1450 qdisc noqueue state UP mode DEFAULT group default qlen 1000
    link/ether fa:98:86:9f:5b:1d brd ff:ff:ff:ff:ff:ff

"up" is not working

root@raspberrypi2:~# ip link set dev can0 up
RTNETLINK answers: Invalid argument

What am I doing wrong?

My System:
VeCanSetup v3.3 via Package manager
Waveshare 1-channel CANbus Has 12 MHz crystal
Raspberrypi 2
firmware v2.89

Thanks for answers in advance
Greetings Gerd

@kwindrem
Copy link
Owner

see what is in dimsg:

dmesg | grep spi0
dmesg | grep can0
dmesg | grep -i waveshare

see if there are any services running for can0

ps | grep can0

@gerd-git
Copy link
Author

root@raspberrypi2:~# dmesg | grep spi0
[    3.980333] mcp251x spi0.0 can0: MCP2515 successfully initialized.
[  138.070031] mcp251x spi0.0 can0: bit-timing not yet defined
[  138.075754] mcp251x spi0.0: unable to set initial baudrate!
[  215.302927] mcp251x spi0.0 can0: bit-timing not yet defined
[  215.308518] mcp251x spi0.0: unable to set initial baudrate!
root@raspberrypi2:~#

root@raspberrypi2:~# dmesg | grep can0
[    3.980333] mcp251x spi0.0 can0: MCP2515 successfully initialized.
[  138.070031] mcp251x spi0.0 can0: bit-timing not yet defined
[  215.302927] mcp251x spi0.0 can0: bit-timing not yet defined
root@raspberrypi2:~#


root@raspberrypi2:~# dmesg | grep -i waveshare
root@raspberrypi2:~#



root@raspberrypi2:~# ps | grep can0
  978 root      1612 S    supervise can-bus-bms.can0
  984 root      1612 S    supervise dbus-motordrive.can0
  991 root      1612 S    supervise dbus-valence.can0
 9093 root      2692 S    grep can0
root@raspberrypi2:~#





@kwindrem
Copy link
Owner

Did you set up can0 using VeCanSetup?

Look in /etc/udev/rules.d for VeCanSetup.rules If that is not present, VeCanSetup didn't install the necessary stuff to initialize the interface.

You must run /data/VeCanSetup/setup from the command line. Simply attempting to install it from PackageManager won't work unless you have run it first from the command line and setup the interfaces.

I see the can-bus-bms service running for can0 but not the main vecan-dbus

VeCanSetup's setup script will also log it's activity in /data/log/SetupHelper. You can look there to see if there are any problems.

@gerd-git
Copy link
Author

I had run VeCanSetup from the command line after installation via PackageManager.

root@raspberrypi2:~# ls -la /etc/udev/rules.d
drwxr-xr-x    2 root     root          1024 Dec 25 14:27 .
drwxr-xr-x    6 root     root          1024 Jul 15 12:36 ..
-rw-r--r--    1 root     root             0 Jul 15 12:06 80-net-name-slot.rules
-rw-r--r--    1 root     root           394 Dec 25 14:27 VeCanSetup.rules
-rw-r--r--    1 root     root             0 Dec 25 14:27 VeCanSetup.rules.NO_ORIG
-rw-r--r--    1 root     root           847 Jul 15 12:28 automount.rules
-rw-r--r--    1 root     root           757 Jul 15 12:28 autonet.rules
-rw-r--r--    1 root     root           165 Jul 15 12:28 bluetooth.rules
-rw-r--r--    1 root     root           159 Jul 15 12:28 ether.rules
-rw-r--r--    1 root     root           885 Jul 15 12:06 local.rules
-rw-r--r--    1 root     root           843 Jul 15 12:28 localextra.rules
-rw-r--r--    1 root     root           644 Jul 15 12:28 machine.rules
-rw-r--r--    1 root     root            63 Jul 15 12:28 mtd.rules
-rw-r--r--    1 root     root            51 Jul 15 12:28 rfkill.rules
-rw-r--r--    1 root     root          1634 Jul 15 11:58 serial-starter.rules
-rw-r--r--    1 root     root           590 Jul 15 12:28 simcom.rules
-rw-r--r--    1 root     root           319 Jul 15 12:23 tanksensor.rules
root@raspberrypi2:~# cat /etc/udev/rules.d/VeCanSetup.rules
# udev rules for Waveshare 1-channel CANbus Hat

# replace ...PH (place holder) with actual values
# DELETE the placeholder lines if they aren't used !!
# rename file to e.g., can0.rules

# find interface and connect directly to CANbus port
ACTION=="add", SUBSYSTEM=="net",\
  KERNELS=="spi0.0",\
  NAME="can0",\
  RUN+="/usr/bin/logger [udev] CANbus device added:\
    can0\
    spi0.0\
    "
root@raspberrypi2:~#

@gerd-git
Copy link
Author

root@raspberrypi2:~# cat /data/log/SetupHelper
@40000000631b985d236a372c blind install rcS.local: start
@40000000631b985d2a04b8b4 blind install rcS.local: running blindInstall.sh
@40000000631b985d2a6a2d5c blind install rcS.local: completed
@40000000631b985d2ebb7e4c blindInstall/blindInstall.sh: starting
@40000000631b985f03630314 blindInstall/blindInstall.sh: waiting for dBus settings
@40000000631b9861035e2114 blindInstall/blindInstall.sh: waiting for dBus settings
@40000000631b986f21ccabfc blindInstall/blindInstall.sh: waiting for dBus settings
@40000000631b98731d20719c blindInstall/blindInstall.sh: moving SetupHelper archive into position
@40000000631b98731e59860c blindInstall/blindInstall.sh: removing rcS.local from blind install
@40000000631b98731f1c7c34 blindInstall/blindInstall.sh: installing SetupHelper
@40000000631b987333944ad4 SetupHelper/setup: --- starting setup script v4.23
@40000000631b9874013a75f4 SetupHelper/setup: creating root setup options directory /data/setupOptions
@40000000631b98740215f944 SetupHelper/setup: creating package options directory /data/setupOptions/SetupHelper
@40000000631b98740315ae34 SetupHelper/setup: creating file set for v2.82-large-30
@40000000631b987421d9c774 SetupHelper/setup: installing PackageManager service
@40000000631b987e26617a44 SetupHelper/setup: adding SetupHelper/setup to reinstallScriptsList
@40000000631b987e26db49dc SetupHelper/setup: creating /data/rcS.local
@40000000631b987e283e0a44 SetupHelper/setup: completed - restarting GUI
@40000000631b987e2939c3ac blindInstall/blindInstall.sh: completed
@40000000631b99743296a154 RpiDisplaySetup/setup: --- starting setup script v2.8
@40000000631b9974390db48c RpiDisplaySetup/setup: creating package options directory /data/setupOptions/RpiDisplaySetup
@40000000631b997439c6d714 RpiDisplaySetup/setup: creating file set for v2.82-large-30
@40000000631b99750430edec RpiDisplaySetup/setup: installing RPI Display Backlight overlay
@40000000631b997504f1ffb4 RpiDisplaySetup/setup: install options have not been set - installng overlay and rebooting for auto discovery
@40000000631b9975064f12fc RpiDisplaySetup/setup: adding RpiDisplaySetup/setup to reinstallScriptsList
@40000000631b997507d5d23c RpiDisplaySetup/setup: script will run again at startup
@40000000631b998427e95e7c SetupHelper/reinstallMods: reinstallMods starting
@40000000631b9986003152f4 SetupHelper/reinstallMods: waiting for dBus settings
@40000000631b99883a5d6224 SetupHelper/reinstallMods: waiting for dBus settings
@40000000631b9999342a87c4 RpiDisplaySetup/setup: --- starting setup script v2.8
@40000000631b999a03d963c4 RpiDisplaySetup/setup: auto-discover display type RPI
@40000000631b999a046490ac RpiDisplaySetup/setup: ++ Installing display enhancements for display: RPI
@40000000631b999a06c7021c RpiDisplaySetup/setup: adding disable_overscan
@40000000631b999a07aabee4 RpiDisplaySetup/setup: adding hdmi_blanking
@40000000631b999a0a0c9414 RpiDisplaySetup/setup: updating config.txt
@40000000631b999a0a798a9c RpiDisplaySetup/setup: setting display blanking to /sys/class/backlight/rpi_backlight/bl_power
@40000000631b999a0af4293c RpiDisplaySetup/setup: setting up brightness control: /sys/class/backlight/rpi_backlight
@40000000631b999a0d778c44 RpiDisplaySetup/setup: disabling AutoBrightness
@40000000631b999b25abf584 RpiDisplaySetup/setup: resetting /Settings/Gui/Brightness max for the RPI display (255)
@40000000631b999c20daaadc RpiDisplaySetup/setup: activating local GUI
@40000000631b999c248207fc SetupHelper/reinstallMods: RpiDisplaySetup reinstall requested reboot
@40000000631b999c24f74b84 SetupHelper/reinstallMods: rebooting ...
@40000000631b999c36861394 SetupHelper/reinstallMods: reinstallMods complete
@40000000631b99a327f197f4 SetupHelper/reinstallMods: reinstallMods starting
@40000000631b99a32d00be8c SetupHelper/reinstallMods: reinstallMods complete
@40000000631ba3062834bb74 SetupHelper/reinstallMods: reinstallMods starting
@40000000631ba3062d69f80c SetupHelper/reinstallMods: reinstallMods complete
@40000000631ba3062727b45c SetupHelper/reinstallMods: reinstallMods starting
@40000000631ba3062c5a0eac SetupHelper/reinstallMods: reinstallMods complete
@40000000631ba30627d78fe4 SetupHelper/reinstallMods: reinstallMods starting
@40000000631ba3062ceb428c SetupHelper/reinstallMods: reinstallMods complete
@40000000631c59bf283dc7dc SetupHelper/reinstallMods: reinstallMods starting
@40000000631c59bf2d6646bc SetupHelper/reinstallMods: reinstallMods complete
@40000000631c59bf293022d4 SetupHelper/reinstallMods: reinstallMods starting
@40000000631c59bf2e440074 SetupHelper/reinstallMods: reinstallMods complete
@40000000631c59bf282e00cc SetupHelper/reinstallMods: reinstallMods starting
@40000000631c59bf2d52a364 SetupHelper/reinstallMods: reinstallMods complete
@40000000631c59bf27f1f5b4 SetupHelper/reinstallMods: reinstallMods starting
@40000000631c59bf2d09de7c SetupHelper/reinstallMods: reinstallMods complete
@40000000631c59bf27f489dc SetupHelper/reinstallMods: reinstallMods starting
@40000000631c59bf2d189bec SetupHelper/reinstallMods: reinstallMods complete
@40000000631c59bf27a9cd0c SetupHelper/reinstallMods: reinstallMods starting
@40000000631c59bf2ce1a59c SetupHelper/reinstallMods: reinstallMods complete
@40000000631c59bf280cfbac SetupHelper/reinstallMods: reinstallMods starting
@40000000631c59bf2d35dc34 SetupHelper/reinstallMods: reinstallMods complete
@40000000631c59bf27954b0c SetupHelper/reinstallMods: reinstallMods starting
@40000000631c59bf2cb79414 SetupHelper/reinstallMods: reinstallMods complete
@40000000631c59bf284e8cd4 SetupHelper/reinstallMods: reinstallMods starting
@40000000631c59bf2d73db4c SetupHelper/reinstallMods: reinstallMods complete
@40000000631c59bf287d2684 SetupHelper/reinstallMods: reinstallMods starting
@40000000631c59bf2e13b144 SetupHelper/reinstallMods: reinstallMods complete
@40000000631c59bf27c9ff3c SetupHelper/reinstallMods: reinstallMods starting
@40000000631c59bf2d4df044 SetupHelper/reinstallMods: reinstallMods complete
@40000000631c59bf27f266fc SetupHelper/reinstallMods: reinstallMods starting
@40000000631c59bf2d74e104 SetupHelper/reinstallMods: reinstallMods complete
@40000000631c59bf2864feec SetupHelper/reinstallMods: reinstallMods starting
@40000000631c59bf2d896ebc SetupHelper/reinstallMods: reinstallMods complete
@40000000631c59bf28910c44 SetupHelper/reinstallMods: reinstallMods starting
@40000000631c59bf2db91dc4 SetupHelper/reinstallMods: reinstallMods complete
@40000000631c59bf28f76f34 SetupHelper/reinstallMods: reinstallMods starting
@40000000631c59bf2e21b71c SetupHelper/reinstallMods: reinstallMods complete
@40000000631c59bf28121c2c SetupHelper/reinstallMods: reinstallMods starting
@40000000631c59bf2d3f59e4 SetupHelper/reinstallMods: reinstallMods complete
@40000000631c59bf2b84ec2c SetupHelper/reinstallMods: reinstallMods starting
@40000000631c59bf311d3ff4 SetupHelper/reinstallMods: reinstallMods complete
@40000000631c59bf277a7bc4 SetupHelper/reinstallMods: reinstallMods starting
@40000000631c59bf2c9bda6c SetupHelper/reinstallMods: reinstallMods complete
@40000000632f9071292acf8c SetupHelper/reinstallMods: reinstallMods starting
@40000000632f90712ee09a4c SetupHelper/reinstallMods: reinstallMods complete
@40000000632f90712822603c SetupHelper/reinstallMods: reinstallMods starting
@40000000632f90712d6c74c4 SetupHelper/reinstallMods: reinstallMods complete
@40000000632f907127dfa24c SetupHelper/reinstallMods: reinstallMods starting
@40000000632f90712d46ace4 SetupHelper/reinstallMods: reinstallMods complete
@40000000632f9071284ec76c SetupHelper/reinstallMods: reinstallMods starting
@40000000632f90712d79ab94 SetupHelper/reinstallMods: reinstallMods complete
@40000000632f907127e21734 SetupHelper/reinstallMods: reinstallMods starting
@40000000632f90712d17f00c SetupHelper/reinstallMods: reinstallMods complete
@40000000632f907127d7e5d4 SetupHelper/reinstallMods: reinstallMods starting
@40000000632f90712d5bea64 SetupHelper/reinstallMods: reinstallMods complete
@40000000632f907127bf29cc SetupHelper/reinstallMods: reinstallMods starting
@40000000632f90712cf6a0b4 SetupHelper/reinstallMods: reinstallMods complete
@40000000632f907127955aac SetupHelper/reinstallMods: reinstallMods starting
@40000000632f90712cd97fac SetupHelper/reinstallMods: reinstallMods complete
@40000000632f907127493294 SetupHelper/reinstallMods: reinstallMods starting
@40000000632f90712c99b78c SetupHelper/reinstallMods: reinstallMods complete
@40000000632f9071272d1b2c SetupHelper/reinstallMods: reinstallMods starting
@40000000632f90712c7b1b9c SetupHelper/reinstallMods: reinstallMods complete
@40000000632f907127ab28b4 SetupHelper/reinstallMods: reinstallMods starting
@40000000632f90712ce76644 SetupHelper/reinstallMods: reinstallMods complete
@40000000632f907127341454 SetupHelper/reinstallMods: reinstallMods starting
@40000000632f90712ca62b0c SetupHelper/reinstallMods: reinstallMods complete
@40000000632f907127d06bc4 SetupHelper/reinstallMods: reinstallMods starting
@40000000632f90712d0f4d1c SetupHelper/reinstallMods: reinstallMods complete
@40000000632f907127fac784 SetupHelper/reinstallMods: reinstallMods starting
@40000000632f90712d3aa6c4 SetupHelper/reinstallMods: reinstallMods complete
@40000000632f90712806f89c SetupHelper/reinstallMods: reinstallMods starting
@40000000632f90712d24d8bc SetupHelper/reinstallMods: reinstallMods complete
@40000000632f907127ffccac SetupHelper/reinstallMods: reinstallMods starting
@40000000632f90712d22c57c SetupHelper/reinstallMods: reinstallMods complete
@40000000632f9071277203cc SetupHelper/reinstallMods: reinstallMods starting
@40000000632f90712ca782cc SetupHelper/reinstallMods: reinstallMods complete
@40000000632f90712786bc7c SetupHelper/reinstallMods: reinstallMods starting
@40000000632f90712d1e1644 SetupHelper/reinstallMods: reinstallMods complete
@40000000632f90712812915c SetupHelper/reinstallMods: reinstallMods starting
@40000000632f90712d34c2f4 SetupHelper/reinstallMods: reinstallMods complete
@40000000632f907127b9b744 SetupHelper/reinstallMods: reinstallMods starting
@40000000632f90712ce8548c SetupHelper/reinstallMods: reinstallMods complete
@40000000632f907127e2e63c SetupHelper/reinstallMods: reinstallMods starting
@40000000632f90712d1947cc SetupHelper/reinstallMods: reinstallMods complete
@40000000632f9071281515e4 SetupHelper/reinstallMods: reinstallMods starting
@40000000632f90712d36badc SetupHelper/reinstallMods: reinstallMods complete
@40000000632f907127f04fd4 SetupHelper/reinstallMods: reinstallMods starting
@40000000632f90712d1ef4ec SetupHelper/reinstallMods: reinstallMods complete
@40000000632f9071275392d4 SetupHelper/reinstallMods: reinstallMods starting
@40000000632f90712c793b24 SetupHelper/reinstallMods: reinstallMods complete
@40000000632f907126e6bb8c SetupHelper/reinstallMods: reinstallMods starting
@40000000632f90712c25bc24 SetupHelper/reinstallMods: reinstallMods complete
@40000000632f907127454e7c SetupHelper/reinstallMods: reinstallMods starting
@40000000632f90712c9834d4 SetupHelper/reinstallMods: reinstallMods complete
@40000000632f9071284ed324 SetupHelper/reinstallMods: reinstallMods starting
@40000000632f90712d8af944 SetupHelper/reinstallMods: reinstallMods complete
@40000000632f90712787397c SetupHelper/reinstallMods: reinstallMods starting
@40000000632f90712cbe009c SetupHelper/reinstallMods: reinstallMods complete
@40000000632f907127e2f1f4 SetupHelper/reinstallMods: reinstallMods starting
@40000000632f90712d36d24c SetupHelper/reinstallMods: reinstallMods complete
@40000000633de86b27e7a8fc SetupHelper/reinstallMods: reinstallMods starting
@40000000633de86b2d1c87d4 SetupHelper/reinstallMods: reinstallMods complete
@40000000633df9e112815bac SetupHelper/setup: --- starting setup script v4.23
@40000000633df9e128a48c74 SetupHelper/setup: restarting PackageManager service
@40000000633df9e132264b84 SetupHelper/setup: completed
@40000000633dfa06142bfe6c ShutdownMonitor/setup: --- starting setup script v2.2
@40000000633dfa061c1bde94 ShutdownMonitor/setup: creating file set for v2.82-large-30
@40000000633dfa0621828b6c ShutdownMonitor/setup: ++ Installing ShutdownMonitor
@40000000633dfa062595e8fc ShutdownMonitor/setup: installing ShutdownMonitor service
@40000000633dfa102933a544 ShutdownMonitor/setup: adding ShutdownMonitor/setup to reinstallScriptsList
@40000000633dfa102bbfde04 ShutdownMonitor/setup: completed - GUI restart needed
@40000000633dfa28282588d4 SetupHelper/reinstallMods: reinstallMods starting
@40000000633dfa282f74c014 SetupHelper/reinstallMods: reinstallMods complete
@40000000633dfa28280264bc SetupHelper/reinstallMods: reinstallMods starting
@40000000633dfa282f874a2c SetupHelper/reinstallMods: reinstallMods complete
@40000000633dfa282780b19c SetupHelper/reinstallMods: reinstallMods starting
@40000000633dfa282f0cea0c SetupHelper/reinstallMods: reinstallMods complete
@40000000633dfa282879e67c SetupHelper/reinstallMods: reinstallMods starting
@40000000633dfa282fe106d4 SetupHelper/reinstallMods: reinstallMods complete
@400000006390d9302a7f7e64 SetupHelper/reinstallMods: reinstallMods starting
@400000006390d932012cdd7c SetupHelper/reinstallMods: waiting for dBus settings
@400000006390d9420aadf494 SetupHelper/reinstallMods: waiting for dBus settings
@400000006390d947145880f4 SetupHelper/setup: --- starting setup script v4.23
@400000006390d9471e6712cc SetupHelper/setup: creating file set for v2.89
@400000006390d94806662d0c SetupHelper/setup: installing PackageManager service
@400000006390d9520c58c634 SetupHelper/setup: completed - GUI restart needed
@400000006390d9520cdec6e4 SetupHelper/reinstallMods: SetupHelper reinstall requested GUI restart
@400000006390d9521ee52054 RpiDisplaySetup/setup: --- starting setup script v2.8
@400000006390d95225259afc RpiDisplaySetup/setup: creating file set for v2.89
@400000006390d9522c960a24 RpiDisplaySetup/setup: ++ Installing display enhancements for display: RPI
@400000006390d9522ef52804 RpiDisplaySetup/setup: setting display blanking to /sys/class/backlight/rpi_backlight/bl_power
@400000006390d9522f5ee26c RpiDisplaySetup/setup: setting up brightness control: /sys/class/backlight/rpi_backlight
@400000006390d952317df5c4 RpiDisplaySetup/setup: disabling AutoBrightness
@400000006390d95323a4d314 RpiDisplaySetup/setup: resetting /Settings/Gui/Brightness max for the RPI display (255)
@400000006390d954163f463c RpiDisplaySetup/setup: activating local GUI
@400000006390d95419359ef4 RpiDisplaySetup/setup: completed - GUI restart needed
@400000006390d954199c28f4 SetupHelper/reinstallMods: RpiDisplaySetup reinstall requested GUI restart
@400000006390d9542a9aaf54 ShutdownMonitor/setup: --- starting setup script v2.2
@400000006390d95430b35a94 ShutdownMonitor/setup: creating file set for v2.89
@400000006390d954373239e4 ShutdownMonitor/setup: ++ Installing ShutdownMonitor
@400000006390d95500194e84 ShutdownMonitor/setup: installing ShutdownMonitor service
@400000006390d95f04c2604c ShutdownMonitor/setup: completed - GUI restart needed
@400000006390d95f060173e4 SetupHelper/reinstallMods: ShutdownMonitor reinstall requested GUI restart
@400000006390d95f066b361c SetupHelper/reinstallMods: restarting GUI
@400000006390d95f0711b334 SetupHelper/reinstallMods: reinstallMods complete
@400000006390d930290f5c34 SetupHelper/reinstallMods: reinstallMods starting
@400000006390d93030122124 SetupHelper/reinstallMods: reinstallMods complete
@400000006390d9302931fb7c SetupHelper/reinstallMods: reinstallMods starting
@400000006390d930305ce5c4 SetupHelper/reinstallMods: reinstallMods complete
@400000006390d930297096d4 SetupHelper/reinstallMods: reinstallMods starting
@400000006390d930309b65c4 SetupHelper/reinstallMods: reinstallMods complete
@400000006390d93028c468b4 SetupHelper/reinstallMods: reinstallMods starting
@400000006390d9302ff820e4 SetupHelper/reinstallMods: reinstallMods complete
@400000006390d93028eee3b4 SetupHelper/reinstallMods: reinstallMods starting
@400000006390d9302fe8a7f4 SetupHelper/reinstallMods: reinstallMods complete
@400000006390d93028b95c94 SetupHelper/reinstallMods: reinstallMods starting
@400000006390d9302fd61ddc SetupHelper/reinstallMods: reinstallMods complete
@400000006390d930295736bc SetupHelper/reinstallMods: reinstallMods starting
@400000006390d93030684bbc SetupHelper/reinstallMods: reinstallMods complete
@400000006390d93029c2f8ac SetupHelper/reinstallMods: reinstallMods starting
@400000006390d93030f1bf3c SetupHelper/reinstallMods: reinstallMods complete
@400000006390d9302847d614 SetupHelper/reinstallMods: reinstallMods starting
@400000006390d9302fac3364 SetupHelper/reinstallMods: reinstallMods complete
@400000006390d9302896481c SetupHelper/reinstallMods: reinstallMods starting
@400000006390d9302fb9f6d4 SetupHelper/reinstallMods: reinstallMods complete
@4000000063a7801a05795c0c SetupHelper/setup: --- starting setup script v4.31
@4000000063a7801a1de7ccc4 SetupHelper/setup: restarting PackageManager service
@4000000063a7801a28257934 SetupHelper/setup: completed - GUI restart needed
@4000000063a782ed25d33c34 ShutdownMonitor/setup: --- starting setup script v2.3
@4000000063a782ed2c86cbcc ShutdownMonitor/setup: creating file set for v2.89
@4000000063a782ed32dc4574 ShutdownMonitor/setup: ++ Installing ShutdownMonitor
@4000000063a782ed35d9b2ac ShutdownMonitor/setup: restarting ShutdownMonitor service
@4000000063a782ee01723b4c ShutdownMonitor/setup: completed
@4000000063a7837a1c61e074 RpiDisplaySetup/setup: --- starting setup script v3.3
@4000000063a7837a276ed74c RpiDisplaySetup/setup: ++ Installing display config to /u-boot/config.txt for display: RPI
@4000000063a7837a2941070c RpiDisplaySetup/setup: updating config.txt
@4000000063a7837a2d2ab4bc RpiDisplaySetup/setup: disabling AutoBrightness
@4000000063a7837b1fe15e8c RpiDisplaySetup/setup: resetting /Settings/Gui/Brightness max for the RPI display (255)
@4000000063a7838d2952c21c SetupHelper/reinstallMods: reinstallMods starting
@4000000063a7838d3097cbe4 SetupHelper/reinstallMods: reinstallMods complete
@4000000063a817b90302d9e4 VeCanSetup/setup: --- starting setup script v3.3
@4000000063a817b90ae832bc VeCanSetup/setup: creating package options directory /data/setupOptions/VeCanSetup
@4000000063a817b90bdb60a4 VeCanSetup/setup: Error: new configs not present - can't allow reinstall
@4000000063a817b90c450b6c VeCanSetup/setup: must run setup script from command line and configure ports
@4000000063a817ce0883bdac VeCanSetup/setup: --- starting setup script v3.3
@4000000063a817ce0efbf9c4 VeCanSetup/setup: Error: new configs not present - can't allow reinstall
@4000000063a817ce0f62415c VeCanSetup/setup: must run setup script from command line and configure ports
@4000000063a817e10618729c VeCanSetup/setup: --- starting setup script v3.3
@4000000063a817e10d7ff49c VeCanSetup/setup: Error: new configs not present - can't allow reinstall
@4000000063a817e10de7af4c VeCanSetup/setup: must run setup script from command line and configure ports
@4000000063a817fc0f9cc5d4 VeCanSetup/setup: --- starting setup script v3.3
@4000000063a818110ac1325c VeCanSetup/setup: --- starting setup script v3.3
@4000000063a8186b0011632c VeCanSetup/setup: Hat configuration updated
@4000000063a8188814040fc4 VeCanSetup/setup: installing CANbus ports
@4000000063a818881937508c VeCanSetup/setup: adding udev rules for hat
@4000000063a818881a072f64 VeCanSetup/setup: creating can-bus-bms.hat.config
@4000000063a818881cb2ea8c VeCanSetup/setup: creating vecan-dbus.hat.config
@4000000063a818881faa0a7c VeCanSetup/setup: creating mqtt-n2k.hat.config
@4000000063a818882282f024 VeCanSetup/setup: creating dbus-valence.hat.config
@4000000063a8188825336e0c VeCanSetup/setup: creating dbus-motordrive.hat.config
@4000000063a8188827f3bebc VeCanSetup/setup: updating VeCanSetup udev rules
@4000000063a8188829bc2694 VeCanSetup/setup: updating canbus_ports file
@4000000063a818882c85aea4 VeCanSetup/setup: adding new CAN hat overlay to config.txt
@4000000063a818882eed253c VeCanSetup/setup: adding VeCanSetup/setup to reinstallScriptsList
@4000000063a818a7297c819c SetupHelper/reinstallMods: reinstallMods starting
@4000000063a818a7330564cc SetupHelper/reinstallMods: reinstallMods complete
@4000000063a81ab01d7ae9c4 VeCanSetup/setup: --- starting setup script v3.3
@4000000063a81ad821f2c1fc VeCanSetup/setup: --- starting setup script v3.3
@4000000063a81bb3066d783c VeCanSetup/setup: installing CANbus ports
@4000000063a81bb3088b2c04 VeCanSetup/setup: removing scripts from old version of VeCanSetup
@4000000063a81bb30c5d3ebc VeCanSetup/setup: adding udev rules for hat
@4000000063a81bb30d332874 VeCanSetup/setup: updating VeCanSetup udev rules
@4000000063a81bb30eb2e6bc VeCanSetup/setup: updating canbus_ports file
@4000000063a81bb311d302dc VeCanSetup/setup: removing old CAN hat overlay from config.txt
@4000000063a81bb3129ed2a4 VeCanSetup/setup: adding new CAN hat overlay to config.txt
@4000000063a81bb9052c9f84 VeCanSetup/setup: --- starting setup script v3.3
@4000000063a81bc81165e544 VeCanSetup/setup: installing CANbus ports
@4000000063a81bc813d4705c VeCanSetup/setup: removing scripts from old version of VeCanSetup
@4000000063a81bc8173fbe7c VeCanSetup/setup: adding udev rules for hat
@4000000063a81bc8181ea8e4 VeCanSetup/setup: updating VeCanSetup udev rules
@4000000063a81bc81999b40c VeCanSetup/setup: updating canbus_ports file
@4000000063a81bc81c54e43c VeCanSetup/setup: removing old CAN hat overlay from config.txt
@4000000063a81bc81d431c9c VeCanSetup/setup: adding new CAN hat overlay to config.txt
@4000000063a81bcb19d7de1c VeCanSetup/setup: --- starting setup script v3.3
@4000000063a81be62d8995cc VeCanSetup/setup: installing CANbus ports
@4000000063a81be62fa4a5cc VeCanSetup/setup: removing scripts from old version of VeCanSetup
@4000000063a81be633256c04 VeCanSetup/setup: adding udev rules for hat
@4000000063a81be633eec6e4 VeCanSetup/setup: updating VeCanSetup udev rules
@4000000063a81be635794ee4 VeCanSetup/setup: updating canbus_ports file
@4000000063a81be638a3428c VeCanSetup/setup: removing old CAN hat overlay from config.txt
@4000000063a81be639703b34 VeCanSetup/setup: adding new CAN hat overlay to config.txt
@4000000063a81bf7290a1c74 SetupHelper/reinstallMods: reinstallMods starting
@4000000063a81bf732e8862c SetupHelper/reinstallMods: reinstallMods complete
@4000000063a854c60f5bd8bc VeCanSetup/setup: --- starting setup script v3.3
@4000000063a85997297c819c SetupHelper/reinstallMods: reinstallMods starting
@4000000063a8599733004064 SetupHelper/reinstallMods: reinstallMods complete
@4000000063a859f517f483d4 RpiDisplaySetup/setup: --- starting setup script v3.3
@4000000063a85a4325320e7c RpiDisplaySetup/setup: --- starting setup script v3.3
@4000000063a85a5d2b7075e4 RpiDisplaySetup/setup: ++ Installing display config to /u-boot/config.txt for display: RPI
@4000000063a85a5d2d4d6f5c RpiDisplaySetup/setup: updating config.txt
@4000000063a85a5d31661c4c RpiDisplaySetup/setup: disabling AutoBrightness
@4000000063a85a5e22c6afe4 RpiDisplaySetup/setup: resetting /Settings/Gui/Brightness max for the RPI display (255)
@4000000063a85a8d2918ddcc SetupHelper/reinstallMods: reinstallMods starting
@4000000063a85a8d32e3d30c SetupHelper/reinstallMods: reinstallMods complete
@4000000063a85cae2e8d03dc RpiDisplaySetup/setup: --- starting setup script v3.3
@4000000063a85cba1d977e2c VeCanSetup/setup: --- starting setup script v3.3
@4000000063a85cd91236f0e4 VeCanSetup/setup: deleting hat
@4000000063a85cf91fedce24 VeCanSetup/setup: installing CANbus ports
@4000000063a85cf92249bf84 VeCanSetup/setup: removing scripts from old version of VeCanSetup
@4000000063a85cf9256cc5bc VeCanSetup/setup: removing VeCanSetup udev rules
@4000000063a85cf9271db9ac VeCanSetup/setup: updating canbus_ports file
@4000000063a85d05298be31c SetupHelper/reinstallMods: reinstallMods starting
@4000000063a85d0533566714 SetupHelper/reinstallMods: reinstallMods complete
@4000000063a85d6537dca6cc VeCanSetup/setup: --- starting setup script v3.3
@4000000063a85dab1f52d644 VeCanSetup/setup: Hat configuration updated
@4000000063a85dea20dfb7d4 VeCanSetup/setup: installing CANbus ports
@4000000063a85dea231d6b04 VeCanSetup/setup: removing scripts from old version of VeCanSetup
@4000000063a85dea27133e14 VeCanSetup/setup: adding udev rules for hat
@4000000063a85dea27f14204 VeCanSetup/setup: updating VeCanSetup udev rules
@4000000063a85dea29c52744 VeCanSetup/setup: updating canbus_ports file
@4000000063a85dea2c4628ec VeCanSetup/setup: adding new CAN hat overlay to config.txt
@4000000063a85e4e29a5859c SetupHelper/reinstallMods: reinstallMods starting
@4000000063a85e4e33266dd4 SetupHelper/reinstallMods: reinstallMods complete
root@raspberrypi2:~#

@kwindrem
Copy link
Owner

Doesn't look like my script is installing the correct services: creating vecan-dbus.hat.config. should be creating vecan-dbus.can0. I'll work on a fix

@gerd-git
Copy link
Author

Thank you! I am waiting for your fix.

@kwindrem
Copy link
Owner

I think I fixed it. Made several changes that involve the way the interface is defined and stored in the config directory so I would delete any existing interfaces then add them back in.

Let me know how it goes.

@gerd-git
Copy link
Author

gerd-git commented Dec 26, 2022

after update to v3.4 via package Manager, still no CAN-bus under Services:

root@raspberrypi2:~# cat /u-boot/config.txt
kernel=u-boot.bin

[pi2]
device_tree=bcm2709-rpi-2-b.dtb

[pi3]
device_tree=bcm2710-rpi-3-b.dtb
dtoverlay=miniuart-bt
core_freq=400
core_freq_min=400


[pi3+]
device_tree=bcm2710-rpi-3-b-plus.dtb

[all]
dtparam=spi=on

# no overscan
disable_overscan=1

# allow HDMI display to enter low powr mode
hdmi_blanking=1
#### RpiDisplaySetup begin
disable_overscan=1
lcd_rotate=2
#### RpiDisplaySetup end
#### begin CAN overlay
# Waveshare 1-channel CANbus Hat 12 MHz crystal
# instantiates as can0 ONLY !!!
# use udev rules to rename
[all]
dtparam=spi=on
dtoverlay=mcp2515-can0,oscillator=12000000,interrupt=25,spimaxfrequency=2000000
#### end CAN overlay
root@raspberrypi2:~#
root@raspberrypi2:~# ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,DYNAMIC,UP,LOWER_UP> mtu 1450 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
    link/ether b8:27:eb:e4:e8:96 brd ff:ff:ff:ff:ff:ff
3: can0: <NOARP,ECHO> mtu 16 qdisc noop state DOWN mode DEFAULT group default qlen 10
    link/can
4: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,DYNAMIC,UP> mtu 1450 qdisc pfifo_fast state DOWN mode DORMANT group default qlen 1000
    link/ether b8:27:eb:b1:bd:c3 brd ff:ff:ff:ff:ff:ff
5: ll-eth0@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1450 qdisc noqueue state UP mode DEFAULT group default qlen 1000
    link/ether a2:2a:a8:29:c0:99 brd ff:ff:ff:ff:ff:ff
root@raspberrypi2:~#
root@raspberrypi2:~# /data/VeCanSetup/setup
--- starting setup script v3.4

VeCanSetup adds CANbus ports to the Venus OS system
Raspberry PI includes 0 CANbus ports
2 additional ports may be configured
one single CANbus hat may be configured

Available actions:
  Install and activate (i)
  Reinstall (r) based on options provided at last install
  Uninstall (u) and restores all files to stock
  Quit (q) without further action
  Display setup log (s) outputs the last 100 lines of the log

Choose an action from the list above: u

CANbus interface definitions:
interface: hat ) Waveshare 1-channel CANbus Hat 12 MHz crystal
  can0 spi0.0

Available actions:
  Add a USB interface (a <interface>)
  Delete existing interface (d <interface>)
interface may optionally be added to the action, (e.g. a hat or d 11)
USB interface must be 0 or 1
Hat interface should be entered as 'h' or 'hat'

Choose action from list above or (cr) if done with changes: d hat

deleting hat

no CANbus definitions found
Available actions:
  Add a USB interface (a <interface>)
interface may optionally be added to the action, (e.g. a hat or d 11)
USB interface must be 0 or 1
Hat interface should be entered as 'h' or 'hat'

Choose action from list above or (cr) if done with changes:
installing CANbus ports
removing scripts from old version of VeCanSetup
removing VeCanSetup udev rules
updating canbus_ports file
removing old CAN hat overlay from config.txt

new interfaces will not become active until after a reboot
Reboot system now (y) or do it manually later (n): y

After REBOOT:

root@raspberrypi2:~# cat /u-boot/config.txt
kernel=u-boot.bin

[pi2]
device_tree=bcm2709-rpi-2-b.dtb

[pi3]
device_tree=bcm2710-rpi-3-b.dtb
dtoverlay=miniuart-bt
core_freq=400
core_freq_min=400


[pi3+]
device_tree=bcm2710-rpi-3-b-plus.dtb

[all]
dtparam=spi=on

# no overscan
disable_overscan=1

# allow HDMI display to enter low powr mode
hdmi_blanking=1
#### RpiDisplaySetup begin
disable_overscan=1
lcd_rotate=2
#### RpiDisplaySetup end
root@raspberrypi2:~# ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,DYNAMIC,UP,LOWER_UP> mtu 1450 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
    link/ether b8:27:eb:e4:e8:96 brd ff:ff:ff:ff:ff:ff
3: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,DYNAMIC,UP> mtu 1450 qdisc pfifo_fast state DOWN mode DORMANT group default qlen 1000
    link/ether b8:27:eb:b1:bd:c3 brd ff:ff:ff:ff:ff:ff
4: ll-eth0@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1450 qdisc noqueue state UP mode DEFAULT group default qlen 1000
    link/ether 9e:b8:ba:62:94:71 brd ff:ff:ff:ff:ff:ff
root@raspberrypi2:~#

after another install via package Manager

root@raspberrypi2:~# ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,DYNAMIC,UP,LOWER_UP> mtu 1450 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
    link/ether b8:27:eb:e4:e8:96 brd ff:ff:ff:ff:ff:ff
3: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,DYNAMIC,UP> mtu 1450 qdisc pfifo_fast state DOWN mode DORMANT group default qlen 1000
    link/ether b8:27:eb:b1:bd:c3 brd ff:ff:ff:ff:ff:ff
4: ll-eth0@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1450 qdisc noqueue state UP mode DEFAULT group default qlen 1000
    link/ether d6:60:ff:5d:70:dd brd ff:ff:ff:ff:ff:ff
root@raspberrypi2:~# /data/VeCanSetup/setup
--- starting setup script v3.4

VeCanSetup adds CANbus ports to the Venus OS system
Raspberry PI includes 0 CANbus ports
2 additional ports may be configured
one single CANbus hat may be configured

Available actions:
  Install and activate (i)
  Reinstall (r) based on options provided at last install
  Uninstall (u) and restores all files to stock
  Quit (q) without further action
  Display setup log (s) outputs the last 100 lines of the log

Choose an action from the list above: i

no CANbus definitions found
Available actions:
  Add a USB interface (a <interface>)
interface may optionally be added to the action, (e.g. a hat or d 11)
USB interface must be 0 or 1
Hat interface should be entered as 'h' or 'hat'

Choose action from list above or (cr) if done with changes: a hat
1 ) Canberry Hat (1-channel)
2 ) PiCAN-M Rev B 2.0 Hat (1 CAN-bus, 1 RS422 channel)
3 ) PiCAN-M Rev B 2.0 Hat (1 CAN-bus, 1 RS422 channel)
4 ) PiCAN Hat (1-channel)
5 ) Waveshare 1-channel CANbus Hat 12 MHz crystal
6 ) Waveshare 1-channel CANbus Hat 8 MHz crystal
7 ) Waveshare 2-channel CANbus (non FD) Hat
8 ) Waveshare 2-channel CANbus FD Hat

Choose the Hat configuration from the list above (by number) (cr to skip): 5
selected interface: Waveshare 1-channel CANbus Hat 12 MHz crystal

Waveshare 1-channel CANbus Hat 12 MHz crystal
  can0  spi0.0

Install interface as shown above (y/n)?: y
adding CANbus hat
Hat configuration updated

CANbus interface definitions:
interface: hat ) Waveshare 1-channel CANbus Hat 12 MHz crystal
  can0 spi0.0

Available actions:
  Add a USB interface (a <interface>)
  Delete existing interface (d <interface>)
interface may optionally be added to the action, (e.g. a hat or d 11)
USB interface must be 0 or 1
Hat interface should be entered as 'h' or 'hat'

Choose action from list above or (cr) if done with changes:
installing CANbus ports
removing scripts from old version of VeCanSetup
adding udev rules for hat
updating VeCanSetup udev rules
updating canbus_ports file
adding new CAN hat overlay to config.txt
creating can-bus-bms.can0
creating vecan-dbus.can0
creating mqtt-n2k.can0
creating dbus-valence.can0
creating dbus-motordrive.can0

new interfaces will not become active until after a reboot
Reboot system now (y) or do it manually later (n): y

Now there is a "CAN-bus (1)" under services!

THANK YOU!!!!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants