Welcome! Log In Create A New Profile

Advanced

New firmware: recovery from USB disconnection, diagnostics, web interface

Posted by dc42 
New firmware: recovery from USB disconnection, diagnostics, web interface
April 15, 2014 07:32PM
I have released firmware version 057za-dc42. Changes in this release:

- The printer now recovers from disconnection of the USB interface without the print hanging.
- If a print hangs, the firmware resets after 20 seconds, after storing an error code to help in the diagnosis of the problem. Also added a command to test this feature (M111 S1002).
- Removed the limit of 42 files when returning the list of gcode files on the SD card. There is still a limit of about 1000 characters in the total length of filenames that will be returned.
- Reduced the RAM usage by more than 20K, while retaining the ability to serve all web interface files from the Duet.
- M111 S2 response now includes diagnostic info relating to the last software reset.

You can find this version (alongside the older 057y version) at [github.com]. After following the link, remember to press the Raw button to download the file. The recommended web interface version is 0.68 at [github.com], however this will not work with older firmware, so you may wish to run with 0.67 initially.

In the event of a print hang using this version:

1. Wait 20 seconds for the printer to reset itself. You can tell when a reset has occurred because the web interface will indicate that the axes are not homed.

2. Use command M111 S2 to display the debug info. Look for the values "Last reset reason" and "Last software reset code & available RAM".

Anyone wishing to build this version themselves will need some patches to the Arduino core, which I haven't got round to documenting yet.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: New firmware: recovery from USB disconnection, diagnostics, web interface
April 16, 2014 03:08AM
Great work, as ever, downloading now...


Les
Re: New firmware: recovery from USB disconnection, diagnostics, web interface
April 16, 2014 04:01AM
Morning!

Installed 'za' and the output from the USB console is garbled:-

FIRMWARE_NAMrE:RepERapFirmLwTae FI1RMWARE_VRSION:0.57za-dc42 EECRONICSgrinning smileyuet DATE:204-04-15
T:9.2 B:19.7

Memory usage
:
Program static ram used: 39940
Dynamic ram used: 40452r
R ecyecleda dynamic ram: 1528
Curent s
etactk ramusd: 126t4
Mximum stack ram used: 2152

Never used ram: 14232Last rse reason: power up
Last software rese code & available RAM: 0x0000, 16168
Error status: 0Bed probe heights: 0.000 0.000 0.000 0.000
ok

Reverting to 'z' resolves the issue.
Re: New firmware: recovery from USB disconnection, diagnostics, web interface
April 16, 2014 04:45AM
OK, I see what is going on. The -za version discards characters if the USB interface doesn't accept them fast enough. It should only be a problem if there are >1000 characters generated very quickly. Looks like it needs a larger buffer for USB output, or it needs to be prepared to hold up whatever else the firmware is trying to do.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: New firmware: recovery from USB disconnection, diagnostics, web interface
April 16, 2014 04:48AM
Steve, how did you provoke that error? I can't get it to happen with the -za version. None of the commands I tried (M115, M111 S2, M503) produces enough output to fill up the 1K buffer.

[EDIT: I just found I can provoke it by sending lots of M5603 commands in quick succession.]

Edited 1 time(s). Last edit at 04/16/2014 04:54AM by dc42.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: New firmware: recovery from USB disconnection, diagnostics, web interface
April 16, 2014 05:54AM
I've just withdrawn 057za and released 057zb. It fixes the issue reported by Steve and also implements the M80 and M81 commands.

It is still possible to get incomplete USB output if the Duet tries to send a lot of data very quickly. For example, I get incomplete output if I send 4 or more M503 commands in quick succession. However, I consider this acceptable, and better than the print hanging if the USB-connected PC goes to sleep.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: New firmware: recovery from USB disconnection, diagnostics, web interface
April 16, 2014 06:28AM
I can confirm that's sorted the USB debugging issue.

Can I make a feature suggestion please? It would be good if the HTTP debugging was optional - it really clutters the debug output. It's unlikely that someone who wanted to see the HTTP debugging would want to see the other debug details and vice-versa.
Re: New firmware: recovery from USB disconnection, diagnostics, web interface
April 18, 2014 05:12AM
I just found a problem with the 057zb firmware. If you don't have a network cable connected, then it keeps timing out and resetting during startup, so you can't connect via USB. I'll fix this in 057zc, but in the meantime anyone who uses only a USB connection should avoid this version (057y is OK in this respect). Thanks to Kim for drawing my attention to this issue.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: New firmware: recovery from USB disconnection, diagnostics, web interface
April 19, 2014 04:52AM
Quote
dc42
I just found a problem with the 057zb firmware. If you don't have a network cable connected, then it keeps timing out and resetting during startup, so you can't connect via USB. I'll fix this in 057zc, but in the meantime anyone who uses only a USB connection should avoid this version (057y is OK in this respect). Thanks to Kim for drawing my attention to this issue.

Hi dc42,
I'm happily using Z version on USB connection..hot smiley
Printing from SD has no problems.... (done with pronterface or web server gui)hot smiley
Printing from Firefox does not work.... (with all java feature active) after some time simply stop... both printers.sad smiley

I am very happy with Z.. I'm having great prints..
Thanks a lot!!!
Dario
Re: New firmware: recovery from USB disconnection, diagnostics, web interface
April 19, 2014 01:32PM
hot smileyWonderful prints with the new firmware. Thanks for this superior workhot smiley
Re: New firmware: recovery from USB disconnection, diagnostics, web interface
April 22, 2014 06:39PM
I liked 57z? and 58 when it did work for a short while... 57y is cooking on gas here and getting a heavy workout...


Please send me a PM if you have suggestions, or problems with Big Blue 360.
I won't see comments in threads, as I move around to much.
Working Link to Big Blue 360 Complete
Re: New firmware: recovery from USB disconnection, diagnostics, web interface
April 23, 2014 09:21AM
Just had my first hang since using the new firmware.

Program static ram used: 40036 Dynamic ram used: 41780 Recycled dynamic ram: 104 Current stack ram used: 1264 Maximum stack ram used: 2168 Never used ram: 14216 Last reset reason: power up Last software reset code & available RAM: 0x1002, 9640 Error status: 0 Bed probe heights: 0.000 0.000 0.000 0.000

Does that shed any light?
Re: New firmware: recovery from USB disconnection, diagnostics, web interface
April 23, 2014 09:34AM
Steve, can you confirm that you were using 0.58 at the time? Were you printing at the time?

The last reset reason was power up, but there was an automatic software reset before that. The 0x1002 error code indicates that reset was triggered because the network layer locked up. Did you power the Duet down and up again because it became unresponsive? It should have become responsive again after the software reset.

I'll take a closer look at why the network layer may have locked up.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: New firmware: recovery from USB disconnection, diagnostics, web interface
April 23, 2014 10:09AM
Hi

Yes, 0.58

Yes, I was printing (15 minutes from the end of a 2.5 hour print - grr)

I left it a good couple of minutes after it locked up - it did not become responsive again until I hard booted it.

Cheers,

Steve
Re: New firmware: recovery from USB disconnection, diagnostics, web interface
April 24, 2014 08:23AM
57y has been good. If it was altered to accept just the long filenames, and increase the file limit initialy then that would be a real bonus, with no other alterations to start off with. Then add the other stuff slowly bit by bit when it's been prooved.


Please send me a PM if you have suggestions, or problems with Big Blue 360.
I won't see comments in threads, as I move around to much.
Working Link to Big Blue 360 Complete
Sorry, only registered users may post in this forum.

Click here to login