BSc Thesis: Unity Network, resilient virtual networking platform built for direct host-to-host data exchange with user identification and security properties

Hello! in this article I would like to present my BSc thesis, Unity Network, conducted in Technological Educational Institute of Crete at summer 2014.

Abstract

Unity network is a virtual networking platform, capable to be deployed in any kind of IP network as a Local Area Network or over the Internet. The network is centered around three pillar key-principles: Attributing a unique network identity to each connected host: The ability for a user to have many personal host-devices connected to the same network where each one is identified by a unique IP address. Feature which enhances host-to-host connections and lets the users keep contacts of other friendly hosts in their contact list. Non-restraining host-to-host connections: the ability for a user’s host to non-restrictively and conveniently exchange data of any type of network service he wishes with any other host. Secure and private host-to-host connections: the ability for each host to exchange encrypted information with any other by default and non-encrypted by selection by making use of RSA certificates and public key distribution features in order to provide authentication and confidentiality between the connected nodes. From a technical aspect, the network is built for enhanced resilience as, from the one hand, it is based on a divide and conquer logic demonstrating distributed node roles and decupled network traffic from network logic, features which allow the platform to resist death and dynamically expand to serve many host-systems. From the other, it is based solemnly on software written in Java without the need of any dedicated device or hardware which allows its applications to be hosted under many different devices and Operating Systems. For the clients behind a NAT/firewall, the network offers NAT traversal techniques to let them pass their network limitations and connect to the virtual network without compromising their ability to exchange any kind of data. To conclude, the network’s higher intention is to act as a live and tangible example of a better version of today’s Internet.

Report

The thesis report is available in greek from the following url:

https://apothesis.lib.teicrete.gr/handle/11713/3241

The report is being translated in english by its author. Currently chapters 1, 2 and 3 are complete while 4, 5 and 6 are under translation. To view the translated report please visit the following url:

Unity_Network_report_12_2_2017

Source Code

Unity Network is composed by three software applications written in Java. The source code for them is published on github and can be accessed from the following urls:

https://github.com/kostiskag/unitynetwork-tracker

https://github.com/kostiskag/unitynetwork-bluenode

https://github.com/kostiskag/unitynetwork-rednode

How-to deploy and use the network guide

The following pdf guide is compiled in order to aid admins setup and run the virtual network in their environment for either local or Internet usage.

Unity Network, how-to-setup-guide

Looking for developers in order to deploy the platform for real use on the Internet

In order for the platform to be fully operational it needs the following todo list to be done:

  • improve the control flow algorithm
  • fix minor bugs
  • deploy and test on the Internet

If you are interested in joining the project or to provide professional advice and guidance please send me an email.

PiWall, how to build a game-changing, flexible, low-level network firewall

firewall-29940_640You may be surprised with how frequently, modern Internet devices such as mobiles, laptops or computers continuously send and receive data on our behalf that were we are not aware of their existence. When a person decides to know the content of the information that is being shared or limit and profile some data he may come across the idea of installing a firewall in his computer. So, is installing software firewalls in computers enough to counter the situation? When a software firewall is used it is probably aiming to control the higher network level and therefore it may be good at limiting other software applications exchanging data. On the other hand, have you considered the possibility that your own device might send the information which needs to be monitored? In this point, a software firewall on top of the device is not the best case scenario as the software might never be in a position to detect the exchanged low-lever system data or may not be legally allowed from the Operating System’s manufacturer and other factors to tamper with them. Finally, as the saying goes, one system is based on another, so if an attacker could use another vulnerability in your system to tamper with its firewall, since its software, you might never knew it was affected. On the other hand, as compared to software firewalls, someone could use a hardware standalone network firewall as these devices may control the network traffic from more than one hosts and they are dedicated to a single task wich makes them harder to be penetrated. The solution of using standalone network devices as firewalls makes more sence in the security field, however, their negative aspects lie in other factors as: that they are difficult to be found in the consumer market, they may cost something extra and may not be tailored according to a user’s needs.

For quite some time I was occupied to solve this situation wondering whether a person could use a firewall solution within reach to define his network policies, be 100% confident for their effect in play, eliminate the possibility of breach through software, and be informed as well, in real-time, for the exchanged network data. To fit in the above requirements, the solution had to be an independent network device for the afore mentioned benefits, not cost a fortune and to have enough processing speed to control the exchanging data. In order to match these expectations, the raspberry pi B was ideal as it is built for low-power consumption and may run Linux and Python over a quad-core ARM cpu. The next question in hand, was how to monitor the exchanging traffic. The solution, was given to me by the network itself as at the end it’s all about data in a cable that come and go. I had to let the hosts be and focus my attention on the medium, the cable where everyone is connected! What if you could control which kind of data arrive and which kind of data leave from the medium towards the Internet? There is no other way for the data to go right? and that would be something really game-changing as with one device you could control multiple hosts! In order to achieve this, I had to somehow split the network wire between the internal hosts that were in need to be defended and the Internet and to install the device in between them to act as the firewall.

In order to approach the solution, I had to ask how does someone split a network wire in two?! For this task, a bridge was in need to be formed as it is called in networks. A bridge is simply a device with two network cards which may exchange data from/to another and therefore the hosts from the one or the other side of the cable are not aware of the device’s existence since it does not have a network presence. Furthermore, in order to be informed for the network traffic from the device and change its rules you would need to use a third network interface to access the device, this time as a network host. These make up to three network interfaces, however, as you may have noticed a raspberry pi has only one. The other two interfaces would be usb to ethernet adapters since the pi has 4 USB ports available. In the project,  Apple’s ethernet to usb adapters were used as they demonstrate good performance, low power consumption and the raspbian os has the necessary drivers to support them. If you decide to make a device of your own, watch out for the adapters from the ebay and other online stores as the pi might not support their drivers. Finally in order to understand the device you may observe the following diagram.

firewall

Introducing the device

This is PiWall, a game-changing, flexible, low-level network firewall!

Do it yourself!

in order to replicate the device you are going to need:

  • one Raspberry Pi model B (2 or 3) url1, url2
  • one micro sd card 8gb or more
  • two Apple USB Ethernet Adapter
  • one power cable for the raspberry pi
  • a case for the raspberry pi (optional)
  • heat sinks for the pi (optional)
  • two new ethernet cables

Setting up the device

Write the latest linux/raspbian to the sd card as described in the official raspberry pi guide:

https://www.raspberrypi.org/documentation/installation/installing-images/

Insert the sd card and connect your device to a monitor, keyboard and power. As soon as you have a command prompt set up a new user password with:

passwd

edit the system’s settings with:

sudo raspi-config

select to:

expand filesystem
Internationalization options:
change time locale, timezone and keyboard layout
Advanced Options:
Hostname: change hostname to PiWall
SSH: enable sshd

Source code

The source code for the project is written in Python (3.4) as from the one hand, it is really easy and fun to control low-level traffic with a high-level programming language and from the other, Python is easy to write and thus to set your firewall, monitor and modify rules the way you need them.

