Duet 3 and jetson Nano?
-
I figured it out. I stupidly forgot to set the MISO pins to TRISTATE so the data was getting corrupted.
Tested and things now seem fully operational.
Grab the new u-boot and dtb files from:
https://github.com/gtjoseph/jetson-nano-support/tree/l4t_32.2.1 -
@gtj0 Success!! Thank you fior your hard work of making it work Iแธฟ truly grateful
-
Just a quick update...
There are official 64 bit builds of Duet Software Framework available from Duet3D. All you have to do is create a file named /etc/apt/sources.list.d/duet3d.list with one line in it...
deb https://pkg.duet3d.com/ stable armv7
Even though armv7 is mentioned, you'll get the arm64 packages.
Then copy the attached gpg key to /etc/apt/trusted.gpg.d/duet3d.gpg.
duet3d.gpg.txt
The.txt
suffix was added just to satisfy the forum's upload restrictions so you need to remove it.Finally, do an
apt-get update
andapt-get install duetsoftwareframework
-
@gtj0 said in Duet 3 and jetson Nano?:
etc/apt/sources.list.d/duet3d.lis
Yes, Iยดve been thinking about this for a while and just like that the update I was waiting for :)!
Followed your instructions and it worked like a charm, thank you so much. -
Those packages have been up there for a while now but both @chrishamm and I forgot to tell anyone.
-
I did a fresh install (both L4T & DSF) and I'm running into an issue:
Monitoring DCS shows "Kernel SPI buffer" warning & "Duet is not available"
jpomo@jpomo-desktop:~$ sudo /opt/dsf/bin/DuetControlServer Duet Control Server v1.2.3.0 Written by Christian Hammacher for Duet3D Licensed under the terms of the GNU Public License Version 3 [info] Settings loaded [info] Environment initialized **[warn] Kernel SPI buffer size is smaller than RepRapFirmware buffer size (4096 configured vs 8192 required) [error] Duet is not available**
Here are my config files -
http.json:
{ "Logging": { "LogLevel": { "Default": "Information" } }, "Kestrel": { "Endpoints": { "Http": { "Url": "http://127.0.0.1" } } }, "KeepAliveInterval": 30, "ModelRetryDelay": 5000, "UseCors": true, "UseStaticFiles": true, "SocketPath": "/var/run/dsf/dcs.sock", "WebSocketBufferSize": 8192 }
config.json
"LogLevel": "info", "SocketDirectory": "/var/run/dsf", "SocketFile": "dcs.sock", "Backlog": 4, "SocketPollInterval": 2000, "BaseDirectory": "/opt/dsf/sd", "HostUpdateInterval": 4000, "ConfigUpdateInterval": 5000, "MaxMessageAge": 60.0, "SpiDevice": "/dev/spidev0.0", "SpiFrequency": 1000000, "SpiTransferTimeout": 500, "MaxSpiRetries": 3, "SpiPollDelay": 25, "GpioChipDevice": "/dev/gpiochip0", "TransferReadyPin": 13, "BufferedPrintCodes": 32, "BufferedMacroCodes": 16, "MaxBufferSpacePerChannel": 1536, "ModelUpdateInterval": 125, "MaxMachineModelLockTime": -1, "FileInfoReadLimitHeader": 12288, "FileInfoReadLimitFooter": 262144, "MaxLayerHeight": 0.9,
Additonally,
sudo systemctl status duetcontrolserver:
jpomo@jpomo-desktop:~$ sudo systemctl status duetcontrolserver โ duetcontrolserver.service - Duet Control Server Loaded: loaded (/usr/lib/systemd/system/duetcontrolserver.service; enabled; vendor preset: ena Active: active (running) since Mon 2020-01-13 13:09:55 MST; 589ms ago Main PID: 17421 (DuetControlServ) Tasks: 9 (limit: 4182) CGroup: /system.slice/duetcontrolserver.service โโ17421 /opt/dsf/bin/DuetControlServer Jan 13 13:09:55 jpomo-desktop systemd[1]: Started Duet Control Server. Jan 13 13:09:56 jpomo-desktop DuetControlServer[17421]: Duet Control Server v1.2.3.0 Jan 13 13:09:56 jpomo-desktop DuetControlServer[17421]: Written by Christian Hammacher for Duet3D Jan 13 13:09:56 jpomo-desktop DuetControlServer[17421]: Licensed under the terms of the GNU Publi
sudo systemctl status duetwebserver:
โ duetwebserver.service - Duet Web Server Loaded: loaded (/usr/lib/systemd/system/duetwebserver.service; enabled; vendor preset: enabled) Active: active (running) since Mon 2020-01-13 12:52:11 MST; 18min ago Main PID: 4592 (DuetWebServer) Tasks: 19 (limit: 4182) CGroup: /system.slice/duetwebserver.service โโ4592 /opt/dsf/bin/DuetWebServer Jan 13 13:10:26 jpomo-desktop DuetWebServer[4592]: at System.Net.Sockets.Socket.Connect(EndPoint remoteEP) Jan 13 13:10:26 jpomo-desktop DuetWebServer[4592]: at DuetAPIClient.BaseConnection.Connect(ClientInitMessage initMessage, String socketPath, CancellationToken cancellationToken Jan 13 13:10:26 jpomo-desktop DuetWebServer[4592]: at DuetWebServer.Services.ModelObserver.Execute() in /home/christian/duet/DuetSoftwareFramework/src/DuetWebServer/Services/Mo Jan 13 13:10:31 jpomo-desktop DuetWebServer[4592]: warn: DuetWebServer.Services.ModelObserver[0] Jan 13 13:10:31 jpomo-desktop DuetWebServer[4592]: Failed to synchronize machine model Jan 13 13:10:31 jpomo-desktop DuetWebServer[4592]: System.Net.Internals.SocketExceptionFactory+ExtendedSocketException (99): Cannot assign requested address /var/run/dsf/dcs.sock Jan 13 13:10:31 jpomo-desktop DuetWebServer[4592]: at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress) Jan 13 13:10:31 jpomo-desktop DuetWebServer[4592]: at System.Net.Sockets.Socket.Connect(EndPoint remoteEP) Jan 13 13:10:31 jpomo-desktop DuetWebServer[4592]: at DuetAPIClient.BaseConnection.Connect(ClientInitMessage initMessage, String socketPath, CancellationToken cancellationToken Jan 13 13:10:31 jpomo-desktop DuetWebServer[4592]: at DuetWebServer.Services.ModelObserver.Execute() in /home/christian/duet/DuetSoftwareFramework/src/DuetWebServer/Services/Mo
As far as I know, I have set the correct GPIO pin and SPI frequency.
Any advice is appreciated!
-
Have a look at the note in https://duet3d.dozuki.com/Wiki/Getting_Started_With_Duet_3#Section_Enabling_SPI I haven't tested this on a Jetson Nano, though.
-
@jpomo10 It's an easy fix...
Create a file named /etc/modprobe.d/spidev.conf and put 1 line in it...
options spidev bufsiz=8192
Then reboot. You should be good to go after that.
-
Thank you for your help on this.
@gtj0 said in Duet 3 and jetson Nano?:
@jpomo10 It's an easy fix...
Create a file named /etc/modprobe.d/spidev.conf and put 1 line in it...
options spidev bufsiz=8192
Then reboot. You should be good to go after that.
This fixed the buffersize problem, but still getting Duet is not available:
jpomo@jpomo-desktop:~$ sudo /opt/dsf/bin/DuetControlServer Duet Control Server v1.2.3.0 Written by Christian Hammacher for Duet3D Licensed under the terms of the GNU Public License Version 3 [info] Settings loaded [info] Environment initialized [error] Duet is not available
Any other ideas of what might be causing it?
Thanks!
-
What's the contents of /opt/dsf/conf/config.json ?
Also start duetcontrolserver with
-l debug
-
My best guess is that you don't have the GPIO pin for the transfer ready line configured yet. Unfortunately this part is a bit counter-intuitive because the pin index in the gpiochip device likely varies from the sysfs index but with the right tool you can dump the indices and figure out what device/index you need to use.
-
{ "LogLevel": "info", "SocketDirectory": "/var/run/dsf", "SocketFile": "dcs.sock", "Backlog": 4, "SocketPollInterval": 2000, "BaseDirectory": "/opt/dsf/sd", "HostUpdateInterval": 4000, "ConfigUpdateInterval": 5000, "MaxMessageAge": 60.0, "SpiDevice": "/dev/spidev0.0", "SpiFrequency": 500000, "SpiTransferTimeout": 500, "MaxSpiRetries": 3, "SpiPollDelay": 25, "GpioChipDevice": "/dev/gpiochip0", "TransferReadyPin": 13, "BufferedPrintCodes": 32, "BufferedMacroCodes": 16, "MaxBufferSpacePerChannel": 1536, "ModelUpdateInterval": 125, "MaxMachineModelLockTime": -1, "FileInfoReadLimitHeader": 12288, "FileInfoReadLimitFooter": 262144, "MaxLayerHeight": 0.9, "LayerHeightFilters": [ { "Pattern": "layer_height\\D\u002B(?\u003Cmm\u003E(\\d\u002B\\.?\\d*))", "Options": 17 }, { "Pattern": "Layer height\\D\u002B(?\u003Cmm\u003E(\\d\u002B\\.?\\d*))", "Options": 17 }, { "Pattern": "layerHeight\\D\u002B(?\u003Cmm\u003E(\\d\u002B\\.?\\d*))", "Options": 17 }, { "Pattern": "layer_thickness_mm\\D\u002B(?\u003Cmm\u003E(\\d\u002B\\.?\\d*))", "Options": 17 }, { "Pattern": "layerThickness\\D\u002B(?\u003Cmm\u003E(\\d\u002B\\.?\\d*))", "Options": 17 } ], "FilamentFilters": [ { "Pattern": "filament used\\D\u002B(((?\u003Cmm\u003E\\d\u002B\\.?\\d*)mm)(\\D\u002B)?)\u002B", "Options": 17 }, { "Pattern": "filament used\\D\u002B(((?\u003Cm\u003E\\d\u002B\\.?\\d*)m([^m]|$))(\\D\u002B)?)\u002B", "Options": 17 }, { "Pattern": "material\\#\\d\u002B\\D\u002B(?\u003Cmm\u003E\\d\u002B\\.?\\d*)", "Options": 17 }, { "Pattern": "filament length\\D\u002B(((?\u003Cmm\u003E\\d\u002B\\.?\\d*)\\s*mm)(\\D\u002B)?)\u002B", "Options": 17 }, { "Pattern": "Filament used per extruder:\\r\\n;\\s*(?\u003Cname\u003E.\u002B)\\s\u002B=\\s*(?\u003Cmm\u003E[0-9.]\u002B)", "Options": 17 } ], "GeneratedByFilters": [ { "Pattern": "generated by\\s\u002B(.\u002B)", "Options": 17 }, { "Pattern": ";\\s*Sliced by\\s\u002B(.\u002B)", "Options": 17 }, { "Pattern": ";\\s*(KISSlicer.*)", "Options": 17 }, { "Pattern": ";\\s*Sliced at:\\s*(.\u002B)", "Options": 17 }, { "Pattern": ";\\s*Generated with\\s*(.\u002B)", "Options": 17 } ], "PrintTimeFilters": [ { "Pattern": "estimated printing time = ((?\u003Ch\u003E(\\d\u002B))h\\s*)?((?\u003Cm\u003E(\\d\u002B))m\\s*)?((?\u003Cs\u003E(\\d\u002B))s)?", "Options": 17 }, { "Pattern": ";TIME:(?\u003Cs\u003E(\\d\u002B\\.?\\d*))", "Options": 17 }, { "Pattern": "Build time: ((?\u003Ch\u003E\\d\u002B) hours\\s*)?((?\u003Cm\u003E\\d\u002B) minutes\\s*)?((?\u003Cs\u003E(\\d\u002B) seconds))?", "Options": 17 }, { "Pattern": "Estimated Build Time:\\s\u002B((?\u003Ch\u003E(\\d\u002B\\.?\\d*)) hours\\s*)?((?\u003Cm\u003E(\\d\u002B\\.?\\d*)) minutes\\s*)?((?\u003Cs\u003E(\\d\u002B\\.?\\d*)) seconds)?", "Options": 17 } ], "SimulatedTimeFilters": [ { "Pattern": "; Simulated print time\\D\u002B(?\u003Cs\u003E(\\d\u002B\\.?\\d*))", "Options": 17 } ] }
-
@chrishamm Yeah I know which one he needs to use.
-
And yeah, 13 is the right pin on the nano
-
AFAIR I used this guide to figure out the right gpiochip index. You can further diagnose why DCS cannot connect by launching it with the
--log-level debug
parameter. -
@jpomo10 Turn on debug from the command line or the "LogLevel" in config.json
-
jpomo@jpomo-desktop:~$ sudo /opt/dsf/bin/DuetControlServer Duet Control Server v1.2.3.0 Written by Christian Hammacher for Duet3D Licensed under the terms of the GNU Public License Version 3 [info] Settings loaded [info] Environment initialized [debug] Lost connection to Duet System.OperationCanceledException: Board is not available (no header) at DuetControlServer.SPI.DataTransfer.ExchangeHeader() in /home/christian/duet/DuetSoftwareFramework/src/DuetControlServer/SPI/DataTransfer.cs:line 965 at DuetControlServer.SPI.DataTransfer.PerformFullTransfer(Boolean mustSucceed) in /home/christian/duet/DuetSoftwareFramework/src/DuetControlServer/SPI/DataTransfer.cs:line 154 [error] Duet is not available
-
Hmmm. Your SpiFrequency is actually on the low side. Try increasing it to 2000000 (2MHz)
-
@jpomo10 Check the SPI connection. This error message indicates that DCS could not receive any data over SPI.
-
OK, I increased SPI to 2MHz but no change.
To rule-out hardware problems, I set-up a raspberry pi according to the instructions in the getting started guide.
I was able to connect to the Duet3 (thermistors and endstops were reading correctly) but the Duet never responds to gcode sent through the console. e.g. M122 just hangs forever with no response.
I had the exact same problem with the Jetson before I did my fresh install.