Skip to main content

AR51.Net Troubleshooting (C# API)

Fixes for common AR51.Net problems. Turn on logging first — it shows connecting, reconnecting and refused requests.

SymptomCauseFix
StartAsync never returnsThe server isn't found: discovery is blocked (another subnet, firewall, VPN), or the system is offConnect to a fixed host: AR51Client.Create(new AR51ClientOptions { Host = "192.168.1.20" }). Give StartAsync a token with a timeout to stop waiting.
Works on your computer, but StartAsync hangs in Docker or WSL 2UDP broadcast discovery doesn't leave a Docker bridge network or WSL 2's NATSet Host to the AR 51 server's address, or run the container with host networking.
AR51Exception with ServiceUnavailableThe client isn't started yet, or that service isn't running on the systemCall await ar51.StartAsync() first; check the AR 51 servers are running (ar51.Servers).
ServiceUnavailable for cameras, calibration or servers, but skeletons workThose services run on other AR 51 machines that aren't upLaunch the missing machines' server program (ar51.Servers.LaunchServerAsync), or check them in Mocap Studio.
RejectedThe server refused the request; the message says why (for example "A calibration is already running", "Restart too soon", an unknown camera id). Starting a recording while one is already running is also Rejected: "A recording is already running. Stop it first."Read exception.Message, fix the request, or try again later.
Some joints are (0, 0, 0)The cameras didn't see those jointsUse skeleton.TryGetPosition(joint, out var position) or check GetConfidence(joint).
LeftHand / RightHand are always nullHands come only from a hand-tracking headset worn by that personExpected without such a headset.
Events stop or lagA handler is too slow — skeleton handlers run on the receiving threadKeep handlers short; copy the data and process it on another thread — see hand-off patterns.
A standalone SkeletonClient stops working after a server restartService ports are assigned by the system and can changeUse AR51Client, which finds the services for you.
ObjectDisposedExceptionThe client was used after it was disposedKeep one client for the application's lifetime.
The log says "declined discovery"The client sends its discovery protocol version, and the AR 51 server doesn't accept itUse matching versions: update the AR51.Net package or the AR 51 server.

AR51.Net is tested with AR 51 server 3.2.0 and 3.2.1.

Firewall and network checklist​

  • Outgoing UDP 1500 — discovery broadcast (not needed with a fixed Host).
  • TCP 1501 to the AR 51 server — registration.
  • TCP to the AR 51 machines on the ports the system assigns to its services.
  • Your computer and the AR 51 machines on the same subnet for discovery.

See also​

Was this page helpful?