Site Navigation

Your Account

Choose Language

WiFi disconnections and AJAX timeout errors

If you find that your web browser repeatedly disconnects from the Duet, typically with an AJAX Error message from older versions of DuetWebControl or "The last HTTP request has timed out" from version 1.20 or later, follow these troubleshooting steps. Many of them relate to the Duet WiFi only, but some are also applicable to the Duet Ethernet.

Troubleshooting ¶ 

  • Make sure you are running the latest stable versions of the main firmware (e.g. DuetWiFiFirmware), the WiFi module firmware (DuetWiFiServer), and DuetWebControl. You can find the latest files at https://github.com/dc42/RepRapFirmware/r.... In particular, Duet WiFiServer 1.19.2 (which requires DuetWiFiFirmware 1.19.2 too) and later versions try harder than earlier versions to reconnect to your access point if the WiFi connection is lost. You can check which versions you are running on the Settings/General tab of Duet Web Control.
  • If an AJAX Error is reported, check the Error Reason given at the bottom of the error message box. If it is anything other than Timeout, this indicates mismatched versions of Duet Web Control, or possibly a bug. If you are running the current stable firmware versions, or later beta versions, report the problem on the forum.
  • If the disconnection always happens when you switch to the GCode Files page in Duet Web Control, see Network disconnections after uploading large files.
  • Run M122 from either the web interface (if you can reconnect) or from USB. In the Network diagnostics, check the WiFi signal strength, also called RSSI. Values in the range -30 to -50 are good, -50 to -60 is OK, -60 to -70 is marginal. Anything below -70 is weak and likely be unreliable. See below for how to improve RSSI.
  • Also in the M122 Network diagnostics check the WiFi Module Reset Reason. It should be "turned on by main processor". If it is anything else (e.g. "exception"), report the problem on the forum.
  • In Duet Web Control, on the Settings/General tab check that "Maximum number of AJAX retries" is at least 3.
  • Are the disconnections related to another device that uses the 2.4GHz band? Typical devices that may cause problems include cordless telephones, baby monitors, and leaky microwave ovens.
  • Try changing the channel on your WiFi router. Most routers default to Auto, but can be set to use a fixed channel instead. The channels overlap, so it is common to use channel 1, 6 or 11. This may also help if another device is causing interference. We have some feedback that channel 6 gives better results than channel 1.
  • Is the connection stable when the printer is idle, but unreliable when printing? If so then there may be too few CPU cycles to service the network interface, because of an excessive step pulse rate. Check the M122 report after a disconnection during a print, or after completing the print, and look at the MaxReps figure in the Move diagnostics. This value should be kept below about 50. If it is higher, reduce either microstepping (M350) or maximum speed (M203). Please note, MaxReps is reset when you run M122 so only the value the first time you run M122 after a disconnection or completion of a print is significant.
  • Also if the connection is stable when the printer is idle but not when printing: could it be temperature-related? Does the disconnection occur when the CPU temperature displayed in DWC reaches a certain value? If so, try cooling the Duet with a fan, if you are not doing so already.

How to improve RSSI ¶ 

  • If your printer is largely constructed from metallic components, make sure that the WiFi antenna at the edge of the Duet WiFi is outside of or at the edge of the metallic structure, so that radio waves from your router can reach it unimpeded.
  • Move the printer and your router closer to each other. Avoid having solid walls between them.
  • Try a different WiFi channel (see earlier)
  • Consider locating a WiFi repeater in the room with the printer
  • It's now possible to replace the ESP-12F WiFi module on the Duet by an ESP-07S with external antenna, but this is not an easy modification to make unless you are experienced with hot air SMD rework and have the necessary equipment.

One Comment

A method I just attempted successfully to improve RSSI was to create a Wireless Hosted Network on a computer close to the printer. This means that my Duet is accessible to that computer, via it’s network, but is not connected to my router, or the internet.

James Rowlands - Reply

View Statistics:

Past 24 Hours: 3

Past 7 Days: 35

Past 30 Days: 224

All Time: 1,394