CONSTANT AJAX disconnect errors
-
Hi David
I was documenting my actions in my other thread. I did post to have one closed because they were converging into 1 issue which is the one you have addressed here.
I appreciate the updated documentation and I will follow it to the letter and report back.
Thanks
Tim -
"Check the voltage indication LEDs
If you have a PanelDue, disconnect it from the Duet to reduce the load on the 5V supply. "Done
"Then connect your Duet to a PC using the USB cable."
Done
"Do not apply VIN power to the Duet at this point."
Ok, not powered on.
"Check the LEDs on the Duet. There should be a red LED illuminated close to the USB connector."
I have one illuminated on either side of the USB connector. (I don't remember seeing the one between the USB port and the memory card slot being lit before.)
"On the Duet 0.8.5 and Duet WiFi, the red 5V LED at the edge of the board should also be lit, so should the green 3.3V LED."
I have a red and a green along the edge of the board.
"Connect to a PC via USB and look for the port
If the LEDs are correctly lit, go to your PC and see whether a new COM port appeared when you plugged in the USB cable. Under Windows you do this by loading Device Manager, then expand "Ports - COM and LPT"."Interesting!!!, I now have Bossa Program Port (COM6)!!!. I always checked by running listcomports from a Dos CMD window.
"If a port called "Bossa port" is shown then the firmware has been erased. Perhaps you pressed the Erase button. You need to re-install firmware via USB. How to do this for the Duet WiFi is described in section "Fall-back procedure #3" in Updating main firmware."
Ok, I will retrieve that document and carry on from there.
" The Bossa Port should appear; if it does then you can upload firmware using SAM-BA or Bossa/bossac 1.8 as described in section "Fall-back procedure #3" in Updating main firmware."
Will do
From this document
https://duet3d.com/wiki/Updating_main_firmware"Fallback procedure #3
Only use this if the firmware on the Duet WiFi has been corrupted, or if you have accidentally pressed the Erase button, so you can’t connect over USB with Pronterface even with WiFi disabled in config.g."That is my situation.
"You will need a Windows or Linux PC."
Ok, Got one handy - Windows 10
"Download the main firmware file (DuetWiFiFirmware.bin for the Duet WiFi, DuetEthernetFirmware.bin for the Duet Ethernet) from https://github.com/dc42/RepRapFirmware/releases."
This link goes to a directory of individual files under 1.19.2, not a packaged .zip file (Since I only want the one file that's ok)
"Verify that the downloaded firmware file has the correct size, as shown on the page you downloaded it from."
Size matches at 323KB
"Download and install SAM-BA version 2.17 from here http://www.microchip.com/DevelopmentTools/ProductDetails.aspx?PartNO=Atmel%20SAM-BA%20In-system%20Programmer"
Version 2.17 downloaded
"Connect the Duet WiFi to your PC via USB. Press the Erase button on the Duet WiFi, then the Reset button."
Done (Checked Ports in Device Manager - Bossa Program Port (Com6) still there
"Load SAM-BA. It usually detects the correct COM port automatically. "
SAM-BA selected COM1 (Communications Port)
I selected COM6
There is another port listed which is \USBSerial\COM6Select board at91sam4e8-ek. Press Connect.
Select board. Received "Invalid Chip ID" popup message stating
"Can't connect at91SAM4c8-ek"
I'm sure I selected at91sam4e8-ek"
Tried again on COM6 - same message except it says at91sam4e8-ek
Tried again on \USBSerial\COM6 - same message including at91sam4e8-ek
Tried again on COM1 and it took a little longer to respond but I got the same message.Device Manager is still showing Com6 as Bossa Program Port (Com6)
"In the Send File Name box enter or browse to the DuetWiFiFirmware.bin file to be loaded, then press Send File (leave the Address at the default of 0x400000). On completion it will invite you to lock the region; press Yes.
If desired, press Compare sent file with memory.
Press the Execute button next to the Boot from Flash option in the Scripts box. Then exit SAM-BA."I could not do the block above because of the Can't connect at91sam4e8-ek so I am going to continue on with the reset of the document
"If you are unable to run SAM-BA (for example because you want to update the firmware from a Mac), you can alternatively use Bossa 1.18 (not an earlier version) from https://github.com/shumatech/BOSSA/releases. "
Downloaded and installed.
"The interactive version (Bossa) does not work on high dpi screens, but you can still use the command line version (bossac). If you use the interactive version, you must check boxes Erase all, Lock, and Boot from Flash before pressing Write. If you use the command line version, try this command line:"
Windows version posts an error on startup and does not run
Copied command line version into same directory as DuetWifiFirmware.bin"bossac –port=COMxx -U true -e -w -v -b path\DuetWiFiFirmware.bin -R"
Replace COMxx in the above by the COM port number (e.g. COM3) and replace path\DuetWiFiFirmware.bin to the path and name of the firmware file to install."
entered bossac –port=COM6 -U true -e -w -v -b DuetWifiFirmware.bin -Rreturned error message "bossav: extra arguments found"
From the help file, the option -U indicates it is used to "force serial port detection to USB if BOOL is 1 [default]"
I read it as [BOOL] is defaulted to 1 earlier in the help file by including -b because it says the default for BOOL is 1. Therefore, the -U will default to force serial port detection to USB because that is the default for -U if -b is used.
Removed "true" from command line argument
Entered bossac –port=COM6 -b -U -e -w -v-DuetWifiFirmware.bin -RReturned
Erase flashDone in 4.022 seconds
Write 330452 bytes to flash (646 pages)
[====================]
Done in 10.251 seconds
Verify 330452 bytes of flash
[====================]
Verify successful
Done in 9.250 seconds
Set boot flash trueSo. I am taking a bit of a break and then I believe I need to continue back at Fallback Position 1
I thank you so much for the expanded documentation which was critical to my getting this far.
If I may, I would suggest placing -b in front of -U and removing the word true from your document. I have verified the command above.
I mean nothing by my statement and I am not correcting your command for bossac.exe. There are a million different command line exe with all sort of different options tagged along behind them. I just checked the help file to see if I could spot something I would recognize.Best regards,
Tim -
Ok, to follow on from where I left off.
Disconnect / reconnect USB cable
Device Manager Ports
Duet Wifi or Duet Ethernet 3D printer control electronics (COM7)So I believe I start back in where the documentation says to load Pronterface.
My config.g has ; added to comment out all of the lines.
Loaded PronterfaceSelected COM7 and connect
Returned
Connecting…
Printer is now onlineI issued M997 S0:1:2
Returned File DuetWifiServer.bin not found
I issued M997 S0
Returned Error: Firmware Binary DuetWifiFirmware.bin not foundI issue M115
Returned FIRMWARE_NAME: RepRapFirmware for Duet Wifi
FIRMWARE_VERSION: 1.19,2
ELECTRONICS: Duet Wifi 1.0
FIRMWARE_DATE: 2017-09-01I have pulled the memory card and put it in my PC.
DuetWebControl.bin
DuetWifiServer.bin
DuetWifiFirmware.bin
are all located in the \sys folder on the card.I tried M552 S0
Returned Wifi module started
Error: Failed to initialise WiFi Module, code -10That makes sense to me. DuetWifiControl.bin has not been loaded, and neither has DuetWifiServer.bin.
So, not sure where to go from here. I can connect to the board, I have the files. Pronterface sees the board and talks to it, but the 3 .bin files appear to be invisible to Pronterface.
Suggestions?Thanks
Tim -
Do you need the iap4e.bin in there as well?
-
Thanks for your detailed feedback.
I'm surprised that SAM-BA didn't work for you. I've not heard of that happening before.
The Bossac command line I gave in the wiki was correct for older versions of bossac but it looks like the options have changed in version 1.18. I'll update the wiki as you suggest.
File DuetWiFiServer.bin is not required with firmware 1.19 and later. You have already updated the main firmware, so you need only send M997 S1 to install DuetWiFiServer.bin.
HTH David
PS - the iap4e.bin file is needed for doing main firmware updates over the web or from SD card.
-
I have started to run into the dreaded AJAX Disconnect prob but have tracked it down to the router (Netgear D6400).
It would disconnect after anything from 2-5 hours or so not actually timed it but seems like that Router is only 8 feet max away from the Duet and only Chipboard/plasterboard between them.
Have plugged in my TP-Link TL720N in as an AP Extender and all is now good S I am now suspecting that some of the issues may well be the AP's in use but can't categorically confirm this.
Duet is on 1.20A7
Incidentally spent a few hours yesterday and Friday evening trying to get a friend of mine's Replikeo supplied Duet0.6 working and it came out the his Virgin Hub would not communicate with it at all plug it thru a TP-Link router that he had lying around and it came straight up again telling me that there are some flaky network routers out there.
Just thoughts
Doug
-
Hi David
Spot on!!!I can't give an error message for SAM-BA as it did not return anything specific, just opened a window that said there was an error and quit.
I connected this morning with Pronterface on Com7 (Duet Wifi or Duet Ethernet)
Entered M997 S1. It did the erase and cycled right on up to Upload Successful!!!Thank you so much.
now to set up the network
Tim
Does the board have to be powered up to initialize the wifi module?
I got a failed to initialize wifi module, code -10
Power on still failed to initialize module. code -10
I'll go back through the documentation to make sure I am doing the right things
-
Hi
I found this post id=2443#p24224 which would indicate that there is a mismatch in my firmware versions. I had intended to migrate to v1.20.7 when I started this, so I think I will try that now with a fresh download.
Tim -
Yes, the code -10 normally means you are using 1.19 or later DuetWiFiFirmware with a pre-1.19 version of DuetWiFiServer. You should be able to fix it by copying the new DuetWiFiServer.bin file (version 1.19) into /sys on the SD card, then use M997 S1 to install it.
Once you have versions 1.19 or later of both DuetWiFiFirmware and DuetWiFiServer installed and running, future upgrades will be much easier.
-
Hi
Thanks for the confirmation.Upload of DuetWifiServer.bin successful
I have gone through the balance of the commands to set up the network and I am currently connected with an IP address from my router.
Thank you for your time and patience.
I am now connect from DWC and when it connected, it did not just wait a couple of seconds and drop the connection. -
Glad you got it working! I'm sorry I was short with you earlier on.
-
3 hours at idle. Did not disconnect
-
I'm sorry I expressed my frustrations out loud. Normally I'm much more patient.
At some point I am going to reconnect the IR Sensor. I was getting the 4 red flashes shortly after power up, and then at about 10 mm it would register 408/409. At 3 - 5 it would register 440 - 441, but it never went over 500. I did try a completely different cable with the same results, so if you could give that some thought, I'd appreciate it. The green light on the edge of the board means my 3.3v is ok, right?
I'm using limit switches on all axis now, but I would use the probe on the hot end for bed leveling, as soon as I can print up a bracket for it!.
Thanks,
Tim -
I am fairly certain that either you have the OUT pin from the sensor connected to the wrong pin on the Duet (it should go to the pin marked IN on the underside of the Duet, which is the end one next to the PanelDue connector), or you have a bad crimp connection in that wire.
-
I will check the pins. I did not build either of the two cables that I am using. There is no doubt that I was careful to make sure that the orientation of both ends of the connects matched between what I took out and what I put it, so it the original was backwards, it's replacement would also be backwards.
I should ask a more important question. Is the cable three wires at both ends? I ask because if signal out from the sensor should go to the in port on the wifi board probe connector, I will not have a 4th pin on my cable to pick up 3.3v from the other end of that probe connector. Which every way I go, I have 3 lines from the sensor going to 4 lines on the board. I thought one end on the wifi board was not used,.
I will look it up to be sure. I'm trying to reset my movement settings since all the gcode files were replaced when I deleted /sys and installed fresh with the firmware. Yes, you're right! It would have been wise of me to have written my gcode files out somewhere when I could get at them and they were working. You can bet I will when I get them fixed.
-
I have started to run into the dreaded AJAX Disconnect prob but have tracked it down to the router (Netgear D6400).
It would disconnect after anything from 2-5 hours or so not actually timed it but seems like that Router is only 8 feet max away from the Duet and only Chipboard/plasterboard between them.
Have plugged in my TP-Link TL720N in as an AP Extender and all is now good S I am now suspecting that some of the issues may well be the AP's in use but can't categorically confirm this.
Duet is on 1.20A7
Incidentally spent a few hours yesterday and Friday evening trying to get a friend of mine's Replikeo supplied Duet0.6 working and it came out the his Virgin Hub would not communicate with it at all plug it thru a TP-Link router that he had lying around and it came straight up again telling me that there are some flaky network routers out there.
Just thoughts
Doug
Your thought on the APs is interesting. Currently I am running 1 Airport Extreme Base Station and 3 Airport expresses. 2 are set to extend the network, and the 3rd is just set to join the network (it handles a POE switch in my attic for security system).
Tomorrow my new router will be here (Tenda AC18) and I will do away with all of the previous network hardware (except the attic stuff) and start the network from scratch.
-
I continue to have wifi connection issues.
Disconnects mid print
Disconnects when sitting idle
Disconnects part way through a G32 calibrate routine.On a possibly related note. I happened to be watching the print screen right at the time prior to a disconnect.
The temperature/time graph, which has a very straight line for temp, was suddenly going very jittery, such that the right side 1/4 of the line was suddenly 1/4" high of very compact squiggles as temp was read high/low.
I was about to take a screenshot when it disconnected, and of course the histogram disappears…....I'm using a PT100 on a smart effector system. The temp line, when I'm actually connected and can see it, is typically very straight, maybe a minor bump every now and then. This was a solid couple of min (1/4 of the time line) where it was extremely erratic temp readings. Then a disconnect.
May be related, maybe not, as it also disconnects in a calibration or idle when there is no temp.
-
I'm sorry to hear that you are still having problems. See https://duet3d.com/wiki/WiFi_disconnections_and_AJAX_timeout_errors.
The fluctuating temperature readings could indicate interference, or a power supply issue. Check that the VIN terminal block screws are tight (check the bed heater output terminals too).
-
I have done everything in the wiki page linked
My RSS is at -38, its not a wifi strength issue.
I have now commissioned two printers, each with duet wifi. This issue is the same on both.Right now i would not recommend this board to anyone as its disconnection issue makes its use beyond frustrating and many of the "features" are missing if you only have connection through the PanelDue and not the browser.
I would exchange them both for ethernet versions where I could hook them up to a router acting as a bridge, or a $20 travel router which is actually able to keep a connection.
-
I'm sorry to hear that you are still having problems with staying connected. Are you running the latest stable version (1.19.2) of both DuetWiFiFirmware and DuetWiFiServer? Look on the Settings/General tabe of DWC to check.
If you are running the latest versions, then it would be helpful for me to know the following:
1. Does it disconnect when the printer is idle, or only when printing?
2. When connection from the browser is lost, are you able to reconnect by pressing the Connect button?
3. If you are not able to reconnect by pressing the Connect button, please send M552 or M122 from USB and let us know whether it says the wifi module is connected to the access point, or is idle.
4. If it disconnects only during printing, please run M122 after a print and report the MaxReps value it prints. Note that MaxReps is cleared every time you run M122, so only the first time you run it after completing a print has any meaning.
5. What do you have the Max Retries set to in DWC?