Duet Ethernet not responding to UART commands except for M408
-
Hi everyone,
I want to use my Duet Ethernet (Firmware 2.03, Electronics 1.02 or later) to control a 3 axis robot via an arduino-like microcontroller.
The controller in question is a Teensy 4.0 with known good UART.
I've tested the UART connection by sending G-Code commands and printing the responses on my serial terminal.
All G-Codes work as they are supposed to, execpt that I never get a response from the Duet. Only when sending M408 I get the JSON response.Is there a setting that limits the Duet responses to only M408 for UART?
This is the UART configuration in config.g:
M575 P1 B57600 S0Thanks!
-
With
S0
inM575
you're using PanelDue mode and PanelDue only usesM408
so that might be why?Ref https://duet3d.dozuki.com/Wiki/Gcode#Section_M575_Set_serial_comms_parameters and try
S2
instead if you need responses to other commandsedit: no, that'll only work with recent RRF3.x
-
@bearer yeah, i tried S2 too before noticing the RRF3 compatibility.
I'd really like the "ok\n" feedback from the Duet to confirm that the G-Code sent is valid and begin executed.If there is no direct solution I might just connect the Teensy 4.0 via USB to the Duet, but I really wanted to keep the USB free for direct inputs and setup by the user...
-
You could maybe go tcp/ip and telnet protocol if you intend to stick with 2.03? (it'll likely be dropped at some point in 3.x though).
enc28j60 or w5550 are cheap addons with good library support afaik
-
PanelDue accepts only JSON-formatted responses. Therefore, when the serial port is in PanelDue mode and you send a command that does not generate a JSON response automatically, RRF 2.05 and earlier saves any response for later retrieval by the next M408 command. So you need to send M408 to get the response (if any).
RRF 3.1.1 changes this in two respects:
- Most commands that generate a non-empty response cause a JSON response packet to be sent immediately;
- You have the option (using M575) of putting the serial port in raw mode, so that responses are sent in plain text.
-
@dc42 then I'll probably use the USB host port of my MCU to talk to the Duet. Do I need to provide either or both +5V and GND?
-
@Marius-Breuer said in Duet Ethernet not responding to UART commands except for M408:
@dc42 then I'll probably use the USB host port of my MCU to talk to the Duet. Do I need to provide either or both +5V and GND?
GND but not +5V.