Duet3D Logo

    Duet3D

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • Documentation
    • Order

    Object Model Sniffer

    Firmware developers
    3
    9
    241
    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.
    • dhusolo
      dhusolo last edited by

      My goal is to have a 2nd device that polls the object model with

      M409 F"d99F"
      

      I have a 2nd RPI connected to my Duet 3 with + RPI as SBC.
      GPIO14TX > IO_0.in
      GPIO15RX > IO_0.out
      GND > GND

      I'm using

      cat /dev/ttyS0 & cat > /dev/ttyS0
      

      which basically turns terminal into a chatroom.
      From DWC I can send

      M118 P0 S"Hello Logfile and DWC" L1
      

      Terminal shows

      {"seq":3,"resp":"Hello Logfile and DWC\n"}
      

      From DWC if I send

      M118 P2 S"Hello Logfile and DWC" L1
      

      Terminal responds with

      Hello Logfile and DWC
      

      Terminal does not respond when DWC sends P1, P3, P4 and P5.

      So to me it seems like terminal was able to communicate with DSF.

      When I try to send any of the following it doesn't respond with anything.

      M409
      M409 \n
      M409 F"d994"
      M409 F"d994"\n
      "M409 F"d994"\n"
      "M409"
      "M409\n"
      

      It's clear I'm missing something. Does anyone have any idea?

      dc42 chrishamm 2 Replies Last reply Reply Quote 0
      • dc42
        dc42 administrators @dhusolo last edited by

        @dhusolo How have you connected the second RPi to the Duet?

        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

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

          @dhusolo In SBC mode you can listen to object model updates either using a WebSocket connection or using the ModelObserver utility that comes with the preinstalled duettools package (invoke it via /opt/dsf/bin/ModelObserver). If you don't want a network connection between both boards, I suggest you start the ModelObserver utility with a filter string and redirect the output to your UART device.

          Duet software engineer

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

            @dc42
            The 2nd RPI is connected to my Duet 3 IO_0.
            GPIO14TX > IO_0.in
            GPIO15RX > IO_0.out
            GND > GND

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

              @chrishamm That sounds like it might be easier. I don't see how I can redirect the filtered data to /dev/ttyS0

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

                @dhusolo AFAIR /dev/ttyS0 is a main display TTY to be selected using Ctrl+Alt+F1 but that might vary per device.

                AFAIR you could set up the UART device using the stty command and then redirect everything of interest to it using a simple redirect statement:

                stty -F /dev/ttyAMA0 115200
                /opt/dsf/bin/ModelObserver -q -f "heat/**|tools/**" > /dev/ttyAMA0
                

                This example would send updates from the heat and tools keys over the first UART port.

                Duet software engineer

                dhusolo 3 Replies Last reply Reply Quote 0
                • dhusolo
                  dhusolo @chrishamm last edited by

                  @chrishamm Got it thanks. I'll try it out when I get home.

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

                    @chrishamm I wasn't really thinking. I don't have a USB to serial converter I can attach to the Duet's RPI. Is there a way to output the data to the duet's IO port or do I need a USB adapter?

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

                      @chrishamm I found an old USB to TTL adapter. I connect the USB to the Duet's RPI USB port.
                      I've got the it connected by
                      TTY RX to Pi TX
                      TTY TX to Pi RX
                      TTY GND to Pi GND

                      I have the jumper on the tty in the 3.3v setting

                      On the pi listening I ran terminal with

                      cat /dev/ttyS0
                      

                      On the duet pi I ran

                      stty -F /dev/ttyUSB0 115200
                      /opt/dsf/bin/ModelObserver -q -f "heat/**|tools/**" > /dev/ttyUSB0
                      

                      This is the output
                      1b9f91b8-d7ee-4900-b6b5-912538fab252-image.png

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