The source code may:

  • Monitor your traffic on the fly
  • Firewall your traffic on the fly
  • Modify your traffic on the fly
  • Provide live information for all the above

Keeps internal and external host whitelist and has the necessary policies to handle ARP, IPv4, IPv6, ICMP, DHCP network protocols. You may view the project’s source code from here and learn how to install and run it:

https://github.com/kostiskag/PiWall

Last but not least, if something is not in the code the main idea is to define it yourself. Moreover the overall project, the programming language and the source code demonstrate a good background to apply various other algorithms for AI or big data. You may start by collecting frequencies from the various send and received protocols, you may modify your internal hosts mac addresses to keep them private, monitor DNS traffic, monitor peak hours and much more.

Final thoughts

You may know that these kind of solutions could be used for malicious acts like collecting network traffic, however, as a scientist, I believe in knowledge sharing and decided to publish this article as its development was meant to help individuals apply one extra measure of security in their home or work networks and thus try to reach a state of equilibrium towards the extensive network trafficking and profiling which is done on their behalf. On the other hand, this article and device were meant to let individuals be introduced into network traffic and control as network trafficking has become a part of our digital lives. Finally, the overall installation is not very expensive as the hardware costs around 110€£$ and may be used for research purposes, home or work environments.

As a room of after-thought, It may be a good practice to avoid connecting to unknown WiFis in airports, hotels or cafes as a similar and not so friendly Man-In-The-Middle (MITM) solution may be installed there. If you still need to connect from public places and can not avoid it you may use an encrypted VPN solution such as openVPN towards a trusted VPN server and thus be defended against a close MITM host.

Finally, have fun with your device and watch out for project updates!

You can view this project along with other three raspberry pi projects developed for 2017 in the following video

 

How to build a highly resilient raspberry pi GPS tracker and visualize your data real time on Google Maps.

gps_avdou_presentHello guys! In this article I am going to present one of my newest projects, a fully functional GPS tracker which may stream its location over 3g and visualize gps data on Google maps in real time.

To begin with, and in order to understand the significance of this project let me explain what a GPS tracker is and why someone might use it for. Normally when we use a car GPS or a mobile GPS app it shows our location on a map and demonstrates the best path related to distance or other factors from our spot to a selected destination. As opposed to a GPS tracker we may not use it to find the best route to our destination but it may be used to track objects or people who carry it. It is noteworthy that, in contrast with a gps we may not need to be physically near to it in order to receive data as it may stream those over the internet. As an example case, someone like me may not remember where he parked his car last night, with a tracker in his car he may receive its last known location. Similarly, the use of tracking moving objects is handy in other cases as when we need to know the location of other important stuff, or  even to track pets!

Another cool use trackers may have is to let you record your walks. Similarly with how you record video with a camera you might just do the same with GPS co-ordinates. This feature comes to be really useful for mountain climbing, daily walks or exploration as when you return to your place you may study/observe your followed track or, you know, collect and share your tracks like you take pictures or videos! In my implementation, in order to enhance this feature I have made the routes to be stored as independent html files and open in your browser with a double click.

In the remainder of this article, the device and its uses may be observed at first glance. Afterwards,  the device, its source code and scripts are going to be analyzed in order for you to learn more stuff and, if you decide, to be able to replicate the device!

Introducing the device!

In more detail, the parts which were used are:

PI: 1x raspberry pi model B url1, url2 One micro sd card 8gb or more. One micro USB to USB cable for the power. One USB power charger of (5V 1A), one usb keyboard, one monitor with hdmi input and an HDMI cable.

GPS: 1x adafruit hat for raspberry pi similarly with my implementation. You may also use the gps breakout without the hat were you should have some jumper wires in order to attach it. If you decide, you may use another USB gps. The other two gps components which were used were: an SMA to UFL adapter url1 , url2 and a SMA gps antenna url1, url2

Networks: 1x 3G usb adapter: url1 . For the case that you may wish to stream  the tracker’s location to a selected server. Otherwise, if you do not wish to stream the tracker’s location you may “record” your routes and view the results when you reach to your computer. Make sure that the adapter’s specifications are compatible with your region. In order to use your adapter you will require a SIM card and a mobile plan to send and receive internet data.

1x WiFi adapter: url1  Makes things easier when on a LAN environment to access the pi’s content, services and for setting up and debugging purposes. In the case that you may not wish to buy a wifi adapter you may use the pi’s ethernet socket.

Some USB extension cables or USB mounts. To connect those to the pi in order to be able to conveniently plug in/out the USB WiFi and 3G adapters.

Power: 1x witty pi 2 hat A very good implementation in order to manage your pi’s energy. It stabilizes the power input, there is a power on button and more importantly it may power on/off you pi based on a scheduled time plan. The main idea is to, let’s say, open tracker every day for 30 min or similarly with another plan in order to save the battery’s energy and use our tracker for a bigger time duration.

One powerbank most preferably with a large capacity and a USB output of 1A.

Case: A case capable to contain all the above equipment and to be able to withstand some real world shocks.

Do it yourself!

Assembling the device

The device’s assembly is not so hard to achieve. To begin with, the first task to do is to solder the adafruit gps hat. In the witty pi you should move Halt by GP4 to custom as the gps hat uses that port to send the PPS pulse. In addition, you should move the jumper to the right to Dummy Load On in order to not let the external powerbank switch off when it is left alone. Afterwards, you may create a stack with the gps hat and the witti pi 2. It does not matter which HAT is on top, however, witty pi comes by default with a stacked header and you may need to move the gps antenna sometimes so it is much more convenient for the witty pi to go first in the stack and the gps to go on top of it. You may power the device on from the button on the witty pi.

Configuring the device

For the first part of the device’s configuration we may wish to set up the raspberry pi for the first time, the I2C interface, the wifi and network, the ssh service and time in order to be let the devices work, to be able to control our device from a remote shell and to display the proper system time when sending email events. This process is already explained in another one of my articles about the tampering device which you may view from here. From this article you should follow “Phase 1 – pi configuration”.

Setting up the GPS

In order to set up your gps hat you should study adafruit’s given setup guide found here: https://learn.adafruit.com/adafruit-ultimate-gps-hat-for-raspberry-pi/. What I did was slightly different from the default setup as I provided gpsd’s settings in a different way and used the service command to stop and start gpsd. What I did was:

sudo apt-get update
sudo apt-get install gpsd gpsd-clients

GPSD is sometimes buggy and if you decided its time to reinstall it you should do that with the purge option:

sudo apt-get purge gpsd

In my case where I used Raspbian Jessie and as described in adafruit’s blog I had to run the following commands:

sudo systemctl stop gpsd.socket
sudo systemctl disable gpsd.socket

When all of this is done, restart your pi, there is a fix led on top of the gps hat which may indicate a fix when it blinks with large time gaps. Your next task to do is to power it on, leave it outside with the gps antenna facing the sky and run either from there or from ssh:

sudo gpsd /dev/ttyAMA0 -F /var/run/gpsd.sock
gpsmon

