Duet2 Wifi+Duex5 and SBC
-
@wilriker thank you for your reply! Do I need to do something special for the SPI Pins on the WiFi ESP?
#2 alright than I will try both and see what the difference will be
#6 alright! -
So I made the initial setup according to the list. Pi (Pi 3B+) is working but I don't get a connection to the duet: "failed to connect to duet3" Please check your connection (DCS is not started).
the cable is setup like: duet --> SBC
CS --> pin 24
RDC --> pin 22
3,3V --> pin 17
MISO --> pin 21
MOSI --> pin 19
SCK --> pin 23
GND --> pin 20There is no SD-card in the duet.
Duet2 Wifi is connected via USB to Laptop
Pi has its own power supply
Any ideas how to troubleshoot? -
@taconite I don't know what RDC pin is (EDIT: I guess that's a typo and actually refers to the TfrRdy Pin) but I miss Transfer Ready pin that is (in default configuration) connected to pin 25 of RPi.
EDIT: I found that in my setup it was absolutely necessary to have an addition ground connection between the RPi and the PSU that delivers VIN to Duet. As you are still working with power from USB that's not critical yet, but keep that in mind.
-
@wilriker you are absolutely right - it was a typo. it should be RDY.
mhh okay that is weird - I didn't find a 100% info about the wiring so I searched it together from here (https://forum.duet3d.com/topic/17241/quest-duet2wifi-sbc-without-espectomy-possible-yes/2)
EDIT: mhh pictures are not uploading
and here (https://forum.duet3d.com/topic/17203/duet-2-ethernet-and-sbc)
![0_1612471698173_wire2.PNG](Uploading 100%)EDIT: thank you for the grounding info. that's gonna be a little problematic because for the test setup I am powering the pi with a Pi power supply (micro USB) but I will find a solution for that.
-
@taconite My fault. I was mixing up RPi pin numbering schemes. I meant GPIO 25 which is physical pin 22. So that's actually correct on your end already.
Too tired right now for good ideas, sorry.
Re ground connection: it's totally sufficient to connect any one of the ground pins of RPi's GPIO header to ground of your PSU. While testing I even powered the Duet from one of the USB ports of the RPi. Worked fine. Only when I eventually applied 24V VIN to the Duet it was that I required this extra connection for stable communication.
-
@wilriker alright! Than get a good night of sleep
I would really appreciate if you could come back tomorrow with some fresh ideas hahaMaybe with an idea how i could diagnose a possible error. To narrow it down why it is not connecting.
-
logging in via ssh to see why dcs isn't starting would be a a good start, see
systemctl status duetcontrolserver.service
and/orjournalctl -xeu duetcontrolserver.service
for details.To troubeshoot the spi stuff maybe search for "loopback" to see an old thread troubleshooting a faulty raspberry pi
-
@bearer
- journalctl -xeu duetcontrolserver.service -- Automatic restarting of the unit duetcontrolserver.service has been scheduled -- the configured Restart= setting for the unit. Feb 05 17:24:24 duet3 systemd[1]: Stopped Duet Control Server. -- Subject: A stop job for unit duetcontrolserver.service has finished -- Defined-By: systemd -- Support: https://www.debian.org/support -- -- A stop job for unit duetcontrolserver.service has finished. -- -- The job identifier is 12641 and the job result is done. Feb 05 17:24:24 duet3 systemd[1]: Starting Duet Control Server... -- Subject: A start job for unit duetcontrolserver.service has begun execution -- Defined-By: systemd -- Support: https://www.debian.org/support -- -- A start job for unit duetcontrolserver.service has begun execution. -- -- The job identifier is 12641. Feb 05 17:24:25 duet3 DuetControlServer[4176]: Duet Control Server v3.2.0 Feb 05 17:24:25 duet3 DuetControlServer[4176]: Written by Christian Hammacher fo Feb 05 17:24:25 duet3 DuetControlServer[4176]: Licensed under the terms of the G Feb 05 17:24:26 duet3 DuetControlServer[4176]: [info] Settings loaded Feb 05 17:24:27 duet3 DuetControlServer[4176]: [info] Environment initialized ESCOC controlserver.service has been scheduled, as the result for he unit. d Duet Control Server. rolserver.service has finished rt .service has finished. ob result is done. ng Duet Control Server... trolserver.service has begun execution rt r.service has begun execution. 4176]: Duet Control Server v3.2.0 4176]: Written by Christian Hammacher for Duet3D 4176]: Licensed under the terms of the GNU Public License Version 3 4176]: [info] Settings loaded 4176]: [info] Environment initialized ESCOD -- Automatic restarting of the unit duetcontrolserver.service has been scheduled -- the configured Restart= setting for the unit. Feb 05 17:24:24 duet3 systemd[1]: Stopped Duet Control Server. -- Subject: A stop job for unit duetcontrolserver.service has finished -- Defined-By: systemd -- Support: https://www.debian.org/support -- -- A stop job for unit duetcontrolserver.service has finished. -- -- The job identifier is 12641 and the job result is done. Feb 05 17:24:24 duet3 systemd[1]: Starting Duet Control Server... -- Subject: A start job for unit duetcontrolserver.service has begun execution -- Defined-By: systemd -- Support: https://www.debian.org/support -- -- A start job for unit duetcontrolserver.service has begun execution. -- -- The job identifier is 12641. Feb 05 17:24:25 duet3 DuetControlServer[4176]: Duet Control Server v3.2.0 Feb 05 17:24:25 duet3 DuetControlServer[4176]: Written by Christian Hammacher fo Feb 05 17:24:25 duet3 DuetControlServer[4176]: Licensed under the terms of the G Feb 05 17:24:26 duet3 DuetControlServer[4176]: [info] Settings loaded Feb 05 17:24:27 duet3 DuetControlServer[4176]: [info] Environment initialized ESCOD -- Automatic restarting of the unit duetcontrolserver.service has been scheduled -- the configured Restart= setting for the unit. Feb 05 17:24:24 duet3 systemd[1]: Stopped Duet Control Server. -- Subject: A stop job for unit duetcontrolserver.service has finished -- Defined-By: systemd -- Support: https://www.debian.org/support -- -- A stop job for unit duetcontrolserver.service has finished. -- -- The job identifier is 12641 and the job result is done. Feb 05 17:24:24 duet3 systemd[1]: Starting Duet Control Server... -- Subject: A start job for unit duetcontrolserver.service has begun execution -- Defined-By: systemd -- Support: https://www.debian.org/support -- -- A start job for unit duetcontrolserver.service has begun execution. -- -- The job identifier is 12641. Feb 05 17:24:25 duet3 DuetControlServer[4176]: Duet Control Server v3.2.0 Feb 05 17:24:25 duet3 DuetControlServer[4176]: Written by Christian Hammacher fo Feb 05 17:24:25 duet3 DuetControlServer[4176]: Licensed under the terms of the G Feb 05 17:24:26 duet3 DuetControlServer[4176]: [info] Settings loaded Feb 05 17:24:27 duet3 DuetControlServer[4176]: [info] Environment initialized ESCOD -- Automatic restarting of the unit duetcontrolserver.service has been scheduled -- the configured Restart= setting for the unit. Feb 05 17:24:24 duet3 systemd[1]: Stopped Duet Control Server. -- Subject: A stop job for unit duetcontrolserver.service has finished -- Defined-By: systemd -- Support: https://www.debian.org/support -- -- A stop job for unit duetcontrolserver.service has finished. -- -- The job identifier is 12641 and the job result is done. Feb 05 17:24:24 duet3 systemd[1]: Starting Duet Control Server... -- Subject: A start job for unit duetcontrolserver.service has begun execution -- Defined-By: systemd -- Support: https://www.debian.org/support -- -- A start job for unit duetcontrolserver.service has begun execution. -- -- The job identifier is 12641. Feb 05 17:24:25 duet3 DuetControlServer[4176]: Duet Control Server v3.2.0 Feb 05 17:24:25 duet3 DuetControlServer[4176]: Written by Christian Hammacher fo Feb 05 17:24:25 duet3 DuetControlServer[4176]: Licensed under the terms of the G Feb 05 17:24:26 duet3 DuetControlServer[4176]: [info] Settings loaded Feb 05 17:24:27 duet3 DuetControlServer[4176]: [info] Environment initialized ESCOD -- Automatic restarting of the unit duetcontrolserver.service has been scheduled -- the configured Restart= setting for the unit. Feb 05 17:24:24 duet3 systemd[1]: Stopped Duet Control Server. -- Subject: A stop job for unit duetcontrolserver.service has finished -- Defined-By: systemd -- Support: https://www.debian.org/support -- -- A stop job for unit duetcontrolserver.service has finished. -- -- The job identifier is 12641 and the job result is done. Feb 05 17:24:24 duet3 systemd[1]: Starting Duet Control Server... -- Subject: A start job for unit duetcontrolserver.service has begun execution -- Defined-By: systemd -- Support: https://www.debian.org/support -- -- A start job for unit duetcontrolserver.service has begun execution. -- -- The job identifier is 12641. Feb 05 17:24:25 duet3 DuetControlServer[4176]: Duet Control Server v3.2.0 Feb 05 17:24:25 duet3 DuetControlServer[4176]: Written by Christian Hammacher fo Feb 05 17:24:25 duet3 DuetControlServer[4176]: Licensed under the terms of the G Feb 05 17:24:26 duet3 DuetControlServer[4176]: [info] Settings loaded Feb 05 17:24:27 duet3 DuetControlServer[4176]: [info] Environment initialized ESCOD -- A stop job for unit duetcontrolserver.service has finished. -- -- The job identifier is 12580 and the job result is done. Feb 05 17:24:21 duet3 systemd[1]: Starting Duet Control Server... -- Subject: A start job for unit duetcontrolserver.service has begun execution -- Defined-By: systemd -- Support: https://www.debian.org/support -- Support: https://www.debian.org/support -- -- The unit duetcontrolserver.service has entered the 'failed' state with result Feb 05 17:24:01 duet3 systemd[1]: Failed to start Duet Control Server. -- Subject: A start job for unit duetcontrolserver.service has failed -- Defined-By: systemd -- Support: https://www.debian.org/support -- -- A start job for unit duetcontrolserver.service has finished with a failure. -- -- The job identifier is 12153 and the job result is failed. Feb 05 17:24:01 duet3 systemd[1]: duetcontrolserver.service: Service RestartSec= Feb 05 17:24:01 duet3 systemd[1]: duetcontrolserver.service: Scheduled restart j -- Subject: Automatic restarting of a unit has been scheduled -- Defined-By: systemd -- Support: https://www.debian.org/support -- -- Automatic restarting of the unit duetcontrolserver.service has been scheduled -- the configured Restart= setting for the unit. Feb 05 17:24:01 duet3 systemd[1]: Stopped Duet Control Server. -- Subject: A stop job for unit duetcontrolserver.service has finished -- Defined-By: systemd -- Support: https://www.debian.org/support lines 3310-3332/3657 91% -- Support: https://www.debian.org/support -- -- The unit duetcontrolserver.service has entered the 'failed' state with result 'protocol'. Feb 05 17:24:01 duet3 systemd[1]: Failed to start Duet Control Server. -- Subject: A start job for unit duetcontrolserver.service has failed -- Defined-By: systemd -- Support: https://www.debian.org/support -- -- A start job for unit duetcontrolserver.service has finished with a failure. -- -- The job identifier is 12153 and the job result is failed. Feb 05 17:24:01 duet3 systemd[1]: duetcontrolserver.service: Service RestartSec=100ms expired, scheduling restart. Feb 05 17:24:01 duet3 systemd[1]: duetcontrolserver.service: Scheduled restart job, restart counter is at 181. -- Subject: Automatic restarting of a unit has been scheduled -- Defined-By: systemd -- Support: https://www.debian.org/support -- -- Automatic restarting of the unit duetcontrolserver.service has been scheduled, as the result for -- the configured Restart= setting for the unit. Feb 05 17:24:01 duet3 systemd[1]: Stopped Duet Control Server. -- Subject: A stop job for unit duetcontrolserver.service has finished -- Defined-By: systemd -- Support: https://www.debian.org/support -- -- A stop job for unit duetcontrolserver.service has finished. -- -- The job identifier is 12214 and the job result is done. Feb 05 17:24:01 duet3 systemd[1]: Starting Duet Control Server... -- Subject: A start job for unit duetcontrolserver.service has begun execution -- Defined-By: systemd -- Support: https://www.debian.org/support -- -- A start job for unit duetcontrolserver.service has begun execution. -- -- The job identifier is 12214. Feb 05 17:24:02 duet3 DuetControlServer[4086]: Duet Control Server v3.2.0 Feb 05 17:24:02 duet3 DuetControlServer[4086]: Written by Christian Hammacher for Duet3D Feb 05 17:24:02 duet3 DuetControlServer[4086]: Licensed under the terms of the GNU Public License Version 3 Feb 05 17:24:03 duet3 DuetControlServer[4086]: [info] Settings loaded Feb 05 17:24:03 duet3 DuetControlServer[4086]: [info] Environment initialized Feb 05 17:24:04 duet3 DuetControlServer[4086]: [fatal] Could not connect to Duet (Timeout while waiting for transfer ready pin) Feb 05 17:24:04 duet3 systemd[1]: duetcontrolserver.service: Failed with result 'protocol'. -- Subject: Unit failed -- Defined-By: systemd -- Support: https://www.debian.org/support -- -- The unit duetcontrolserver.service has entered the 'failed' state with result 'protocol'. Feb 05 17:24:04 duet3 systemd[1]: Failed to start Duet Control Server. -- Subject: A start job for unit duetcontrolserver.service has failed lines 3310-3358/3657 92%
-
systemctl status duetcontrolserver.service ā duetcontrolserver.service - Duet Control Server Loaded: loaded (/lib/systemd/system/duetcontrolserver.service; enabled; vendo Active: activating (start) since Fri 2021-02-05 17:23:47 CET; 1s ago Main PID: 4023 (DuetControlServ) Tasks: 9 (limit: 2063) CGroup: /system.slice/duetcontrolserver.service āā4023 /opt/dsf/bin/DuetControlServer Feb 05 17:23:47 duet3 systemd[1]: Starting Duet Control Server... Feb 05 17:23:48 duet3 DuetControlServer[4023]: Duet Control Server v3.2.0 Feb 05 17:23:48 duet3 DuetControlServer[4023]: Written by Christian Hammacher fo Feb 05 17:23:48 duet3 DuetControlServer[4023]: Licensed under the terms of the G
so there is not a lot of info ...
-
@taconite said in Duet2 Wifi+Duex5 and SBC:
Feb 05 17:24:04 duet3 DuetControlServer[4086]: [fatal] Could not connect to Duet (Timeout while waiting for transfer ready pin)
this suggest the trf_rdy pin isn't wired/working correctly.
(also please put three backticks (
```
) over and under long text like that to preserve formatting next time, or use the code formatting button on the toolbar (between strikeout and link)) -
So I rechecked the wiring and the board itself - didn't find any issues. Reflashed the SBC firmware to the Duet and it seems that now I get a connection even though it is not really stable. BTW the Duex5 is not connected right now
Feb 06 13:54:07 duet3 DuetControlServer[5480]: [warn] RepRapFirmware got a bad header checksum Feb 06 13:54:07 duet3 DuetControlServer[5480]: [warn] RepRapFirmware got a bad header checksum Feb 06 13:54:07 duet3 DuetControlServer[5480]: [warn] Restarting transfer because the number of maximum retries has been exceeded Feb 06 13:54:07 duet3 DuetControlServer[5480]: [warn] RepRapFirmware got a bad header checksum Feb 06 13:54:07 duet3 DuetControlServer[5480]: [warn] RepRapFirmware got a bad header checksum Feb 06 13:54:07 duet3 DuetControlServer[5480]: [warn] RepRapFirmware got a bad header checksum Feb 06 13:54:07 duet3 DuetControlServer[5480]: [warn] Restarting transfer because the number of maximum retries has been exceeded Feb 06 13:54:07 duet3 DuetControlServer[5480]: [warn] RepRapFirmware got a bad header checksum Feb 06 13:54:07 duet3 DuetControlServer[5480]: [warn] RepRapFirmware got a bad header checksum Feb 06 13:54:07 duet3 DuetControlServer[5480]: [warn] RepRapFirmware got a bad header checksum Feb 06 13:54:07 duet3 DuetControlServer[5480]: [warn] Restarting transfer because the number of maximum retries has been exceeded Feb 06 13:54:07 duet3 DuetControlServer[5480]: [warn] RepRapFirmware got a bad header checksum Feb 06 13:54:07 duet3 DuetControlServer[5480]: [warn] RepRapFirmware got a bad header checksum Feb 06 13:54:07 duet3 DuetControlServer[5480]: [warn] RepRapFirmware got a bad header checksum Feb 06 13:54:07 duet3 DuetControlServer[5480]: [warn] Restarting transfer because the number of maximum retries has been exceeded Feb 06 13:54:07 duet3 DuetControlServer[5480]: [warn] RepRapFirmware got a bad header checksum Feb 06 13:54:07 duet3 DuetControlServer[5480]: [warn] RepRapFirmware got a bad header checksum Feb 06 13:54:07 duet3 DuetControlServer[5480]: [warn] RepRapFirmware got a bad header checksum Feb 06 13:54:07 duet3 DuetControlServer[5480]: [warn] Restarting transfer because the number of maximum retries has been exceeded Feb 06 13:54:07 duet3 DuetControlServer[5480]: [warn] Bad header CRC32 (expected 0x00000000, got 0x59923eca) Feb 06 13:54:07 duet3 DuetControlServer[5480]: [warn] Note: RepRapFirmware didn't receive valid data either (code 0x00000000) Feb 06 13:54:07 duet3 DuetControlServer[5480]: [info] Connection to Duet established Feb 06 13:54:08 duet3 DuetControlServer[5480]: [warn] Lost connection to Duet (Board is not available (no header))
EDIT: So it's more like a "connection" I can reach it over the network and I uploaded a valid config but its not responsive at all
-
Can you provide a photo of the wiring between the Duet and the Pi?
-
Verify RRF and DSF versions are compatible, if they are, odds are the connection is the issue given the checksum/crc issues.
How is the common ground between the duet and sbc?
Have you tried lowering the SPI frequency? (Edit there is a json config file under /opt/dsf on the sbc
-
@bearer
I got DuetPI (With GUI form here):
https://duet3d.dozuki.com/Wiki/SBC_Setup_for_Duet_3
RRF is 3.2.0I will provide Pictures of the common ground and the wiring in a minute. (maybe I should increase the gauge of the common ground)
No I didn't change the SPI speed but I could try to
@dc42
EDIT: The black single cable is the common ground
-
The little pcb has a pad labeled gnd1, this also carries a common ground from the duet to the sbc?
and the shield is grounded at both ends? if the shield is the ground connection thats not optimal either, ground the shield at one end and use a conductor for signal ground
the cable also seems a bit long in the tooth, reducing the spi frequency might help if the length is the issue.
/opt/dsf/conf/config.conf
and reduce the"SpiFrequency": 8000000,
to maybe 2mhz or even less -
Yes the GND1 of the little PCB from @deadwood83 has a connection to the GND of the Duet and the SBC
So what I did:
- Removed the Shield from one side
- connected the GND1 pin of the little PCB with an extra cable to the GND of the SBC
- reduced the spifrequency to 2 MHz.
--> same thing as before
What do you mean with "bit long in the tooth"
-
The Duet to Pi cable is way too long. Also, as it is a round cable, it will have higher capacitance and more crosstalk than a ribbon cable would. You should replace it by a short (150mm or less) ribbon cable.
-
Changed to a short ribbon cable - nothing changed - still "no header" fault message
-
maybe I should try the duetpi-lite?
-
@dc42 Sorry for bothering you again. Do you any other ideas?