View Single Post
  #4   Spotlight this post!  
Unread 17-01-2017, 22:59
Thardro Thardro is offline
Registered User
AKA: Ethan
FRC #3042 (Cobalt Catalysts)
Team Role: Programmer
 
Join Date: Jan 2016
Rookie Year: 2015
Location: Minnesota
Posts: 19
Thardro has a spectacular aura aboutThardro has a spectacular aura about
Re: Connecting with roboRIO over TCP

Quote:
Originally Posted by Jaci View Post
If it hangs, it generally means that the client socket isn't finding (or isn't trying to connect to) the host socket. Double check that your client phone is trying to connect to the host (i.e. it reaches the code that creates the connection), and that you're on the same network.

As a rule of thumb, for things like vision tracking that update on a periodic basis, UDP might be a better idea.
We have confirmed that the phone is attempting the connection, and they should be on the same network as adb on the roboRIO is detecting the phone. Why would you recommend using UDP over TCP in this case?

Quote:
Originally Posted by Andrew Lobos View Post
If you're using adb for network forwarding, it binds the port on localhost

So if you run "adb reverse tcp:3042 tcp:3042" to setup your port forward on the RIO, then the phone connecting to 127.0.0.1 port 3042 will be forwarded to port 3042 on the RIO - use this instead of the RIO's mDNS name.
Thanks for pointing that out, I could not find which host to use so I assumed it was the mDNS name. I will try this as soon as I can get access to a robot again.
__________________


Reply With Quote