makerbase-mks / MKS-GEN_L

MKS GEN_L is a powerful 3D printer control board with ATMEGA2560 and compatible with RAMPS. V2.1 version the motherboard integrates SPI / UART interface and works with MKS TMC2130/TMC2208 V2.0/TMC2209. It can be used after plugged in. No soldering or flying lead is required ...
https://es.aliexpress.com/item/32802151924.html?spm=a219c.12010612.8148356.1.e4d93944s4tYDC
189 stars 48 forks source link

establish UART communication with my Mac #22

Closed kaine1973 closed 10 months ago

kaine1973 commented 10 months ago

Hello,

I am currently facing an issue with configuring UART on my 3D printer running Marlin 2.0, and I am seeking some guidance.

I have searched through the official documentation, but unfortunately, I couldn't find specific information regarding the configuration of UART in Marlin 2.0. I have checked Configuration.h and Configuration_adv.h files, but there seems to be no direct settings like SERIAL_PORT, RX_PIN, or TX_PIN.

My goal is to establish UART communication with my Mac, and I would appreciate any help or guidance on how to configure UART settings in Marlin 2.0. If there have been changes or new methods introduced in the latest version, please point me in the right direction.

I have also checked the official GitHub repository, but the information there is quite extensive, and I may have overlooked something. If anyone has experience with configuring UART in Marlin 2.0 or can direct me to relevant resources, I would be grateful.

Thank you in advance for your assistance.

sdoe0 commented 10 months ago

Hello kaine, in configuration.h @section machine, i got to choose the Board according to boards.h image

Then there are two serial ports to set. One for Host Connection and one for Stepperdriver image

This is for SGEN_LV2 but i think for gen_L its analog. In Marlin 2.0 the Pins are declared by selecting a Board-Type

kaine1973 commented 10 months ago

Type

Thank you, dMarabou. I am glad that you replied.

At the last time, I set SERIAL_PORT value 0 (default), and SERIAL_PORT_2 value to 1, It did not work.

截屏2023-12-06 09 24 33

Wiring like this, red to tx, and green to rx:

截屏2023-12-06 09 30 43

And I did this because I read this: https://github.com/MarlinFirmware/Marlin/issues/10219#issuecomment-375999216

I'll try your configuration later, see if it works.

Thank you !

kaine1973 commented 10 months ago

Sorry, changing value of SERIAL_PORT to -1 raises an error on building:

截屏2023-12-06 10 20 58
sdoe0 commented 10 months ago

Hi @kaine1973, Are u trying to establish a direct Connection between the Mac and the Board via the AUX Connector? U should use the USB Port for that. Because Otherwise u have to change the Pin Numbering in the Boards.h-File

Can u post a Photo of ur setup or describe it ?