@chrishamm tested and it works great. Super fast when compared to M36. Thank you again for your help
Best posts made by AndMaz
-
RE: [Feature Request] GCode to check if file exists
-
[Request] Add `recursiveDelete` to param to `GET /rr_delete`
Is is possible to add a
recursiveDelete
(default tofalse
) toGET /rr_delete
? At the moment it's doesn't seem to be possible to remove a dir if it contains something inside. I would like to avoid overloading HTTP server with a bunch of delete reqs. -
Q: How to check the type of a variable?
Is there a way to check the type of a variable? Something like
typeof(global.fanSpeed)
and result would bebool
,int
,float
,string
,DateTime
,object
orarray
If this is not possible atm, can you please add this feature? It will help a lot with params validation
Latest posts made by AndMaz
-
RE: [Telnet] Random chars in command
Here's the M122, obtained via HTTP, when telnet is showing "Bad Command" error for
echo 123
:Escape character is '^]'. echo 123 Error: Bad command: 0x03]0x18]0x1f]0x05]echo 123 ok M122 Error: Bad command: M122 ok
=== Diagnostics === RepRapFirmware for Duet 2 WiFi/Ethernet version 3.5.1 (2024-04-19 14:40:46) running on Duet Ethernet 1.02 or later Board ID: Used output buffers: 1 of 26 (26 max) Error in macro line 182 while starting up: I2C transmission error === RTOS === Static ram: 23256 Dynamic ram: 77288 of which 0 recycled Never used RAM 4032, free system stack 172 words Tasks: NETWORK(1,ready,34.5%,179) HEAT(3,nWait 5,0.1%,330) Move(4,nWait 5,0.0%,359) MAIN(1,running,65.4%,660) IDLE(0,ready,0.0%,29), total 100.0% Owned mutexes: === Platform === Last reset 184:52:29 ago, cause: software Last software reset at 2024-05-13 14:28, reason: User, Gcodes spinning, available RAM 3320, slot 2 Software reset code 0x0003 HFSR 0x00000000 CFSR 0x00000000 ICSR 0x0041f000 BFAR 0xe000ed38 SP 0x00000000 Task MAIN Freestk 0 n/a Error status: 0x0c Aux0 errors 0,0,0 MCU temperature: min 36.5, current 37.0, max 37.1 Supply voltage: min 23.7, current 23.8, max 23.8, under voltage events: 0, over voltage events: 0, power good: yes Heap OK, handles allocated/used 297/201, heap memory allocated/used/recyclable 6144/5672/1340, gc cycles 18345 Events: 0 queued, 0 completed Driver 0: standstill, SG min n/a Driver 1: standstill, SG min n/a Driver 2: standstill, SG min n/a Driver 3: standstill, SG min n/a Driver 4: standstill, SG min n/a Driver 5: Driver 6: Driver 7: Driver 8: Driver 9: Driver 10: Driver 11: Date/time: 2024-05-21 07:21:05 Cache data hit count 4294967295 Slowest loop: 7.23ms; fastest: 0.15ms I2C nak errors 0, send timeouts 0, receive timeouts 0, finishTimeouts 0, resets 0 === Storage === Free file entries: 7 SD card 0 detected, interface speed: 20.0MBytes/sec SD card longest read time 3.5ms, write time 0.0ms, max retries 0 === Move === DMs created 83, segments created 0, maxWait 0ms, bed compensation in use: none, height map offset 0.000, max steps late 0, min interval 0, bad calcs 0, ebfmin 0.00, ebfmax 0.00 no step interrupt scheduled Moves shaped first try 0, on retry 0, too short 0, wrong shape 0, maybepossible 0 === DDARing 0 === Scheduled moves 0, completed 0, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 0], CDDA state -1 === Heat === Bed heaters -1 -1 -1 -1, chamber heaters -1 -1 -1 -1, ordering errs 0 === GCodes === Movement locks held by null HTTP is idle in state(s) 0 Telnet is idle in state(s) 0 File is doing "G4 S15" in state(s) 0 0, running macro USB is idle in state(s) 0 Aux is idle in state(s) 0 Trigger is idle in state(s) 0 Queue is idle in state(s) 0 LCD is idle in state(s) 0 Daemon is idle in state(s) 0 Autopause is idle in state(s) 0 Q0 segments left 0 Code queue 0 is empty === Network === Slowest loop: 9.95ms; fastest: 0.07ms Responder states: HTTP(0) HTTP(0) HTTP(0) FTP(0) Telnet(1) HTTP sessions: 1 of 8 Interface state active, link 100Mbps full duplex Socket states: 5 2 2 2 1 3
and here's when telnet is ok
=== Diagnostics === RepRapFirmware for Duet 2 WiFi/Ethernet version 3.5.1 (2024-04-19 14:40:46) running on Duet Ethernet 1.02 or later Board ID: Used output buffers: 1 of 26 (26 max) Error in macro line 182 while starting up: I2C transmission error === RTOS === Static ram: 23256 Dynamic ram: 77288 of which 0 recycled Never used RAM 4032, free system stack 172 words Tasks: NETWORK(1,ready,33.9%,179) HEAT(3,nWait 5,0.1%,330) Move(4,nWait 5,0.0%,359) MAIN(1,running,66.0%,660) IDLE(0,ready,0.0%,29), total 100.0% Owned mutexes: === Platform === Last reset 184:53:20 ago, cause: software Last software reset at 2024-05-13 14:28, reason: User, Gcodes spinning, available RAM 3320, slot 2 Software reset code 0x0003 HFSR 0x00000000 CFSR 0x00000000 ICSR 0x0041f000 BFAR 0xe000ed38 SP 0x00000000 Task MAIN Freestk 0 n/a Error status: 0x0c Aux0 errors 0,0,0 MCU temperature: min 36.5, current 36.8, max 37.2 Supply voltage: min 23.7, current 23.8, max 23.8, under voltage events: 0, over voltage events: 0, power good: yes Heap OK, handles allocated/used 297/201, heap memory allocated/used/recyclable 6144/4736/404, gc cycles 18347 Events: 0 queued, 0 completed Driver 0: standstill, SG min n/a Driver 1: standstill, SG min n/a Driver 2: standstill, SG min n/a Driver 3: standstill, SG min n/a Driver 4: standstill, SG min n/a Driver 5: Driver 6: Driver 7: Driver 8: Driver 9: Driver 10: Driver 11: Date/time: 2024-05-21 07:21:56 Cache data hit count 4294967295 Slowest loop: 4.57ms; fastest: 0.22ms I2C nak errors 0, send timeouts 0, receive timeouts 0, finishTimeouts 0, resets 0 === Storage === Free file entries: 7 SD card 0 detected, interface speed: 20.0MBytes/sec SD card longest read time 3.2ms, write time 1.1ms, max retries 0 === Move === DMs created 83, segments created 0, maxWait 0ms, bed compensation in use: none, height map offset 0.000, max steps late 0, min interval 0, bad calcs 0, ebfmin 0.00, ebfmax 0.00 no step interrupt scheduled Moves shaped first try 0, on retry 0, too short 0, wrong shape 0, maybepossible 0 === DDARing 0 === Scheduled moves 0, completed 0, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 0], CDDA state -1 === Heat === Bed heaters -1 -1 -1 -1, chamber heaters -1 -1 -1 -1, ordering errs 0 === GCodes === Movement locks held by null HTTP is idle in state(s) 0 Telnet is idle in state(s) 0 File is doing "G4 S15" in state(s) 0 0, running macro USB is idle in state(s) 0 Aux is idle in state(s) 0 Trigger is idle in state(s) 0 Queue is idle in state(s) 0 LCD is idle in state(s) 0 Daemon is idle in state(s) 0 Autopause is idle in state(s) 0 Q0 segments left 0 Code queue 0 is empty === Network === Slowest loop: 3.72ms; fastest: 0.07ms Responder states: HTTP(0) HTTP(0) HTTP(0) FTP(0) Telnet(1) HTTP sessions: 1 of 8 Interface state active, link 100Mbps full duplex Socket states: 5 2 2 2 1 3
Sorry for @dc42 tagging you but do you have any clue on what might be causing this?
-
RE: [Telnet] Random chars in command
@gloomyandy said in [Telnet] Random chars in command:
So for instance do you ever get this extra output if you just type the command correctly (no editing of the line) and hit enter?
Yep, I do. As shown in prints above simple
echo 1
producesBad command 0x03]0x18]0x1f]0x05] echo 1
. There's no special chars in here nor it's a copy-paste -
RE: [Telnet] Random chars in command
@droftarts @gloomyandy I'm using Duet 2 Ethernet.
In general RRF does not support the use of editing keys (like backspace or the arrow keys) when reading text so it will be seeing the backspace characters you are typing as invalid values.
If enter is causing problems you may need to change what character the enter key is sending in your terminal program.Both
enter
andbackspace
work fine when telnet works "properly". The other keys are not so important to meWhen it misbehaves it "magically" adds random chars, as in the
echo 1
command that's shown in the first image.Network diagnostics that might be useful
Yep, I'll keep you updated.
-
[Telnet] Random chars in command
This is a long standing problem (not just v3.5.1). It's not recurrent but still, it's an annoying one. Sometimes when I connect via telnet to my duet I get random chars.
Example:
another example:
^M
is when I pressEnter
and^?
forBackspace
Closing connection and opening again works fine
This happens on Linux and on Mac.
Any idea of what is going on here?
-
RE: M122 software reset code field and its values
@dc42 @droftarts @jay_s_uk sorry for the spam, can we expect, in near future, RAM-related data exposed via Object-Model or, at least, a way to redirect M122 data to a specific file?
We're going to PROD in few months and I would like to sort this memory issue by then
-
RE: M122 software reset code field and its values
@droftarts will any of the above be possible?
-
RE: M122 software reset code field and its values
@dc42 if exposing this data via HTTP API is not an option, is it possible to redirect the output of
M122
to a file?Something like
echo >"my-file.txt" M122
orM122 F"my-file.txt"
? -
RE: M122 software reset code field and its values
@dc42 thank you for the detailed explanation. I'll keep an eye on the
Never Used RAM
BTW would be possible to expose memory related vars via Object-Model?
Extracting data from M122 is prone to error. I need to update my regex for each firmware version.
Would be super useful to have a consistent API that exposes this kind of data via HTTP
-
RE: M122 software reset code field and its values
@jay_s_uk You're right. I'm on
3.5.0-beta.4
but this also happens with other versions=== Diagnostics === RepRapFirmware for Duet 2 WiFi/Ethernet version 3.5.0-beta.4 (2023-06-08 23:39:39) running on Duet Ethernet 1.02 or later Board ID: <BOARD-ID> Used output buffers: 2 of 26 (24 max) Error in macro line 183 while starting up: I2C transmission error === RTOS === Static ram: 23236 Dynamic ram: 79896 of which 12 recycled Never used RAM 1432, free system stack 184 words Tasks: NETWORK(1,ready,27.9%,242) HEAT(3,nWait,0.1%,331) Move(4,nWait,0.0%,364) MAIN(1,running,72.0%,709) IDLE(0,ready,0.0%,29), total 100.0% Owned mutexes: === Platform === Last reset 01:01:20 ago, cause: software Last software reset at 2023-12-07 11:58, reason: OutOfMemory, Gcodes spinning, available RAM 16, slot 0 Software reset code 0x41c3 HFSR 0x00000000 CFSR 0x00000000 ICSR 0x0041f000 BFAR 0xe000ed38 SP 0x200021e8 Task MAIN Freestk 943 ok Stack: 2001993c 004103d3 200197bc 00400247 200197bc 00000000 000000cc 00400299 00000000 20002288 00000000 20002280 200022d4 0040018d 00000000 00411d7f 20004bb4 40090000 200040f4 ffffffed 00000002 00473fac 200023f8 20002400 00000000 20002288 00000000 Error status: 0x00 Aux0 errors 0,0,0 MCU temperature: min 52.0, current 52.6, max 53.3 Supply voltage: min 23.6, current 23.7, max 23.8, under voltage events: 0, over voltage events: 0, power good: yes Heap OK, handles allocated/used 297/187, heap memory allocated/used/recyclable 6144/5844/1812, gc cycles 119
@dc42 said in M122 software reset code field and its values:
It's easy to run out of memory on Duet 2 if a lot of conditional GCode expressions and/or global variables are used.
Yep, I have 174 global variables in total and my
.g
files have a loooot of conditional expressions. I guess that's the source of my problemBTW what's the meaning of
Never used RAM 1432, free system stack 184 words
? Is it reserved for something? I mean, why theOutOfMemory
error if there's 1432 of never used RAM? -
RE: M122 software reset code field and its values
Hi @dc42 Here's an example:
Last reset 00:00:29 ago, cause: software Last software reset at 2023-12-07 11:58, reason: OutOfMemory, Gcodes spinning, available RAM 16, slot 0 Software reset code 0x41c3 HFSR 0x00000000 CFSR 0x00000000 ICSR 0x0041f000 BFAR 0xe000ed38 SP 0x200021e8 Task MAIN Freestk 943 ok Stack: 2001993c 004103d3 200197bc 00400247 200197bc 00000000 000000cc 00400299 00000000 20002288 00000000 20002280 200022d4 0040018d 00000000 00411d7f 20004bb4 40090000 200040f4 ffffffed 00000002 00473fac 200023f8 20002400 00000000 20002288 00000000
Also, can you explain the
available RAM 16
?16
was the available memory when the reset happened?