This is related to the help request here.
I'm doing something similar, where I want my NodeJS application running on one computer on my wifi network to connect to the Leap Motion websocket server running on another computer on my same wifi network, same subnet.
I'm unable to get it to work so far. My Node application simply reports that it can't connect to the remote websocket server. I have found two config.json files on that remote computer (a Mac running Yosemite):
/Users/MyComputer/Library/Application Support/Leap Motion/config.json
/Macintosh HD/Library/Application Support/Leap Motion/config.json
I was able to edit the first one to read:
{
"configuration": {
"background_app_mode": 2,
"websockets_allow_remote": true,
"websockets_enabled": true
}
}
When I edit the second one to have those properties for the websockets and then restart my Leap Motion by unplugging and plugging it back in, the config.json file gets overwritten without those object properties I added.
When I run netstat -a, I see this:
tcp4 0 0 localhost.6436 *.* LISTEN
tcp4 0 0 localhost.6437 *.* LISTEN
tcp4 0 0 localhost.6439 *.* LISTEN
tcp4 0 0 localhost.6438 *.* LISTEN
The IP address of the remote computer running the Leap Motion websocket server is 10.0.0.3. I'm using the following code, utilizing the nodejs-websocket module, the try and connect:
var connection = ws.connect('ws://10.0.0.3:6437/v6.json', function() {
console.log('connected');
});
connection.on('error', function(err) {
console.log('Connection error: ', err);
});
And the error:
Connection error: Error: ENOENT Cannot connect to 10.0.0.3 Got: err-1
Any help on this would be greatly appreciated. Thanks.