OpenPNP doesn't connect over WiFi, only serial, but DWC works
-
@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.
-
@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:
And here is what I've added to the config.sys:
This got me connect to DWC, but OpenPNP give me:
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.
-
@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.
-
@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:
If I ping either of the urls, I get an expected response ie the duet responds.
-
@ayalaresearch I'll need to ask Mark what protocol OpenPnP uses when you configure it to communicate over the network.
I have emailed him.
-
@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.
-
@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.
-
@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:
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.
-
@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.
-
@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.