NatNet Broadcast from Guest OS to Host OS

NatNet, VRPN, TrackD, and Plugins
Post Reply
patrickmauro
Posts: 2
Joined: Sun Dec 06, 2020 10:37 pm

NatNet Broadcast from Guest OS to Host OS

Post by patrickmauro »

I'm developing an application to use Motive data within a Python script. My host machine is a Mac (Intel Core i7, x86-64, MacOS 11.0.1) and I'm running Motive within a virtual machine (VMWare Fusion Pro 12.1.0, Windows 10 x64, Motive 2.2.0). Does anyone have any tips on how to configure the network adapter in the guest OS to properly allow the Motive broadcast to hit my host OS? I have confirmed that I can get Motive to broadcast data to other applications running in guest OS but haven't gotten the data to reach the host OS. Thanks!
patrickmauro
Posts: 2
Joined: Sun Dec 06, 2020 10:37 pm

Re: NatNet Broadcast from Guest OS to Host OS

Post by patrickmauro »

I figured this out. Not a problem with VMWare but with the python sample code in the NatNet SDK.

First, a few things about configuring VMWare:
  • If you're on a Retina display (as I am), the Motive windows will be truncated if "Use full resolution for Retina display" is enabled in the VMWare display settings. You'll likely want that disabled.
  • Just set the virtual network adapter to "Bridge" mode and the NatNet broadcasting should work from guest->host.

As for the fix in NatNetClient.py, I had to bind the socket produced in __createDataSocket() to the muticast address, not the host address. I think this makes sense to me, but I'm not a network programming guru.

Code: Select all

result.bind( (self.localIPAddress, port) )
becomes

Code: Select all

result.bind( (self.multicastAddress, port) )
Post Reply