With those commands you may observe if you gps operated similarly with the pictures shown below. You may need to let it for some time in order to receive a gps FIX.

In order to close gpsd:

sudo service gpsd stop
#or
sudo killall gpsd

GPSD permission error FIX

If you can not open gpsmon or other gpsd clients as in my case, the gpsd may have changed the permissions of the gps device it is using. From what I have seen on the Internet posts the gpsd and the raspberry pi have some co-operation issues as this happens frequently. In order to overcome it you may use the following fix:

sudo gpsd /dev/ttyAMA0 -F /var/run/gpsd.sock
( while : ; do sudo chmod 777 /dev/ttyAMA0; sleep 20; done ) &
gpsmon

When you have decided that everything is alright it is time you registered gpsd on system’s start. In order to learn about startup scripts you may study this guide: https://www.dexterindustries.com/howto/run-a-program-on-your-raspberry-pi-at-startup/.

The following script is a startup one, the bulky header is being used for letting the os know in which order to start the startup scripts. The “while” code is a bit dirty however, as mentioned, the gpsd changes the permissions on the gps device and does not allow the pi user to open any gpsd clients. The while code lets the user to be able to open any gps clients. Finally, the last line executes a bundle of services for the gps from the pi’s home directory. You should keep that in mind as we may return later to that.

sudo nano /etc/init.d/init_gps

#!/bin/bash
### BEGIN INIT INFO
# Provides: init_gps
# Required-Start: $all
# Required-Stop:
# Default-Start: 4
# Default-Stop:
# Short-Description: Initialises gpsd and python services.
# Description: This file initts all gps related stuff.
### END INIT INFO
(
sudo gpsd /dev/ttyAMA0 -F /var/run/gpsd.sock
(
while : ; do
chmod 777 /dev/ttyAMA0
sleep 20
done
) &
# this file may open our source code services and  is explained in detail later in the article in the project’s git
sudo -u pi /home/pi/gps_bundle_services start
) > /home/pi/gpsout

sudo chmod +x /etc/init.d/init_gps
sudo update-rc.d init_gps defaults

Should you ever wish to remove the script from start you may do with:

sudo update-rc.d init_gps remove

Setting up 3G

In order to setup the 3g please consider the guide shown here as well: https://www.thefanclub.co.za/how-to/how-setup-usb-3g-modem-raspberry-pi-using-usbmodeswitch-and-wvdial

For the 3g what you have to do is:

Plug in the 3g usb but do not remove wifi or etherner as you may use ssh.

sudo apt-get update
sudo apt-get install ppp wvdial usb-modeswitch

First, as the above article suggests you should make sure that the usb 3g modem is on modem mode and not storage mode every time and before wvdial attempts to connect. When you have your setup ready you may proceed with setting wvdial.

Wvdial needs a config file in order to properly work and connect to network. If you did not have your 3g usb plugged in, the config file may not be auto generated but you may still want to auto generate it by running sudo wvdialconf. The auto-generated config file is halfway to connect and you are going to need more attributes as shown below. It might be a good strategy to save the auto generated file’s differences like the Init2 or Modem lines, copy the file from here and then replace these lines.

sudo nano /etc/wvdial.conf

[Dialer Defaults]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 +FCLASS=0
Init3 = AT+CGDCONT=1,”IP”,”internet”
Modem Type = Analog Modem
Baud = 9600
New PPPD = yes
Modem = /dev/ttyUSB0
ISDN = 0
Phone = *99#
Password = { }
Username = { }

In my case I had to connect to a cosmote 3g network in Greece and gave the above settings which did the trick. In your case you may have to variate a bit and search for your APN name or login credentials to match your carrier’s settings and save the file. Finally, shutdown the system and remove any LAN wifi usb or ethernet cable. We are going to need a keyboard and monitor for this one as we can’t use the ssh.  restart the system, then, use Ctrl + Alt + [F1 – F12] in order to switch between different terminals. Then in one terminal run:

sudo usb_modeswitch -c /etc/usb_modeswitch.conf
sudo wvdial 3gconnect

When wvdial connects, switch to another terminal to test your connection. You may also include an ampersand to the command and use the same terminal, however, you may have a lot of verbose in order to easily understand the messages. As soon as you observe the adapter’s led blinking vividly you are probably connected and you may run ifconfig to collect your public IP address from the ppp0 interface. To test your network run something like:

wget –spider http://www.google.com

Once your implementation is working make the 3G to connect at startup. I have developed this script to drop when there is an already active network interface like a wifi. Finally the session’s information is stored on /home/pi/3gout

sudo nano /etc/init.d/init_3g

#!/bin/bash
### BEGIN INIT INFO
# Provides: init_3g
# Required-Start: $all
# Required-Stop:
# Default-Start: 4
# Default-Stop:
# Short-Description: Initialises 3g
# Description: This file initts 3g
### END INIT INFO
(
sleep 60
#Allow this block when you have installed the project’s source code
#python3 /home/pi/gps_tracker/is_there_internet.py
#if [ $? = “1” ]; then
#echo “Script drops for this one.”
#exit
#fi
usb_modeswitch -c /etc/usb_modeswitch.conf
while : ; do
echo “3g connect”
date
wvdial 3gconnect
echo “3g hangup”
date
sleep 10
done
) > /home/pi/3gout &

sudo chmod +x /etc/init.d/init_3g
sudo update-rc.d init_3g defaults

Witty Pi 2

Witty pi’s setup can be studied from the given project guides:

http://www.uugear.com/product/wittypi2/
http://www.uugear.com/doc/WittyPi2_UserManual.pdf

Since everything is starting on system’s power on, our task with this hat is to set up a script for the pi to open every 4 hours for 40 min in order to collect GPS data,stream them back to us and thus extend the battery’s power for longer.

In order to install witty pi’s source code please run:

wget http://www.uugear.com/repo/WittyPi2/installWittyPi.sh
sudo sh installWittyPi.sh

Compatibility towards the gps hat

Remember that we had to put halt on GPIO4 to custom in order to not interfere with the gps hat since it is using the same port? It looks like we have to do the same thing in witty pi’s scripts or otherwise the device may switch off unexpectedly by misinterpreting the PPS pulse for a halt signal. In order to fix that go ahead and edit /home/pi/wittyPi/daemon.sh .

nano /home/pi/wittyPi/daemon.sh

Change the below variable from 7 to 10 in order to solve it.


# halt by GPIO-4 (wiringPi pin 7)
halt_pin=7 #should go to anything except 7(gps) and 1(the led) let’s say 10

You may find more information about this setup from here: http://www.uugear.com/portfolio/change-the-pin-that-used-by-witty-pi/ . When you are done save the file and restart your pi. Next, you may start making the schedule file in order to switch on and off automatically your device:

cd /home/pi/wittyPi/schedules
nano 40min_every_3hours.wpi

BEGIN   2016-02-24 00:00:00
END     2020-02-24 23:59:59
ON      M40   # keep ON state for 40 minutes
OFF     H3     # keep OFF state for 3 hours

Save the file and move on to synchronize time and activate the script.

