• Tags
  • Documentation
  • Order
  • Register
  • Login
Duet3D Logo Duet3D
  • Tags
  • Documentation
  • Order
  • Register
  • Login

Duet3/pi DCS is unavailable after wiring 24V

Scheduled Pinned Locked Moved
Duet Hardware and wiring
duet 3 rasberry pi
8
166
11.0k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • undefined
    Danal @A Former User
    last edited by 24 Apr 2020, 14:19

    @bearer said in Duet3/pi flashing Diag LED after wiring 24V DCS is unavailable:

    Ultimately it doesn't matter; board is updated to RC9 and installing the latest unstable DSF should work as hes tried time and time again.

    (Not having the correct firmware would only be a problem if the latest available apt packages aren't compatible)

    Agreed... but... what should he do next?

    Delta / Kossel printer fanatic

    ? 1 Reply Last reply 24 Apr 2020, 14:34 Reply Quote 0
    • ?
      A Former User @Danal
      last edited by A Former User 24 Apr 2020, 14:34

      @Danal said in Duet3/pi flashing Diag LED after wiring 24V DCS is unavailable:

      what should he do next?

      try the other pi he'll be borrowing any time now (and hope if the orignal Pi was damaged with the original Duet, the borrowed Pi didn't suffer the same fate).

      following that I guess either call an exorcist or attempt to try another SPI slave (maybe there is a bit banged SPI slave for a Pi out there?)

      1 Reply Last reply Reply Quote 0
      • undefined
        fractalengineer
        last edited by fractalengineer 24 Apr 2020, 16:05

        Ok guys I'm just absolutely confused; the RPi 4 that worked last time on the standard image SD card won't connect to Wifi with chris's image no matter if I redo the wpa supplicant file.

        It is not a Pi4 hardware issue because it works just fine with my other SD card flashed with Octopi

        I'm rebuilding an image from scratch following this guide again; don't know what else to do at this point.

        Duetpi lite this time; as if it changed anything

        I'll report back once I get the new image setup on the pi4 with wifi working and everything up do date

        Thanks for the help

        Railcore II ZL

        1 Reply Last reply Reply Quote 0
        • ?
          A Former User
          last edited by A Former User 24 Apr 2020, 16:11

          Send me a message if you'd want a second pair of eyes on it. If you can connect the Pi to wired Ethernet and provide remote access (e.g. ngrok) I can take a stab at it.

          prime suspect is missing country code in the config or somehow strange whitespace in the config preventing it from being parsed.

          this was one of the more detailed guides I could find to share https://wiki.archlinux.org/index.php/wpa_supplicant

          undefined 1 Reply Last reply 24 Apr 2020, 16:33 Reply Quote 1
          • undefined
            fractalengineer @A Former User
            last edited by 24 Apr 2020, 16:33

            @bearer thanks;

            Well it's all fixed now with the new image...the wifi connection it is...Still unable to connect to DCS

            On a separate pi...

            On a new board...

            Maybe we can try that pin by pin connection to double check the issue wasn't the ribbon?

            I can go buy jumpers tomorrow; how many we need?

            Railcore II ZL

            ? 1 Reply Last reply 24 Apr 2020, 16:50 Reply Quote 0
            • ?
              A Former User @fractalengineer
              last edited by 24 Apr 2020, 16:50

              @fractalengineer said in Duet3/pi flashing Diag LED after wiring 24V DCS is unavailable:

              how many we need?

              Minimum 9, but didn't you get a new cable?

              undefined 1 Reply Last reply 24 Apr 2020, 16:52 Reply Quote 0
              • undefined
                fractalengineer @A Former User
                last edited by 24 Apr 2020, 16:52

                @bearer no I think I got a refurb; there was only the board and SD card in it

                Railcore II ZL

                1 Reply Last reply Reply Quote 0
                • undefined
                  chrishamm administrators @Danal
                  last edited by chrishamm 24 Apr 2020, 17:21

                  @Danal That error occurred because SPI wasn't enabled at that point, hence no /dev/spidev.0.0. It's always possible to define module options in /etc/modprobe.d, that doesn't require the driver(s) to be loaded.

                  It must be the connection from the Pi to the Duet 3 (ribbon cable?). The SPI link uses pins 19-24 (see https://pinout.xyz/pinout/pin22_gpio25#) so I'd once more check continuity between these pins on both sides. The error you see in the log without any extra comment (more verbose in v2.1.0) means that no signal could be transferred over pin 22 (BCM25). DSF expects this pin to be high when it starts.

                  Duet software engineer

                  ? undefined 2 Replies Last reply 24 Apr 2020, 17:25 Reply Quote 1
                  • ?
                    A Former User @chrishamm
                    last edited by 24 Apr 2020, 17:25

                    @chrishamm said in Duet3/pi flashing Diag LED after wiring 24V DCS is unavailable:

                    It must be the connection from the Pi to the Duet 3

                    of curiosity what does DCS say if it gets a response, but the wrong due to say wrong firmware or spi clock?

                    1 Reply Last reply Reply Quote 0
                    • undefined
                      chrishamm administrators
                      last edited by chrishamm 24 Apr 2020, 17:31

                      It's also worth starting DCS with -l debug to see a few more details. If the SPI clock is too high, you usually see warnings about failed transfers and/or checksum errors.

                      Duet software engineer

                      ? 1 Reply Last reply 24 Apr 2020, 17:35 Reply Quote 1
                      • ?
                        A Former User @chrishamm
                        last edited by A Former User 24 Apr 2020, 17:35

                        @chrishamm said in Duet3/pi flashing Diag LED after wiring 24V DCS is unavailable:

                        It's also worth starting DCS with -l debug to see a few more details. If the SPI clock is too high, you usually see warnings about failed transfers and/or checksum errors.

                        -l debug shows the difference, no difference without it.

                        #with 22 low
                        pi@raspberrypi:~ $ /opt/dsf/bin/DuetControlServer -l debug
                        [debug] Lost connection to Duet
                           System.OperationCanceledException: Timeout while waiting for transfer ready pin ...
                        [error] Duet is not available
                        
                        #with 22 high
                        pi@raspberrypi:~ $ /opt/dsf/bin/DuetControlServer -l debug
                        [debug] Lost connection to Duet
                           System.OperationCanceledException: Board is not available (no header) ...
                        [error] Duet is not available
                        

                        Maybe change the first to Duet is not ready?

                        edit: sudo wasn't needed (at that point in starting up at least)
                        edit2: whops, wasn't testing the latest version, error changed to fatal, but same string.

                        1 Reply Last reply Reply Quote 0
                        • undefined
                          chrishamm administrators
                          last edited by 24 Apr 2020, 17:38

                          Yes I thought it already showed more details so I'm going to improve that in v2.1.1.

                          Duet software engineer

                          1 Reply Last reply Reply Quote 0
                          • undefined
                            fractalengineer @chrishamm
                            last edited by 24 Apr 2020, 17:40

                            @chrishamm I just checked continuity once more; ever pin beeps from one board to the other.

                            Also checked for any short to ground; it’s all clear with the multimeter.

                            I’ll try wiring pin by pin using bridges; really can’t figure out what else to do

                            Unless the previous duet fried the pi4 too...

                            Railcore II ZL

                            ? 1 Reply Last reply 24 Apr 2020, 17:41 Reply Quote 0
                            • ?
                              A Former User @fractalengineer
                              last edited by A Former User 24 Apr 2020, 17:41

                              @fractalengineer said in Duet3/pi flashing Diag LED after wiring 24V DCS is unavailable:

                              really can’t figure out what else to do

                              if you've got a steady hand you could measure the voltage on pin 22 with the Duet running (before and after starting DCS) and then cross refrene with the output of running DSC with -l debug to at least verify if the Pi is reading pin 22 correctly.

                              see next post instead:

                              1 Reply Last reply Reply Quote 1
                              • ?
                                A Former User
                                last edited by A Former User 24 Apr 2020, 17:58

                                Hold off on that; not sure why loopback testing didn't occur to me a week ago ... but:

                                https://github.com/rm-hull/spidev-test

                                combine with wiringpi's gpiocommand and two jumpers to do full (or 80%? as SCK isn't tested) diagnostic on the rPi.

                                place jumper over 22-24 and 19-21, then run commands as shown, compare to output below.
                                9ff41e90-9272-4588-bceb-75e5acf19c86-image.png
                                (Quick copy/paste to get the spidev-test tool and wiringpi):

                                sudo apt install -y git wiringpi
                                git clone https://github.com/rm-hull/spidev-test ~/spidev-test
                                cd ~/spidev-test
                                gcc spidev_test.c -o spidev_test
                                

                                Commands to run:

                                RDY=22 CS=24 ; { 
                                gpio -1 mode $CS out
                                gpio -1 mode $RDY in
                                gpio -1 write $CS 1 && echo "(Pin RDY/$RDY) `gpio -1 read $RDY` should equal `gpio -1 read $CS` (Pin CS/$CS)"
                                gpio -1 write $CS 0 && echo "(Pin RDY/$RDY) `gpio -1 read $RDY` should equal `gpio -1 read $CS` (Pin CS/$CS)"
                                { ~/spidev-test/spidev_test -v -s 8000000 -D /dev/spidev0.0 && echo RX should equal TX. ;} | tail -n3 | cut -b-100 ;}
                                

                                What output should look like:

                                (Pin RDY/22) 1 should equal 1 (Pin CS/24)
                                (Pin RDY/22) 0 should equal 0 (Pin CS/24)
                                TX | FF FF FF FF FF FF 40 00 00 00 00 95 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F0 0D
                                RX | FF FF FF FF FF FF 40 00 00 00 00 95 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F0 0D
                                RX should equal TX.
                                

                                Repeat with wires jumpering the far side of the ribbon cable if test with jumpers on the rPi is passed.
                                (Print quality comments can be addressed to Tiertime pending full Duet conversion of the Up Mini 2)

                                1 Reply Last reply Reply Quote 1
                                • undefined
                                  Danal
                                  last edited by 24 Apr 2020, 18:51

                                  I don't know about the "W" part... but I'll take a look.

                                  I can also spiff it up so that its output is very clear for an "end user", in the Duet environment.

                                  Delta / Kossel printer fanatic

                                  ? 1 Reply Last reply 24 Apr 2020, 18:53 Reply Quote 0
                                  • ?
                                    A Former User @Danal
                                    last edited by 24 Apr 2020, 18:53

                                    @Danal wrong topic?

                                    1 Reply Last reply Reply Quote 0
                                    • undefined
                                      Danal
                                      last edited by Danal 24 Apr 2020, 19:53

                                      I thought a post said: "If a C Wizard happens along"... and then got edited... the request being to make spidev_test more duet specific, easier to interpret. ?

                                      Hopefully, because I did take a look.

                                      I am not a Wizard, but:

                                      ./DuetTestSPI
                                      spi mode: 0x0
                                      bits per word: 8
                                      max speed: 8000000 Hz (8000 KHz)
                                      TX | FF FF FF FF FF FF 40 00 00 00 00 95 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F0 0D | ......@....�..................�.
                                      RX | FF FF FF FF FF FF 40 00 00 00 00 95 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F0 0D | ......@....�..................�.
                                      Loopback on pins 19-21, SPI MOSI MISO tested successfully.
                                      All tests passed, SPI should work for Duet 3 <> Raspberry Pi.

                                      (removed jumper)

                                      ./DuetTestSPI
                                      spi mode: 0x0
                                      bits per word: 8
                                      max speed: 8000000 Hz (8000 KHz)
                                      TX | FF FF FF FF FF FF 40 00 00 00 00 95 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F0 0D | ......@....�..................�.
                                      RX | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................
                                      Send and receive buffers do not match!
                                      Check jumpers on pins 19-21; if they are correct this machine has an SPI problem.
                                      Aborted

                                      Much clearer messages, etc. This is 1/2 of your suggestion above, I'll do the 22-24 part in a few min, and then post a link.

                                      Delta / Kossel printer fanatic

                                      ? 1 Reply Last reply 24 Apr 2020, 20:01 Reply Quote 0
                                      • ?
                                        A Former User @Danal
                                        last edited by A Former User 24 Apr 2020, 20:01

                                        @Danal said in Duet3/pi flashing Diag LED after wiring 24V DCS is unavailable:

                                        I thought a post said: "If a C Wizard happens along"... and then got edited...

                                        it did, but "W" didn't make much sense; anyways, as DSF depends on wiringpi anyways figured less effort than forking the spi tools. (and easier to change if other boards have different gpio mapping)

                                        1 Reply Last reply Reply Quote 0
                                        • undefined
                                          Danal
                                          last edited by 24 Apr 2020, 20:07

                                          Understood... it was obscure. Perhaps should have said "not a Wiz, but"

                                          Delta / Kossel printer fanatic

                                          1 Reply Last reply Reply Quote 0
                                          122 out of 166
                                          • First post
                                            122/166
                                            Last post
                                          Unless otherwise noted, all forum content is licensed under CC-BY-SA