# Auto-Recovery for Stuck 4G Dongles and USB Bus

> For AI tools: this is the Markdown copy of https://xproxy.io/document/watchdog-auto-recovery. Every XProxy guide has one at its URL + `.md`; the index of all guides is https://xproxy.io/llms.txt.

Let XProxy renew DHCP, reset stuck dongles and recover the USB controller by itself. Set the limits, read the log and keep disk use low.

XProxy can repair a stuck 4G dongle or a slow USB bus by itself. Turn on auto-recovery, then let it renew the IP, reset the dongle or the USB controller, and keep a log.

**You need:** the XProxy panel on your box. The pricing page lists health check and auto-recovery from the [Basic plan](https://xproxy.io/pricing).

In short

**It acts only when needed**

A dongle with no IP gets a new DHCP request first. A USB reset comes last.

**It has limits**

Backoff and hourly caps stop it from resetting the same dongle again and again.

**It writes a log**

Open **View Log** to see what it did and why.

## How do I turn on auto-recovery?

**Step 1: Open the Advanced tab of System Setting (Dongle DHCP Fix, PCI USB Recovery, Force DHCP)**

In the left menu, open **General Settings → System Setting**. Click the **Advanced** tab.

Scroll down. **DHCP client force requesting** and **Hardware Recovery Options** are at the bottom.

![General Settings, System Setting page with the menu item and the Advanced tab marked (demo data)](https://media1.xproxy.io/docs/watchdog/wd-1-menu-v1.webp)

**Step 2: Turn on Dongle DHCP Fix (Dongle DHCP Fix)**

1. Turn on **Dongle DHCP Fix**. More fields show up.
2. Set when XProxy should act: **No response** in seconds, **Web page down** in minutes (0 means never) and **No IP** in minutes. The defaults are 90, 10 and 3.
3. **DHCP Fix Backoff** slows down repeated fixes of the same dongle. Leave it on.
4. Click **Save**. It applies without a restart.

![Hardware Recovery Options with the PCI USB Recovery and Dongle DHCP Fix switches, the thresholds, backoff, Save and View Log marked (demo data)](https://media1.xproxy.io/docs/watchdog/wd-2-recovery-v1.webp)

> The backoff fields have defaults too: base 60 seconds, maximum 3600 seconds, factor 2. The maximum cannot be lower than the base.

**Step 3: Read the recovery log (Dongle DHCP Fix)**

Click **View Log** (the button after **Save**). The **Dongle DHCP Fix Log** opens and shows the last 300 lines. It refreshes by itself every 5 seconds. **Refresh** reads it now and **Close** shuts the window.

Each line starts with the date and time. You see which dongle was renewed or reset, and why: **link dead**, **web dead** or **no IPv4**.

![The Dongle DHCP Fix Log window with the log text, Refresh and Close marked (demo data)](https://media1.xproxy.io/docs/watchdog/wd-3-log-v1.webp)

> The log is a file on the box, `/opt/xproxy/log/dhcp_fix.log`. It keeps up to about 5 MB, then starts a new file and keeps the old one.

**Step 4: Turn on PCI USB Recovery (PCI USB Recovery)**

Turn on **PCI USB Recovery**, then click **Save**. It applies without a restart.

XProxy then watches the USB controllers of the box. If a controller falls back to a slow speed, or a whole USB bus goes dead, it resets that controller. All dongles on it reconnect and get new IPs.

![Hardware Recovery Options with the PCI USB Recovery switch and the Save button marked (demo data)](https://media1.xproxy.io/docs/watchdog/wd-2-recovery-v1.webp)

> This switch is **off** by default. The two switches work separately: you can use one without the other.

**Step 5: Turn on Force requesting DHCP (Force DHCP)**

Turn on **Force requesting DHCP** and click **Save**.

XProxy then forces a DHCP request on each dongle.

![DHCP client force requesting with the switch and the Save button marked (demo data)](https://media1.xproxy.io/docs/watchdog/wd-4-force-dhcp-v1.webp)

> **Only turn this on when dongles cannot load.** The panel says some dongles on large servers have problems with the DHCP server, and recommends asking support first.

**Step 6: Reset the USB bus of one dongle (Reset USB Bus)**

Open **Proxy Management**. On the row of the stuck dongle, click the arrow next to **Rotate**. Choose **Reset USB Bus**.

The panel says **Sent command reset usb bus successfully!** The dongle disconnects from USB and comes back, a bit like unplugging it and plugging it in again.

![The menu next to the Rotate button of a proxy row with Reset USB Bus marked (demo data)](https://media1.xproxy.io/docs/watchdog/wd-5-reset-bus-v1.webp)

> Try **Reboot** (the item above it) first. Use **Reset USB Bus** when a reboot does not bring the dongle back. It needs the Basic plan or higher.

**Step 7: Set how long logs are kept (Log retention)**

Open **General Settings → System Setting**. On the **System** tab, find **Controller log retention**.

1. **Keep logs for**: 1 to 30 days. The default is 3.
2. **Max total size**: 10 to 2000 MB. The default is 100.
3. Click **Save**.

![Controller log retention with the days, the maximum size and the Save button marked (demo data)](https://media1.xproxy.io/docs/watchdog/wd-6-logs-v1.webp)

> XProxy starts a new log file every day. Old files go when they are older than your days, or sooner (oldest first) when all log files together are bigger than your size.

## What does XProxy fix by itself?

| Problem | What XProxy does | Setting |
| --- | --- | --- |
| A dongle has no IP, or stops answering | Asks for a new IP (DHCP renew). If it stays dead, resets that dongle's USB device. | **Dongle DHCP Fix** |
| A USB controller falls back to a slow speed, or a whole bus goes quiet | Resets that USB controller. The dongles on it reconnect. | **PCI USB Recovery** |
| Dongles on a big server do not get an IP from DHCP | Forces a DHCP request on each dongle. | **Force requesting DHCP** |
| One dongle is stuck right now | You reset its USB bus by hand. | **Reset USB Bus** |
| Log files fill the disk | Starts a new log each day and deletes old ones. | **Controller log retention** |

## How does Dongle DHCP Fix decide to act?

XProxy checks every dongle about every 30 seconds. It goes up one step at a time:

1. **No IPv4 address:** it renews DHCP.
2. **Still dead after your wait:** it resets the dongle's USB device. The wait is **No response** (the dongle does not answer, 90 seconds), **Web page down** (its web page does not open, 10 minutes) or **No IP** (no IPv4, 3 minutes).

It never acts on a dongle while XProxy is rotating, rebooting or resetting that dongle, or for 15 minutes after a firmware upgrade started. It also waits when the panel itself does not answer, and when **never change IP automatically** is on (a renew is still allowed).

Built-in limits, unless support changed them: at most 4 USB resets per hour for one dongle, at most 10 per hour for the whole box, and at least 60 seconds between two resets.

## What does PCI USB Recovery do?

Dongles sit behind USB hubs on the USB controllers of the box. Sometimes a hub falls back from **480 Mbit/s** to **12 Mbit/s** and every dongle behind it gets slow. With PCI USB Recovery on, XProxy:

- resets that controller so the dongles come back at full speed;
- does the same when most dongles on one bus have no traffic and no answer from their gateway for 90 seconds;
- turns off the USB 3 side of a port whose link keeps dropping (10 times in 5 minutes), so the hub keeps running on USB 2.0 until the next reboot.

A controller reset makes **all dongles on it reconnect, and their IPs change**. XProxy does it at most 3 times per hour, and never while a firmware upgrade or flash runs.

## FAQ

### Where is the system watchdog switch?

The current panel has no visible watchdog switch. Stuck dongles are handled by **Dongle DHCP Fix** and **PCI USB Recovery**. To restart the whole app by hand, see [Update XProxy and restart](https://xproxy.io/document/update-xproxy).

### Does anything run when both switches are off?

After you click **Save** here, the recovery service stays on, even with both switches off. It keeps dongles from taking over the default route of your box (the road to your LAN and the internet).

### What is the difference between Reboot and Reset USB Bus?

**Reboot** restarts the modem. **Reset USB Bus** resets its USB connection, like a replug. Try Reboot first. Both are in the same menu and need the Basic plan or higher.

### When should I turn on Force requesting DHCP?

Only when dongles do not get an IP, for example on a big server. The panel recommends asking support first, so use [remote support](https://xproxy.io/document/remote-support).

### How much disk do the logs use?

The app log keeps 3 days and 100 MB by default. You can raise it up to 30 days and 2000 MB, or lower it, in **Controller log retention**.

## What next?

Check your setup, change a dongle, or restart the box.

[Setup check →](https://xproxy.io/document/troubleshooting-setup-check) [Dongle settings →](https://xproxy.io/document/dongle-devices-settings) [Update and restart →](https://xproxy.io/document/update-xproxy) [Remote support →](https://xproxy.io/document/remote-support)

---

Source: https://xproxy.io/document/watchdog-auto-recovery
