View Single Post
  #15   Spotlight this post!  
Unread 16-12-2014, 23:33
ExecutiveAssist ExecutiveAssist is offline
Registered User
FRC #1540
 
Join Date: Dec 2014
Location: Portland, Oregon
Posts: 1
ExecutiveAssist is an unknown quantity at this point
Re: Scouting App Development

Quote:
Originally Posted by nathanwalters View Post
My team investigated Bluetooth but we could never find a good way to make it work. Would you be able to post some of the basic ideas of your setup? I'm curious about how you went about this.
Hey, I'm the guy that is behind 1540's aforementioned scouting app. (This post is probably a bit excessive, and probably mostly under your level of proficiency, but I felt like typing it out.)

Let me just preface this with some background. For us trying bluetooth was the natural choice for this season. Last season we used a system with android tablets wired directly to a raspberry pi that would service requests. While this idea was great in theory, in practice it meant a lot of messy wires and not quite functioning ethernet ports. Additionally, this system also tied all the tablets functionality to the server, which meant server crashes were disastrous. We might of tried to continue in this vein, even with these drawbacks, but we lost all the team members who knew enough javascript to maintain the system.

With this in mind I knew that I wanted our rewrite to be two things, server independent, and maintainable.

Immediately I realized maintainability meant Java. Our school has a strong computer science curriculum that does Java second year, and our robot code is also written in Java. Java is also more maintainable, in my opinion, than Python, which is the only other language our team has consistent proficiency in.

Secondly, reliability meant wireless. Since I'm not a web guy, this meant a native app, helpfully also in Java. Wireless was actually a tricky issue. Since we couldn't communicate over wi-fi that left bluetooth as the only other high level choice. Unfortunately, despite being in the same language, bluetooth communications between an Android Java app and a computer running a Java app are hard to establish. I just used the built ins for the tablets, but for computer I didn't. Why, one might ask? Because there is no built-in Java bluetooth functionality! Helpfully, or debatably not, Sun published a spec of what they think it should look like, JSR-82. I downloaded Bluecove, an open source implementation, and wrote my server code based on that. Bluecove was really fiddly, requiring 32 bit Java 6 to work properly, but is pretty reliable once it was correctly configured. The biggest problem after setting this strait was a random crash I was getting ever so often, I mention this for sheer absurdity points, the first message transmitted by the tablet never goes through. (I never actually fixed this, it's just handled by my other failed message code.) In actual fact, once you fix up networking code, it's pretty reliable.

Once networking works, the server and client apps seem fairly self evident, presuming you know what you want to collect