bdring / PendantsForFluidNC

Pendants for controlling FluidNC CNC firmware
Other
34 stars 13 forks source link

Bekomme keine Verbindung zum FluidDial Pendant #23

Open luft-post opened 6 months ago

luft-post commented 6 months ago

Guten Tag,

ich hoffe Ihr könnt mir Helfen. Ich habe den FluidDial Pendant nach den Wiki Vorgaben aufgebaut und eingerichtet. Ich benutze zum Anschluss an mein ESP32 den UART0 (GPIO3 für Rx und GPIO1 für Tx) In der FluidNC YAML config file habe ich

`uart0: txd_pin: gpio.1 rxd_pin: gpio.3 rts_pin: NO_PIN cts_pin: NO_PIN baud: 115200 mode: 8N1

uart_channel0: report_interval_ms: 75 uart_num: 0`

eingetragen. Leider bekomme ich keine Verbindung zu meinen Pendat. Im Statusfeld steht N/C und die Kreise sind alle Grau (Keine Symbole drin) der Drehkreis und die Auswahltaste funktionieren. Die Ratschläge im Wiki zu Verbindung Schwierigkeiten habe ich beherzigt. Ich habe meine YAML Konfiguration im verdacht finde den Fehler aber nicht.

Was ich nicht richtig verstehe ist das Beispiel im Wiki, da werden gpio.26 und gpio.4 verwendet. Aber die sind nach meinen Recherchen gar keine UART Pins

UART | RX IO | TX IO |

UART0 | GPIO3 | GPIO1 | UART1 | GPIO9 | GPIO10 | UART2 | GPIO16 | GPIO17 |

Habt Ihr eine Idee wo mein Fehler stecken könnte?

Vielen Dank und Gruß Matthias

MitchBradley commented 6 months ago

uart_channel0 and uart0 are for the USB-serial console port. For the pendant it is best to use uart1 and uart_channel1, or uart2 and uart_channel2. If you try to use uart0 and its default pins gpio1 and gpio3, the USB-serial chip on the ESP32 module will interfere with the communications.

Regarding "according to my research, these are not UART pins at all" : For UART1, GPIO9 and GPIO10 are the suggested pin assignments, but it is possible to use almost any GPIO pins instead. ESP32 has an "iomux" that permits the software to reassign pins to functions. There are a few restrictions, for example, you cannot use an "input only" pin as UART Tx. The restrictions mostly apply to pins with numbers above 32.

luft-post commented 6 months ago

ah ok, I understand. I have now entered the following into the .YAML:

uart1: txd_pin: gpio.2 rxd_pin: gpio.16 baud: 115200 mode: 8N1

uart_channel1: uart_num: 1 report_interval_ms: 75

But unfortunately I still can't establish a connection :( I noticed that in FluidNC Terminal I get the message: MSG:DBG: UTF8 decoding error get. I don't know if this is related to my problem. Is there a way to test the FluidNC UART with additional hardware (e.g. PC with RS232 and Hyperterminal)?

greeting Matthias

MitchBradley commented 6 months ago

"UTF8 decoding error" usually means that the baud rate is wrong.

You can indeed use a PC to talk to FluidNC on the uart channel, or to the pendant, but you would need a USB-serial adapter that can be set for 3.3V, not RS232, signaling. RS232 is 12V and would destroy either the FluidNC controller or the M5 Dial.

Since you told us essentially nothing about your setup, nor about how you compiled the pendant code (which branch, any modificiations, etc), that's all I can tell you.

luft-post commented 6 months ago

Hello, You are of course right, at first I assumed that it was a problem that could be solved quickly, but since I didn't make any fundamental progress yesterday evening, I'll now provide some information:

FluidNC hardware: I use a board from: https://docs.timos-werkstatt.de/open-cnc-shield-2/controllermodules/fluidnc

With an ESP32 on it. The FluidNC version I have is v.3.7.15. In the .YAML I have:

uart1: txd_pin: gpio.2 rxd_pin: gpio.16 baud: 115200 mode: 8N1 uart_channel1: uart_num: 1 report_interval_ms: 75

registered.

Because I have followers according to the Wiki article: http://wiki.fluidnc.com/hardware/official/M5Dial_Pendant put into operation. I mean, I use port A (G13,G15) for the connection to FluidNC. As pendant software I use the "main" version from https://github.com/bdring/PendantsForFluidNC/tree/main

Basically, the trailer seems to work as intended, the symbols are there and it responds to the rotary wheel. Unless the connection cannot be established properly.

This evening I will try to connect a USB serial converter to the ESP32 with FluidNC, I hope I can see whether this direction is OK. Is there a command I can send to FluidNC so that FluidNC responds?

I'll try the same thing with trailers...I'm looking forward to the findings.

Thank you very much and greetings Matthias

luft-post commented 6 months ago

Moin, ich wollte hier noch einmal Feedback zu meinen Problem geben. Nachdem ich einen zweiten M5Dial geordert habe, und ich mich mit einen USB-Serial Wandler auf die Rx/Tx Leitungen gesteckt habe, habe ich bemerkt, dass die Stecker für Port A und B auf den M5Dial kein richtigen Kontakt haben (schlechte Qualität der Stecker) deswegen konnte der M5Dial keine Verbindung zum FluidNC aufbauen. Jetzt wo der Fehler behoben ist kann ich die Verbindung ohne Probleme aufbauen.

Vielen Dank für eure Unterstützung und eure Arbeit hier.

Gruß Matthias