Duet WiFi web interface only half working
-
I am having some issues using my Duet Wifi.
The problem started as a file upload issue. I was not able to upload any files larger than about 100KB. I was using Firmware version 1.19.3 when the issues all started.
When I tried to upload gcode files they would fail. I hadn't updated the firmware in a while so I figured id start with that since it was a good idea anyway. Uploading the first couple Bin files worked fine. When I tried uploading the web control files the smaller ones (<100KB) worked fine but the larger ones failed. I then removed the SD card and loaded the files directly to SD. The firmware upgrade completed and the web interface loaded, connected to the printer, but still would not let me upload gcode files.
Next, I figured it could be the SD card so I got a new one and copied all the files from the old SD to the new one. I put that in the printer and nothing worked. Turnes out I bumped the erase button and deleted my firmware. So out comes the USB cable and I follow the directions to get firmware back on the board. Everything seems to go according to plan, no error messages or anything. Once the firmware is loaded again and the new SD card is installed I try to load the web interface.
Now for my current problem. The web page loads partially, sometimes more than others. when I load the page I get a range of results. Sometimes it just loads unformatted text, other times it loads the whole page but its non-responsive and only shows "printer disconnected" status. I have tried reloading all the parts of the firmware; Duet2CombinedFirmware, DuetWiFiServer, and DuetWebControl just to make sure I did it right. None of my efforts have been successful at resolving the website issues.
Other odd behavior I noticed is when I connect over USB using Repetier I get a "No start signal detected - forcing start" message but the connection continues and I am able to send commands to the printer. Also, I get random disconnects while connected USB.
Connection and M122 results
No start signal detected - forcing start N1 M110*34 N2 M115*36 N4 M114*35 ok FIRMWARE_NAME: RepRapFirmware for Duet 2 WiFi/Ethernet FIRMWARE_VERSION: 2.04RC1 ELECTRONICS: Duet WiFi 1.0 or 1.01 FIRMWARE_DATE: 2019-07-14b1 ok N5 M111 S6*98 N6 T0*60 N7 M20*22 N8 M111 S6*111 X:0.000 Y:0.000 Z:214.893 E:0.000 E0:0.0 E1:0.0 E2:0.0 E3:0.0 E4:0.0 E5:0.0 E6:0.0 E7:0.0 E8:0.0 Count 643854 643854 643854 Machine 0.000 0.000 214.893 Bed comp 0.107 ok N9 T0*51 N10 M80*42 Use P parameter to specify which module to debug ok ok Begin file list NONE End file list ok Use P parameter to specify which module to debug ok ok ok N13 M122*16 === Diagnostics === RepRapFirmware for Duet 2 WiFi/Ethernet version 2.04RC1 running on Duet WiFi 1.0 or 1.01 Board ID: 08DAM-999TL-MQ4SD-6J9FG-3S86R-T5AZZ Used output buffers: 1 of 24 (2 max) === RTOS === Static ram: 25680 Dynamic ram: 93080 of which 424 recycled Exception stack ram used: 244 Never used ram: 11644 Tasks: NETWORK(ready,1448) HEAT(blocked,1236) MAIN(running,3844) IDLE(ready,160) Owned mutexes: === Platform === Last reset 00:00:13 ago, cause: software Last software reset time unknown, reason: Stuck in spin loop, spinning module GCodes, available RAM 11228 bytes (slot 3) Software reset code 0x0043 HFSR 0x00000000 CFSR 0x00000000 ICSR 0x0043380f BFAR 0xe000ed38 SP 0x20001f44 Task 0x5754454e Stack: 00444ec3 004488dc 61000000 00000000 00000004 00448b11 20005494 00000001 00000000 00006be4 00000004 2001c7c4 00006be4 00000004 004451b5 00000004 00000000 00000000 0041be77 20001fc4 03b14fff 00000000 00403201 Error status: 0 Free file entries: 10 SD card 0 detected, interface speed: 20.0MBytes/sec SD card longest block write time: 0.0ms, max retries 2 MCU temperature: min 33.5, current 34.2, max 34.7 Supply voltage: min 0.2, current 0.3, max 0.3, under voltage events: 0, over voltage events: 0, power good: no Driver 0: ok, SG min/max not available Driver 1: ok, SG min/max not available Driver 2: ok, SG min/max not available Driver 3: ok, SG min/max not available Driver 4: ok, SG min/max not available Date/time: 1970-01-01 00:00:00 Cache data hit count 34101806 Slowest loop: 1.11ms; fastest: 0.06ms I2C nak errors 0, send timeouts 0, receive timeouts 0, finishTimeouts 0, resets 0 === Move === Hiccups: 0, FreeDm: 169, MinFreeDm: 169, MaxWait: 0ms Bed compensation in use: mesh, comp offset 0.000 === DDARing === Scheduled moves: 0, completed moves: 0, StepErrors: 0, LaErrors: 0, Underruns: 0, 0 === Heat === Bed heaters = 0 -1 -1 -1, chamberHeaters = -1 -1 Heater 1 is on, I-accum = 0.0 === 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 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 === Slowest loop: 39.67ms; fastest: 0.00ms Responder states: HTTP(0) HTTP(0) HTTP(0) HTTP(0) FTP(0) Telnet(0) Telnet(0) HTTP sessions: 0 of 8 - WiFi - Network state is running WiFi module is connected to access point Failed messages: pending 0, notready 0, noresp 0 WiFi firmware version 1.23 WiFi MAC address 5c:cf:7f:2c:25:13 WiFi Vcc 3.39, reset reason Turned on by main processor WiFi flash size 4194304, free heap 24816 WiFi IP address 192.168.1.181 WiFi signal strength -47dBm, reconnections 0, sleep mode modem Socket states: 0 0 0 0 0 0 0 0 ok
Webpage screen shot
Thanks for your help. I am out of ideas.
-
I had this issue with the page showing up like that too some time ago.
I cleared my browser cache (firefox) and tried a different browser, both without success. Opening the webpage from my phone did work.
Rebooting my router (fritzbox) did the trick finally. -
Clearing cache, different browser, different device, all good advice.
Reboot the router? Hmmm... must have some interesting proxying going on in that router. Or it doesn't like parallel TCP streams between local devices, or ...
Certainly worth trying. I have had Duet not get on the network at all, until the router was rebooted. What a PITA.
-
Also, when you upload new firmware via the web interface, it both uploads the files to the /sys directory and installs them into the flash memory on the board and/or wifi module by issuing separate M commands.
If you've had trouble getting this to work, it is at least possible that your alternative methods (physical copy to the SD, etc, etc. ) got the files to /sys, but never loaded them to the board(s).
As such, repeat the uploads via the web interface, or if that is too broken, look up the G-Code to actually install the firmware. Be sure the files on the SD /sys are correct, and issue those commands.
-
Thanks for the recommendation. I got momentary success but lost it again.
I had previously cleared the cache but it didn't fix the issue, but I had not restarted my networking equipment. I had also previously removed and re-added the pairing in the access points web interface but that did not resolve the problem.
Restarting the access point, router, and switch and also clearing cache fixed the problem. I'm not 100% sure what action resolved the issue this time since I did them all at the same time.
I was able to connect to the page for a minute but then got another error "request timed out."
List of actions.
- clear cache in Edge.
- restart network equipment
- restart duet
- connect to the webpage using edge
- everything working, uploaded gcode. FIXED!!
- try connecting using firefox (my main browser)
- page half loads (Img 1) in firefox, at the same time I get "request timed out" in Edge window (Img 2) BROKE!!
- close both browsers
- restart duet
- try connecting with Edge "page cant be reached"
- repeat steps 1-4
- "page cant be reached"
Throughout all of this, I am watching ping and am getting responses when I should.
We were so close.
Img 1 ↓
Img 2 ↓
-
@Danal said in Duet WiFi web interface only half working:
Also, when you upload new firmware via the web interface, it both uploads the files to the /sys directory and installs them into the flash memory on the board and/or wifi module by issuing separate M commands.
If you've had trouble getting this to work, it is at least possible that your alternative methods (physical copy to the SD, etc, etc. ) got the files to /sys, but never loaded them to the board(s).
As such, repeat the uploads via the web interface, or if that is too broken, look up the G-Code to actually install the firmware. Be sure the files on the SD /sys are correct, and issue those commands.
Thanks for the advice. I followed the guides and due to my own mistakes had to go as far as flashing a fresh firmware using USB and BOSSA since I accidentally delete everything. I am getting USB connection now and the board is reporting 2.04RC1, and webServer 1.23 with webControl 1.22.6 which is the firmware I was trying to install, so it seems like the process worked. However, the firmware upgrade mostly seems to have made the issue worse since originally I could connect fine just not upload but now I can't even connect.
-
@niik said in Duet WiFi web interface only half working:
Throughout all of this, I am watching ping and am getting responses when I should.
This is absolutely key. Given that you can ping, the network is functioning correctly.
So... even though we think it is all good... re-flash the Duet. Specifically:
-
Be sure the sys/Duet2CombinedFirmware and sys/DuetWiFiServer.bin files on the SD are the versions that you want. A fresh download won't hurt.
-
Issue M997 S0:1 and wait for it to complete!!
-
Power Cycle the Duet
-
-
After more troubleshooting, I have no idea...
I tried updating the firmware using fallback procedure #1 (as @Danal recommended) and ran into some more issues, details below. I have also included another m122 result since I am now seeing errors in the console maybe the m122 will have more relevant info.
Actions:
- downloaded firmware
Duet2CombinedFirmware.bin (from 2.04RC1)
DuetWiFiServer.bin (from 2.03)
iap4e.bin (from 2.03) - loaded to SD card
- connected to board over USB using repetier
- sent M997 S0:1
- waited for completion (console counted to 100% then I listened for the USB device to disappear and reappear)
5)restarted - pressed connect on Repetier → "Com port does not exist"
- try the other ports. still not working.
- check device manager → "Bossa port" showing instead of Duet
- decide to try another firmware version
- download Duet2CombinedFirmware.bin, DuetWiFiServer.bin, DuetWebControl.zip, iap4e.bin from version 1.21 and load them to the SD card
- loaded firmware using "BOSSA" app following fallback procedure #3
- connect to Duet over USB issue M997 S1 to load the WiFi server that matches the main.
- restart
- try to connect to webConsole → half loads. (img 3) and console reports
Error: Can't open 0:/www/img/diabase_calibration_diagram.png.gz to read, error code 1
I get multiple of those errors depending on what is trying to load. - remove SD And check that the files are on it. They are.
- delete and recreate the www folder and extract the WebControle files to it again
- put SD card back and try again. same issue
Another observation is that after I try to connect to the webpage sometimes the Duet disconnects from USB and I drop like 2-3 pings, so it seems like it is getting reset.
Full console log when trying to access the web page. ↓
New conn on socket 0 for local port 80 HTTP connection accepted Found responder Received 391 bytes Sending reply, file = yes HTTP req, command words { GET / HTTP/1.1 }, parameters { } New conn on socket 1 for local port 80 HTTP connection accepted Found responder New conn on socket 2 for local port 80 HTTP connection accepted Found responder Received 359 bytes Sending reply, file = yes HTTP req, command words { GET /css/dwc.css HTTP/1.1 }, parameters { } Received 412 bytes Sending reply, file = no HTTP req, command words { GET /img/diabase_calibration_diagram.png HTTP/1.1 }, parameters { } Error: Can't open 0:/www/img/diabase_calibration_diagram.png.gz to read, error code 5 Error: Can't open 0:/www/img/diabase_calibration_diagram.png to read, error code 5 Webserver: rejecting message with: 404 page not found New conn on socket 3 for local port 0 HTTP connection accepted Found responder Received 342 bytes Sending reply, file = yes HTTP req, command words { GET /js/dwc.js HTTP/1.1 }, parameters { } New conn on socket 0 for local port 80 HTTP connection accepted Found responder Received 355 bytes Sending reply, file = yes HTTP req, command words { GET /fonts/glyphicons.woff2 HTTP/1.1 }, parameters { } New conn on socket 0 for local port 80 HTTP connection accepted Found responder Received 371 bytes Sending reply, file = yes HTTP req, command words { GET /css/bootstrap-theme.css HTTP/1.1 }, parameters { } New conn on socket 0 for local port 80 HTTP connection accepted Found responder Received 414 bytes Sending reply, file = yes HTTP req, command words { GET /language.xml HTTP/1.1 }, parameters { } Error: Cannot read file. New conn on socket 0 for local port 80 HTTP connection accepted Found responder Received 463 bytes Sending reply, file = no HTTP req, command words { GET /rr_connect HTTP/1.1 }, parameters { password=reprap time=2019-9-24T0:48:37 } New conn on socket 0 for local port 80 HTTP connection accepted Found responder Received 442 bytes
Img 3 ↓
serial: M122 === Diagnostics === Used output buffers: 1 of 32 (3 max) === Platform === RepRapFirmware for Duet 2 WiFi/Ethernet version 1.21 running on Duet WiFi 1.0 or 1.01 Board ID: 08DAM-999TL-MQ4SD-6J9FG-3S86R-T5AZZ Static ram used: 16152 Dynamic ram used: 100400 ReWiFi: Conn 0: free cycled dynamic ram: 2232 Stack ram used: 3576 current, 4488 maximum Never used ram: 7800 Last reset 00:34:18 ago, cause: power up Last software reset time unknown, reason: Stuck in spin loop, spinning module Platform, available RAM 11228 bytes (slot 2) SofWiFi: Conn 1: free tware reset code 0x4040 HFWiFi: Conn 2: free SR 0x00000000, CFSR 0x00000000, ICSR 0x0043380f, BFAR 0xe000ed38, SP 0x20001b5c Stack: 5754454e 00444ec3 004488dc 61000000 00000000 00000001 00448b11 20005494 00000001 20001774 10000000 00000001 20008c78 00006000 00000001 004451b5WiFi: Conn 3: free 00000001 00000000 00000001 0041be93 0000000f 03b14fWiFi: Conn 4: free ff 00000000 0041cc01 Error status: 1 Free file entries: 10 SD card 0 detected, interface speed: 20.0MBytes/sec SD card longest block write time: 0.0ms MCU temperature: min 25.7, current 35.9, max 36.7 SupWiFi: Conn 5: free ply voltage: min 0.0, current 12.3, max 12.5, under voltage events: 0, over voWiFi: Conn 6: free ltage events: 0 Driver 0: standstill, SG min/max not available Driver 1: standstill, SG min/max not available Driver 2: standstill, SG min/max not available Driver 3: standstill,WiFi: Conn 7: free SG min/max not available Driver 4: standstill, SG min/max not available Date/time: 1970-01-01 00:00:00 Slowest main loop (seconds): 0.053961; fastest: 0.000041 === Move === MaxReps: 6, StepErrors: 0, LaErrors: 0, FreeDm: 240, MinFreeDm 237, MaxWait: 18530WiFi: 43626ms, Underruns: 0, 0 Scheduled movWiFi: xmit: 0 es: 3, completed moves: 3 Bed compensation in use: mesh Bed probe heights: 0.000 0.000 0.000 0.000 0.000 === Heat === Bed heaters = 0 -1 -1 -1, chamberHeaters = -1 -1 === GCodes === Segments left: 0 Stack records: 1 alWiFi: recv: 0 located, 0 in use Movement lock held by null http is idle in state(s) 0 teWiFi: fw: 0 lnet is idle in state(s) 0 file is idle 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 autWiFi: drop: 0 opause is idle in state(s) 0 Code queue is empty. === Network === Responder states: HTTP(0) HTTP(0) HTTP(0) HTTPWiFi: chkerr: 0 (0) FTP(0) Telnet(0) Telnet(0) HTTP sessions: 0 of 8 - WiFi - Network state is running WiFi module is connected to access point Failed messagesWiFi: lenerr: 0 : pending 0, notready 0, noresp 0 WiFi firmware version 1.21 WiFi MAC address 5c:cf:7f:2c:25:13 WiFi Vcc 3.39, reset reason Turned on by main processor WiFi flash size 4194304, free heap 16120 WiFi IP address 192.168.1.181 WiFi signal strength -47dBm, recoWiFi: memerr: 0 nnections 0, sleep mode modem SoWiFi: rterr: 0 cket states: 0 0 0 0 0 0 0 0 === Expansion === ok WiFi: proterr: 0 WiFi: opterr: 0 WiFi: err: 0 WiFi: cachehit: 0 WiFi: WiFi: xmit: 53 WiFi: recv: 487 WiFi: fw: 0 WiFi: drop: 179 WiFi: chkerr: 0 WiFi: lenerr: 0 WiFi: memerr: 0 WiFi: rterr: 0 WiFi: proterr: 179 WiFi: opterr: 0 WiFi: err: 0 WiFi: cachehit: 1900 WiFi: WiFi: xmit: 1968 WiFi: recv: 5399 WiFi: fw: 0 WiFi: drop: 678 WiFi: chkerr: 0 WiFi: lenerr: 0 WiFi: memerr: 0 WiFi: rterr: 0 WiFi: proterr: 0 WiFi: opterr: 0 WiFi: err: 0 WiFi: cachehit: 0 WiFi: WiFi: xmit: 24 WiFi: recv: 0 WiFi: drop: 0 WiFi: chkerr: 0 WiFi: lenerr: 0 WiFi: memerr: 0
- downloaded firmware
-
@niik said in Duet WiFi web interface only half working:
- restart
- try to connect to webConsole → half loads. (img 3) and console reports
Error: Can't open 0:/www/img/diabase_calibration_diagram.png.gz to read, error code 1
I get multiple of those errors depending on what is trying to load.
That is really odd. There is no such file in a Duet's /www directory as distributed. In fact, there is no such directory as /www/img. DWC does not use images (png).
(It does use a favicon.ico.gz file, but no other images).I do see that the functions that are built into DWC to automatically put various files in their correct directory, by file extension, WILL build a /www/img directory and put any .png, .jpg, or .jpeg files there. So, at some point in the past, some files with those extensions got uploaded.
My advice at this point:
First, try to fix the www directory:
-
Put the SD in your PC and delete /www (and everything under it). Back it up first, if you wish.
-
Download DuetWebControl-Duet2.zip This is R2.0.0-RC7, which should work fine with the firmware you've loaded. If you want another release, see here
-
Unzip it into a new, empty /www on the SD. After the unzip, the directory should look like:
css (dir)
fonts (dir)
js (dir)
index.html.gz
favicon.ico.gz
... and maybe one or two other files, but NO 'img' directory! -
Put that in the printer and see what you get.
If (and only if) that does not work, build a physically new SD. Be sure and start by formatting the new SD as a "FAT32", and be sure and UNcheck "quick format". Then copy stuff over. Including the newly built www directory.
-
I had the exact same. so this is what i had to do to fix this.
Check your wifi security on your router. duet doesnt seem to like multi mode authentication. Set your router to WPA2-PSK and your problem should be resolved. It wont drop off and the browser will work fine.
-
Test 1
@Danal said in Duet WiFi web interface only half working:First, try to fix the www directory:
-
Put the SD in your PC and delete /www (and everything under it). Back it up first, if you wish.
-
Download DuetWebControl-Duet2.zip This is R2.0.0-RC7, which should work fine with the firmware you've loaded. If you want another release, see here
-
Unzip it into a new, empty /www on the SD. After the unzip, the directory should look like:
css (dir)
fonts (dir)
js (dir)
index.html.gz
favicon.ico.gz
... and maybe one or two other files, but NO 'img' directory! -
Put that in the printer and see what you get.
Results:
Webpage loaded a 404 error and console also reported an errorNew conn on socket 0 for local port 80 HTTP connection accepted Found responder Received 391 bytes Sending reply, file = no HTTP req, command words { GET / HTTP/1.1 }, parameters { } Error: Can't open 0:/www/reprap.htm.gz to read, error code 4 Error: Can't open 0:/www/reprap.htm to read, error code 4 Error: Can't open 0:/www/html404.htm to read, error code 4 Webserver: rejecting message with: 404 page not found
This result makes me think the WebControle and webServer versions I am using are not compatible.
Also, the M122 console output looks odd
12:32:18.716 : WiFi firmware versiWiFi: lenerr: 0 12:32:18.716 : on 1.21
Test 2:
Migrate back to the 2.04RC1 and webServer 1.23 but keep using webControl 2.0.0-RC7loaded relevant .bin files to the SD and installed using fallback procedure #1 steps
Results:
The page starts to load but gets stuck. I no longer get any errors in the console when trying to access the web console.
Verified firmware update
=== Diagnostics === RepRapFirmware for Duet 2 WiFi/Ethernet version 2.04RC1 running on Duet WiFi 1.0 or 1.01 Board ID: 08DAM-999TL-MQ4SD-6J9FG-3S86R-T5AZZ Used output buffers: 1 of 24 (2 max) .... - WiFi - Network state is running WiFi module is connected to access point Failed messages: pending 0, notready 0, noresp 0 WiFi firmware version 1.23
Never gets past this page.
Test 3:
@Danal said in Duet WiFi web interface only half working:If (and only if) that does not work, build a physically new SD. Be sure and start by formatting the new SD as a "FAT32", and be sure and UNcheck "quick format". Then copy stuff over. Including the newly built www directory.
Formated another SD card using SDformatter.exe with settings FULL(overWrite) FORMAT, SIZE ADJUSTMENT ON. The card was previously used in a Pi so I could not format it with windows until the Linux partitions were removed.
Confirmed FAT32 file system
Copied all files from SD1 to SD2.
Results: FIXED!!!
Page loaded and connected to the printer. I uploaded a file a ran a test print.
Couple small errors
- M141: not chamber heater has been configured for slot 0
- Failed to get file list - directory 0:/filaments not found
I think these are relatively self-explanatory errors and I can work through them.
Summery
After all the stuff I think I have an idea about how everything happened.
- I had a network issue that caused my original upload problems.
1.1. Updating the firmware was probably not necessary - My first and second SD cards were bad leading to unexpected and unpredictable results.
2.1. SD1 has been in since I got the board so could have worn out.
2.2. SD2 is an almost new card that was used for pictures like once. So must have been defective or the format I ran on it when I first set it up completed with unknown errors. - SD3 was a card I had in a Pi and it seems to have fixed the issues I was having.
-
-
SD card specification for Duet is here: https://duet3d.dozuki.com/Wiki/SD_Card
(I've just updated the bit about formatting, and size limit)
For M141 error (it's Cura) see: https://forum.duet3d.com/topic/11546/cura-4-2-1-to-duet2wifi-plugin-problem
You need to create a filaments folder on the SD card.Ian
-