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

Rigol LXI - via NAT #15

Open
lwojdziak opened this issue Jun 9, 2016 · 2 comments
Open

Rigol LXI - via NAT #15

lwojdziak opened this issue Jun 9, 2016 · 2 comments

Comments

@lwojdziak
Copy link

Hello,

I have my Rigol instrument connected to router in local network with forwarding port 5555 to external address (f.eg. 8000).
Can I use contructior of vxi11.Instrument class with host:port?

vxi11.Instrument("192.168.1.104:8000")

Becase I have 5 Rigols I need to forward each of them to separate port (8000, 8001,...)

@hardkrash
Copy link

You would have to pass in a port at line 528 of vxi11.py
https://github.com/python-ivi/python-vxi11/blob/master/vxi11/vxi11.py#L528

It also looks like you could "try" this by setting self.client before calling open.

Is the router facing a public internet?
If so, I suggest that you setup a computer with SSH tunneling so that you can have secure communications. You will still need to specify a local port to attach to.

@alexforencich
Copy link
Contributor

No. There is really no good way to do this nicely. The problem is that VXI-11 connects to the portmapper service to ask what port to connect to, then it goes and connects to the actual service port. There is no reason for the service port to be fixed - i.e. the port mapper service could give each client a different port for the actual VXI-11 traffic, and there is no way to predict what port beforehand for setting up static forwarding. Because of how the portmapper request is implemented, there is no good way to specify what port to connect to. You may be able to hack something together to completely skip the initial port request, but this would require significant modifications down in the bowels of rpc.py and it is almost certain to not work at all with many instruments.

I would recommend setting up some sort of a VPN so you can access instruments via distinct IP addresses. Not sure what the best setup for this would be, possibly some combination of openvpn, sshuttle, hamachi, etc.

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

3 participants