Journal -
Week 3
::: Day 1 - Monday
06/20/05 :::
It is amazing that it is
already the third week of my internship. I was excited to go to work
today because I knew I'd be working on a new thing. Vinod and I
talked this morning and agreed that I will start working on the
Bluetooth Client/Server applications. I am still unfamiliar with all
the code involved in the the communication between two Bluetooth
devices but that's why I am here - to learn and apply my knowledge.
We decided that for the next couple of weeks I will be trying to
create a client/server application what would transmit the
information my GIU program needs (energy and temperature values and
node coordinates). I will have to write a server that runs on one
computer and sends info to a client. The client will use the GUI
interface I have built to display the info.
I looked into some sample
programs and read through the code. I also went back to the Swing
tutorials to check for a couple of things. I spent most of the
morning doing that and doing changes in the GUI. I mentioned that on
Friday I had an idea but no time. So today, I worked with the
windows that display coordinates and added some extra space where
the x and y values were displayed as a pain of integers (eg: node 1
at (67,45)).
In the afternoon I started
playing with the a sample client application and modified it a
little. I created by first MS-DOS Batch file :) and also read some
posts on the Java Forums.
I also spent some time off
the computer, coming up with a simple algorithm for the client side.
Pen and paper always work great when you are trying to come with
algorithms for applications. I decided there will be a button
"Obtain Data" and when clicked it will perform the
following actions:
1) look for a Bluetooth device in range (the server)
2) look for services offered by the device
3) call a function getData()which will open a connection and receive
all the data we have
After having all the data on the client, I could simply use the
existing GUI to display it.
I left work a little early
and went to check out the special library at UMASS for sciences and
engineering. I got an XML book to look through when I have time ...
And now I am home - kind of
tired, but excited about the rest of the week. I feel it will be
interesting and challenging.
::: Day 2 - Tuesday
06/21/05 :::
The first thing I did this morning was to go back to the readme.txt file and update it. I wanted to include a couple of words about the addition of a panel in some of the windows that shows the node's
coordinates as ordered pairs.
After I did that I spent some time browsing through the Java forums. They are so informative that I just read posts and learn something new each time. I also went back to the Bluetooth examples I have. I will use those files and build my own client-server application on top of them. I redid part of the layout for the client.
The main communication between the client and the server occurs in a
getData() method, so I started exploring it a little closer. I
altered it a bit and then used Vinod's and my computer to run the
new versions of the client and the server.
At lunch I met with Natalie
and she took my to the Computer Science building where she works.
She showed me her lab and I met one of the grad students there; the
we headed to the CS lounge where we had a cup noodles lunch.
After lunch I went back to
my lab and continued working on the server code. The initial example
I had was transmitting data in the form of bytes and converting it
to a string (for example, "Hello from Server!"). What I am
trying to do, on the other hand, is have integers and doubles
transmitted over the Bluetooth network. therefore I tried changing
part of the code so that I could transmit the number of nodes in the
network and possibly a array of doubles (energy, say). I spent
around an hour debugging the code I had written because quite a few
things had gone wrong when I was modifying the already existing
code. (No wonder profs always tell you that it is easier to just
write your own code than modify something..... very very true.)
Finally when I had debugged the client and the server files, I tried
running them. Unfortunately the communication between the two
computers didn't happen as expected. I think it is a problem with
the data streams. The original code used InputStream and
OutputStream, and I tried switching to Data Streams but that did not
work. Tomorrow I will research what stream is the best to use and
also if I use the ones used in the examples, how to convert my data
from byte (coming from the stream) to int and double.
Now I am back in my dorm
room typing and looking out the window. It is so beautiful. I can
see the mountains and the pink sky. Today is the longest day of the
year and even though it's 8:15pm the sun is still out there. It's a beautiful
sunset and I really feel lucky I am not stuck somewhere
without nature. I love the burning orange clouds surrounding the
sun!
Edit: Just now I had
some time to play in Photoshop and made a little something for
visual pleasure. You can click here
to see. Please note that the image quality is not great because the
lab computers have nothing but paint for saving and manipulating
images. Enjoy!
::: Day 3 - Wednesday
- 06/22/05 :::
I have been frustrated
today because I made no progress. The state of my Bluetooth
project has not changed for the past 24 hours. What I have been
doing is tons of research online to see what Input Stream would be
best for transferring integer and double values via the Bluetooth
link. After I initially looked into the streams available in Java, I
come to the conclusion I could use a DataStream. I've used that
before for reading and writing various data types to/from file. It
seemed easy from there but I kept getting bugs in the code and was
unable to run my client and server. All I was trying to do is
transfer one integer from Vinod's computer to mine, using the
Bluetooth devices. Well, it didn't work.
So I spent most of the day
trying to figure out various problems. I also read more in depth
info on Java streams because as Vinod said I should use this
opportunity to learn. Vinod's been very nice to me and encourages me
to work and learn. He told me not to worry too much because I have
enough time to complete the projects. He understands that when it
comes to Bluetooth things are not so simple.
I tried google-ing examples
of programs for Bluetooth written in Java but to no avail. We all
thing we can find any information on google, but with some topics
that's just not true. Sure, there is a lot of stuff on Bluetooth but
it's all technical and theoretical information, not real code. The
examples I found were pretty much similar (all were transferring
strings), and none of them addressed the issue of transferring
primitive data types or objects. I now realize that Bluetooth is a
new technology that still has not touched many in the CS field. I
guess that's what makes it interesting - there is much to be
developed in the future.
Towards the end of the day
I decided to go back to the original examples I have and start
modifying them again following a slightly different idea. I know
that this will not resolve the problem I was having today, but will
put the communication algorithm in better order. One of the reasons
I decided to start from scratch was that even the original files I
have did not work properly this afternoon. I suspect tomorrow will
be a day of testing and more research until I get it working. Once I
manage to transfer the first integer, the rest of it should go more
smoothly.
::: Day 4 - Thursday -
06/23/05 :::
Today I spent the most of the day trying to get the client-server
Bluetooth example working, and I am talking about the original one!!! I've given up on making modifications until I can get that one working. Vinod and I found contact information for the guy (Bruce Hopkins) who wrote the book "Bluetooth for Java" and those examples. We e-mailed him hoping he could give us some information on the exception error we were seeing on our computers.
Vinod had to send the e-mail quite a few times because it kept bouncing back. (Sometimes I lose faith in technology whatsoever...)
Since I couldn't do any more work on the Bluetooth project until the problems were resolved, Vinod gave me some reading to do. First I read two chapters from a book talking about the IEEE 802.15.4 wireless standard (on which ZigBee is based.) Most of the reading was very accessible and interesting. It gave an overview of the standard and explained the need for it. After I was done reading those chapters, I moved to a long article titled
"Wireless Sensor Networks".
I went to read outside because, as usual, the lab was freezing. By the end of the day I had gone through the first 13 pages.
After I got home I rested a little and then met with Natalie (the other DMP student). We went to the movies and stopped by the grocery store on the way back. The movie (Sisterhood of the Traveling Pants) wasn't a blast but I didn't expect much anyway.
::: Day 5 - Friday
06/24/05 :::
Bruce (the Bluetooth/Java guru) responded to Vinod's e-mail last night and suggested that we should use a different utility that comes with the software. It was supposed to help me determine weather we can establish a working connection between the two computers. The problem until now has been that the GUI interfaced application gives an exception when the two computers try to connect to each other. I was trying to see whether the problem is in the application, or somewhere deeper in the Bluetooth devices. Well, to keep this short - I was not able to run the utility. I needed a connection URL that contains the address of the second Bluetooth enabled computer, but for some reason the Bluetooth utility does not accept my URL. I am stuck once again and Vinod advised me to e-mail Bruce again. I did and I also added him to my Yahoo! messenger.
Seeing that I couldn't do anything more with Bluetooth, I went back to that article I was reading yesterday. I finished up the remaining 6 pages, which were getting progressively harder to understand. Since I was a bit confused after the reading, I went online and looked for some more (and simpler) information on wireless sensor networks. I found a really good overview of the topic on the
Intel Research
Webpage.
After lunch Vinod and I headed to another meeting with the rest of the lab. The grad students and Prof. Gao were there. This time it was Vinod who was presenting a paper. It was interesting, though hard to follow at times. Some of the information was what I had read in that book the day before so I was well prepared.
When Vinod and I came back from the meeting, we talked about grad school and different possibilities I will have when I graduate from college. Next, I went back to my readings and spent the rest of the afternoon educating myself.
I left UMASS at 4:45 on the bus to Boston with big plans for a good dinner out and a movie. As it turned out, I was way too tired for any of that and was in bed by 11pm.
::: Day 6 - Saturday
06/25/05 :::
I woke up to good warm weather and leftover food from the night before. Matt is at work till 3pm so I can just hang out the apartment and relax. I've been browsing the internet and most importantly following the Bulgarian news websites because it's election day at home. Things don't seem good but you have to respect the view of the masses.
In the afternoon Matt and I went to see Batman. It was a long long movie (2.5 hrs) but I have to admit that it was good; the only thing that made me laugh (when I wasn't supposed to) was Batman's voice. They could have done a better job with that. Overall though, it was goooood.
We will be heading to dinner soon - an Italian restaurant nearby. Maybe I haven't mentioned before but I am not crazy about Italian food; we will see how it goes.
[after dinner] Okay, I take those last words back - dinner was tastyyyyy...
::: Day 7 - Sunday
06/26/05 :::
I am still in Boston but by myself because Matt is working all day long (10am - 6pm :::sad:::) I could have gone back to UMASS but I like staying at Matt's apartment even when I am alone. It feels like home. I've been reading an XML book most of the morning/early afternoon. I got the book from the UMASS science library because I wanted to get a basic, high-level overview of the XML technology.
In the afternoon, I went to Berklee College of Music to say good-bye to Matt and headed to the bus station. I got back to UMASS at 8:30, got some dinner and watched Family Guy and American Dad.
I saw that Bruce has replied to my e-mail concerning Bluetooth and I am supposed to meet him online at 8pm tomorrow (which means I'd have to go to the lab at night.)
10:30pm and I am in bed, ready to sleep.
::: Week
1 ::: Week 2 ::: Week
3 ::: Week 4 ::: Week
5 :::
::: Week
6 ::: Week 7 ::: Week
8 ::: Week 9 ::: Week
10 :::
|