COMP4720 Computer Networks 2
Project
PREAMBLE
This project is inspired by a graduate course assignment given by
Professor Larry Rudolph who taught the course at MIT in 2007.
Cell phones and PDAs were used as tools to carry out the original
assignment.
MOTIVATION
It is a rare event when the Soprano will repeat an aria because someone in
the audience was not listening!
On the other-hand, most lecturers look at the students to judge their
attentiveness and apparent understanding of the material, and will
modify the presentation dynamically, based on the students attention.
However, with students hiding behind laptops, it is hard to read their
body language.
A proposed solution is to have the students continually record their attention
level using a handheld device. In the future, this could be automatically
done by a biomedical feedback device, but we will use Sun SPOTs in this
pet project.
Here, we assume that we are in a large lecture hall. In other words, the
system should be scalable.
PRELIMINARIES
We will loan you a
Sun SPOT kit.
I advise you to read
Getting Started With Sun SPOTs document. It will direct you to
the relevant documents and software, depending on your computer's
operating system.
You can then follow the
Next Steps
and enjoy your Sun SPOTs!
RADIO COMMUNICATION
Each SunSPOT will act as both a generator as well as an intermediate node or
gateway. There are three active tasks:
- Detect key-presses with the following meaning. Zero through eight indicate
attention level, with eight being the most attentive and zero meaning nearly
asleep. This will be visualized by turning on a LED in green, according to
the level (no LED means level zero and all LEDs means level eight).
- Receive messages from other devices over radio connection. The
sunSPOT constantly monitors incoming messages from other devices. The
message will be very short, consisting of n + 1 words. The first
word will contain the value of n (to make debugging easier, make
sure it is always smaller than 100.) Wait a bit of time (you decide) before
forwarding the message towards the Lecturer.
In this context, the Lecturer is the base station attached to your
computer.
- Forward single message that aggregates received messages and local
activity. Aggregate multiple received messages into a single one by appending
values and updating n appropriately. If any keys have been pressed (or
pressed several times), append these to the message as well. Find a Sun SPOT
and send the message to it. I suggest that you choose a Sun SPOT with a
smaller unit address. This is the number associated with your kit,
appended with 1 and 2 (e.g., if your unit number is 12, your Sun SPOTs will
have unit numbers 121 and 122). This will avoid cycles. If there are no
smaller units, but you do find the Lecturer's device, then forward
the message to the Lecturer.
For the fun of it, you should display on your own device, the average
attentiveness in a different color, say in blue.
Since service advertisement and discovery is a pain, you should assume a
list of all Sun SPOT devices (i.e., their unit numbers) participating in
this project.
Use the base station attached to your computer or laptop as the
Lecturer.
ADVICE and COMMENTS
First, you will work in pairs. Make sure that I know your buddy by Monday,
October 24, 2011, the latest.
As you noticed, the project is somewhat under-specified. Please make use
of the class mailing list (comp4720-list@cs.umanitoba.ca) to clarify and
share ideas (but not the code!).
You may discuss better ways of doing things and better protocols and
specifications, however, I expect everything to work together so we must
agree on standards.
DUE DATE and DELIVERABLES
Your project is due in class the last day of classes: Wednesday,
December 7, 2011. We will experiment after class to see if they can all
work together!
Please email me your code, documentation, and any suggestions on how to
make this project more realistic.
There will be an award for the most complete submission. The details will
follow later.
|
Copyright ©
Last modified on
|