not the end…

And so I finished my education, I passed the project with a very good mark and soon I’ll be looking for jobs, but first I need a little bit more vacation. Actually I have been travelling for almost a month already now, in Portugal and France… In Portugal we had some good bye parties, we visit the places in Porto we liked the most, had dinner all together… Next I made a trip with tents together with who’s left in our house. We went all the way to the first Alentejo beaches south of Lisboa. Alentejo is the area in between Lisboa and Faro which is in the south of Portugal. Alentejo is known for its wine grapes, it also has some nice less known beaches and off course it can get very hot there (we had up to 43°C !! ). Next I had to leave my room as the contract was expired but already the next day we left again to the beautiful island of Madeira. Madeira is an island south of Portugal, more or less as south as Casablanca (Morocco) is, but still part of the country Portugal. Madeira is an volcanic island but its volcanic activity has stopped for centuries now. The island is actually only the top of the island, the volcanic ‘cone’ continues 6km under sea level until it reaches the ocean bottom. Madeira is very different in landscape. Even with its small surface area its highest point is 1.8km high, and the steep mountains that characterize the island creates unique environments and micro climates. In the north you’ll see some tropic forest, in the middle of the island there is the volcanic mountains which have needle trees on the way to the top. The south of the island is more like inland Portugal while some places east of the island are really dry and have nearly no trees or vegetation at all. Madeira is really beautiful to do some hiking, it also comes with some natural swimming pools for whoever wants to chill down a little bit after hiking, and in some places once can go surfing or scuba diving or make a boat trip to the next island nearby (that has a really nice beach so I have been told). Madeira also has some typical food and drinks, for example Madeira wine and the Lapas seafood. I really enjoyed this place and arriving at the Pico do Arieiro (the top of the island) the last day of this trip was really a perfect way to end the Erasmus.

This however means not that this is the end of this blog. I’ll try to experiment more with the current code and post my findings here, however don’t expect the same update rate from the past few months as development is now pushed to my free time…

Before I go, a nice shot taken on the Madeira island (not by me):

food, food, food… and drinks!

More (Portuguese) food and drinks!

For starters, nearly every confeitaria (and there are a lot in Porto) has these Pastel De Nata:

Very sweet and very good! Also Bifana is popular kind of dish. It’s more or less like a dry hamburger where sometimes the meat is kinda chopped:

The next dish is very popular here in Porto, I’m not sure it is because of its taste (because it’s not THAT good) or because it is just fills very well. It’s called Francesinha and looks for me like a deluxe Croque Monsieur

The next one we all know, it’s the famous Port wine which I really started to appreciate while living here in Porto:

The next drink is not the best but for me is a good replacement licor for making Tiramisu. The drink is called Amêndoa or Licor de Amêndoa:

Finishing the project

Last few week I had to spend quit a bit more time on the project as I wanted to make sure the basic functionality was there. I changed some parts of the code, did some performance testing, tuned the code a little bit and yesterday I put it into a state I think is good enough to show. Here is more or less an overview of  the software architecture:

software architecture

It’s more or less the same as the drawing you saw before. One of the differences is that the console application is now an application on its own plus the server IO back-end is more or less programmed as a service which automatically loads at boot. This way security rules can be applied, although they have not be implemented at this stage. The console app talks to the back-end server through TCP/IP and uses the same classes and methods as the front-end website when interacting with the XBee network. Regarding the front-end webserver, in the end I remained using the Jetty webserver. Altough it is still not performing very well, it does with it is supposed to do and I can’t find a solution which can be used as easily as the current one. Loading web pages still takes some time, but since this is more a research project than a product design I think concluding that “the functionality is doing what we hoped for” is good enough. Below you’ll find a screenshot of the analog values page which got a small interface update since my last screenshot of it. Notice the labels that get displayed when hovering one of the samples.

webapp3

