Below you will find some pictures made in MS Visio which show how our database is constructed, and how the sunspotnetwork will work.
Sunspot Network
It is important to note here that all the links is infact wireless communication. Also known as a mesh network.
Database
Friday, 24 October 2008
Color LCD on SunSPOT
Yesterday I have been working with a SunSpot which has an Oled-screen on top of it. An other group of Censi students have written a library for this particular screen in Java. You can find a post about this on the censi blog. With this library it was quite easy to get the screen to work. What we have so far:
While startingup the spot it will display a welcome message.

After this the program will wait for a command. Our host application is continuously searching for new spots. Once it had found the spot it will offer to send a program. The SunSPOT will give the following screen. Here you can accept or reject this incomming program. By moving the spot up and down you can select "Yes" or "No". Once you have made a choice you can confirm it by pressing the button on th right.

When you select "yes" a program will be send to the spot. When it has arrived it wil start. In this example you wil see a blinking led(The red spot pointed to by the arrow).


Here's a video showing the above:
While startingup the spot it will display a welcome message.
After this the program will wait for a command. Our host application is continuously searching for new spots. Once it had found the spot it will offer to send a program. The SunSPOT will give the following screen. Here you can accept or reject this incomming program. By moving the spot up and down you can select "Yes" or "No". Once you have made a choice you can confirm it by pressing the button on th right.
When you select "yes" a program will be send to the spot. When it has arrived it wil start. In this example you wil see a blinking led(The red spot pointed to by the arrow).
Here's a video showing the above:
Last Meeting
Today we had a meeting with our councelor. We had to redo our planning and most importantly make more blog posts!
For the new planning see this link:
Planning
Most important changes are that i will do more research on what the jumping software could be used for.
And from now on we will try to make more blog posts with added pictures and/or movies.
For the new planning see this link:
Planning
Most important changes are that i will do more research on what the jumping software could be used for.
And from now on we will try to make more blog posts with added pictures and/or movies.
Wednesday, 22 October 2008
Finally, it works!!
After about two weeks of programming, testing and drinking lots of coffee it finally works! We can now run multiple programs side by side(up to 7), deploy and start them remotely. This all from our own Java application. We have also rewritten our "seeNewSpot"-function, this now works better. Today I have been testing how the Spots function in a mesh network. As long as you do not move the Spots, this works fine.
I've also started on writing a demo application for the 29th of October. What I have so far: the program can detect spot's in the neighborhood(using the mesh networking feature), determine if there's a new spot and then send a little program to this spot.
I've also started on writing a demo application for the 29th of October. What I have so far: the program can detect spot's in the neighborhood(using the mesh networking feature), determine if there's a new spot and then send a little program to this spot.
Friday, 17 October 2008
Isolates, Isolates, Isolates...
After more then week of trying to get Isolates to work I almost gave up. As a last resort I posted a topic on sunspotworld.com. People almost reacted immediately. Part of the problem was that I had a wrong view of what Isolates are. The following video explains what the difference is between a normal vm and the squawk vm running on the SunSpot. This explained a lot. You can find it here.
One of the replies pointed out that Solarium could do what I wanted to do! In Solarium there is an option to deploy midlets to the SunSPOT and run these midlets side by side. This turned out to be exactly the feature I was trying to build. As Solarium is open-source I only have to find out how Solarium does this.
Someone else gave me the following link. Here I could find a piece of code which should do the same without the UI.
One of the replies pointed out that Solarium could do what I wanted to do! In Solarium there is an option to deploy midlets to the SunSPOT and run these midlets side by side. This turned out to be exactly the feature I was trying to build. As Solarium is open-source I only have to find out how Solarium does this.
Someone else gave me the following link. Here I could find a piece of code which should do the same without the UI.
New Planning and update
Last week we have been working on refining our code further. We have also made some breaktroughs on certain parts. For example we have found out that we could simply use Solarium, a build in program to deploy entire suites. We have been trying to find out how this program works so we can implement the workings in our code. This will make it alot easier to deploy software on the Sunspot.
Our new Planning is also online now in pdf-format:
New Planning
We have also visited the Nite-event, this was an IT orientated event in in Groningen.
For now we will be working towards trying to make a working demo version so we can demonstrate the Proof of Concept. 29 October we will be giving a small presentation for Hans Appel and some business partners.
Our new Planning is also online now in pdf-format:
New Planning
We have also visited the Nite-event, this was an IT orientated event in in Groningen.
For now we will be working towards trying to make a working demo version so we can demonstrate the Proof of Concept. 29 October we will be giving a small presentation for Hans Appel and some business partners.
Thursday, 9 October 2008
MySQL
Sorry for the long wait, we havent been getting to updating our blog in a while. Last monday we had a Problem Solving workshop.
Frankly this was mostly wasted time as we didnt have any real problems at the time, and we didn't learn much from it.
Tuesday we started further developing our code. I have been busy with making a MySQL database and the code which is needed to communicate with it.
Erwin has been helping me with this and he has been busy also with coding the communication between the SunSpots. Isolates are still somewhat hard to realise. But we will get there eventually :).
So i will show you some pieces of code from the MySQL communication program.
With this we have been able to communicate with the database. Here we can make User profiles, update them, delete them if necessary etc.
Also we can retrieve information trought so called queries. So we can for example ask the database which categories of software a certain user is interested in.
Below is a link to the code thusfar in PDF format, keep in mind it is still work in progress and so it isnt final yet in any shape or form.
Code MySQL Communicatie
Frankly this was mostly wasted time as we didnt have any real problems at the time, and we didn't learn much from it.
Tuesday we started further developing our code. I have been busy with making a MySQL database and the code which is needed to communicate with it.
Erwin has been helping me with this and he has been busy also with coding the communication between the SunSpots. Isolates are still somewhat hard to realise. But we will get there eventually :).
So i will show you some pieces of code from the MySQL communication program.
With this we have been able to communicate with the database. Here we can make User profiles, update them, delete them if necessary etc.
Also we can retrieve information trought so called queries. So we can for example ask the database which categories of software a certain user is interested in.
Below is a link to the code thusfar in PDF format, keep in mind it is still work in progress and so it isnt final yet in any shape or form.
Code MySQL Communicatie
Thursday, 2 October 2008
Isolates
An important feature of our program will be the ability to run multiple programs at the same time. Within the squawk VM there is a thing called isolates. A Squawk isolate is a collection of threads and associated objects that forms a distinct and separate execution unit. Objects are never shared between isolates.
If you want to run two or more Java applications on your desktop you would normally launch a separate VM process for each application. This is not practical if you are resource limited, as with the SPOT. So the alternative is to run the applications as a set of isolates within a single VM. A clever feature of Squawk is the ability to snapshot the state of an isolate and save it in a file or, for SPOT applications, send it to another SPOT over the radio.
What we need in our application is the ability to start a program from our already running program. This is where Isolates come in. After sending a new program(a .class file) from a basestation to a sunspot, we create an Isolate with it and have this run.
At this moment we are able to send a .class file to a sunspot. But when we try to have it run as an Isolate we get an error. So there's still some work to do next week.
This is how we create an Isolate:
Isolate i = new Isolate("com.sun.spot.flashmanagement.FlashFile", args, null, Isolate.currentIsolate().getParentSuiteSourceURI());
If you want to run two or more Java applications on your desktop you would normally launch a separate VM process for each application. This is not practical if you are resource limited, as with the SPOT. So the alternative is to run the applications as a set of isolates within a single VM. A clever feature of Squawk is the ability to snapshot the state of an isolate and save it in a file or, for SPOT applications, send it to another SPOT over the radio.
What we need in our application is the ability to start a program from our already running program. This is where Isolates come in. After sending a new program(a .class file) from a basestation to a sunspot, we create an Isolate with it and have this run.
At this moment we are able to send a .class file to a sunspot. But when we try to have it run as an Isolate we get an error. So there's still some work to do next week.
This is how we create an Isolate:
Isolate i = new Isolate("com.sun.spot.flashmanagement.FlashFile", args, null, Isolate.currentIsolate().getParentSuiteSourceURI());
This week - Detection Code
This week started off with presentations on monday. Every group had to do a small presentation about what they where doing.
Tuesday we started with programming again. Myself i walked trough the sunspot tutorials as i didnt have time to do that yet.
Wednesday we started programming again and we made a program which is capable of detecting the sunspots in the vicinity and giving back their adresses.
boolean running = true;
while (running) {
RouteTable t = LowPan.getInstance().getRoutingManager().getRoutingTable();
Enumeration e = t.getAllEntries();
while (e.hasMoreElements()) {
System.out.println(e.nextElement().toString().substring(0, 19));
}
System.out.println("--------------------");
Utils.sleep(5000);
}
This gave back the following results:
0014.4F01.0000.2171
0014.4F01.0000.3881
0014.4F01.0000.42B5
--------------------
0014.4F01.0000.2171
0014.4F01.0000.3881
0014.4F01.0000.42B5
--------------------
0014.4F01.0000.2171
0014.4F01.0000.3881
0014.4F01.0000.42B5
--------------------
etc.
We have also been doing tests with the range of the sunspots indoors. We have found that when we suspend a sunspot on the ceiling they have quite an astonishing range.
We could detect them up to two rooms away. Which means that a mesh network will be a working possibility for the future.
However this will also mean that it will be hard to tell wether a sunspot is actually in the same room or in a room next to it.
All in all we have been busy. Erwin is also working on creating a piece of code capable of storing data on the flashmemory and making it run as an isolate. This has been quite succesful however there are still some problems which have to be resolved for it to work.
More to come soon.
Tuesday we started with programming again. Myself i walked trough the sunspot tutorials as i didnt have time to do that yet.
Wednesday we started programming again and we made a program which is capable of detecting the sunspots in the vicinity and giving back their adresses.
boolean running = true;
while (running) {
RouteTable t = LowPan.getInstance().getRoutingManager().getRoutingTable();
Enumeration e = t.getAllEntries();
while (e.hasMoreElements()) {
System.out.println(e.nextElement().toString().substring(0, 19));
}
System.out.println("--------------------");
Utils.sleep(5000);
}
This gave back the following results:
0014.4F01.0000.2171
0014.4F01.0000.3881
0014.4F01.0000.42B5
--------------------
0014.4F01.0000.2171
0014.4F01.0000.3881
0014.4F01.0000.42B5
--------------------
0014.4F01.0000.2171
0014.4F01.0000.3881
0014.4F01.0000.42B5
--------------------
etc.
We have also been doing tests with the range of the sunspots indoors. We have found that when we suspend a sunspot on the ceiling they have quite an astonishing range.
We could detect them up to two rooms away. Which means that a mesh network will be a working possibility for the future.
However this will also mean that it will be hard to tell wether a sunspot is actually in the same room or in a room next to it.
All in all we have been busy. Erwin is also working on creating a piece of code capable of storing data on the flashmemory and making it run as an isolate. This has been quite succesful however there are still some problems which have to be resolved for it to work.
More to come soon.
Subscribe to:
Posts (Atom)