Monday, February 27, 2012

API Release, New Wiki

Today, I started a wiki containing information about the BlueMesh project and library. It currently contains a number of links to information, as well as a few pages that help outline the API as it now stands. It can be found at bluemeshproject.wikia.com. In addition, a current API has been released and more information about it will be added to the wiki in the upcoming week. The proper beta isn't out, but the library is in a working condition and documentation is being written.

-Sean

EDIT: The wikia wiki has now been deprecated, and a current API can be found on our Github Wiki.

Saturday, February 25, 2012

Implemented Quit() function for CLD and BlueMesh

We have implemented a quit function for BlueMesh. While in the application (using Commandline Like Display), hit the "options" button and then a quit option will appear. This calls a quit function in the CLD service, which in turn calls a disconnect() function from blueMeshService. From here, the threads are interrupted and the sockets are closed.

We had a bit of trouble with this at first. The first issue was with the clientThread quitting properly. Before having the thread interrupted, all the sockets opened must be closed. Also, IOExceptions cause a bit of trouble with the thread.interrupt() flag, so we used a boolean. Second, CLDMessage uses a blocking call to get a line from the Android Keyboard. since CLDMessage.getLine() was being called from a thread in the blueMeshDisplay example service, we implemented a function that calls alertAll() from within the CLDMessage class.


We hope to have an official Beta release very soon.

Wednesday, February 22, 2012

IT WORKS IT WORKS IT WORKS!!!!!!!

Today at 2:30 p.m. we had our first successful test of BlueMesh.

Currently everything is implimented and working except for stop.  On our test application you can type "quit" to stop BlueMesh, but the ClientThread continues to run.  Once this bug is fixed I think we will be ready for our first Beta release.

Stay posted for our release and the launch of our wiki documenting our API.

Also I will post the test aplication's APK on the website so you can download it and try it out!

Thursday, February 16, 2012

New Member, Documentation, and Development

Hello, All!

My name is Sean, and I'm a new addition to the BlueMesh Project. I have gotten more or less set up, and I plan to spend the next week or so working on the documentation in the project. My goal is to have a clearer and more explanatory API as well as supplying written instructions for various tasks both internally and externally.

This has a twofold purpose. The first, and most important in my mind, is that it will make the library much easier to read, understand, and implement to any developer using it. The second is that it will make development itself easier, as we will have a documentation to fall back on.

Eventually, I will be developing applications myself in this library, which I am also looking forward to.

Wednesday, February 15, 2012

It's working... better

Today Trevor and I did a lot of debugging and fixed a number of bugs:
1) The device doesn't attempt to connect to another device that it is already connected to which resulted in a crash
2) The example device also converts bytes to strings properly now

The program is currently displaying the following behavior:

1) Startup (consistently)
2) Cycle through devices and attempt to connect (consistently)
3) Connect to device in the same area running the same program (not consistently)
4) Once connected send bytes (consistently)
5) Read bytes that were sent to this device (consistently)
6) PROBLEM: Accept messages and re-route messages that have already been received (consistently)
7) PROBLEM: Messages received have LOTS of excess white space (consistently)

When one device sends data "hi"
The other device receives data that says "<excess white space>hi<excess white space>"

Monday, February 13, 2012

Help us debug!

If you're really excited about BlueMesh, here's how you can help up debug.

What you need:

  • Eclipse + Android SDK + Eclipse Android plugin
  • 2+ Android devices, OS-2.1 or newer
  • At least 1 micro USB cable to connect phone to computer
What you need to do:

If you do not want to compile the code, I will post a compiled .apk and put it on the BlueMesh website (www.bluemeshproject.com) which you can download and run on your devices.  If you do this, then skip directly to step two.

Step 1: Because BlueMesh is a Library, we use CLD (https://github.com/schnej7/Android_CommandlineLikeDisplay) to test BlueMesh.  The current version of the repository has an example program that uses BlueMesh to Launch the service and read and write data to the other devices.  You can download the source for both CLD and BlueMesh.  You will need to set BlueMesh as an Android library and link to it from CLD in order to compile it.

Step 2: Once you have it all compiled, you can run the .apk on your device through Eclipse which will give you a debug log.  Feel free to submit your bug fixes through github or simply send your debug log and a brief description of of the behavior of the program to schnej7@rpi.edu.

I encourage anyone who is interested to help out debugging, we will be able to debug much quicker the more logs we get.  Thank you all in advance for your help!

Thursday, February 9, 2012

Bluemesh Testing

Today me and Jerry managed to compile an instance of a very simple text debugger app (using commandline like display) and the bluemesh library. However, we have run into a few problems. Currently, bluemesh does manage to connect devices both running the application, however, not entirely consistently. Also, data did get sent, although not received correctly. There are also some some socket and thread management issues that cause errors. We hope to have most of these errors remedied by next week.

SO MUCH PROGRESS!

Since our last big update on Sunday the BlueMesh team has gotten a LOT of work done.  Today we finished the complete reworking of the project.  All of the functions that we will need for the most basic uses of BlueMesh are now implemented.  By tomorrow we hope to have everything tested and have a sample app demonstrating how BlueMesh works.  Our implementation is still yet to be tested, but it looks promising.

I will write another blog post as soon as we test our project with the results, wish us luck!

Tuesday, February 7, 2012

Client Thread

The client thread curently has:
** constructor (Handler mHandler, BluetoothAdapter mAdapter,
RouterObject mRouter )
** public void run()

The constructor takes the three arguments and sets the values to private variables.

Run is as follows:
the thread continuously runs until an interrupt is given, and first gets a list of paired devices.
For each paired device, it attempts to create a client socket. If that's successful, it then attempts to connect to a server socket. If that is successful, the connected socket is then passed to the Router Object to be handled.

Sunday, February 5, 2012

This week at BlueMesh

Today I spent a few hours with Trevor Zettersten and Zachary Clapper redesigning and restructuring BlueMesh.  It turns out that I was doing some things wrong... really wrong.

We will spend this week setting up the skeleton for BlueMesh and trying to implement most of the functionality. Compared to the former design of BlueMesh, the current design is much more elegant and simple.

I expect that we should have a significant amount of work done by the end of this week.  We will also be giving  an RCOS talk this Friday explaining more details about our new structure and the BlueMesh API.