Wide-area wireless sensor and actuator networks can be used across a
broad range of application domains. The SICS Mogile platform is one
such platform based on small wireless sensor/actuator boards combined
with mobile phones as communication nodes. Furthermore connecting sensors and actuators to a computing device is not
always easily done, specifically to a mobile device like a mobile phone. The
Mogile module make this a bit easier.
The Mogile Platform is based both on a hardware
module and software to support this module. Only simple
sensors and actuators are possible to connect to this version of the Mogile.
This would typically include sensors such as light sensor, shake sensor or a
switch. Actuator examples such as a LED, a relay or a vibrator. The software
provided allows for the application to register as a listener to events and
will through these events be notified if any changes are detected on the
sensors.
Download the latest distribution release below:
A Mogile is built upon a Bluetooth chip from Ezurio(former TDK) called BISM2 Bluetooth Serial Module. More information about the module can be found from Ezurios website. The BISM2 has several different external connections. For the Mogile we use the 9 digital I/O ports and the 2 analog input ports where sensors and actuators can be connected to. A circuit board has been developed for easy access to these ports. This circuit board also has a small prototyping area where sensors or actuators can be soldered.

Figure 1: A photo of a Mogile with two LEDs and a battery connected to it

Figure 2: A photo of a SonyEricsson K800 and a Mogile.
Several examples have been created using this board. For a Swedish Live Action Role-Playing group a pair of Mogiles has been fitted with two bright red LEDs, see figure 1. They have embedded these into some game artefacts and for an upcoming game these LEDs will be the eyes of an amulet. For Epidemic Menace game a Mogile with a vibrator motor connected to it provides tactile feedback, though due to other problems in the game there was not time to integrate this module into the actual game. For demonstration purposes we have created Mogiles with a shake sensor and a light sensor.
The circuit board layout is part of the distribution package which can be downloaded from here. One can have these circuit boards produced from a company like PCB-Pool. The components need for each board are (Elfa part numbers within parentheses):

Figure 3: Mogile board along with a AA battery and a Ezurio module as well as a ruler to give a hint about sizes.
For novices on electronics the book Physical Computing by Dan O’Sullivan and Tom Igoe is warmly recommended to get a better understanding of what and how sensors and actuators can be connected to the Mogile.
A java class has been written for simple integration of the functionality of a Mogile within a Java application. This software works both on Java2 Standard Edition as well as Java2 Micro Edition, thus runs both on PCs and Mobile Phones. The package includes a number of classes. The most important is the Mogile class and the MogileManager class.
The Mogile class is used to communicate with a Mogile module and basically it wraps the functionality of one Ezurio BISM2 module into Java code. This class does not implement or know of any of the hardware connected to the board. This is a software wrapper for the functionality provided by the Ezurio module on the Mogile board. Specific configurations are used to describe the actual hardware connected, described below.
The MogileManager is a convenience class, it allows a developer to register a number of listeners in the manager to get notified about changes from Mogile objects also registered in the manager. For details on how to use this class, see the Java documentation.
To tell an instance of the Mogile class about the current configuration connected to it is done through a set of two configuration files. These are a Mogile Mapping file and a Mogile Configuration file. In a Mogile Mapping file the name of each Mogile is mapped to a specific type. The type is looked up in a Mogile Configuration file that describes the actual hardware configuration of a certain kind of Mogiles. Each line in the configuration file defines one or more configurations for the different ports on a Mogile. Each port configuration is made up of several comma separated fields; Name, Type, Port, Direction and State.
The Name-field should be a text string with a user friendly name of the port.
The Type-field should also be a text string. This string can be set to anything that defines the kind of data from the port. This is not used by any of classes in this package but is for the convenience of the developer using this class. For instance this could be the name of a Java class which can model the sensor connected to the port. E.g. Temperature.class for a port with a temperature sensor connected to it.
The Port-field should be an integer and is the actual port on the Mogile that this configuration is for. Ports are numbered like this:
The Direction-field should be a text string set to wither "in" or "out".
The State-field should be an integer and is only eligible for digital IO ports with a direction set to "out". Either 0 or 1.
Example:
The Mogile named myLED has one darkness
sensor and one LED. In a file called momentum.mogiles which is a Mogile Mapping
file, one line reads
myLED=DarknessSensor+LED
This map the Mogile name myLED to a Mogile type called DarknessSensor+LED. The file mogiles.config which is a Mogile Configuration file and has the following line:
DarknessSensor+LED=Darkness_Sensor,org.iperg.pimp.types.PimpScalar,10,IN,0,LED,org.iperg.pimp.types.PimpBinary,9,OUT,0,Power,org.iperg.pimp.types.PimpBinary,5,OUT,1
This configuration will setup a Mogile with one input and two outputs. The input is called Darkness_Sensor and gives the current reading of the darkness sensor connected to port 10 of the myLED Mogile. Both port 5 and 9 will be configured as outputs. To port 9 is a LED connected that will be controlled by setting the port to 0 or 1. Port 5 controls the power supply tot he darkness sensor, and thus setting port 5 to o will turn off the darkness sensor.
A simple test application has been written to demonstrate some simple functionality. To start the application type:
java -cp mogile_j2se.jar org.iperg.mogile.MogileSerialConnector serial.properties
First you need to have created the serial.properties file. It can include several lines but the two most important are port and baudrate. Here is an example how this might look:
port = COM5 baudrate = 115200
There is one more option that could be given to the test application and that is a name of a Mogile. If this is given the application will try to look up this name in the Mogile Mapping file at http://www.sics.se/ice/projects/iperg/prosopopeia2.mogiles and then find that type in the Mogile Configuration file http://www.sics.se/ice/projects/iperg/mogiles.config. If no Mogile name is given the application will used a fixed configuration with the following three ports defined:
sensor power,"",5,OUT,1 LED,"",9,OUT,0 light sensor,"",10,OUT,0
This work is a result from the IPerG project, see IPerG website for more details.
For more information, please send email to or call
Pär Hansson +46 8 633 1575 par@sics.se
Karl-Petter Åkesson +46 31 826509 kalle@sics.se