kwindrem / VeCanSetup

Manages Victrion VenusOs VeCan (aka CANbus) ports
46 stars 6 forks source link

Choose action from list above: hat invalid action, please try again #44

Closed Nvanderbeek closed 1 month ago

Nvanderbeek commented 1 month ago

when I run command line to install the CAN port connected to GPI 8,9,10,11,25 on my waveshare https://www.waveshare.com/wiki/CM4-IO-WIRELESS-BASE-B it has Waveshare 1-channel CANbus 16 MHz crystal, I selected this for installation.

Choose an action from the list above: i

**no CANbus definitions found**
Available actions:
  Add a USB interface (a <interface>)
  blank line if done with changes

interface may optionally be added to the action, (e.g. a hat or d 11)
USB interface must be 10 or greater
Hat interface should be entered as 'h' or 'hat'

Choose action from list above: 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 16 MHz crystal
7 ) Waveshare 1-channel CANbus Hat 8 MHz crystal
8 ) Waveshare 2-channel CANbus (non FD) Hat
9 ) Waveshare 2-channel CANbus FD Hat

Choose the Hat configuration from the list above (by number) (cr to skip):

the no CAN bus found is probably caused by my entry in the config:

dtparam=spi=on
dtoverlay=mcp2515-can0,oscillator=16000000,interrupt=25

when removing of comment out the lines in the config.txt

--- starting setup script v3.14 action: NONE

VeCanSetup adds CANbus ports to the Venus OS system
Raspberry PI includes 0 CANbus ports
an unlimited number of USB ports may be configured
one single or dual CANbus hat may be configured

Available actions:
  Install and activate (i)
  Uninstall (u) and restores all files to stock
  Quit (q) without further action
  Display log (l) 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>)
  blank line if done with changes

interface may optionally be added to the action, (e.g. a hat or d 11)
USB interface must be 10 or greater
Hat interface should be entered as 'h' or 'hat'

Choose action from list above: 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 16 MHz crystal
7 ) Waveshare 1-channel CANbus Hat 8 MHz crystal
8 ) Waveshare 2-channel CANbus (non FD) Hat
9 ) Waveshare 2-channel CANbus FD Hat

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

Enter optional name for the CANbus port on this Hat (cr for none): CAN
Waveshare 1-channel CANbus Hat 16 MHz crystal
  CAN (can8)  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 16 MHz crystal
  CAN (can8) can8 spi0.0

check if it works:

root@raspberrypi4:~# dmesg | grep spi0
[    5.578533] mcp251x spi0.0 can0: MCP2515 successfully initialized.
[    5.626171] mcp251x spi0.0 can8: renamed from can0
root@raspberrypi4:~# 
kwindrem commented 1 month ago

Is this working or is something still wrong?

I don't recall how I check for CANbus hats but this would usually result in the script reporting the hat interface. As you say it could be because you manually entered the lines in config.txt.

Nvanderbeek commented 1 month ago

Yes, it is working. After removing the line

Op ma 16 sep 2024 00:34 schreef kwindrem @.***>:

Is this working or is something still wrong?

I don't recall how I check for CANbus hats but this would usually result in the script reporting the hat interface. As you say it could be because you manually entered the lines in config.txt.

— Reply to this email directly, view it on GitHub https://github.com/kwindrem/VeCanSetup/issues/44#issuecomment-2351815894, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIFPJJQZSSU7RVNYTY6IJLDZWYDPZAVCNFSM6AAAAABOHVKFUKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNJRHAYTKOBZGQ . You are receiving this because you authored the thread.Message ID: @.***>