[M118] How does *send HTTP message* work?
-
Hi gents,
I've successfully sent a message over PanelDue/TX port, but the description says it's also possible over Telnet and HTTP.
How does it work over HTTP, when the Duet WiFi is in access point mode and more than one client is logged in?Background: I want to send data strings to an ESP32, while controlling the printer with DWC on a PC.
-
@o_lampe said in [M118] How does *send HTTP message* work?:
Hi gents,
I've successfully sent a message over PanelDue/TX port, but the description says it's also possible over Telnet and HTTP.
How does it work over HTTP, when the Duet WiFi is in access point mode and more than one client is logged in?Background: I want to send data strings to an ESP32, while controlling the printer with DWC on a PC.
For simple strings of data Telnet works fine.
Frederick
-
-
@o_lampe said in [M118] How does *send HTTP message* work?:
I've successfully sent a message over PanelDue/TX port
Something weird happens
I'm able to send back a Gcode string (eg. "G92 x100") over PanelDue port, but when I try to send a message back to the DWC console withSerial.println("echo \"Hello\" ");
it sends back this message to the sender instead of DWC console.
Even when I call a macro with the echo command, it doesn't show but instead the printer status toggles from idle to busy repeatingly.
Serial.print("m98 p\"/macros/hello.g\" \n");
FYI, I init the serial port with
m575 p1 b57600 s2
(s2 = raw data, no checksum)
-
@o_lampe said in [M118] How does *send HTTP message* work?:
, but when I try to send a message back to the DWC consol
In my understanding, DWC runs on Duet on a http server (on the ESP8266 Wifi chip), so it needs to be addressed by http and the address is localhost if the program runs on Duet (or Duet's IP address). For special functions, wilriker's program may be useful also: https://github.com/wilriker/rfm
If you want to integrate ESP32, Smuff https://github.com/technik-gegg/SMuFF-Ifc may also be interesting. However, I would try to use SPI, because it's more stable than I2C, if possible.