Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accessing Tracking Data from Another Computer #203

Open
jochasinga opened this issue Apr 29, 2015 · 4 comments
Open

Accessing Tracking Data from Another Computer #203

jochasinga opened this issue Apr 29, 2015 · 4 comments

Comments

@jochasinga
Copy link

Is there a way that a Node server running leapjs on another computer can connect via websocket to the host computer running leapd on port 6437? i.e. this browser function:

Leap.loop({host: '192.168.x.xx'}, function(frame) {
    // print frame data to browser console
});

Of course on browser this didn't work and got net::ERR_CONNECTION_REFUSED, but is it possible to get the data from another node server? (I noticed in the node.js example there's no way to supply the host argument)

@capnmidnight
Copy link

You probably just have your firewall settings blocking that port.
On Apr 29, 2015 3:51 AM, "Joe Chasinga" [email protected] wrote:

Is there a way that a Node server running leapjs on another computer can
connect via websocket to the host computer running leapd on port 6437? i.e.
this browser function:

Leap.loop({host: '192.168.x.xx'}, function(frame) {
// print frame data to browser console
});

Of course on browser this didn't work and got net::ERR_CONNECTION_REFUSED,
but is it possible to get the data from another node server? (I noticed in
the node.js example there's no way to supply the host argument)


Reply to this email directly or view it on GitHub
#203.

@pehrlich
Copy link
Contributor

Yes, this is possible.

Firstly, the code base is almost entirely shared between Node and Web, so passing in the host option should be just the same.

To fix the net::ERR_CONNECTION_REFUSED, check out this thread: https://community.leapmotion.com/t/read-leap-data-from-guest-vm-on-host-machine-using-websockets/1523/9

In a nutshell, non-localhost access is by default forbidden, but this can be configured on a per-machine basis. Also, SSH tunneling is an alternative.

@codemercenary
Copy link

@capnmidnight The webserver is actually configured specifically to accept connections only from localhost. I'm not exactly sure how I would design a sufficiently secure authentication scheme to serve user input content over the general internet.

@tkluysk
Copy link

tkluysk commented Feb 26, 2017

For others stumbling to this place two years later...

I had to do a few things:

  1. Modify the host IP in base.js (127.0.0.1 by default) to use the IP of the machine the Leap Server is running on.
  2. Modify my config.json file as per this article.
  3. Disable my local Windows firewall.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants