Our limelight as a static IP 10.TE.AM.2 and I was wondering you connect to it when tethered through USB.
If you setup port forwarding yes you can connect it while tethered. Check the official LL documentation for more info.
Setting up Port Forwarding in the code as written does not work.
We also have two limelights
Try the port forwarding code while having only one LL connected. Also are you using the second radio port?
Using a switch
The Rio should be .2. it is recommended to use .12-.19 for limelights, etc.
So connected only to robot via usb
IP on limelight is static at 10.8.29.13:5801 for the port
Not able to access.
Port forwarding is setup as instructed in Robot.java.
Can you try with only 1 LL. Maybe they have conflicting names or ips or ports or something like that? (Just writing things that I would do to identify the problem)
Make sure the limelights have different names….
Are you using “limelight.local” inside the for loop?
Did you try “10.8.29.13” instead?
I did. The limelight isnamed limelight-rear.local. All that was setup first. Just not able to see it over USB tether.
Something like this might work for 2 …
for (int port = 5800; port <= 5807; port++) {
PortForwarder.add(port, "limelight-1.local", port);
for (int port = 5800; port <= 5807; port++) {
PortForwarder.add(port+100, "limelight-2.local", port);
Limelight 1 would be 5801, Limelight 2 would be 5901
Already applied it. Just working with one at the moment
The rio’s ip when tethered to USB is 172.22.11.2
Yes… 172.22.11.2:5801 would take you to limelight-1.local
Not 172.22.11.13:5801 ??
In a browser you put 172.22.11.2:5801
Which is the Rio.
The Rio then forwards the request to the limelight using the limelight’s IP address and the port setup in the forward.
makes sense now.
So I was able to see one of them through port 172.22.11.2:5801
I wasn’t able to see the other trying the trick you mentioned up above by adding 100 to the port forward. I’m going to try again later today.
So an update. I can only port forward the one with the lowest up address. Adding 100 for the other one just forwards the first one again