At the moment, Leap Motion does not officially support using two or more Leap Motion controllers on the same computing device. To get around this, you can set up a virtual machine (VM) on your computer (host). With my setup, I installed VMware Player with Linux Mint 13 (Maya) as the operating system. Before choosing what operating system to use, remember to read the current minimum system requirements for the Leap software.
After installing the Leap Motion controller software (version 1) on the VM and the host machine, connect the two Leap Motion controllers to your computer, and make sure that your VM takes control/connects to one of them. At this point, you should use Leap's diagnostic visualization software to make sure that each machine is receiving data from the devices.
The Leap Motion service/daemon uses TCP to send the tracking data to the 127.0.0.1 IP address (localhost) at port 6437. An easy way to retrieve data from both controllers is to create a web application — on your host computer — that uses the WebSocket protocol. Within your VM, set the network option to host-only and run the operating system's network interface configurator by typing in
ipconfiginto the terminal. When you do this, you will see the IP address for the VM. Use WebSockets to connect to that IP adress at port 6437. If you also use WebSockets to connect to the localhost IP address (127.0.0.1) at port 6437, you should now be receiving tracking data from both controllers.
Update — September 6, 2014
With version 2 of the Leap Motion software in Linux Mint 13, I was having trouble with dependencies when trying to run the Leap Motion visualizer. I just updated to Linux Mint 17 to solve the problem.
In versions 1.2 and higher, you need to configure your Leap Motion config.json file and add
At the time of this writing, the file is stored in these locations:
~/Library/Application\ Support/Leap\ Motion/config.jsonAlso, make sure that your firewall settings allow you to receive the Leap Motion data on port 6437.
If the Leap daemon needs to be restarted, type in
sudo service leapd restart
net stop LeapService
net start LeapService
sudo launchctl unload /Library/LaunchDaemons/com.leapmotion.leapd.plistTo run the Leap Control Panel in Linux, type in
sudo launchctl load /Library/LaunchDaemons/com.leapmotion.leapd.plist