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

OpenPNP doesn't connect over WiFi, only serial, but DWC works

Scheduled Pinned Locked Moved
Duet Web Control
2
11
560
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
    ayalaresearch
    last edited by 3 Oct 2023, 00:27

    I am working at putting together an OpenPNP (pick and place machine). I purchased the Duet3d 6HC board, it was highly recommended. I alos purchased the optional WiFi card.

    I've gotten as far as setting up DWC, which works fine over WiFI, even and tow different locations/networks home and work; so I know that is not an issue.

    I cannot get OpenPNP to connect over WiFI, only serial. Over serial I can contol homing of axis, movement of axis, which is as far as I've gotten anyway (x and y axis only) on the hardware front. DWC controls the axis and homing as well.

    OpenPNP requires a PORT number in the tcp section, I've tried 80, 43, but this does not seem to help and I am unsure if it is necessary or not. I have yet to find any information on this particular subject/issue.

    I have a vague working knowledge of PORTS since I built a Rasberry Pi based server with motor drivers, but I can't find specific information on the Duet.

    undefined 1 Reply Last reply 3 Oct 2023, 05:29 Reply Quote 0
    • undefined
      dc42 administrators @ayalaresearch
      last edited by dc42 10 Mar 2023, 05:30 3 Oct 2023, 05:29

      @ayalaresearch I wasn't aware that OpenPnp could connect over the network, I've only heard of it using USB. Does it use Telnet protocol? If so then you will need to enable that protocol on the Duet in config.g. See the M586 command in the GCode dictionary.

      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

      undefined 1 Reply Last reply 3 Oct 2023, 19:48 Reply Quote 0
      • undefined
        ayalaresearch @dc42
        last edited by 3 Oct 2023, 19:48

        @dc42 Hi DC42, I saw your reply over on the OpenPNP forums. Thanks. I tried adding the M586 command, that didn't seem to work.

        FWIW, I did try pinging from my computer at the url of the Duet and I did get a response, plus I can see it on my network when I log into the router. So it's not a network issue per se.

        This is the option in OpenPNP:77c3dcd5-6ff9-446d-bce1-f757b34d2b6f-image.png

        And here is what I've added to the config.sys:
        f5f77b02-fb55-421a-bccb-832278aecb01-image.png

        This got me connect to DWC, but OpenPNP give me:
        af92527f-a97d-4a78-84e3-0ce93b9d28d6-image.png

        So I'm a bit clueless at the moment. I looked at config files for an OpenPNP configuration on a pick and place machine (a modified Charmhigh) but am only working with an X and Y axis at the moment, so I didn't want an overly complex config.sys with lots of stuff tha wasn't applicable yet.

        undefined 1 Reply Last reply 4 Oct 2023, 07:11 Reply Quote 0
        • undefined
          dc42 administrators @ayalaresearch
          last edited by 4 Oct 2023, 07:11

          @ayalaresearch try configuring OpenPnP to use port 23 and line endings LF or CRLF, and use M586 P2 S1 in config.g on 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

          undefined 1 Reply Last reply 5 Oct 2023, 22:47 Reply Quote 0
          • undefined
            ayalaresearch @dc42
            last edited by 5 Oct 2023, 22:47

            @dc42 That didn't seem to work. DWC handles switching between home and work without an issue. I decided to see if I could enable the ethernet port on the 6HC by adding M552 I0 S1 P0.0.0.0 and the router at work assigned it an address no problem. DWC functions on both addresses, simulataneously if I have the WiFi card plugged in and the ethernet cable connected. If either is disconnected, one won't work, but the other continues to function. I continue to get the same message above when I try either of the url's (the wifi or the ethernet).

            When I try M586 P2 S1 and change that in config.g and then try port 23 in OpenPNP, I get this message:66c1dab8-d264-421e-9f11-9dedaa81bb82-image.png

            If I ping either of the urls, I get an expected response ie the duet responds.

            undefined 1 Reply Last reply 6 Oct 2023, 15:38 Reply Quote 0
            • undefined
              dc42 administrators @ayalaresearch
              last edited by dc42 10 Jun 2023, 15:42 6 Oct 2023, 15:38

              @ayalaresearch I'll need to ask Mark what protocol OpenPnP uses when you configure it to communicate over the network.

              I have emailed him.

              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

              undefined 1 Reply Last reply 6 Oct 2023, 17:29 Reply Quote 0
              • undefined
                ayalaresearch @dc42
                last edited by 6 Oct 2023, 17:29

                @dc42 Thanks. I've searched for posts on the subject in the OpenPNP group, but haven't had much luck on the subject. I even looked at wayneosdias set up with a duet in a charmhigh, but that didn't get me very far. It also appears that he is using and sbc, versus a pc over a network.

                Still, it's weird DWC, pinging, all work, but OpenPNP is running into issues.

                undefined 1 Reply Last reply 7 Oct 2023, 20:07 Reply Quote 0
                • undefined
                  dc42 administrators @ayalaresearch
                  last edited by dc42 10 Jul 2023, 20:08 7 Oct 2023, 20:07

                  @ayalaresearch I've had a response from Mark. Apparently, OpenPnP just tries to open a socket on the control board and write/read it. Whereas the Telnet protocol supported by Duet requires a fairly minimalistic username and password before it will accept data.

                  So you will need to use a USB cable. You could create a feature request for OpenPnP to send Telnet-style username and password after opening the socket. I don't expect we will change RRF to support receiving and executing commands without some form of authentication because the security implications would be horrible.

                  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

                  undefined 1 Reply Last reply 9 Oct 2023, 03:07 Reply Quote 0
                  • undefined
                    ayalaresearch @dc42
                    last edited by 9 Oct 2023, 03:07

                    @dc42 Well that's a bummer, just when I thought I was making progress. It occurred to me that on PORT 80, the duet was acting as a server and basically sent the entire DWC interface to my client over tcp/ip for display in my browser. I've done that for another project, but don't remeber all the details, mostly just the concepts.

                    Then thinking about you comment regarding telnet, and that PORT 23 was where telnet messages are sent and received on, I added that into my config.g. I then put that in OpenPNP and viola, I get an error message: 645d6b0d-cc11-44fc-81c2-03846ace1a6d-image.png

                    In YAT, I am successfully sending G-Code back and forth on PORT 23, this is confusing. I realize a huge amount of work goes into this, so I don't want to sound ungrateful either with duet or OpenPNP.

                    Then tried again in OpenPNP and it sorta works, but there is a 15+ second delay in response. If I go to gcodedriver set up tcp, setup url to 192.168.1.111 PORT 23 (not the actual URL on my network) and go to the console tab it will take g-gode commands, I only get "OK" back, probably a regex issue. Some progress, it is still a bit confusing.

                    undefined 2 Replies Last reply 9 Oct 2023, 06:32 Reply Quote 0
                    • undefined
                      dc42 administrators @ayalaresearch
                      last edited by 9 Oct 2023, 06:32

                      @ayalaresearch the response to most GCode commands including movement commands received via Telnet or USB is "OK" and a newline. Commands that have a different response include M114 and M119.

                      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

                      1 Reply Last reply Reply Quote 0
                      • undefined
                        dc42 administrators @ayalaresearch
                        last edited by 11 Oct 2023, 13:39

                        @ayalaresearch I've checked the code and it appears to me that if you don't use M551 in config.g to set a password, then you should be able to connect to port 23 from OpenPNP. However, characters received within 4 seconds of the connection being opened will be discarded.

                        Each command line received by the Duet must be terminated by either carriage return or linefeed.

                        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

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