OpenMarine

Full Version: SeatalkNG/N2K to USB interface
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm attempting to use a CAN-USB analyzer (RS485 - RS232/USB) UART to combine my SeaTalkNG network into openplotter. Reports from reviews say this unit works seamlessly with other CAN-BUS networks.

https://www.seeedstudio.com/USB-CAN-Anal...-2888.html



I have CAN high, CAN low and GND hooked up to STNG spur and can see data being received in RealTerm (serial terminal) under windows. I believe CAN-BUS is a binary communication, binary view mode in RealTerm looks "healthy".

In openplotter I can add the device as a CAN-USB, but there's no data populating into OP (RX light on interface always flashing with activity STNG/n2k network)

Am I missing something? Is there something special that the Open Plotter CAN-USB stick does that a regular CAN interface like this doesn't? Guessing OP is missing a step ie. the transport layer?
The protocol of the device isn't compatible with actisense or slcan.
If you are familiar with stm32F103 and know what pins are used for serialport and canport you can try to install slcan on it (https://github.com/GBert/misc.git).
(2020-01-08, 03:02 PM)e-sailing Wrote: [ -> ]The protocol of the device isn't compatible with actisense or slcan.
If you are familiar with stm32F103 and know what pins are used for serialport and canport you can try to install slcan on it (https://github.com/GBert/misc.git).

I see, you're saying if I can get the device into bootloader mode and upload the slcan .hex (possibly need to modify pin configs and recompile) it could work?

It's running the MCP2551, stm32f103c8t6 and CH34OC.

Here's a photo of the layout.

https://imgshare.io/image/img-20200109-231636.J9hzu
Ok, so I've mapped out this PCB... Found Boot0 and jumped into bootloader mode. Now able to flash any Arduino IDE programs onto it along with .hex through ST demonstrator program. I/O's, LEDs, etc work.

With simple code I'm able to pass through raw binary from CANBUS to Serial0 and into a terminal. Very promising!
https://photos.app.goo.gl/cVDBwyihxfbTVyHT8

I've tried loading ActisenseListenerSender.ino from the NMEA2000 lib, it compiles and loads fine but doesn't function due to incorrect pin assignments for CAN-BUS.
https://github.com/ttlappalainen/NMEA200...Sender.ino

Could anyone help to figure out re-assignment of pins in the NMEA2000 lib?

Here's the relevant pinout:

STM32 Pin30 / PA9 / USART1_Tx <-> CH340C(usb cont.)/Rxd (serial0)
STM32 Pin31 / PA10 / USART1_Rx <-> CH340C(usb cont.)/Txd (serial0)
STM32 Pin32 / PA11 / CAN_Rx <-> MCP2561(canbus transceiver)/Pin1/Txd
STM32 Pin33 / PA12 / CAN_Tx <-> MCP2561(canbus transceiver)/Pin4/Rxd