Back to my K750i page
Did this site help you?
Average rating (K750i):
2.68/3 (1866 votes)

DisGUISE

A C# GUI class library for Sony Ericsson cellphones

The DisGUISE library provides an easy and object oriented access to the advanced features of the AT command interface available in Sony Ericsson cellphones. This includes basic tasks like querying the phone book or getting a notice on incoming or outgoing calls, as well as creating and handling advanced GUI elements. The phone, connected via bluetooth to the computer, thus can become an additional user interface element.

Overview

TuxMobil Listed
Main menu

Instead of fiddling with AT commands and parsing the strings returned from the phone, DisGUISE enables you to use actual objects to control and monitor events on your phone. There are also classes available to create various GUI items on the mobile, which report back their results through event listeners, and allow the phone to act as an input and output device of your application.

A common case of use would be the implementation of a media remote control: While actions like skipping to the next or previous track or volume adjustment can be implemented with the builtin BT-HID remote control quite easily, this approach allows you to establish a way of displaying information from the computer on your phone, like the properties of the playing track, or the current volume level.

DisGUISE is available for download on BerliOS, and under the GPL. The documentation can be accessed here.

If you are interested in this project, feel free to contact me.

Project goals

BerliOS Developer Logo

DisGUISE will focus on a clean and flexible implementation of a class library that will enable developers to use the phone GUI from within their own applications. Most classes will be simple object oriented wrapper around the builtin widget availablevia AT commands, and classes to support other phone features like notification on incoming calls.

DisGUISE is explicitly not designated to become an media player interface itself, but to provide the platform to implement such a program.

Now playing

The Project GUIdanSE (Hooray for project names) however will bring more advanced widgets - derived from the base classes of DisGUISE - with it, for example a file browser or media controller. It will act as an example of DisGUISE use as well.

Another goal is the use of DCOP, Bonobo, Corba or DBUS to provide a way of using the phone functions without applications borders, however this is still only planned.

Supported phones

The library is aimed at Sony Ericsson phones, since most of the GUI related commands are specific to that brand (The commands start with AT*SE...). Other operations, like looking up the phonebook, or listening for key or call events may work on other brands phones as well. The library has been tested on following devices:

First examples

The DisGUISE library is easy to use: Just derive something from the supplied classes, and let the library do the hard work. If, for example, you would like to display an information message on your phone, you would have to do the following without DisGUISE:

Without DisGUISE: The naked truth

  1. Open the device
  2. Initialize an UI session:
    AT*SEUIS=1
  3. Create the alert (The 4 indictates the type "info")
    AT*SELERT="Text goes here",4,1
  4. Parse the returned string and remember the GUI item id ("1" in this example)
    AT*SELERT:1
  5. Wait for GUI event codes, and destroy the window once they are received
    AT*SEGUI:1,3
    AT*SEDEL=1
    
  6. Close the GUI session
    AT*SEUIS=0
  7. Close the device

Of course, if you create more than one widget, you have to keep track of them to decide when to open or close the GUI session.

With DisGUISE: Hard work hidden in the dark

With the library, you can just instantiate some objects and get on with your actual application:

using DisGUISE.Backend;
using DisGUISE.SEWidgets;

IPhonePort port = new DeviceFilePort("/dev/bluetooth/rfcomm/1");
SEWidget w = new SEAlert(port, "Text goes here");
w.AutoDestruct = true;
w.Show();

The AutoDestcuct property destroys the widget once a arbitrary GUI event is received, a behaviour which is appropiate for such an easy widget like a message box. As a bonus, the class itself will keep track of all widgets being shown an destroyed, deciding when to close the GUI session or open a new one.