Duet 2 Ethernet and SBC
-
@bearer said in Duet 2 Ethernet and SBC:
@smoki3 said in Duet 2 Ethernet and SBC:
With SBC there is no SD card needed in the duet right?
it explicitly needs to not have a SD card with a config.g on it.
I got it I removed the SD Card now my config is working
-
@wilriker said in Duet 2 Ethernet and SBC:
@Dougal1957 DSF is absolutely the same. It does neither know nor care if it's a D3 or a D2 on the other end.
not 100% accurate .. if one were to suffer from pendanticitis(?) .. upon first connection it says "Welcome to your new Duet 3" .
...good thing i don't
-
@bearer Have you found a solution building DuetIAP?
maybe @wilriker can help us?
-
@smoki3 said in Duet 2 Ethernet and SBC:
@bearer Have you found a solution building DuetIAP?
sort of; wait for 3.2 release candidates as I don't really need it.
I just send
M997 P"ERASE"
M999 P"ERASE"
and upload firmware with bossac from the pi. -
@bearer said in Duet 2 Ethernet and SBC:
I just send
M997 P"ERASE"
and upload firmware with bossac from the pi.It's actually
M999 P"ERASE"
.Anyway, I remember I had that compiler error as well. I just don't remember what I did to fix that. I can most likely only check on Monday in more detail. Meanwhile I try to upload my IAP binary to Dropbox and then share here.
EDIT: find the IAP here: https://www.dropbox.com/s/rkcb3chqk878nkm/Duet2_SBCiap_2SBC.bin?dl=0
-
@wilriker said in Duet 2 Ethernet and SBC:
It's actually M999 P"ERASE".
'aint that the truth, I should stick to copy/paste. luckily there is always a pedantic around:)
-
@smoki3 said in Duet 2 Ethernet and SBC:
../src/Libraries/Fatfs/diskio.c:51:10: fatal error: ctrl_access.h: No such file or directory 51 | #include "ctrl_access.h" | ^~~~~~~~~~~~~~~ compilation terminated. make: *** [src/Libraries/Fatfs/diskio.o] Error 1 make: *** Waiting for unfinished jobs....
I get this when I try to build DuetIAP. Building in mac.
That's a victim of recent refactorings. Currently looking into how to fix it best.
-
@dc42 @wilriker
After some testing with the sbc configuration, I have problems with homing my tool changer.I have configured 3 additional axes. However I do a home all, all axes getting homes besides the last "W" axes and the printer hangs forever. After some time the printer then resets itself automatically.
If I home all axes separately it is working fine so far. Also the whole configuration what working fine before.
I also made a short video:
https://photos.app.goo.gl/1YnQmdPAnkXtDG2X8Is there a possibility to grab logs why it is crashing?
UPDATE:
[info] Starting macro file /sys/homew.g on channel Aux [warn] Lost connection to Duet (Timeout while waiting for transfer ready pin) [warn] Bad header checksum (expected 0x0000, got 0xb5c3) [warn] Note: RepRapFirmware didn't receive valid data either (code 0x00000005) [warn] Bad header checksum (expected 0x0000, got 0xb5c3) [warn] Note: RepRapFirmware didn't receive valid data either (code 0x00000005) [warn] Bad header checksum (expected 0x0000, got 0xb5c3) [warn] Note: RepRapFirmware didn't receive valid data either (code 0x00000005) [warn] Restarting transfer because the number of maximum retries has been exceeded [warn] Bad header checksum (expected 0x0000, got 0xb5c3) [warn] Note: RepRapFirmware didn't receive valid data either (code 0x00000005) [warn] Bad header checksum (expected 0x0000, got 0x7532) [warn] Note: RepRapFirmware didn't receive valid data either (code 0x00000005) [warn] Note: RepRapFirmware didn't receive valid data either (code 0x00000005) [warn] Bad header checksum (expected 0x0000, got 0x606a) [warn] Note: RepRapFirmware didn't receive valid data either (code 0x00000005) [warn] Restarting transfer because the number of maximum retries has been exceeded [warn] Bad header checksum (expected 0x0000, got 0x606a) [warn] Note: RepRapFirmware didn't receive valid data either (code 0x00000005) [warn] Bad header checksum (expected 0x0000, got 0x006d) [warn] Note: RepRapFirmware didn't receive valid data either (code 0x00000005) [warn] Bad header checksum (expected 0x0000, got 0x006d) [warn] Note: RepRapFirmware didn't receive valid data either (code 0x00000005) [warn] Restarting transfer because the number of maximum retries has been exceeded [warn] Bad header checksum (expected 0x0000, got 0x606a) [warn] Note: RepRapFirmware didn't receive valid data either (code 0x00000005) [warn] Bad header checksum (expected 0x0000, got 0xcacc) [warn] Note: RepRapFirmware didn't receive valid data either (code 0x00000005) [warn] Bad header checksum (expected 0x0000, got 0x6ac5) [warn] Note: RepRapFirmware didn't receive valid data either (code 0x00000005) [warn] Restarting transfer because the number of maximum retries has been exceeded [warn] Bad header checksum (expected 0x0000, got 0x606a) [warn] Note: RepRapFirmware didn't receive valid data either (code 0x00000005) [warn] Bad header checksum (expected 0x0000, got 0xa075) [warn] Note: RepRapFirmware didn't receive valid data either (code 0x00000005) [warn] Bad header checksum (expected 0x0000, got 0x006d) [warn] Note: RepRapFirmware didn't receive valid data either (code 0x00000005) [warn] Restarting transfer because the number of maximum retries has been exceeded [warn] Bad header checksum (expected 0x0000, got 0x606c) [warn] Note: RepRapFirmware didn't receive valid data either (code 0x00000005) [warn] Bad header checksum (expected 0x0000, got 0xaacb) [warn] Note: RepRapFirmware didn't receive valid data either (code 0x00000005) [warn] Bad header checksum (expected 0x0000, got 0xa075) [warn] Note: RepRapFirmware didn't receive valid data either (code 0x00000005) [warn] Restarting transfer because the number of maximum retries has been exceeded [warn] Bad header checksum (expected 0x0000, got 0x606a) [warn] Note: RepRapFirmware didn't receive valid data either (code 0x00000005) [warn] Bad header checksum (expected 0x0000, got 0xaacb) [warn] Note: RepRapFirmware didn't receive valid data either (code 0x00000005) [warn] Bad header checksum (expected 0x0000, got 0xaacb) [warn] Note: RepRapFirmware didn't receive valid data either (code 0x00000005) [warn] Restarting transfer because the number of maximum retries has been exceeded [warn] Bad header checksum (expected 0x0000, got 0xc074) [warn] Note: RepRapFirmware didn't receive valid data either (code 0x00000005) [warn] Bad header checksum (expected 0x0000, got 0x606a) [warn] Note: RepRapFirmware didn't receive valid data either (code 0x00000005) [warn] Bad header checksum (expected 0x0000, got 0x006d) [warn] Note: RepRapFirmware didn't receive valid data either (code 0x00000005) [warn] Restarting transfer because the number of maximum retries has been exceeded [warn] Bad header checksum (expected 0x0000, got 0xc074) [warn] Note: RepRapFirmware didn't receive valid data either (code 0x00000005) [warn] Bad header checksum (expected 0x0000, got 0x606a) [warn] Note: RepRapFirmware didn't receive valid data either (code 0x00000005) [warn] Bad header checksum (expected 0x0000, got 0xc074) [warn] Note: RepRapFirmware didn't receive valid data either (code 0x00000005) [warn] Restarting transfer because the number of maximum retries has been exceeded [warn] Bad header checksum (expected 0x0000, got 0x006d) [warn] Note: RepRapFirmware didn't receive valid data either (code 0x00000005) [warn] Bad header checksum (expected 0x0000, got 0x006d) [warn] Note: RepRapFirmware didn't receive valid data either (code 0x00000005) [warn] Bad header checksum (expected 0x0000, got 0x606a) [warn] Note: RepRapFirmware didn't receive valid data either (code 0x0002005f) [warn] Restarting transfer because the number of maximum retries has been exceeded [info] Connection to Duet established [info] Aborted macro file /sys/homew.g [warn] Aux: ==> Cancelling unfinished starting code: M98 P"/sys/homew.g" [info] Aborted macro file homeall.g [warn] Controller has been reset [info] Starting macro file config.g on channel Trigger [error] Failed to merge JSON: {"key":"inputs","flags":"d99vn","result":[{"axesRelative":false,"compatibility":"RepRapFirmware","distanceUnit":"mm","drivesRelative":false,"feedRate":50.0,"inMacro":false,"lineNumber":0,"name":"HTTP","stackDepth":0,"state":"idle","volumetric":false},{"axesRelative":false,"compatibility":"Marlin","distanceUnit":"mm","drivesRelative":false,"feedRate":50.0,"inMacro":false,"lineNumber":0,"name":"Telnet","stackDepth":0,"state":"idle","volumetric":false},{"axesRelative":false,"compatibility":"RepRapFirmware","distanceUnit":"mm","drivesRelative":false,"feedRate":50.0,"inMacro":false,"lineNumber":0,"name":"File","stackDepth":0,"state":"idle","volumetric":false},{"axesRelative":false,"compatibility":"Marlin","distanceUnit":"mm","drivesRelative":false,"feedRate":50.0,"inMacro":false,"lineNumber":0,"name":"USBchan","stackDepth":0,"state":"idle","volumetric":false},{"axesRelative":false,"compatibility":"RepRapFirmware","distanceUnit":"mm","drivesRelative":false,"feedRate":50.0,"inMacro":false,"lineNumber":0,"name":"Aux","stackDepth":0,"state":"idle","volumetric":false},{"axesRelative":false,"compatibility":"RepRapFirmware","distanceUnit":"mm","drivesRelative":true,"feedRate":50.0,"inMacro":true,"lineNumber":51,"name":"Trigger","stackDepth":1,"state":"idle","volumetric":false},{"axesRelative":false,"compatibility":"RepRapFirmware","distanceUnit":"mm","drivesRelative":false,"feedRate":50.0,"inMacro":false,"lineNumber":0,"name":"Queue","stackDepth":0,"state":"idle","volumetric":false},{"axesRelative":false,"compatibility":"RepRapFirmware","distanceUnit":"mm","drivesRelative":false,"feedRate":50.0,"inMacro":false,"lineNumber":0,"name":"LCD","stackDepth":0,"state":"idle","volumetric":false},{"axesRelative":false,"compatibility":"RepRapFirmware","distanceUnit":"mm","drivesRelative":false,"feedRate":50.0,"inMacro":false,"lineNumber":0,"name":"SBC","stackDepth":0,"state":"idle","volumetric":false},{"axesRelative":false,"compatibility":"RepRapFirmware","distanceUnit":"mm","drivesRelative":false,"feedRate":50.0,"inMacro":false,"lineNumber":0,"name":"Daemon","stackDepth":0,"state":"idle","volumetric":false},{"axesRelative":false,"compatibility":"RepRapFirmware","distanceUnit":"mm","drivesRelative":false,"feedRate":50.0,"inMacro":false,"lineNumber":0,"name":"Aux2","stackDepth":0,"state":"idle","volumetric":false},{"axesRelative":false,"compatibility":"RepRapFirmware","distanceUnit":"mm","drivesRelative":false,"feedRate":50.0,"inMacro":false,"lineNumber":0,"name":"Autopause","stackDepth":0,"state":"idle","volumetric":false}]} System.Text.Json.JsonException: Failed to deserialize property [InputChannel].Name (type CodeChannel) from JSON "USBchan" ---> System.Text.Json.JsonException: The JSON value could not be converted to DuetAPI.CodeChannel. Path: $ | LineNumber: 0 | BytePositionInLine: 9. at System.Text.Json.ThrowHelper.ThrowJsonException() at System.Text.Json.Serialization.Converters.JsonConverterEnum`1.Read(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options) at System.Text.Json.JsonPropertyInfoNotNullable`4.OnRead(ReadStack& state, Utf8JsonReader& reader) at System.Text.Json.JsonPropertyInfo.Read(JsonTokenType tokenType, ReadStack& state, Utf8JsonReader& reader) at System.Text.Json.JsonSerializer.ReadCore(JsonSerializerOptions options, Utf8JsonReader& reader, ReadStack& readStack) at System.Text.Json.JsonSerializer.ReadCore(Type returnType, JsonSerializerOptions options, Utf8JsonReader& reader) at System.Text.Json.JsonSerializer.Deserialize(String json, Type returnType, JsonSerializerOptions options) at DuetAPI.Machine.ModelObject.UpdateFromJson(JsonElement jsonElement, Boolean ignoreSbcProperties) in /home/christian/Duet3D/DuetSoftwareFramework/src/DuetAPI/Machine/Base/ModelObject.cs:line 321 --- End of inner exception stack trace --- at DuetAPI.Machine.ModelObject.UpdateFromJson(JsonElement jsonElement, Boolean ignoreSbcProperties) in /home/christian/Duet3D/DuetSoftwareFramework/src/DuetAPI/Machine/Base/ModelObject.cs:line 336 at DuetAPI.Machine.ModelCollectionHelper.UpdateFromJson(IList list, Type itemType, JsonElement jsonElement, Boolean ignoreSbcProperties) in /home/christian/Duet3D/DuetSoftwareFramework/src/DuetAPI/Machine/Base/ModelCollection.cs:line 243 at DuetAPI.Machine.MachineModel.UpdateFromFirmwareModel(String key, JsonElement jsonElement) in /home/christian/Duet3D/DuetSoftwareFramework/src/DuetAPI/Machine/MachineModel.cs:line 162 at DuetControlServer.Model.Updater.Run() in /home/christian/Duet3D/DuetSoftwareFramework/src/DuetControlServer/Model/Updater.cs:line 197
-
So building IAP is fixed on
dev-wilriker
branch in DuetIAP repo.@smoki3 First of all you can ignore the error at the end of your log excerpt. That will be fixed in the next DSF version and has nothing to do with resets. The
Bad checksum
statements on the other hand really are the cause of the reboot.Can you please post again which resistors you use on which line and also both your DCS
config.json
as well as (if you use an actual Raspberry Pi) it's/boot/config.txt
. -
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.