ESPRINTER icon indicating copy to clipboard operation
ESPRINTER copied to clipboard

UI never sends M408 S1 command with Repetier-Firmware

Open romekb opened this issue 9 years ago • 15 comments

Hi ! I testing ESPRINTER with last Repetier code. I get Machine name, firmware version and file listings but no current machine status. After debugging serial commands from ESP8266 to Repetier I found a M117 commands (info), M408 S2, M408 S5, M20 S2 and M36 (sd listing) commands. No any M408 S0/S1, and no current parameters displayed. Axis control work, I can start printing via web interface, sending G commands work to. No any status data, themperatures ect (no M408 S0/S1) commands from ESP8266. Tested with Firefox and Chrome with the same result.

romekb avatar Dec 02 '15 23:12 romekb

Are you sending the requests, but having no responses? (like, being disconnected from the web interface) Or the web interface just never asks for data (not sending M408 S1)?

toxuin avatar Dec 02 '15 23:12 toxuin

Web interface never asks for data (never send M408 S1) But after click connect on web page, web interface send M408 S2 , then M408 S5. But never M408 S1.

romekb avatar Dec 03 '15 13:12 romekb

I've done some investigating and am testing a fix now. Will update the repo soon.

toxuin avatar Dec 05 '15 17:12 toxuin

Ok. I can test it too. But I found one more problem. The buttons on confirmation windows (after file uploading, after click ATX power off or after click "Return to defaults") are not clicable. If I click on these button, the window go out, but action is not executed. Only way to click these buttons is select it via keyboard TAB key, then press ENTER on keyboard.

romekb avatar Dec 05 '15 21:12 romekb

That's really weird. I've tested it on latest Chromium and Firefox – both seem to work fine. Do you get any errors in your browser's console?

toxuin avatar Dec 05 '15 21:12 toxuin

Log from Firefox console:

GET XHR http://192.168.1.15/rr_connect [HTTP/1.1 200 OK 891ms] GET XHR http://192.168.1.15/rr_status [HTTP/1.1 200 OK 127ms] TypeError: e.coords is undefined ugly.min.js.gz:1:4822 GET XHR http://192.168.1.15/rr_files [HTTP/1.1 200 OK 155ms] TypeError: e.files is undefined ugly.min.js.gz:1:13864 GET XHR http://192.168.1.15/rr_config [HTTP/1.1 200 OK 157ms] GET XHR http://192.168.1.15/rr_gcode [HTTP/1.1 200 OK 186ms] GET XHR http://192.168.1.15/rr_files [HTTP/1.1 200 OK 174ms] GET XHR http://192.168.1.15/rr_fileinfo [HTTP/1.1 200 OK 178ms] GET XHR http://192.168.1.15/rr_fileinfo [HTTP/1.1 200 OK 180ms] GET XHR http://192.168.1.15/rr_fileinfo [HTTP/1.1 200 OK 258ms] GET XHR http://192.168.1.15/rr_fileinfo [HTTP/1.1 200 OK 256ms] GET XHR http://192.168.1.15/rr_fileinfo [HTTP/1.1 200 OK 316ms] GET XHR http://192.168.1.15/rr_fileinfo [HTTP/1.1 200 OK 240ms] GET XHR http://192.168.1.15/rr_fileinfo [HTTP/1.1 200 OK 277ms]

Maybe my module (ESP-01 upgraded to 2MB of flash) are weird ?

romekb avatar Dec 05 '15 22:12 romekb

It is hard to tell, but shouldn't be the case. I'll test the latest changes on my machine over the weekend and push the update.

toxuin avatar Dec 06 '15 01:12 toxuin

@romekb Did you build Repetier firmware with ESP8266 Duet JSON data support? image

Toshik avatar Dec 06 '15 19:12 Toshik

Of course. And send some fixes to Roland, because firmware has bug in "GCodeFileInfo::init" function. I'm AVR 'C' programer :-)

romekb avatar Dec 06 '15 20:12 romekb

Okay, I see the culprit now. It is a bug in Repetier-Firmware. That's my fault it's there. I've submitted a patch. For the UI popup bug – we should open another issue since those two aren't connected.

toxuin avatar Dec 12 '15 00:12 toxuin

Ok, now I wait for new ESP12 module to exclude an hardware problem, and apply Your patch to repetier code, then test it.

romekb avatar Dec 12 '15 01:12 romekb

I have a similar problem. I am testing with a NodeMCU 1.0 connected to a Duet. I am using stable 2.0.0 of ESP8266 Arduino code because the staging version appears to be older (2.0.0 rc2). When I work around the authentication problem, the browser connects and I see these commands being sent:

M408 S2 M20 S2 P/macros M408 S5 M408 S1

But that's it. The regular polling that the browser should be doing isn't happening. The Javascript console is showing exception "cannot read property axisHomed of undefined". As the Javascript has been minimised, it's a little hard to debug.

dc42 avatar Dec 17 '15 11:12 dc42

void handleStatus() { char type = (server.args() < 1 || server.arg(0).length() < 1) ? '2' : server.arg(0)[0] + 1; Serial.print(FPSTR(STR_M408_S)); Serial.println(type); Serial.setTimeout(5000); // 2s

dc42 avatar Dec 17 '15 11:12 dc42

dc42, please confirm this fix solves the problem. From my understanding it was my bug in certain version of Repetier firmware that was not sending full extended response, but only the fields that are making it extended. Therefore response parsing function failing half way through and not setting itself for repetition after a timeout. The bug is (hopefully) fixed in latest git version of Repetier.

toxuin avatar Dec 17 '15 20:12 toxuin

Hi Tony, I confirm that it solves the problem, running with RepRapFirmware 1.09m-dc42.

If you refer to the code that implements M408 in RepRapFirmware, you will see that M408 with S0 and S1 implemt the status responses that were used by an older version of the web interface and are still used by PanelDue, S2 S3 and S4 implement the status responses type 1 2 and 3 used by the current web interface, and S5 returns the machine configuration.

Regards David

On 17 December 2015 20:47:50 GMT+00:00, Tony [email protected] wrote:

dc42, please confirm this fix solves the problem. From my understanding it was my bug in certain version of Repetier firmware that was not sending full extended response, but only the fields that are making it extended. Therefore response parsing function failing half way through and not setting itself for repetition after a timeout. The bug is (hopefully) fixed in latest git version of Repetier.


Reply to this email directly or view it on GitHub: https://github.com/toxuin/ESPRINTER/issues/2#issuecomment-165577909

Sent from my Android phone with K-9 Mail. Please excuse my brevity.

dc42 avatar Dec 17 '15 22:12 dc42