arsi-apli / CanFdToSerial

Serial port emulation over CAN FD bus.
GNU Lesser General Public License v3.0
8 stars 0 forks source link

Install instructions. #3

Open Unjun357 opened 3 years ago

Unjun357 commented 3 years ago

I have the can bus hat installed. I installed the RPI code for the Canfdtoserial. But not sure how to make the changes to Klipper for this to work. Can you provide any assistance. Sorry for contacting you here not sure how to contact you otherwise.

arsi-apli commented 3 years ago

The problem is that I haven't completely finished the Duet 3 Toolboard1LC port for Klipper. It's completely functional on the previous version of the clipper, but in the meantime a new version of the Klipper firmware was published and I didn't have time to add those new things.. If you want, I can send you a hex file for the toolboard and instructions how to upload it. arsi(at)arsi.sk

This is my configuration: Just the Z leveling sensor needs to be connected to the main MCU, this is a limitation of Klipper fw a USB 3.1 cable can be used power+CAN FD+Z senzor

[mcu head0]
serial: /tmp/ttyCAN0MCU1
restart_method = command

[extruder]
step_pin: head0:PA27
dir_pin: head0:PA28
enable_pin: !head0:PB2
step_distance: .00125
max_extrude_cross_section: 50.0
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: head0:PA11
sensor_type: NTC 100K beta 3950
sensor_pin: head0:PB9
pullup_resistor: 2200
min_temp: 0
max_temp: 400
pressure_advance: 0.015
max_extrude_only_velocity: 300
max_extrude_only_accel: 1000
max_extrude_only_distance: 200

[tmc2209 extruder]
diag_pin: head0:PB3
uart_pin: head0:PA20
tx_pin: head0:PA22
microsteps: 32
run_current:  0.7
hold_current: 0.400
stealthchop_threshold: 0
interpolate: False

[fan]
pin: head0:PA10

[temperature_sensor VSSA_PT1000]
sensor_type: PT1000
sensor_pin: head0:PB8

[temperature_sensor VREF_PT1000]
sensor_type: PT1000
sensor_pin: head0:PA7
Unjun357 commented 3 years ago

Yes please I would be interested in the hex. If I understand u could go back to the older klipper version and it all work correctly?

arsi-apli commented 3 years ago

Yes, at least everything works fine for me. If I have time, I'll prepare it for you tomorrow. But don't forget to add sections VSSA_PT1000, VREF_PT1000 to the config, otherwise the temperature measurement will not work .

arsi-apli commented 3 years ago

So finally I did it now: http://server.arsi.sk/toolboard.tar.gz To be sure, use everything from the archive, I don't know if the CanFdToSerial sources are current ..

And as I wrote, the Z leveling sensor must be connected to the main MCU

Unjun357 commented 3 years ago

 

I appreciate you sending me the files. However my skill level must be below doing this. I tried the following

 

  1. Installed the klipper from the package you included. Replacing the files in the home\pi\klipper folder with the ones from the home\pi\CanFdToSerial\klipper\generic. the following files are what I replaced.

 

1.  can_fd_support.c

2.  can_fd_support.h

4.  command.h

 

I also did the main.c file from home\pi\CanFdToSerial to the klipper folder

 

I setuo the Waveshare MCP2515 as per the instructions for the device and I get the following.

 

CAN interface init.. ip link set can0 down ip link set can0 up type can bitrate 1000000   dbitrate 1000000 restart-ms 1000 berr-reporting on fd on RTNETLINK answers: Operation not supported setsockopt: No such file or directory New ptyname /dev/pts/2 linked to /tmp/ttyCAN0MCU1 Error sending command via CAN FD!: Network is down

 

If I do a

 

 

pi@raspberrypi:~ $ dmesg | grep -i '(can|spi)' [    8.458596] CAN device driver interface [    8.478103] mcp251x spi0.0 can0: MCP2515 successfully initialized. [   49.998290] can: controller area network core [   50.033364] can: raw protocol

 

 

It appears my 25115 is working but I am lost at this point and the firmware install has connection issues also. I am using the same wiring and power I had connected to the duet 3 and canH and canL connected to the MCP2515.

 

It seems like this might be a dead project for you and I understand if it is.

 

 

Andrew Jenkins

 

 

 

 

Sent: Tuesday, February 16, 2021 at 9:57 AM From: "Arsi" notifications@github.com To: "arsi-apli/CanFdToSerial" CanFdToSerial@noreply.github.com Cc: "Unjun357" Phospherus@mail.com, "Author" author@noreply.github.com Subject: Re: [arsi-apli/CanFdToSerial] Install instructions. (#3)

 

So finally I did it now: http://server.arsi.sk/toolboard.tar.gz To be sure, use everything from the archive, I don't know if the CanFdToSerial sources are current

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

arsi-apli commented 3 years ago

But the MCP2515 is only CAN, it does not support CAN FD . I use this: https://wiki.seeedstudio.com/2-Channel-CAN-BUS-FD-Shield-for-Raspberry-Pi/

Unjun357 commented 3 years ago

Well that explains it. I will get the proper board and report back.