Failed to receive Unicast data in Packet client

NatNet, VRPN, TrackD, and Plugins
Post Reply
TheMaksiest
Posts: 6
Joined: Thu Jul 01, 2021 6:54 am

Failed to receive Unicast data in Packet client

Post by TheMaksiest »

Hello.

For some time I am trying to obtain Motive Tracker position data on a remote device. But for some reason I cannot receive the packets when switching to Unicast mode in Motive Streaming Pane.

I have a C++ program on Unix machine that can receive position packets from Motive in multicast mode, and everything is great. But when I switch to Unicast mode, and try to receive on the data port, there are no packets coming to it. I used Wireshark and saw that the Motive is sending data packets from specified IP address in correct network, but instead of sending packets from 1511 port to 1511 port packets are sent server_ip:1511 -> client_ip:<random_port> . Is this supposed to happen and I am doing something wrong on my side, or is it a bug? It just seems to me that when I create a socket with the server address and port number there is no more configuration to be done on my side, and Motive should know to which port to send the packets, like it does in Multicast mode.

I was hoping to use Unicast mode to avoid a different problem, where while trying to receive position packets over Wifi on a remote device, seems like there is too much traffic and the connection to remote device is lost, but maybe this is a different problem entirely. Maybe, for example there is a way to just reduce the frequency at which the messages are being sent from Motive?

My Motive uses NATNET 3.1.

I checked the PacketClient.cpp file in NATNET SDK 3.1 and 4.0 and while they differ a bit. The Socket creation in Multicast and Unicast seems to be the same in 4.0 (maybe there should be parameter values that change depending on the mode).

I was hoping some here could advise me on these matters. I would like to know how to properly setup Unicast communication with motive without the SDK.
Any Advice will be appreciated.
TheMaksiest
Posts: 6
Joined: Thu Jul 01, 2021 6:54 am

Re: Failed to receive Unicast data in Packet client

Post by TheMaksiest »

If anybody is interested I tinkered a bit more with the Motive and my application while watching the packets on the Wireshark.

I am sending empty NAT_CONNECT message followed by NAT_REQUEST message (with "TestRequest" message) and then waiting for the Response. All this on data port 1510. Here I can see that my data socket has been assigned port nr. 40652 (for example). When on I receive a response on this port from Motive data port I can print out the NATNET version. And so far everything is fine.

But then I start waiting on Data port 1511 on my side, and nothing is received. At the same time in the WireShark I can see that Motive is sending packages from it's data port 1511. What go me curios is that Motive tries to send data packets to the same port that my data port was assigned to.
So in this example it would send packages from <motive_ip>:1511 to <client_ip>:40652. And because I am expecting the data to come on 1511 port, I receive nothing.

Is this normal behavior, or have I messed up something in the configuration?
daisymaria
Posts: 1
Joined: Wed Dec 14, 2022 12:29 am
Contact:

Re: Failed to receive Unicast data in Packet client

Post by daisymaria »

If you use this workaround, take any necessary extra precautions to help safeguard your PC. moto x3m
suri1205
Posts: 2
Joined: Thu Nov 10, 2022 9:44 pm

Re: Failed to receive Unicast data in Packet client

Post by suri1205 »

I am experiencing an issue with my Packet client that is preventing me from receiving unicast data. I have tried multiple times to send a unicast message, and have received the error message "Failed to receive unicast data in Packet client."
blabling2
Posts: 1
Joined: Thu May 11, 2023 12:42 am

Re: Failed to receive Unicast data in Packet client

Post by blabling2 »

TheMaksiest wrote: Fri Jan 07, 2022 6:49 am If anybody is interested I tinkered a bit more with the Motive and my application while watching the packets on the Wireshark.

I am sending empty NAT_CONNECT message followed by NAT_REQUEST message (with "TestRequest" message) and then waiting for the Response. All this on data port 1510. Here I can see that my data socket has been assigned port nr. 40652 (for example). When on I receive a response on this port from Motive data port I can print out the NATNET version. And so far everything is fine.

But then I start waiting on Data port 1511 on my side, and nothing is received. At the same time in the WireShark I can see that Motive is sending packages from it's data port 1511. What go me curios is that Motive tries to send data packets to the same port that my data port was assigned to.
So in this example it would send packages from <motive_ip>:1511 to <client_ip>:40652. And because I am expecting the data to come on 1511 port, I receive nothing.

Is this normal behavior, or have I messed up something in the configuration?
Post Reply