cd /home/pi/wittyPi
sudo ./wittyPi.sh
Select:
Option 3 – To synchronize time
Option 6 – To activate a startup script
And select the script’s number from the given list
Option 8 – To exit

In case you need to reset the script:

sudo ./wittyPi.sh
Select:
Option 7 – to reset
Option 3 – to remove script
Option 8 – To exit

The project’s Source Code

Finally we have an assembled and configured device! The only thing we are still in need is the necessary logic in source code in order to fulfill more sophisticated tasks with our setup. For this reason, the project has a git repository with all the necessary source code for it written in python3 and all the above init scripts ready. The repository can be accessed from here:

https://github.com/kostiskag/gps_tracker

Now, this would be the proper time to switch over to the git’s readme in order to learn how to download, install and use the project’s source code and therefore to reach the device’s full potential. From this point, the setup is complete and after you have everything working it may be a good practice to take a backup from your sd card with all of the setup.

Final thoughts

After all of the code is packed together, the device becomes really reliable, useful and you do not need to make new tweaks or write source code anymore. You just open it, wait for it to connect and establish a FIX. After each event you receive your device ok emails through your mobile email client. By this point you know the device works, everything if fine so you start walking! Furthermore, you may let one of your friends sit in your computer and track you in real time with the auto-generated maps! From my part, I hope I have explained everything but if there is still something missing please let me know by sending me an email in order to update the article. You should keep in mind that this article and the articles I am making were meant to be of help so if you think that you were helped in one of your projects please attribute the article in it. If you do not have a particular project to work on but this article gave you insight or new knowledge, you might suggest this article to your friends or colleagues.  Finally, watch out for project updates and happy tracking!

You can view this project together with other three raspberry pi projects developed for 2017 in the following video

 

Monitor your stuff when you are away with a raspberry pi based tampering device

bagAll of us have some stuff we want to keep private, maybe something personal, or important ideas and concepts that we may not want to fall into the wrong hands. So how should we keep them safe in a house or work environment? One answer would be to lock them up! Obviously, but it is not so convenient and timely to lock stuff all the time and it’s not possible to know whether someone has passed the lock to begin with. This is why this device was made! To keep track of your personal stuff by sending real time email events about their state!

The Tampering device is a raspberry pi based device which is able to detect physical movement and motion, object rotation as well as the ability to detect whether a physical lock is being opened or closed. When an event is detected it sends an email to the user stating the event along with its detailed data and a timestamp so that he may know about it in real-time. Which are the good news? I have made this device in a way to be replicable so that fellow enthusiasts, scientists and engineers may re-assemble the device! In the remaining of this article the device is presented and there is a guide, resources and source code in order to replicate it.

Introducing the device

This is the tampering device! The user has to simply plug the pi into the powerbank to get it started. After power-up the user may take the device and place it in his bag as shown below or in another kind of space like a drawer. When the device is placed, the user has to attach the the lock sensors to the bag’s zip heads and connect those to the device.

As soon as the zip is closed the device is going to send the first email stating that the bag is now locked. From this point and on the device may send an event emal for every motion or rotation which was detected in the bag and whether the zip was opened or closed.

Do it yourself

In order for someone to replicate the device he should have some basic experience with the linux command line, python, computer networks and a basic knowledge of soldering.

Hardware:

You are going to need:

Phase 1 – pi configuration:

Write the latest version of rasbian to your sd card as described in the official raspberry guide here:

https://www.raspberrypi.org/documentation/installation/installing-images/

Insert the sd card into your pi, plug in a usb keyboard and the wifi usb antenna into your pi. After that, connect the pi’s HDMI output to your monitor’s or TV’s HDMI input. Finally, give to your pi some power either by plugging it to a mobile phone charger, a powerbank or into your computer.

The first thing we should do is to setup the wifi and enable the sshd on the pi in order to be able to directly access it through the computer and get rid of the keyboard and monitor interface.

WiFi setup: To setup your wifi follow the guide as shown here: https://www.raspberrypi.org/documentation/configuration/wireless/wireless-cli.md

In addition you may setup multiple wifi networks with priorities as demonstrated below in order to allow it to be operational under multiple areas:

to do this:

sudo nano /etc/wpa_supplicant/wpa_supplicant.conf

and define multiple wifi networks as shown below:

network={
ssid=”xyz-net1″
psk=”a_password”
priority=1
}
network={
ssid=”xyz-net2″
psk=”a_psw”
priority=2
}

finally save it and restart the interface…

sudo ifdown wlan0
sudo ifup wlan0

wait for it… and…

ifconfig wlan0

to collect your ip address and write it down. Make sure the ip address stays the same (it’s static) each time when the pi connects into your wifi. If not, then you should make it static through your router’s DHCP known hosts – interface or by defining it into /etc/network/interfaces as static. You should keep in mind that if the pi connects on a different wifi it may get a new ip address. Moreover make sure that in the interfaces file there are the lines which allow your wifi to accept the above configurations and start when the device starts. By default these lines are already there.

allow-hotplug wlan0
iface wlan0 inet manual
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

After you have set up your wifi it is time to set up your pi’s behaviour. For that run:

sudo raspi-config

select from the menu:

Expand Filesystem

Advanced options:

Enable SSHD

Enable I2C

Internationalization Options:

Change the timezone to your local timezone. You are going to need that later in order for the device to send proper timestamps with the correct time for the events.

Change your keyboard layout in order to be able to type what you see over your buttons as by default pi has a GB keyboard layout.

You can also view the tutorials below to get you going:

https://learn.adafruit.com/adafruits-raspberry-pi-lesson-4-gpio-setup/configuring-gpio

https://learn.adafruit.com/adafruits-raspberry-pi-lesson-4-gpio-setup/configuring-i2c

Now you should shutdown your pi and take a break! As soon as you are done, remove the usb keyboard and monitor, power it up, wait for the wifi. You can now start using the ssh client from your computer so that you may not need to keep a monitor and a keyboard plugged into your pi in order to use it and let it take a more compact form. If you are using windows as an OS you may use putty.

login with username: pi

and password: raspberry

Since the device is going to be monitoring your stuff it is a good practice to change the default password. In order to do that run:

passwd

and follow the on-screen guide

Phase 2 – hardware assembly:

Now it is time to install all the essential packages, From your ssh client run:

sudo apt-get update
sudo apt-get install i2c-tools python-pip python-smbus python-numpy python-dev python-rpi.gpio git

sudo pip install adafruit-lsm303

and wait for the packages to be installed. After the install process is finished you should shutdown the pi and assemble the hardware as shown in the diagram below:

schematic

You may solder the cables directly on the sensor boards or you may use a breadboard similar to my implementation in order to be able to separate the sensors and use them in other future projects. Even if you decided to solder them it may be a good practice to test them out in a breadboard in the beginning. Take care to power the sensors from the 3Volt output as shown in the diagram and do not use the 5Volt or you may burn them. Do not mix the SDA signals with the SCL signals. The two green pinouts in the diagram are used for the lock sensor and may be extended to any kind of conductive wires and materials like jumpers that may trigger an event when connected/disconnected and the circuit is closed/opened accordingly. Finally for the assembly part, this is the proper time to find a nice box for your project to protect your hardware and include a powerbank in order to make it portable.

