Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Android to RoboRIO Communication (http://www.chiefdelphi.com/forums/showthread.php?t=153990)

MMuru 20-01-2017 19:45

Android to RoboRIO Communication
 
Hello all,

My team has decided to see what is necessary to use an Android Phone for vision tracking and sending the target information to the RoboRIO. We have been looking through the RIOdroid library (https://github.com/Spectrum3847/RIOdroid). ADB installs fine on the RIO, however, there is a program called SOCAT which is used for port forwarding and virtualization which refuses to install saying that the architecture is incompatible. When we attempt to install it on a RIO with last years image on it, the installer works fine. We have tried downloading various versions of SOCAT, but all of them fail with the same message. Are there any other communication protocols that can be used between Android and the RoboRIO? All help would be appreciated!

axton900 20-01-2017 19:49

Re: Android to RoboRIO Communication
 
The RioDroid library link provided does not work. the ")" counts as part of the link.

The proper link is this

Thardro 20-01-2017 22:21

Re: Android to RoboRIO Communication
 
We have been able to communicate with an android phone using RIOdroid without using SOCAT. By running "adb reverse tcp:3000 tcp:3000" on the roboRIO you can establish a tcp connection between the roboRIO and the phone, so that connecting to 127.0.0.1 on port 3000 on the phone will connect you to port 3000 on the RIO.

MMuru 20-01-2017 22:38

Re: Android to RoboRIO Communication
 
Quote:

Originally Posted by Thardro (Post 1634263)
We have been able to communicate with an android phone using RIOdroid without using SOCAT. By running "adb reverse tcp:3000 tcp:3000" on the roboRIO you can establish a tcp connection between the roboRIO and the phone, so that connecting to 127.0.0.1 on port 3000 on the phone will connect you to port 3000 on the RIO.

Could I get some a snippet of what that code looks like? Also does that mean that everything else from the RIOdroid library is functional? Finally, was this tested on the 2017 image of the RIO?

Thardro 20-01-2017 22:49

Re: Android to RoboRIO Communication
 
Quote:

Originally Posted by MMuru (Post 1634276)
Could I get some a snippet of what that code looks like? Also does that mean that everything else from the RIOdroid library is functional? Finally, was this tested on the 2017 image of the RIO?

Here is our code that does this on the RIO and you can look inside the vision folder for the rest of our code that handles the connection on the roboRIO (it is almost entirely a copy of 254's code from last year). This is all we have used the library for so I cannot comment on whether the rest is working, however this is enough to send messages back and forth between the RIO and a phone. We have this all set up and working on the 2017 image of the RIO as well.

MMuru 20-01-2017 23:22

Re: Android to RoboRIO Communication
 
Quote:

Originally Posted by Thardro (Post 1634283)
Here is our code that does this on the RIO and you can look inside the vision folder for the rest of our code that handles the connection on the roboRIO (it is almost entirely a copy of 254's code from last year). This is all we have used the library for so I cannot comment on whether the rest is working, however this is enough to send messages back and forth between the RIO and a phone. We have this all set up and working on the 2017 image of the RIO as well.

Thank you so much!!


All times are GMT -5. The time now is 15:29.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi