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

    send gcode command from tinker-board via SPI without DSF

    Scheduled Pinned Locked Moved
    General Discussion
    4
    10
    438
    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.
    • shenouda13undefined
      shenouda13
      last edited by

      Is It possible to send gcode command from a tinker board to a Duet board via SPI without installing the DSF on the Debian OS?

      this is the code I am using with Python-periphery library but nothing is happening.

      from periphery import SPI
      spi = SPI("/dev/spidev1.0", 0, 1000000)
      data_out = b'G1 Y180 F5000\n'
      data_in = spi.transfer(data_out)
      spi.close()

      chrishammundefined 1 Reply Last reply Reply Quote 0
      • chrishammundefined
        chrishamm administrators @shenouda13
        last edited by

        @shenouda13 In theory, yes, but it would be really really difficult because you'd have to reimplement the whole SPI communication protocol including code flow handling, macros, jobs, etc. What's keeping you from installing DSF and using dsf-python?

        Duet software engineer

        shenouda13undefined 1 Reply Last reply Reply Quote 0
        • shenouda13undefined
          shenouda13 @chrishamm
          last edited by

          @chrishamm thank you for your reply. Yes I realized installing DSF is the easiest way.
          However I have few questions regarding the connection between the SBC and duet:
          are they 5 wire connection in total? is the connection below right?
          81457a48-f200-4c87-8432-c779a82d6266-image.png

          Also how to identify the GpioChipDevice and TransferReadyPin? I couldn't get any info from gpioinfo and gpioget

          chrishammundefined 1 Reply Last reply Reply Quote 0
          • chrishammundefined
            chrishamm administrators @shenouda13
            last edited by

            @shenouda13 You must connect +3.3V as well, else the buffer chips on the Duet aren't enabled. Actually I started working on a guide for the ASUS Tinker Board 2 a while back but I haven't had a chance to finish it yet - from my notes the SPI interface should be /dev/spidev1.0 and the TfrRdy should be gpiochip4 -> 28 (pin 128).

            Duet software engineer

            shenouda13undefined tom33undefined 2 Replies Last reply Reply Quote 1
            • shenouda13undefined
              shenouda13 @chrishamm
              last edited by

              @chrishamm I have tried to run the command gpioget gpiochip4 28 and tried also with gpiochip0
              and it gave me this error: gpioget: error reading GPIO values: No such file or directory

              any suggestion?

              1 Reply Last reply Reply Quote 0
              • tom33undefined
                tom33 @chrishamm
                last edited by

                @chrishamm something was done for tinkerboard 2 ?

                dc42undefined 1 Reply Last reply Reply Quote 0
                • dc42undefined
                  dc42 administrators @tom33
                  last edited by

                  @tom33 does the tinkerboard have USB host capability? If so then it would probably be easier to connect it to the Duet via USB.

                  Duet WiFi hardware designer and firmware engineer
                  Please do not ask me for Duet support via PM or email, use the forum
                  http://www.escher3d.com, https://miscsolutions.wordpress.com

                  tom33undefined 1 Reply Last reply Reply Quote 0
                  • tom33undefined
                    tom33 @dc42
                    last edited by

                    @dc42 this is the usb port :
                    1 x USB 3.2 Gen1 Type-C® OTG port
                    2 x USB 3.2 Gen1 Type-A ports
                    2 x USB 2.0 Pin header

                    The otg can use host capability ?

                    dc42undefined 1 Reply Last reply Reply Quote 0
                    • dc42undefined
                      dc42 administrators @tom33
                      last edited by

                      @tom33 yes, USB OTG is a limited form of host capability.

                      Duet WiFi hardware designer and firmware engineer
                      Please do not ask me for Duet support via PM or email, use the forum
                      http://www.escher3d.com, https://miscsolutions.wordpress.com

                      tom33undefined 1 Reply Last reply Reply Quote 0
                      • tom33undefined
                        tom33 @dc42
                        last edited by

                        @dc42 perfect, I just need to follow the instruction from this page : https://docs.duet3d.com/User_manual/Machine_configuration/DSF_Other

                        or this is an other procedure ?

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