To test your hardware power up your pi and run:

sudo i2cdetect -y 1

Normally if all the sensors were installed correctly you should be able to view a response similar to this:

i2c

(where there are not dashes everywhere in all the lines)

Phase 3 – source code:

Are you tired? Now it’s time for some source code!!!! In order to stop this endless torture I have prepared a git repository with all the necessary source code written in python in order to use both of the sensors under the same script. You may view the project’s repository on github from here: https://github.com/kostiskag/tamper_dev

In order to download the project’s source code run:

cd ~
git clone https://github.com/kostiskag/tamper_dev.git
cd tamper_dev
ls

Once you have downloaded the code you should test whether your sensors and the device are working properly. There is a set of standalone scripts in order to let you test your setup. The only thing that you may need is nano or python “a script” in the directory to either edit or run it. Remember python is already installed in phase 2 so we are clear from that. Finally, you may use the commands below:

python L3GD20test.py
-> to test your gyroscope
python LSM303test.py
-> to test your accelerometer and magnetometer
python LSMdiff.py
-> to test whether the device is moved
python GPIOTriggertest.py
-> to test whether your GPIO lock properly works

Phase 4 – configuring your email

Next, you should register your email in order to let your device send email events. The scripts are already configured for SMTP over SSL for a gmail email account. The only thing you should do is to allow less secure applications to send emails from your account as described here:

https://support.google.com/accounts/answer/6010255

http://stackoverflow.com/questions/10147455/how-to-send-an-email-with-gmail-as-provider-using-python

In my case I have created a separate email account responsible for the event notification that may send email events to my original email address. Once you have either made a new account or have an already existing and in both cases you have allowed less safe applications to be used, then you may send a hello world email to test your setup. Run the below commands to provide your email credentials and to test whether you may receive a Hello World email on your email box from the tampering device.

nano GMAILtest.py
python GMAILtest.py

As soon as you have a Hello World in your mailbox, provide your credentials to tamper_dev.py as well and move on to the next and final phase.

nano tamper_dev.py
python tamper_dev.py

Phase 5 – Finalise your device and deploy for use

Last but not least, you should register tamper_dev.py to be executed on system’s start so that the only thing that you may have to do is to power up the device. In order to do that:

sudo nano /etc/init.d/tamper_dev_init

let the os know about your python script by writing the commands below in the opened file:

#!/bin/bash
cd /home/pi/tamper_dev
python tamper_dev.py

save the file, and with the commands shown below, give it execution permissions and notify rc.d which is responsible to start your script at the os start.

sudo chmod +x /etc/init.d/tamper_dev_init
sudo update-rc.d tamper_dev_init defaults
sudo shutdown -h now

if you decide to remove the init script you may use the command shown below:

sudo update-rc.d tamper_dev_init remove

For a more detailed description of startup scripts you may study this guide: https://www.dexterindustries.com/howto/run-a-program-on-your-raspberry-pi-at-startup/

Your device is ready! Now every time it is powered up it starts functioning automatically and once you close that zip it keeps you notified by sending email events over your mailbox!

Future work

The device described here may fail to respond properly under some specific cases as described below. There may be the case where someone might switch off your wifi router. If you think that this might happen and if you are not in control of your wifi’s state, you may choose to use a 3G usb adapter instead. In order to set the 3g adapter you may view the gps_tracker article under the section Setting up 3G. Moreover, there is the case that the device may shut down from a drained battery and there is no way to detect whether the device is off. In that case you may keep track of your battery’s life by measuring the battery’s life duration in order to be notified with an email fro low battery.

Finally watch out for project updates and stay safe, you and your projects!

You can view this project together with other three raspberry pi projects developed for 2017 in the following video

Drawing from MATLAB to Minecraft

A couple of years back, when I was studying digital image processing as a university’s course, I had many creative ideas about its possible applications. One of these ideas was to use what I had learned from the course in order to draw one 2D image into Minecraft. In more detail, in Minecraft a player can place blocks together and in such a way he can crate many different structures: buildings, statues, surfaces, etc. In this case, the idea was to treat one Minecrraft block as an image pixel and therefore be able to draw one image in-game.

In Matlab

trollThe image which was made in-game was a trollface! In matlab, the task was to minimize the original image into a 100×100 pixel image because the in-game blocks are half of the players’ size so they take a lot of space. Before making the resize all 3 RGB layers of the image had to be merged and then one black or white threshold was applied for each pixel in order to classify each either as “255” for white or “0” for black.

modtroll = double((trollface(:,:,1) + trollface(:,:,2) + trollface(:,:,3))/3);

for i = 1:357
for j= 1:391
if modtroll(i,j)>84
modtroll (i,j)=255;
else
modtroll (i,j)=0;
end
end
end

figure4_noerode

After these steps and before making the resize another problem was faced. Because the image had small lines, if the resizing  took place all these lines would be lost! In order to solve this problem image erosion was applied with a 5×5 kernel.

modtroll = imerode(modtroll,ones(5,5));

This move easily dealt with the case by making all the lines bolder before the resize.

After the resize step, there was the need to separate each pixel from its next in order to efficiently draw them in-game. For this reason the 100×100 image was separated by 99 horizontal straight lines between each row and 99 between each vertical in order to see the pixels separated.

for i = 1:100
hold on;
x = i + 0.5;
y = 1.5:1:100;
plot(x, y, ‘r+’);
end

In Minecraft

Next, the in-game building took place! The drawing was made by my brother Nikos and me!

Finally, after 3 days I think, this was the final image!

2013-04-13_23.48.26

2013-04-18_22.21.42

Final thoughts

It is usual for professionals to think that progress comes from being highly professional in a specialized narrowed field. However, an already introduced filed will have a medium or small room for improvement and a big competition. On the other hand, in many cases innovation means to be in a position to effectively combine different fields together in order to create something new. In such a way, a person may find himself eventually in the doorstep of new ideas. My advice here is to look where none has looked before and to think like none has thought before this is the way that a person reaches new ideas and possibilities!

Home Portal, a social network of peers

The Home Portal Project is a peer based social network. It is designed with the intention to let its users experience a peer-to-peer social network service instead of one centralized server based system ex. as Facebook, Twitter, etc.. More specifically each user hosts from his computer a bundle of services which are responsible to provide his personal social page and his personal chat room. With the usage of a tracker each user can find another’s web page easily, comment, instant chat and upload or download files to/from him in real time. Finally, the Home Portal page is intended to be the first page a user views upon connecting to the Internet which aims to ease the user’s browsing experience by providing a personalized and customable web interface based on his needs. This is a project that was implemented when I was in the second year of my IT studies around 2012. The project is currently under Creative Commons Attribution 4.0 International License. For more info about the license please view the blog’s about page.

Project site on Sourceforge: http://sourceforge.net/projects/homepo/

