I am new to the Natnet sdk, if it is a question being asked before, apologize in advance. But I do need help on this.
I don't have Motive or Arena installed. only downloade NatNet sdk 2.10 and its sample Code.
Running SampleServer project.
I got this NatNet Simple Server (NatNet ver. 2.10.0.0)
IP Address : 169.254.66.15
IP Address : 10.162.8.79
IP Address : 127.0.0.1
Socket error 10049: WSAEADDRNOTAVAIL
Socket error 10038: WSAENOTSOCK
Socket error 10038: WSAENOTSOCK
Socket error 10038: WSAENOTSOCK
Socket error 10049: WSAEADDRNOTAVAIL
Server initialized on 169.254.X.Y.
...
I am able to use s to send frame in console window.
Then on the same machine, I run the SampleClient, it gives me Host Not Present error.
Running SampleClient3D project:
if I use
IP address: 127.0.0.1 Server address: 169.254.X.Y
I got Host Not Present error
If I use
169.254.X.Y as IP AND Server address, natnet.initialize() function will fail at ERRCODE_OK
Both SampleClient and SampleServer is using Multicast
Question:
1. Is SampleClient able to receive anyting from SampleServer(when it is running) without Arena or Motive is running?
2.If possible, what I did wrong? If they are using multicast, why client not specify multcast group number anywhere?
Thanks
SampleClient and SampleServer running on Same Machine
-
- NaturalPoint Employee
- Posts: 720
- Joined: Mon Jan 19, 2015 11:52 am
Re: SampleClient and SampleServer running on Same Machine
Hello ybclaire,
For the most part, the sample server is deprecated, and we recommend that you use Motive as the server wherever possible. We do not support the sample server, but I have some information that may help with your questions.
When running the server and the client on the same machine, everything should broadcast to the loopback IP address (127.0.0.1)
The server application should be set to stream on that IP address. The client should also use that IP address for both the serverAddress and localAddress. Using this configuration may help with your connection problem.
The multicast IP address can be specified in the client application using the sNatNetClientConnectParams. More information can be found in our online documentation
I hope you find this to be useful. If you continue to struggle, please feel free to reach out to us at help.naturalpoint.com
Best,
Steven
--
Steven Andrews
OptiTrack | Senior Customer Support Engineer
help.naturalpoint.com
support@optitrack.com
For the most part, the sample server is deprecated, and we recommend that you use Motive as the server wherever possible. We do not support the sample server, but I have some information that may help with your questions.
When running the server and the client on the same machine, everything should broadcast to the loopback IP address (127.0.0.1)
The server application should be set to stream on that IP address. The client should also use that IP address for both the serverAddress and localAddress. Using this configuration may help with your connection problem.
The multicast IP address can be specified in the client application using the sNatNetClientConnectParams. More information can be found in our online documentation
Code: Select all
ErrorCode Connect( const sNatNetClientConnectParams& connectParams );
Code: Select all
typedef struct sNatNetClientConnectParams
{
ConnectionType connectionType;
uint16_t serverCommandPort;
uint16_t serverDataPort;
const char* serverAddress;
const char* localAddress;
const char* multicastAddress;
#if defined(__cplusplus)
sNatNetClientConnectParams()
: connectionType( ConnectionType_Multicast )
, serverCommandPort( 0 )
, serverDataPort( 0 )
, serverAddress( NULL )
, localAddress( NULL )
, multicastAddress( NULL )
{
}
#endif
} sNatNetClientConnectParams;
I hope you find this to be useful. If you continue to struggle, please feel free to reach out to us at help.naturalpoint.com
Best,
Steven
--
Steven Andrews
OptiTrack | Senior Customer Support Engineer
help.naturalpoint.com
support@optitrack.com