I am working on a C# client which communicates with the robot using networktables (with help from this nuget package.) Everything appears to not throw any errors, but there are no roborio logs indicating a new NT connection (like with shuffleboard) and
NetworkTable.IsConnected is always false. I’ve tried numerous different configurations to no avail. If it helps, the robot I’m trying to connect to is simulated using halsim, and my client is actually a program built in Unity.
Here’s the general code i’m using:
NetworkTable.SetClientMode(); //4500 is my team number in both driver station & my project NetworkTable.SetTeam(4500); NetworkTable.SetIPAddress("127.0.0.1"); //have tried with & without this line NetworkTable.SetDSClientEnabled(true); //have tried with & without this line NetworkTable.Initialize(); var table = NetworkTable.GetTable("LiveWindow"); System.WriteLine(table.IsConnected); //always outputs //false