The Home Portal project will be moved from Sourceforge to GitHub for the reason that it is very demanding to keep an executable installer up to date as operating systems evolve and the project has many build in executables in windows such as modifying registry for the install, uninstall and applying plug and play. The project will be hosted on GitHub where the user will have to read the installation guide. You may find the project’s new location in the following url:

Future project site on GitHub: https://github.com/kostiskag/home-portal

Motivation for a Peer Social Network

The project’s motivation came from four main goals:

  • Unconditional Communication
  • Convenience
  • Privacy
  • Security

In detail:

Real Communication, when a user is in control of a personal hosted web page he can have any kind of preferred web service or communication protocol that fits his needs.

To Have a Personalized First Web Page when accessing the Internet.
Users are different and so are their needs. By this thinking, a user should be in a position to change his first page behavior and appearance by keeping his bookmarks, choose search engines, change page styling, maybe have a background and so on.

No data mining, without centralized systems each one user is responsible for keeping his personal data safe in his environment. In such a way he is in full control of them and no third party can mine his behavior or his preferences.

No Legal Binding, When one user joins the one or the other social group he has to accept Legal Terms. Facebook has gone so socially accepted that its holders can literally post anything in their terms and users can not refuse to accept those because there is no major alternative. My question is: since the user is already a member of the Internet why does he have to accept even further Legal Terms to reach Internet’s full potential in communication? The fact that someone is a member of the Internet should be good enough to let him communicate with other users whithout further legal agreements!

Home Portal in action!

Below we can view screenshots of Home Portal’s usage! The first is the page which a guest user will view upon requesting a user’s site. The second is the same page by the owner’s perspective where he is allowed to edit it. The third image shows a personalized search page which is intended to aid the user when browsing. In the fourth page, the webpage settings can be accessed.

Hosting a page such as this has a low cost!

The hardware side of the problem in order to host a personal page such as this in the present is solved as it is not an expensive task. One user can easily use a Raspberry Pi as a dedicated server that has enough processing power to support a task such as this. A pi can be bought for under 40$ serve the user’s page and be active 24/7!

https://www.raspberrypi.org/

Why peer social networking is not in common?

There are three main reasons why the internet is yet not ready to welcome these kind of solutions. The first one is that hosting is a complex task for the average user where he is not familiar with. The second is that users learn to use internet only one way as clients. The final reason is that users can not be identified from their IP address as it is dynamic meaning that is constantly changing.

A possible future for the Internet

A good future for the internet would be communication without boundaries where people will not be binned by Legal Laws or be monitored by third parties and be able to freely exchange information with each other! In this kind of Internet we should invest.

This project

This project is made to demonstrate that there is an alternative possibility! It shows that communication does not need to meet certain boundaries and that there are other kinds of solutions which can be applied!

Future work

In its current state, the project does not make use of encryption of any kind and a user may easily be impersonated by a non authorized attacker. In order to solve this matter the overall peer network has to make use of an RSA key distribution channel and each user has to maintain a keyring with his accepted friend’s public keys. The friendly public keys have to be signed with the respective user’s private in order to be considered as valid. When this system is in play one user may hash and sign his comments on another’s page with his private key and thus establish the senders identity and the message’s integrity.

Is the GNU license free enough to support the open source movement?

This article was made in order to support the open source thinking, production and distribution by demonstrating some negative sides and setbacks about the GNU license as it is now and present solutions for those in order to eventually move on to a better and more “free” open source. To begin understanding the situation we have to think of how the world gets to be introduced with this kind of copyright license and how it is currently being used.

Learning with Linux

In order for a typical computer scientist to learn about his stuff when he begins to take his first baby steps, he is going to use an operating system from the Unix family, most preferably the Linux os as it does not cost, it can be found online to download under many distributions and can be easily modified according to one’s needs and goals, thus making it excellent for learning. This OS is a really good teacher and eventually some computer scientists tend to make it an extension of themselves and continue using it as software engineers, network specialists and intrusion detectors. They love it so much that they would never ever challenge the system and its way of working or its legal frame as that would mean to oppose its community they have now become a part of. They tend to accept its copyright license, the GNU, as if it was some natural unchangeable law and they hold no second thoughts into questioning the system’s legal background. Therefore, none ever bothers to challenge this license for its negative sides. Frankly, my work in this article is to do what everyone is afraid of, dig up the problems of this license and demonstrate the obstacles it presents over how software or source code licensed under it can be used. From what it will be observed the term “freedom” the GNU license is promoting is highly subjective and there are many setbacks that will be addressed below. At the end, solutions will be given capable of dealing with those.

If GNU licensed source code is considered free by the license can I take some GNU licensed source code parts, include those to my work and sell my application or services with my own kind of license?

>Well… you can’t! You may use whatever source code you want under the GNU license as long as you don’t make any profit by selling services or corporate products. The only accepted means of getting income, as it can be observed below in detail, is to be paid only for the distribution process of software under the GNU license. Moreover, if you are using open source code parts licensed with GNU in your target project, you are obligated to publish your product software under the GNU license as well!

