grblHAL / grblHAL_MessageParser

Message parsers for the Grbl/grblHAL serial protocol and the grblHAL I2C display protocol
Other
4 stars 0 forks source link

Serial don't connect #2

Open MrKapim opened 9 months ago

MrKapim commented 9 months ago

Hi Terje, me again, lol. Give me a light, walk... I'm using a BTT TFT display developed for Marlin. I partially changed the firmware to communicate with grblHal and in grblHal I enabled the keypad as "2" (UART mode) and off course, the pins (I checked the "serial.c" for this). But I'm lost now because I can't communicate and ioSender doesn't confirm the "capture" of the port to me. See the photo below... What do you think I'm getting wrong???
image

MrKapim commented 9 months ago

I'm sorry. I stopped saying that in the firmware of the display, I added and I'm using this code of yours to communicate and capture the information... But surely, you had already understood this, lol...

terjeio commented 9 months ago

There are several issues:

  1. The keypad handling code has not been added to the F7xx driver that the H7xx is based on.
  2. The call claiming the serial port does not set the pin description.
  3. KEYPAD_ENABLE 2 is input only if not used with MPG_ENABLE 2 to replicate the real-time output to TX.
  4. When more than one serial port is claimed the stream to use for port 2+ has to explicitly be defined.

Fixes:

  1. I have to add the missing code and this has to be copied to the H7xx driver.
  2. I will change the signature of the call so that a description can be added.
  3. You will have to enable MPG mode 2 to get any output.
  4. Either you have to specify the stream id and/or I have to come up with code that does it by algorithm. See the linked code above, it uses the symbols MPG_STREAM and KEYPAD_STREAM to claim the given serial port.

FYI I have a code pending that would allow allocating a serial port for MPG mode without involving the keypad plugin.

terjeio commented 9 months ago

I have just committed the missing code for the F7xx driver, and added the new MPG mode. Note that this requires the latest core.

MrKapim commented 9 months ago

Wonderful!!! grblHal is working. ioSender shows me the MPG capture and also my spindle (ModBus). But my display still doesn't communicate, lol. I'll look into the errors (I'm not a programmer, just a "curious" one). But right away, thank you very much for your help.

MrKapim commented 9 months ago

Huuummm.... I think it's communicating. I'm getting "Persistent Status Info" in a field where I've had the "grbl_data->grbl.state_text)" data presented to identify what status I'm getting. Can you tell me where this phrase comes from? I searched the code and didn't find it (my code from display and grblHal)

terjeio commented 9 months ago

I'm getting "Persistent Status Info" in a field where I've had the "grbl_data->grbl.state_text)" data presented to identify what status I'm getting. Can you tell me where this phrase comes from? I searched the code and didn't find it (my code from display and grblHal)

I have no idea., there is no such string in the source code. And it is hard to tell what could be wrong without access to your code, if can put it in a public repo that might help.