OpenMarine
Canbus without USB - Printable Version

+- OpenMarine (https://forum.openmarine.net)
+-- Forum: OpenPlotter (https://forum.openmarine.net/forumdisplay.php?fid=1)
+--- Forum: General discussion (https://forum.openmarine.net/forumdisplay.php?fid=2)
+--- Thread: Canbus without USB (/showthread.php?tid=2947)



Canbus without USB - jamos.tan@gmail.com - 2020-09-19

Looking for a CANBUS shield to connect directly onto the GPIO of the Pi, but, I'd need to get the device onto the /dev/tty port.
How can I accomplish this? I know there are easy USB solutions, but I want something more robust.

I've found several shields / hats that can talk through SPI, but after OP1 I didn't see any SPI support anymore. 
I did some searching on how to get SPI devices emulated onto a /dev/tty port, but I'm really not sure if this is the way to go:https://www.itdev.co.uk/blog/emulating-serial-port-unix

Maybe someone has an easy solution to get a canbus without USB to a tty port so I can assign it in openplotter?


RE: Canbus without USB - Sailoog - 2020-09-24

OpenPlotter is ready to use any board using the MCP2515 chip like these:

Tested: http://www.industrialberry.com/canberrydual-v2-1/
Not tested: https://www.aliexpress.com/item/4000605481017.html

You just need the openplotter-can app and use the MCP2515 tab


RE: Canbus without USB - jamos.tan@gmail.com - 2020-10-02

Hi, I see the devices on the MCP2515 tab, but I cannot add them to a SignalK connection because the buttons are greyed out.
Before I used the /boot/config.txt and added dtoverlay=mcp2515-can0,oscillator=12000000,interrupt=25,spimaxfrequency=2000000
Then I could add can0 to SignalK as a NMEA2000 connection.

What do I need to do? Enable or disable the dtoverlay?
Add the can0 connection in SignalK manually?


RE: Canbus without USB - Sailoog - 2020-10-02

openplotter CAN Bus app will do all the job for you but just now I realized that board is oscillator=12000000 and we allow only 8000000 and 16000000. This should be fixed.

until we fix this you should do:

- remove any signal k connection and any device you have set in CAN bus app.
- remove the overlay from /boot/config.txt
- reset
- create a device in CAN Bus app using SPI0, interrupt 25 and oscillator 16000000.
- go to /boot/config.txt and the overlay should have been created again, replace 16000000 by 12000000
- reset
- now you should be able to create a signal k connection from CAN Bus app selecting the device.


RE: Canbus without USB - Sailoog - 2020-10-06

please report results


RE: Canbus without USB - jamos.tan@gmail.com - 2020-10-06

Sorry for the delay, the instruction was perfect, all is fine.


RE: Canbus without USB - Sailoog - 2020-10-09

OK, thanks for reporting, 12000000 oscillators are already added to openplotter-can next release


RE: Canbus without USB - jamos.tan@gmail.com - 2020-10-09

You guys are the best!