Communication Error, Firmware 1.9



  • Hi,

    I updated firmware 1.9 yesterday. Now I'm having constant Communication errors: dwc.js:1 GET http://192.168.1.100/rr_status?type=1 net::ERR_CONNECTION_RESET

    I tried to increase maximum number of AJAX retries to 10. It helped a lot, but I still get errors some times. Also increased Status Update interval from 250ms to 500ms. Also the printer booted (?) itself while printing. It happened 2 times, I'll try to reproduce it so I can debug why it's rebooting mid-print. Printed worked fine before update.

    UPDATE: When the connection error happens and I try to press connect: XHR failed loading: GET "http://192.168.1.100/rr_connect?password=reprap&time=2017-8-17T15%3A21%3A8". For some reason dwc tries to use default password "reprap" to reconnect. I have changed the password. I cant reconnect to printer without refreshing the page and manually entering password again. Also seems that printer just rebooted midprint again at the same time this connection error happened…

    I also installed one new stepper motor at the same time as I updated to 1.19. I'll try to reconnect the old one and "cold print" to test if this still happens with old stepper motor.


  • administrators

    I'm sorry you are having problems with 1.19. If the printer reboots itself again, please run M122 immediately, and post the "Last reset reason" line and the software reset data here.

    I doubt that the changed stepper motor is anything to do with it.

    I'll forward the password issue to chrishamm, the author of DWC.



  • Not sure if this is from last crash (as it was in the morning and I dont remember if I did something after that) but here it goes:

    Last software reset reason: User, spinning module Move, available RAM 3232 bytes (slot 2)
    Software reset code 0x5004, HFSR 0x00000000, CFSR 0x00000000, ICSR 0x0040080f, BFAR 0xe000ed38, SP 0x2001fdbc
    Stack: 00434fcb 20003688 ffffffe9 00000000 00000000 00000000 20003688 000007ff 00407d03 0043a248 47001c00 439caec0 00000000 00000000 00000000 00000000 00000000 4a992075

    I'll post new reason when I get another reboot.

    EDIT: Ok, I get crashes constantly when trying to print something. This is from latest crash:

    Last reset 00:00:37 ago, cause: software

    Last software reset reason: User, spinning module Heat, available RAM 3260 bytes (slot 3)

    Software reset code 0x5005, HFSR 0x00000000, CFSR 0x00000000, ICSR 0x0040080f, BFAR 0xe000ed38, SP 0x2001fdbc

    Stack: 00434fcb 20003688 ffffffe9 00000000 00000000 00000000 20003688 000007ff 00407d03 0043a23a 41000000 4303ea00 00000000 00000000 00000000 00000000 00000000 7fc00000


  • administrators

    Those reset codes suggest that the Duet was trying to send debug info to USB at the time, but no USB device was connected.

    Please check that you do not have any debugging enabled (send M111 to check). Then connect a terminal emulator (e.g. YAT if you are running Windows) or Pronterface (not Repetier) on a PC to communicate with the USB port, and send a couple of commands to check it is working. Then do a print and see what gets sent to USB.



  • M111. debugging is disabled.

    Usb communication works and I can send commands and printer answers as expected. Nothing gets outputed to usb when i start print. The printer crashes every time when it tries to extrude. It does heating and homing just fine but extrusion causes reboot. I tried with another stepper and both have the same issue. I also tried extruding without printing file and it works just fine. Extrudermotor rotates and plastic gets extruded. If it might have had something to do with bad acceleration settings, i tried to tweak those too and it actually was the reason.

    I had
    M566 X800 Y800 Z30 E0 ; Set maximum instantaneous speed changes (mm/min)
    M203 X15000 Y15000 Z1200 E3000 ; Set maximum speeds (mm/min)
    M201 X1000 Y1000 Z1000 E3000 ; Set accelerations (mm/s^2)

    And for some reason this caused firmware to reset. Maybe the accidental 0 in instantaneous speed changes or something? I changed that to 10 and max acceleration to E500 and seems to work now. Still i have occasional Ajax errors but at least now i can print (at least for a while, havent still tested full print)


  • administrators

    Yes it's probably the E0 that caused the problem. That will cause a floating point divide by zero error, which will result in the generation of infinities and goodness knows what else. But I am surprised that the software reset data wasn't informative. I'll look into it.



  • I have the same error

    [[language]]
    Communication Error
    An AJAX error has been reported, so the current session has been terminated.
    Please check if your printer is still on and try to connect again.
    Error reason: timeout
    
    

    it happens even on idle. pressing connect on web interface connects back, but this does not reconnect after Emergency Stop button pressed. power off required.

    i think it is either WiFi frimware or web server.
    i increased timeouts and retry in web interface , but it did not help.

    please advise


  • administrators

    Are you running 1.19 firmware? If so, please run M122 when you are connected and report the WiFi statistics, in particular the RSSI.



  • Mine drops all of the time now after 1.19 , any solution for this
    M122
    === Diagnostics ===
    Used output buffers: 3 of 32 (18 max)
    === Platform ===
    RepRapFirmware for Duet WiFi version 1.19 running on Duet WiFi 1.0
    Board ID: 08DAM-9K9K2-NGNSN-6J9D8-3SJ6S-14U3M
    Static ram used: 21176
    Dynamic ram used: 96128
    Recycled dynamic ram: 1480
    Stack ram used: 1304 current, 5836 maximum
    Never used ram: 6452
    Last reset 00:48:07 ago, cause: software
    Last software reset reason: User, spinning module GCodes, available RAM 3224 bytes (slot 1)
    Software reset code 0x0003, HFSR 0x00000000, CFSR 0x00000000, ICSR 0x00400000, BFAR 0xe000ed38, SP 0xffffffff
    Error status: 0
    Free file entries: 10
    SD card 0 detected, interface speed: 20.0MBytes/sec
    SD card longest block write time: 19.5ms
    MCU temperature: min 50.1, current 50.5, max 55.1
    Supply voltage: min 24.4, current 24.5, max 24.9, under voltage events: 0, over voltage events: 0
    Driver 0: stalled standstill
    Driver 1: stalled standstill
    Driver 2: stalled standstill
    Driver 3: standstill
    Driver 4: standstill
    Date/time: 2017-08-25 20:39:30
    Slowest main loop (seconds): 0.068481; fastest: 0.000000
    === Move ===
    MaxReps: 0, StepErrors: 0, FreeDm: 240, MinFreeDm 240, MaxWait: 0ms, Underruns: 0, 0
    Scheduled moves: 7, completed moves: 7
    Bed compensation in use: none
    Bed probe heights: 0.000 0.000 0.000 0.000 0.000
    === Heat ===
    Bed heater = 0, chamber heater = -1
    Heater 1 is on, I-accum = 0.3
    === GCodes ===
    Segments left: 0
    Stack records: 2 allocated, 0 in use
    Movement lock held by null
    http is idle in state(s) 0
    telnet is idle in state(s) 0
    file is idle in state(s) 0
    serial is idle in state(s) 0
    aux is idle in state(s) 0
    daemon is idle in state(s) 0
    queue is idle in state(s) 0
    autopause is idle in state(s) 0
    Code queue is empty.
    Network state is running
    WiFi module is connected to access point
    WiFi firmware version 1.19
    WiFi MAC address 5c:cf:7f:f8:1f:6b
    WiFi Vcc 3.05, reset reason Turned on by main processor
    WiFi flash size 4194304, free heap 37752
    WiFi IP address 10.0.0.50
    WiFi signal strength -76dBm
    HTTP sessions: 1 of 8
    Socket states: 0 2 0 0 0 0 0 0
    Responder states: HTTP(1) HTTP(0) HTTP(0) HTTP(0) FTP(0) Telnet(0)


  • administrators

    Your WiFi signal strength is only -76dBm, which is to low to give a reliable connection. Changing the WiFi channel on your router may help.



  • here is my M122 too. signal is -76
    however nothing changed in setup but firmware. with previous version connection NEVER failed…

    is there any way to tweak WiFi module?

    perhaps watchdog that will do M552-S0 and M552-S1 after signal lost
    ?

    [c]

    M122
    SENDING:M122
    === Diagnostics ===
    Used output buffers: 1 of 32 (9 max)
    === Platform ===
    RepRapFirmware for Duet WiFi version 1.19 running on Duet WiFi 1.0
    Board ID: 08DAM-9K9K2-NGNS0-7JKDL-3SD6Q-KR37K
    Static ram used: 21176
    Dynamic ram used: 96064
    Recycled dynamic ram: 1544
    Stack ram used: 4008 current, 9300 maximum
    Never used ram: 2988
    Last reset 00:15:50 ago, cause: power up
    Last software reset reason: User, spinning module GCodes, available RAM 3224 bytes (slot 2)
    Software reset code 0x0003, HFSR 0x00000000, CFSR 0x00000000, ICSR 0x00400000, BFAR 0xe000ed38, SP 0xffffffff
    Error status: 0
    [ERROR] Error status: 0

    Free file entries: 9
    SD card 0 detected, interface speed: 20.0MBytes/sec
    SD card longest block write time: 24.9ms
    MCU temperature: min 36.8, current 43.1, max 43.6
    Supply voltage: min 11.8, current 12.0, max 12.1, under voltage events: 0, over voltage events: 0
    Driver 0: stalled standstill
    Driver 1: stalled standstill
    Driver 2: stalled standstill
    Driver 3: standstill
    Driver 4: standstill
    Date/time: 2017-08-27 08:37:51
    Slowest main loop (seconds): 0.078613; fastest: 0.000061
    === Move ===
    MaxReps: 0, StepErrors: 0, FreeDm: 240, MinFreeDm 240, MaxWait: 0ms, Underruns: 0, 0
    Scheduled moves: 0, completed moves: 0
    Bed compensation in use: none
    Bed probe heights: 0.000 0.000 0.000 0.000 0.000
    === Heat ===
    Bed heater = 0, chamber heater = -1
    Heater 0 is on, I-accum = 0.0
    Heater 1 is on, I-accum = 0.2
    === GCodes ===
    Segments left: 0
    Stack records: 2 allocated, 0 in use
    Movement lock held by null
    http is idle in state(s) 0
    telnet is idle in state(s) 0
    file is doing "M190 S110 " in state(s) 0
    serial is ready with "M122" in state(s) 0
    aux is idle in state(s) 0
    daemon is idle in state(s) 0
    queue is idle in state(s) 0
    autopause is idle in state(s) 0
    Code queue is empty.
    Network state is running
    WiFi module is connected to access point
    WiFi firmware version 1.19
    WiFi MAC address 5c:cf:7f:a4:0d:77
    WiFi Vcc 3.04, reset reason Turned on by main processor
    WiFi flash size 4194304, free heap 39720
    WiFi IP address 192.168.11.233
    WiFi signal strength -76dBm
    HTTP sessions: 1 of 8
    Socket states: 0 0 0 0 0 0 0 0
    Responder states: HTTP(0) HTTP(0) HTTP(0) HTTP(0) FTP(0) Telnet(0)

    [/c]


  • administrators

    The WiFi module is already supposed to reconnect if it loses the signal, because we are calling the SDK function that enables that. But that code is closed source and I am not sure that it it working, so it is on my list to test soon.



  • here is another dropout: web intertface lost connection, but i was connected via USB…
    network is running, but IP is lost.

    is it possible to use manual IP instead of DHCP?

    [c]
    Code queue is empty.
    Network state is running
    WiFi module is connected to access point
    WiFi firmware version 1.19
    WiFi MAC address 5c:cf:7f:a4:0d:77
    WiFi Vcc 3.04, reset reason Turned on by main processor
    WiFi flash size 4194304, free heap 39488
    WiFi IP address 0.0.0.0
    WiFi signal strength -78dBm
    HTTP sessions: 1 of 8
    Socket states: 0 0 0 0 0 0 0 0
    [/c]

    Update: M552 P192.168.xx.xx does not update IP address … (even after this command M122 gives IP of 0.0.0.0)


  • administrators

    1. Please try the 1.19+4 version, see separate thread.

    2. For the Duet WiFi, if you want to set the IP address you do that in the M587 command.



  • installed 1.19+4 it does reconnect… but
    what is a way to solder external WiFi antenna to the board?

    which pin or where cable should go?

    p.s. i have a delta printer and board is under heatbed (that is aluminium). at the moment i do not want to change printer setup...
    probably removing heatbed will increase signal strength, but antenna is much convenient


  • administrators

    If you search the web for ESP8266 and external antenna, you will find a few write-ups from people who have done that.

    I too have a delta printer with the Duet under the bed, but I have the wifi antenna poking out through a slot at the side. See https://www.thingiverse.com/thing:965396.


Locked
 

Looks like your connection to Duet3D was lost, please wait while we try to reconnect.