New in the front-end website is this “Command line” page which does exactly what you think it will do: allow the user to send commands to the XBee network. The back-end server has been upgraded to maintain a list of connected devices (with a timeout value of 1 hour) and so we can query the connected devices at all time. A dropdown box is filled with all connected devices and list of all available AT commands is also displayed as a dropdown box. The parameter box can be filled in optionally. In the picture below you see a demonstration of using the front-end ‘command line’. In the previous form submit we selected a node, selected the D1 command and filled in no parameters. After hitting the submit button the D1 command is send to the node which will then reply with its configuration value of the D1 register. Next the page loads as the one seen in the picture below and displays the value of the D1 register. As you see the value is 5 which means the D1 register is configured as digital high output. Next I filled in 4 in the parameter field, the dropdown boxes automatically select the same command from before when the pages loads and so when I would now push the submit button the D1 command with parameter 4 would be send to the remote XBee node which will then be configured as digital low output. To make a long story short, the led that was connected to the remote XBee on pin D1 was once lighted on but has now been turned of through our front-end website.

webapp5

At this moments I’m finalizing my report which should be finished on friday, with next week my final presentation about what I’ve been doing past few months. Wish me luck because if all goes well I can call myself Professional Bachelor in ICT from then on!!

South Portugal: Algarve and its beaches

picture by drchristianchams.blogspot.com

Do I need to say more? Algarve and the south of Portugal really has a nice collection of picture-perfect beaches like for example the one in the image above. Even though the weather wasn’t all that great, it was good enough to enjoy the swimming and get some sunburn. But while the coast scenery is so great one must also say that the place is VERY touristic. Albufeira for example is full of English bars and Irish pubs! You won’t find pastelarias e confeitarias there, instead you’ll have to enjoy a big English breakfast (we actually ended up going to the supermarket…). We also noticed that Algarve has a large collection of resorts, with some of them being as big as a small town! No shitty and abandoned houses there, only nice green grass, perfect houses, indoor and outdoor swimming pools, good dressed people and expensive food. Okay, I might have enjoyed the sauna, and it’s nice to see some off the luxury, but actually I don’t like it as it is all very fake. It’s not Portugal at all, it’s something artificial. People that go to Algarve and say they’ve been in Portugal, well, try some other cities up north and wake up…

So, although I liked the trip, I’m stuck with a double feeling because Portugal is actually much different (and poorer) than the resorts will let you believe. But if you really like to see it once I’d say go there but know that it’s very touristic. Oh, and try the local dish caled Cataplana, it’s very good at some places.

picture by blog.omy.sg

Portugal and its Fado music

As a tourist Fado is one of the things you should definitely try to see once. Fado?

Fado (Portuguese pronunciation: [ˈfaðu], “destiny, fate”) is a music genre which can be traced to the 1820s in Portugal, but probably with much earlier origins. Fado historian and scholar Rui Vieira Nery states that “the only reliable information on the history of Fado was orally transmitted and goes back to the 1820s and 1830s at best. But even that information was frequently modified within the generational transmission process that made it reach us today.”[1] In popular belief, fado is a form of music characterized by mournful tunes and lyrics, often about the sea or the life of the poor, and infused with a characteristic sentiment of resignation, fatefulness and melancholia (loosely captured by the word saudade, or “longing”). However, although the origins are difficult to trace, today fado is regarded, by many, as simply a form of song which can be about anything, but must follow a certain structure. The music is usually linked to the Portuguese word saudade which symbolizes the feeling of loss (a permanent, irreparable loss and its consequent lifelong damage). Famous singers of fado include Amália Rodrigues, Carlos do Carmo, Mariza, Mafalda Arnauth, Ana Moura and Cristina Branco.

Thank you Wikipedia. For myself, I can appreciate this kind of music… once in a while 😉 In Porto, there are many places where you can find it, we found it in the ‘restaurante típico o fado porto’. E agora, musica!

Admin site revisited

For now I’ve added a basic user interaction console method which allows to send commands  and receive responses from the XBee network. I would like to add more functionality but it is kind of hard to include specific handlers for every XBee AT command because there are really a lot. I’ll have to team up with other people involved in this project to discuss what functionality we want to support and which ones we would like to ignore and handle with the Digi software. Furthermore I also experimented a bit more with other Java Servlet webservers… As said, Glassfish really takes a lot of time to startup, same counts for Tomcat. If stumbled upon 2 more webserver applications (Jetty & Winstone) which should be a less of a burden to run. Winstone seems to be the lightest one of the two but I failed to get it running. Furthermore, this Winstone project doesn’t seem to be updated any longer, but I managed to get the Jetty webserver up and running on the Raspberry-pi and I also managed to deploy my first JSP website on the remote (Raspberry-pi) webserver. After launching the necessary processes I got the following response in my webbrowser:

