bigtreetech / BIGTREETECH-TouchScreenFirmware

support TFT35 V1.0/V1.1/V1.2/V2.0/V3.0, TFT28, TFT24 V1.1, TFT43, TFT50, TFT70
GNU General Public License v3.0
1.3k stars 1.65k forks source link

M300 does not work through octoprint #1702

Closed thsrp-bob-roger closed 3 years ago

thsrp-bob-roger commented 3 years ago

Hello Bigtreetech! Please, PLEASE... Can you correct a little bug which should be easy to fix ... the Gcode M300 Play Tone (M300 Sxxx Pxxx) function works perfectly when printing through the SD card reader of the screen but is totally " silent "when printing through Octoprint

Thank you Bigtreetech !!

Guilouz commented 3 years ago

Already reported here : https://github.com/bigtreetech/BIGTREETECH-TouchScreenFirmware/issues/1099

thsrp-bob-roger commented 3 years ago

Yes but I don't know why BIGTREETECH hasn't done anything since September 2020 ?

oldman4U commented 3 years ago

This is an open source software project. So the question is more why no other user - like you and me - did it.

oldman4U commented 3 years ago

Like radek8 wrote. I am not sure this can be done in software even it looks like a trivial thing.

bigtreetech commented 3 years ago

BTT's touch screen is actually a host of the same level as octoprint. If M300 is sent from the TFT, the TFT will parse and control the buzzer to make the proper sound. However, if M300 is sent from octoprint to the motherboard, the motherboard's (Marlin) current protocol will not notify TFT through serial, so TFT can't know how and when to make the sound, To achieve this function, we need alse to modify the protocol in the mainboard(Marlin) first. Let Marlin broadcast the M300 code to other host through serial port when Marlin received M300 code.

bigtreetech commented 3 years ago

BTT's touch screen is actually a host of the same level as octoprint. If M300 is sent from the TFT, the TFT will parse and control the buzzer to make the proper sound. However, if M300 is sent from octoprint to the motherboard, the motherboard's (Marlin) current protocol will not notify TFT through serial, so TFT can't know how and when to make the sound, To achieve this function, we need alse to modify the protocol in the mainboard(Marlin) first. Let Marlin broadcast the M300 code to other host through serial port when Marlin received M300 code.

So the key point is whether this function is necessary to modify the Marlin section

kind3r commented 3 years ago

Or just connect your octoprint to the TFT, this way it will intercept M300 and buzz for you. The rest will go to Marlin.

lightmaster commented 3 years ago

I am unable to get M300 to play from a gcode file saved on SKR 1.4 Turbo's MicroSD card, even when that "print" is initiated by the TFT.

lightmaster commented 3 years ago

Or just connect your octoprint to the TFT

How? The RPi3/4 can not be placed in OTG mode, therefore can not connect to a USB-A host.

kind3r commented 3 years ago

I am unable to get M300 to play from a gcode file saved on SKR 1.4 Turbo's MicroSD card, even when that "print" is initiated by the TFT.

That is because the G-code is no longer passing through the TFT but instead read by the SKR straight from it's SD Card.

In 'normal' operation, when starting a print, the TFT reads the g-code from it's SD Card/USB and sends it to the printer. This way, it can 'see' what g-code it is sending and filter out and react to lines like M300.

Or just connect your octoprint to the TFT

How? The RPi3/4 can not be placed in OTG mode, therefore can not connect to a USB-A host.

Depending on the TFT you have, there may be extra serial ports on it. You can connect the PI to one of those ports instead of the SKR (you can use a USB/TTL adapter or the serial port on the GPIOs). Then the PI would send the commands to the TFT which will forward them to the SKR. This way, the TFT will 'see' all the g-code flowing from the PI to the SKR, filter and react to commands like M300.

guruathwal commented 3 years ago

There is only one speaker on the TFT. Only one device will be able to control it at a time. M300 will only work if it originated from TFT because Marlin does not forwards the commands to the TFT. When printing from the Onboard SD or through any other host, the TFT does not have any info about it.

thsrp-bob-roger commented 3 years ago

There is only one speaker on the TFT. Only one device will be able to control it at a time. M300 will only work if it originated from TFT because Marlin does not forwards the commands to the TFT. When printing from the Onboard SD or through any other host, the TFT does not have any info about it.

Hello, what I do not understand is that with the original TFT screen (very low end) of the CR10S pro, we have the sound of the M300 when we print via Octoprint.? the original screen is connected in serial like the Bigtreetech, and the speaker is on the screen like the Bigtreetech ... The motherboard having no speaker or buzzer

bigtreetech commented 3 years ago

Hello, what I do not understand is that with the original TFT screen (very low end) of the CR10S pro, we have the sound of the M300 when we print via Octoprint.? the original screen is connected in serial like the Bigtreetech, and the speaker is on the screen like the Bigtreetech ... The motherboard having no speaker or buzzer

That screen is a DWIN serial screen controlled by the EXTUI protocol of Marlin, not the general gcode protocol. The function of feedback M300 by serial port is encapsulated in EXTUI of Marlin. Although they all communicate by UART, BTT TFT uses the general gcode protocol, which is different from DWIN EXTUI protocol.

Eddiiie commented 2 years ago

M600 not working this way is really bothering me. What do we have to do to get this to work? I have the EXP1 and EXP2 cables connected, it seems the TFT should be able to look at those?

Has anyone Connected Octoprint to the TFT screen? Does this work OK? I would do it; get rid of the USB cable going to the mainboard.

There are all sorts of wires, protocols, lights. buttons, but no whistles. Need whistles!!

github-actions[bot] commented 5 months ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.