Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI never sends M408 S1 command with Repetier-Firmware #2

Open
romekb opened this issue Dec 2, 2015 · 15 comments
Open

UI never sends M408 S1 command with Repetier-Firmware #2

romekb opened this issue Dec 2, 2015 · 15 comments

Comments

@romekb
Copy link

romekb commented Dec 2, 2015

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.

@toxuin
Copy link
Owner

toxuin commented Dec 2, 2015

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 toxuin changed the title No M508 S0 / S1 command. No response to M408 S0 / S1 command with Repetier-Firmware Dec 2, 2015
@romekb
Copy link
Author

romekb commented Dec 3, 2015

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.

@toxuin
Copy link
Owner

toxuin commented Dec 5, 2015

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

@toxuin toxuin changed the title No response to M408 S0 / S1 command with Repetier-Firmware UI never sends M408 S1 command with Repetier-Firmware Dec 5, 2015
@romekb
Copy link
Author

romekb commented Dec 5, 2015

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.

@toxuin
Copy link
Owner

toxuin commented Dec 5, 2015

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?

@romekb
Copy link
Author

romekb commented Dec 5, 2015

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 ?

@toxuin
Copy link
Owner

toxuin commented Dec 6, 2015

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.

@Toshik
Copy link

Toshik commented Dec 6, 2015

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

@romekb
Copy link
Author

romekb commented Dec 6, 2015

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

@toxuin
Copy link
Owner

toxuin commented Dec 12, 2015

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.

@romekb
Copy link
Author

romekb commented Dec 12, 2015

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

toxuin added a commit that referenced this issue Dec 13, 2015
toxuin added a commit that referenced this issue Dec 13, 2015
@dc42
Copy link

dc42 commented Dec 17, 2015

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
Copy link

dc42 commented Dec 17, 2015

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

@toxuin
Copy link
Owner

toxuin commented Dec 17, 2015

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.

@dc42
Copy link

dc42 commented Dec 17, 2015

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 notifications@github.com 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:
#2 (comment)

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants