All Rights for the images reserved to mugley photostream from flickr, if you keep them,please keep the credit.

Software components

 

Bluetooth Module

In our demo, this Python module is only responsible for the comunication between the Central Node and the Tags Node, so the system is able to scan for the Estimote Beacons. The payload of a Bluetooth packet is 257 bytes and contains the ID’s (which in the case of the iBeacon protocol is divided into three values: UUID, Major, Minor) and the MAC adress and information about the signal power, which are essential for the Central Node to calculate proximity. This module is able to extract these informations, recognize the different objects and calculate their distance from the Central Node.

When this phase terminates, this module sends the information collected to the Core module for the processing phase.

 

 

 

Web Server Module

This module is implemented in Python using FLASK framework and is based on a REST architecture. It serves as the web interface which allows the user to configure the Central Node. Through this service the user is able to create or delete events and objects, search for new courses and specify the relations between them.
The user can also change system settings, defining time and frequency of notifications.

The main functions of this software module are:

  • Create/Delete Object : Lets the user name the different tags identified by their color
  • Create/delete Course : Lets the user search for polito courses based on the name of course or the theacher.
  • When a new course is inserted, the system automatically gets the weekly schedule of the course from Portale della Didattica
  • Create/Delete Reference : Lets the user link objects to courses.
  • Create/Delete Events : Lets the user edit new events indipendently from the ones automatically taken from Portale della Didattica
  • Start/Stop Scan : Lets the user manually start/stop the scanning phase of the Bluetooth module.
  • Edit System Setting

When this phase terminates, this module sends the information collected to the Database module which store them.

 

 

 

Database Module

This module is developed in Python using SQLite library. We choose SQLite library because is small,simple to use, and above all it's self contained, so the DB is stored locally on a single file in the Central Node, without any server.
The first table is used to store the settings of the system.
The others tables contain the representation of the objects, courses, the references between them and the weekly schedule. The objectID and the color are predefined to facilitate the configuration. Only when the user associates a name to an object, it becomes considered as tagged. Few records are present in the representation in order to simplify and speed up the configuration phase.


 

SETTING ( SettingName, Value )

OBJECT ( ObjectID, Name, Color )

COURSE ( CourseID, Name, Teacher )

REFERENCE ( ObjectID, CourseID )

SCHEDULE ( CourseID, Date, TimeStart, TimaEnd )


 

This module offers a series of functions to manage the database, usefull for the Core module and the Web Server module to acces system data. These methods are grouped in:

1. Create/Drop Table

2. Initialization

3. Insert/Delete and Search Object

4. Insert/Delete and Search Course

5. Insert/Delete and Search Schedule

6. Insert/Delete and Search Reference

7. Search Object relevant for a specific date

 

 

 

Notification Module

Is responsible for delivering notifications from the Central Node to the UI Node. This simple Python module is able to send push notifications, coming from the Core module with a specific message, to the NMA server over a HTTP connection. The user device must have Notify My Android (NMA) as a client application. When a new notification is present, this app will show the user the message content.

 

 

 

Core Module
The Core module, also implemented in python, is responsible for the coordination of the other modules. The processing phase triggers the Bluetooth module to start the scanning phase and, based on the result, requests the Database module for related information.
From this information it is able to identify scanned objects and to know related courses and events. Depending on this data, the Core module decide if the Notification module has to inform the user about a specific situation.
This routine may occur in two different situation:

  • Next day notifications: once a day, at a specified time, the module searches the next day schedule and the objects related. Then it triggers the scanning phase to know the content of the bag. The notification message contains the schedule of the next day, the list of objects needed (including those already present in the bag) and the list of the object to remove.
  • Before the first event of the day: once a day, at a specified time before the first event, the module triggers the scanning phase and searches for the objects needed, if something is missing, the Core module immediatly notifies the user. The alerting message only contains the forgotten objects.


 

Smyb Ambient intelligence: technology and design