Duet 2 Ethernet and SBC
-
I use 360 Ohms in MISO MOSI and SPCK. No additional resistors on NPSC0 and EDR because the duet 2 already have 2.2kOhms on board.
I am using a RPI 3:
Boot config:
GNU nano 3.2 /boot/config.txt # For more options and information see # http://rpf.io/configtxt # Some settings may impact device functionality. See link above for details # uncomment if you get no picture on HDMI for a default "safe" mode #hdmi_safe=1 # uncomment this if your display has a black border of unused pixels visible # and your display can output without overscan #disable_overscan=1 # uncomment the following to adjust overscan. Use positive numbers if console # goes off screen, and negative if there is too much border #overscan_left=16 #overscan_right=16 #overscan_top=16 #overscan_bottom=16 # uncomment to force a console size. By default it will be display's size minus # overscan. #framebuffer_width=1280 #framebuffer_height=720 # uncomment if hdmi display is not detected and composite is being output #hdmi_force_hotplug=1 # uncomment to force a specific HDMI mode (this will force VGA) #hdmi_group=1 #hdmi_mode=1 # uncomment to force a HDMI mode rather than DVI. This can make audio work in # DMT (computer monitor) modes #hdmi_drive=2 # uncomment to increase signal to HDMI, if you have interference, blanking, or # no display #config_hdmi_boost=4 # uncomment for composite PAL #sdtv_mode=2 #uncomment to overclock the arm. 700 MHz is the default. #arm_freq=800 # Uncomment some or all of these to enable the optional hardware interfaces #dtparam=i2c_arm=on #dtparam=i2s=on dtparam=spi=on # Uncomment this to enable infrared communication. #dtoverlay=gpio-ir,gpio_pin=17 #dtoverlay=gpio-ir-tx,gpio_pin=18 # Additional overlays and parameters are documented /boot/overlays/README # Enable audio (loads snd_bcm2835) dtparam=audio=on [pi4] # Enable DRM VC4 V3D driver on top of the dispmanx display stack dtoverlay=vc4-fkms-v3d max_framebuffers=2 [all] #dtoverlay=vc4-fkms-v3d
/opt/dsf/conf/config.json:
{ "LogLevel": "info", "SocketDirectory": "/var/run/dsf", "SocketFile": "dcs.sock", "Backlog": 4, "SocketPollInterval": 2000, "BaseDirectory": "/opt/dsf/sd", "NoTerminateOnReset": false, "HostUpdateInterval": 4000, "MaxMessageAge": 60, "SpiDevice": "/dev/spidev0.0", "SpiFrequency": 8000000, "SpiTransferTimeout": 500, "MaxSpiRetries": 3, "SpiPollDelay": 25, "GpioChipDevice": "/dev/gpiochip0", "TransferReadyPin": 25, "BufferedPrintCodes": 32, "BufferedMacroCodes": 16, "MaxBufferSpacePerChannel": 1536, "ModelUpdateInterval": 250, "MaxMachineModelLockTime": -1, "FileBufferSize": 8192, "FileInfoReadLimitHeader": 12288, "FileInfoReadLimitFooter": 262144, "MaxLayerHeight": 0.9, "LayerHeightFilters": [ { "Pattern": "^\\s*layer_height\\D+(?<mm>(\\d+\\.?\\d*))", "Options": 17 }, { "Pattern": "Layer height\\D+(?<mm>(\\d+\\.?\\d*))", "Options": 17 }, { "Pattern": "layerHeight\\D+(?<mm>(\\d+\\.?\\d*))", "Options": 17 }, { "Pattern": "layer_thickness_mm\\D+(?<mm>(\\d+\\.?\\d*))", "Options": 17 }, { "Pattern": "layerThickness\\D+(?<mm>(\\d+\\.?\\d*))", "Options": 17 } ], "FilamentFilters": [ { "Pattern": "filament used\\D+(((?<mm>\\d+\\.?\\d*)mm)(\\D+)?)+", "Options": 17 }, { "Pattern": "filament used\\D+(((?<m>\\d+\\.?\\d*)m([^m]|$))(\\D+)?)+", "Options": 17 }, { "Pattern": "filament length\\D+(((?<mm>\\d+\\.?\\d*)\\s*mm)(\\D+)?)+", "Options": 17 }, { "Pattern": "filament used \\[mm\\]\\D+((?<mm>\\d+\\.?\\d*)(\\D+)?)+", "Options": 17 { "Pattern": "material\\#\\d+\\D+(?<mm>\\d+\\.?\\d*)", "Options": 17 }, { "Pattern": "Filament used per extruder:\\r\\n;\\s*(?<name>.+)\\s+=\\s*(?<mm>[0-9.]+)", "Options": 17 } ], "GeneratedByFilters": [ { "Pattern": "generated by\\s+(.+)", "Options": 17 }, { "Pattern": "Sliced by\\s+(.+)", "Options": 17 }, { "Pattern": "(KISSlicer.*)", "Options": 17 }, { "Pattern": "Sliced at:\\s*(.+)", "Options": 17 }, { "Pattern": "Generated with\\s*(.+)", "Options": 17 } ], "PrintTimeFilters": [ { "Pattern": "estimated printing time .*= ((?<h>(\\d+))h\\s*)?((?<m>(\\d+))m\\s*)?((?<s>(\\d+))s)?", "Options": 17 }, { "Pattern": "TIME:(?<s>(\\d+\\.?\\d*))", "Options": 17 }, { "Pattern": "Build time: ((?<h>\\d+) hour(s)?\\s*)?((?<m>\\d+) minute(s)?\\s*)?((?<s>(\\d+) second(s)?))?", "Options": 17 }, { "Pattern": "Estimated Build Time:\\s+((?<h>(\\d+\\.?\\d*)) hour(s)?\\s*)?((?<m>(\\d+\\.?\\d*)) minute(s)?\\s*)?((?<s>(\\d+\\.?\\d*)) second(s)?)?", "Options": 17 } ], "SimulatedTimeFilters": [ { "Pattern": "Simulated print time\\D+(?<s>(\\d+\\.?\\d*))", "Options": 17 } ] }
Where do I find the config jsons ?
-
@smoki3 said in Duet 2 Ethernet and SBC:
Where do I find the config jsons
in /opt/dsf/conf/config.json
-
@bearer but the have to be two as far I got it right
-
@smoki3 The second file
http.json
is for the DWS (Duet Web Server) not relevant for the problem here.This is a shot in the dark but please try adding
# Fix core frequency to have constant SPI clock speed core_freq=250 core_freq_min=250
to your
/boot/config.txt
and reboot the RPi. It might be that Duet 2 does not like RPi's default SPI frequency shenanigans (neither do I ) -
@wilriker said in Duet 2 Ethernet and SBC:
@smoki3 The second file
http.json
is for the DWS (Duet Web Server) not relevant for the problem here.This is a shot in the dark but please try adding
# Fix core frequency to have constant SPI clock speed core_freq=250 core_freq_min=250
to your
/boot/config.txt
and reboot the RPi. It might be that Duet 2 does not like RPi's default SPI frequency shenanigans (neither do I )So this doesn't help. Same behaviour as before
It wired because it only happens while homing. -
If I try to flash the firmware over DWC I also get checksum error
ed [warn] Bad header checksum (expected 0x40cc, got 0xe30e) [warn] Note: RepRapFirmware didn't receive valid data either (code 0x00000004) [warn] Bad header checksum (expected 0xc340, got 0xa71d) [warn] Note: RepRapFirmware didn't receive valid data either (code 0x00000004) [warn] Bad header checksum (expected 0x40cc, got 0xcdbd) [warn] Note: RepRapFirmware didn't receive valid data either (code 0x00000004) [warn] Restarting transfer because the number of maximum retries has been exceeded [warn] Bad header checksum (expected 0x0040, got 0x5620) [warn] Note: RepRapFirmware didn't receive valid data either (code 0x0002005f) [warn] Bad header checksum (expected 0x0000, got 0x4260) [warn] Note: RepRapFirmware didn't receive valid data either (code 0x0002005f) [warn] Bad header checksum (expected 0x0000, got 0x4260) [warn] Note: RepRapFirmware didn't receive valid data either (code 0x0002005f) [warn] Restarting transfer because the number of maximum retries has been exceeded [info] Flashing RepRapFirmware [info] Verifying checksum [error] Firmware checksum verification failed [info] Flashing RepRapFirmware [info] Verifying checksum [error] Firmware checksum verification failed [info] Flashing RepRapFirmware [info] Verifying checksum [error] Could not flash the firmware binary after 3 attempts. Please install it manually via bossac. [warn] Bad header checksum (expected 0x80ac, got 0xbe3b) [warn] Note: RepRapFirmware didn't receive valid data either (code 0x0002005f) [info] Application has shut down
-
how long is the cable used, and what type of cable is it?
-
@bearer it's a normal ribbon cable with a length of 8cm
-
@smoki3 said in Duet 2 Ethernet and SBC:
8cm
should be okay, still try lowering
"SpiFrequency": 8000000,
to say 2000000 in/opt/dsf/conf/config.json
and restart DCS (sudo systemctl restart duetcontrolserver
) ? -
IAP is fixed now also on
master
branch. -
@wilriker said in Duet 2 Ethernet and SBC:
IAP is fixed now also on master branch.
btw i think there was a slight hickup with it refusing M997 S0 - but can't reproduce it after it did update with both DWC asking to update and M997 without S0.
-
@bearer Since there is only one type of firmware to update it is unnecessary to provide a
Snnn
parameter toM997
in the first place but I agree that it should not result in either a warning or worse an error. If you can reproduce it, please post here. -
@smoki3 said in Duet 2 Ethernet and SBC:
If I try to flash the firmware over DWC I also get checksum error
If everything is working as expected you should not get any checksum errors at all. If you get them more than once something is still wrong.
Have you made sure that both the Duet 2 and the Raspberry Pi share a common ground connection? -
-
@wilriker said in Duet 2 Ethernet and SBC:
@smoki3 said in Duet 2 Ethernet and SBC:
If I try to flash the firmware over DWC I also get checksum error
If everything is working as expected you should not get any checksum errors at all. If you get them more than once something is still wrong.
Have you made sure that both the Duet 2 and the Raspberry Pi share a common ground connection?Yes both are connected directly to ground
-
I tried now different cables, direct wiring without PCB and 470ohm resistors.
But always the same issue.
Also tried now without resistors, same issue
-
@T3P3Tony said in Duet 2 Ethernet and SBC:
We are considering a small hardware board to provide the physical interfacing and signal buffering.
if the series resistance is deemed all that is needed, then a few crimps and a printed part goes a long way:
Btw, is there a part# for the nylon stand offs? gonna try a pogo-pin version for the Wifi -
Jeez. I take some time off and this happens.
-
@wilriker
Today I am back from holidays. I tried to investigate a bit more but it does not help. I disassembled the Duet 2 Ethernet from my printer so I have no other cables in the near of the board. I also made a new cable out of a shielded ethernet cable to avoid any EMC troubles. But still the same. If I try to flash the firmware for example I get many checksum errors.@bearer
are you now able to flash the firmware over DWC? I always get checksum error. -
@smoki3 said in Duet 2 Ethernet and SBC:
are you now able to flash the firmware over DWC?
with both the Wifi and Ethernet (Duets) yes