Screenshot from 2013-05-14 14:41:43

For development purposes however I’ll continue to use the Glassfish webserver on my desktop computer as this one can easily be integrated into Netbeans while Jetty is currently not supported. I’ll also add a Netbeans build command which automatically copies the compiled .war website to the Jetty webserver so that I only need to “git push-pull” my code after compilation if I wanted to test it on the Raspberry-pi.

So, another goal completed, what’s left:
– make the xbee server aware of it’s connected devices
– add a command line page to the admin site
– add GUI configuration possibilities through the admin side
– add more database filtering options

This week however I’ll be writing more text for the thesis than writing program code, and next weekend I’m visiting the south coast of Portugal in between Faro and Sagres. Até à proxima!

Migrating to the Raspberry-Pi, part 2

Like I said, I was getting closer to my end-goal. What I have so far is a Java application which launches two service threads: one which handles TCP/IP requests and one which handles the IO. There is also a database connected to this server application and in case IO samples are received they will be saved in this database. I also made a JSP website which is capable of displaying the database data and should soon also be capable of sending TCP/IP requests to the TCP/IP service.

HOWEVER! It seems that the glassfish webserver is quite a burden to run on the Raspberry-Pi, the pages are showing but launching the service takes roughly 5 minutes. I have to find some lightweight service which offers the same functionality. But, this is something I’ll do later: as my deadline is coming nearer and nearer I’ll have to wrap up my work and put it into a test environment where I simulate a real life scenario. My next goal will be to make the service flexible in a way that once the application is running the user can dynamically adjust the configuration and stuff like this. I’ll have to program a console function which will allow the user to set up the XBee network and later on I can add the a more user friendly interface by using the JSP website as frontend.

Anyway, this week we have the Queima Das Fitas, a week full of ‘festivalitis’, and later on I have 3 more weeks to finish so I’m not sure if I’ll get all of  this working before the deadline (because in the meantime I also need to write up the thesis).

Queima!

http://www.queimadoporto.com/

In between Porto and Lisboa

Previous weekend we made a little trip by car, visiting coastal places, towns and cities on the road in between Porto and Lisboa. We went to places like Nazaré, Peniche, Leiria, Figueira da Foz and Coimbra.

Nazaré is a nice small town near the ocean which has the old town center high on top of the cliffs while the commercial part of this town is located down near the beach.

Nazaré (photo from fim.fotosblogue.com)

Nazaré is also know because of the recent world record of ‘highest surfed wave’, where Garrett McNamara took a 100 foot (30 meters) high wave on the 29th of January.

Peniche is also a place where a lot of surfers go to. There is the annual world championship and the town itself is surrounded by cliffs and Atlantic ocean water, there is also the nice GeekCo where we stayed.

Peniche (photo by puraexperiencia.blogspot.com)

Leiria is more in land and has a nice old castle and cathedral to visit. From the castle you also have a good view on the nearby soccer stadium which is very colorful.

Leiria castle (photo by olhares.sapo.pt)

Coimbra can in some ways by compared to Porto. The city center is also very step to walk through and you have a lot of schools and universaties there, a botanical garden, bars and disco’s, good restaurants, a shopping street and there is also a river going through the town. Founded in 1290 Coimbra actually has one of the oldest universities in Europe. There is also the old Roman city that you can visit, so if you have the time you should definitely go to Coimbra.

Coimbra (photo by umpigodeluz.blogspot.com )

Here we also got served a very good local dish called Chanfana. It’s meat that has been put in wine for 3 days and afterwards cooked for 4-6 hours. It actually looks very very familiar with the dish called ‘stoofvlees’ that we have in Belgium!

Chanfana (photo bysabores.sapo.pt)