More specifically GNU’s License [http://www.gnu.org/licenses/gpl-3.0.html] states that:

“4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program’s source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee.”
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified it, and giving a relevant date.
b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to “keep intact all notices”.
c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so.”

Well if someone can’t use a piece of source code as he wants to use it and keep his preferred target software license, then, these parts of code may not be considered free as they may not be used in any case possible. This is a tremendous blow in source code sharing as many universities, companies, organizations and individuals want to have their own personal/private software licenses and therefore they cannot use any parts from GNU source even though they are “free”. How in the word are you not allowed to use something that it is supposed to be free?

Some examples of this case are:

>A university that publishes its software projects in its own license cannot use any GNU code at all because if it does so the product software has to be under GNU license as well.

>A company may not use any GNU source code and get to keep a personal software license. Apart the obvious need a company has to license its software with its own terms, this means that its is not legal for them to use any kind of payment service for the published software if they chose to publish under GNU. The only option they have if they did so, as mentioned in the next argument, is to get income from the software’s distribution and only. Now an interesting point is that, for commerce, this whole process is a bucket which is leaking; Let me be more clear on this one, If, let’s say a company decides to distribute its highly sophisticated and thoughtfully worked software copyrighted under GNU by getting income from the software’s distribution, the target consumers who may buy the software are totally legalized to re-distribute it as well and this time for free! So after a GNU software hits the market it may be found it in a torrent site and it’s totally in-law! Personally and for this specific reason I know no company which would decide to publish a product software licensed under GNU and thus, as mentioned use already functional source code already licensed for GNU.

Back in the days

From the above it is evident that the GNU license stands against real life commerce. If I might try to analyze why is this the case it might be due to the fact that the license itself was made in the 9o’s! It has been modified since then but it is the same 90’s philosophy trying to copyright open source software in a different age with different needs. Back then, it was a trend to not let companies collect profit from the already developed free software which, as a trend, was fitting with the age! The license is even catchy as it moves like a worm, if you use GNU source in a project you have to publish your project in GNU as well so that  the corpus of GNU projects may grow exactly like a worm virus is spreading, anyway some engineer would have thought about that… The problem nowadays is that big companies have enough funds so that they can buy, not only the source code, but actually hire the developers to make the source code. The real negative impact of stopping commerce over open source software lies in all the small and medium sized companies which would have been benefited from using this source to back their commercial projects! Therefore, if the GNU software was actually free and not “free”, as defined under the GNU context, many startups, small or medium sized companies would have made some of their profit out of already implemented source code or at least skip on some expenses.

Compatibility

GNU licensed source code is not compatible with other kinds of open licenses such as the Apache v2 License. An Apache v2 Licensed source code project cannot use any GNU source code but a GNU project may do the opposite!

And more specifically Apache states:

[http://www.apache.org/licenses/GPL-compatibility.html]

The Free Software Foundation considers the Apache License, Version 2.0 to be a free software license, compatible with version 3 of the GPL. The Software Freedom Law Center provides practical advice for developers about including permissively licensed source.
Apache 2 software can therefore be included in GPLv3 projects, because the GPLv3 license accepts our software into GPLv3 works. However, GPLv3 software cannot be included in Apache projects. The licenses are incompatible in one direction only, and it is a result of ASF’s licensing philosophy and the GPLv3 authors’ interpretation of copyright law.

We can understand that there are many limitations when using GNU licensed software or source code, but wait, aren’t limitations a contradiction for freedom? This is one of the reasons why more and more people start to view GNU as a closed and highly dogmatic community.

Motivation in the source code ecosystem

If many social groups, as described above, cannot use GNU licensed source code in complex life situations they will form no motivation at all to contribute into making GNU licensed source code. The motivation for a software developer to have all rights reserved is even known to many companies that produce programming languages like Oracle who maintains Java, Apple who maintains Swift, etc. . Now if we look at these programming languages even though they come from a higly commercial background they do not request any copyright from the developer. That’s right the developer has all rights reserved for his produced software and source code and this is because these companies know that if they request copyright rights of any kind from the developers they will damage their language usability and thus, developers will stop using these languages.  A recent example was Adobe’s flash technology that was being kept as a property of Adobe as this is one of the reasons that web developers turned into html5.

The world needs a more free and public license

Instead of focusing on copyleft or strange arguments we should turn our interest into copyrighting the source code for the public and use the code in any way possible for any circumstance. There are ways to license free software to not be constraining such as the Public Domain or as Creative Commons Attribution 4 International license. If we start dropping on copyright then eventually we may reach a point to maintain a huge corpus of ready to use source code for any case and any reason and we could implement this source code to our work without any constraint. Then it will have meaning for many more people to contribute to free software development. It will have meaning for people to actually crowdfund source code applications. In such a way, the technology gets to be really free, shared between actual people and being used under real life situations!

In this world someone has to eventually bite the bullet and either move the Linux kerner to the public domain or create a new OS kernel for the public domain

By having an OS kernel for the public domain there will be a tremendous human involvement into implementing it to many works. People would be free to use computer technology however they want maybe for business reasons, for every day reasons and in general, for anything. If a start is made more and more applications may follow. After one point the change would be irreversible and we will be talking for actually shared and owned technology all together!

Is it time to start investing on the public domain?

012261685_prevstillIn the world to date we have technology nearly everywhere! In our pockets, in our homes and on the outside! We have reached a state were we use a lot of technology in our every day lives and, in fact, the trend is integrating more and more technology for the everyday use as we go on. Personally I am very excited about having new and helpful technological solutions and I am not against that. It’s the fact that technology as it has evolved, is closer to the market’s best interest rather than the public’s. So I am questioning if whether we as the public are in control of the technology we are using today and whether or not we may have an active role in defining its evolution. Can we share technology between us or do we have to continuously buy new products and services in order to keep technology integrated in our lives? And finally, is technology more like a service that belongs to the people or is it more like a product that belongs to commerce?

The technology we use comes from people and their motivations.
First of all let’s understand that technology is made from people: scientists, engineers, entrepreneurs, people with new ideas, guys who know how to manage and sell where all of them as people, or as groups of people, happen to form personal driven goals and motivations. These motivations actually mold and shape the technology’s path as it may sound unexpected but technology is more about taking a choice, agreeing or disagreeing  between people, teams or companies rather than solving a complex puzzle. Under the motivation scope, the best public interest and the motivation to improve the world may not necessarily be a company’s or an individual’s best interest where the former is set aside and may become highly disengaged from the overall system.

How does the market affect technology?
We all know that the technology market and every kind of market is concerned about its profits. If we think of the electric cars for example; although they might be cheaper have more benefits for the user and the environment versus the diesel ones which are dominant in the present; the companies in hold of the latter ones would not want the existence of the former ones on the market as they would stop selling the remaining oil. Therefore, in this specific example the market is kind of jammed. It is not on the people’s favor as it should be but it rather tries to satisfy a small portion of wealth holders such as the oil sellers by prolonging the market’s lifespan as long as it’s possible. Moreover let’s not forget, the market wants to survive and for that it needs to keep on running and keep people hooked. Under this process, it does not care if it is doing the right or the wrong thing. In the presented example, it is in the oil holders’ best interest to be willing to fight research over alternative power sources to keep their profits running. Finally, from this example, as in others, we may understand that the money cycle, even though we live on a fast age, in some cases becomes really slow and stiff to be shifted towards another direction while technology which aims to help people may have to either co-align somehow with the current state as it is, wait for a while or be oppressed  as a financial threat.

University research’s part in the publicly applied technology?
None can argue that the human research driven by universities and research centers has made significant steps into our technological evolution as research’s main pursue is about pushing the state of the art of technological advances. Although the scientific process is a necessity, as it is now, it lacks on the appliance part. In more detail, research in its main body, is only concerned about the discovery of new solutions rather than their implementation. In other words, when something new is being discovered and published the scientific process restarts all over again, the problem here is that there is no appliance in the loop, the material is published but no significant effort is made into bringing it out for the public to use. It is then considered the market’s opportunity to take up research and commercially apply it in a product to be deployed for the public. This approach becomes a problem as  most of our modern-day problems would have been solved by applying already existing technology under the right approach without necessarily involving the market for every sollution. For this reason, maybe in the future we might reconsider a researcher’s work to not stop only on publication but to also continue on the appliance part.

Our approach towards the market
The modern man has become more of a consumer rather than a problem solver. We continuously expect from the market to produce something new that promises a small change rather than asserting our best interest in the loop. The problem with this approach is that there is no real dialogue between the consumers and the market as it is a one way road, they make and we buy. What if we were in a position to develop systems which would support and enhance the target consumers to take an active role by expressing their needs for future commercial projects? New systems start to appear that fall under this thinking like Kickstarter or Patreon where the final user has a more active role and is able to evaluate a series of products or even in some of them to express his opinion towards the creator before mass production. The final consumer needs to have a choice and therefore more systems and firms should start to behave similar to this approach.

A solution for the matter
The main goal here is to change this situation by redefining the way we perceive and produce technology by including the best public interest back in the loop. There are some existing philosophies such as to fight the system and not use technology at all, or to go to the extreme and become hackers so that we may know and understand how technology works from the inside out! What if I told you that the approach is much more simple than these extremes which tend to grasp the problem but fail on the solution part?

It is time to start investing on the public domain!
The solution is much more simple than the aforementioned trends. Instead of thinking the technology as a product we have to start thinking it as a service. A good example can be a park! Each one of us may take a walk in a park and none of us has to pay for it. At least not directly but rather indirectly from taxes. Somehow the park is in every one’s use and functions as a service rather than as a product. As opposed with the physical world, in technology things are easier! For the best part software may copied and transferred really fast without cost. In fact, when making software the cost lies only in its development and maintenance, from the development point and on it may be copied over and over. The solution here is very simple, to fund the development of open software licensed for everyone and every use. In other words invest in, as we call it, the public domain! If we manage to push as many things as possible for the public use we may end up to have more to share between us without cost and thus to increase our public wealth of sharable technological solutions and implementations. Software can be free to distribute so that someone may take it, change it or even resell it.

How can this happen?
There are ways to achieve this goal. We could either crowdfund or push governments and organizations to fund the development of source code, protocols and design projects licensed for the public domain that we might later use, change, implement to our own working projects and even make profit by using or reselling them. For example to crowdfund the design of a mobile phone so that when we buy it since the design schematics are already paid we could save money and pay only for the production cost or even a case where the government funds the development of a firewall software where medium and small companies could then use it free of cost, skip on expenses for this part and focus their wealth on something more demanding. Finally, when technology is licensed for the public domain from its birth it stays like this for the rest of its days.

Why Gaming is an important aspect of life?

Why gaming is important!OP3_1920x1080

Some people may say video games seem a waste of time because they are not productive. I am going to give some reasons that this is not the actual case and that there are many aspects that make a video game important! Below are some reasons I support them as useful time spend:

  • Each game is interactive; a typical game needs a high feedback from the player whos fast thinking and acting are being challenged!
  • They are creative! You enter new worlds and see new things! Your mind enters in a natural discovery process as you explore and you get to have more ideas in your life! In games such as Minecraft get you to build your own ideas.

popww_4 Half_Life_2_adepted_by_WillhelmKranz af31920406bf84e594586ec496f28091f5dce7cf Legend-of-Zelda-Wallpaper-the-legend-of-zelda-5433362-1600-1200

  • You get to act! In some games you get the leading role and you learn to survive or fight for a cause, this makes you more willing and much more motivated even in your life!
  • Some of them are trivial. You get to solve puzzles in an interesting way like temples or dungeons making you more of a brainstormer! See Legend of Zelda with its famous temples and even more trivial like: Antichamber, The Stanley Parable, Portal, World of Goo.

minecraft portal-gun

  • Some of them are co-operating or versus games allowing you to interact with other people under different environments! You can play a game with your friends for a change which is something new and interesting! Plus you can meet new people within games with common interests. Gaming tournaments may also become a social event in life so that people may gather. Games like these are: Wii Sports, Teken, Starcraft II, League of Legends, DOTA.

18 wrs3

  • Some games may be considered as good story books because they had good and innovative authors who payed some serious effort to produce a good story with meaning! ex The Legend of Zelda series, Prince of Persia, The Witcher.
miyamoto_a_mario_filmrol_es_a_nintendo_uj_hardvererol_1
Shigeru Miyamoto the creator of Mario and many other Nintendo characters

Keeping games clean from bad ethics

The dark face of gaming industry is the production of extremely violent games like battlefield, cod 5, GTA or payday, these games not only defy morals but they try to teach violent living, acting and thinking and they ought to be separated from just violent games. For example Call Of Duty 2 is a violent game but you get to play an active role in WW2 and it teaches heroism inside a group of soldiers therefore it does not belong to this category. Nowadays the market is full of violent games because they are more intense and sadly they find a bigger audience rather than games similar to Zelda who are trivial and appeal to a lower group of people. A game developer’s and gaming companies’ aim should be to stay away from bad ethics as possible because it they may result in an easy profit but not in a true innovation or creation.

Ending

To conclude with, life should not be considered only as a surviving way there are may things that give us a happier and a more meaningful way of living and each one of us should seek to get some happiness in his life!

Apollo, a solar powered computer

In this article, I would like to present Apollo, a prototype solar powered computer based on Raspberry Pi and parts found from online stores and e-bay! For those who do not know what a Raspberry Pi is: it is a full functional credit sized computer board with an ARM CPU, HDMI, USB ports and Ethernet. For more details please view:

Motivation

Making computers or other kinds of devices energy independent may be really useful on some open field applications like for farmers: to monitor humidity, temperature and to provide video stream from remote areas. As a weather station analysing the weather, in urban areas as a routing point and in many more cases.

This project’s goal was from the one hand to create a solar-powered and low-consumption computer which can sustain itself without the need to be charged from the power network and from the other, to operate outdoors, use either wifi or 3g for remote communication and solve demanding tasks.

Architecture

The parts which were used for this project were:

  • a raspberry pi A, as it maintains a good balance of CPU performance and energy consumption
  • a Li-ion battery of 30.000 mAh with a built-in solar panel
  • a 7″ display with HDMI input
  • a WiFi USB adapter
  • an SD card of 8gb for the OS which is Linux Raspbian
  • a small USB keyboard
  • the external skeleton which was made up from Lego Technic parts.
  • a USB to dc cable to conect the battery and the monitor
  • a USB to micro usb cable to connect the battery and the pi

How it works

The battery has two USB outputs one for 2A and 1A where the monitor and the pi are connected accordingly. In order for the computer to be powered on/off there is a button on the side of the battery. After power, the pi loads the OS from the sd card and the wifi adaptor connects to a local predefined wifi. The device is designed in a compact way in order to capture less space and save energy from the monitor when left alone to collect data or do a process, however, if a user decides to use the computer he may take out the keyboard from the back of the device, open the monitor and type in a command shell. If it is operating in a sunny place its battery life is postponed whereas, if it runs out of energy it simply needs to be left in the sun to charge. The external skeleton keeps smart locks that let the parts be easily inserted, removed, replaced so that new sensors may be inserted regarding the task or broken parts to be easily replaced. Finally, the skeleton with small modifications, allows the computer to be easily pinned on the ground.

20151224_131153

Making the skeleton

When prototyping computers or robotics I discovered that Lego Technic parts are a very good solution as they can be reordered while a project evolves. There are pages like brickowl where you may specifically choose the parts that your project may require (bars and joints make a good start) in order to start forming your project’s shape.

20151224_131806

Energy consumption

In general, making technology devices work independendly by using renewable energy sources is a way to reduce the need for electricity demand which results in less co2 emissions and in a cleaner environment! Furthermore, when a person decides to invest into being energy independent he is liberated from a legal cotract towards a power company. Finally, my hope is that in the future, more technological solutions should invest into similar technologies in order to not only help the environment but to also keep our lives with open and free technology!