Block reference / Device Management

Reconnect

Drop the phone's ADB connection and make it again, then wait until it answers.

Only inWarpX Phone

Reconnect is for a phone that has stopped answering WarpX Phone: a Wi-Fi connection gone stale, or a USB link that hung. A phone on Wi-Fi is disconnected and connected again; a phone on USB has its connection restarted by ADB. The block then waits until the phone is back, and fails if it is not.

Reconnect drops the phone's Wi-Fi connection to WarpX Phone and makes it again, then waits until the phone answers.
The Reconnect block's settings, filled in as in the example below.

Settings

Wait for it to come back (ms)

How long to wait for the phone to be listed again, from 5000 to 120000 milliseconds. The default is 30000.

Example30000
Delay (ms)

A wait after the block finishes, before the next one starts. One number such as 1000, or a range such as 1000,3000 for a random wait in that range on each run.

Example0

Every block also has the shared block settings — a description, Disable block and what to do on an error. Fields that take text accept data from earlier blocks.

What it hands on

Writes nothing and hands nothing on. It leaves by its output once the phone is back.

Example: Bring a Wi-Fi phone back when a block cannot reach it

  1. Start
  2. Start app
  3. Reconnect
  4. Start app
Where Reconnect sits in the example workflow.
  1. Pick the phone in the toolbar's phone menu; it is connected over Wi-Fi.
  2. On the Start app block that starts the run, open its settings and set On error to Execute fallback.
  3. Connect its fallback output to a Reconnect block with Wait for it to come back (ms) set to 45000.
  4. Connect Reconnect to a second Start app block for the same app.
  5. Click Run. If the phone was not answering, Logs shows Reconnect and then the app starting.

Good to know

  • It works on a phone that is offline or not answering, which the other phone blocks refuse.
  • Over USB it runs adb reconnect, which needs adb on this computer; without it the block fails with ADB_UNAVAILABLE.
  • A phone not back in time fails with RECONNECT_TIMEOUT.

See also

  • Check network — Check whether the phone reaches the internet, and read the public IP sites see it at.
  • ADB command — Run a command in the phone's shell, as adb shell does, and keep what it prints.
  • Start app — Open an app by its package, installing it first if the phone has not got it.