Home / Utilities


Utilities Home

Alembik
 uaprofile2wurfl.php Gimme UAProf and I'll give you WURFL


Alembik
 Alembik Media Transcoding Server is a Java application providing transcoding services for a variety of clients.


GAIA Reply
 GAIA Image Trascoder
Open Source library that operates image transcoding, with a special focus on mobile applications.

WURFLTera
 Tera-WURFL
Use MySQL as a WURFL-powered backend!!!

WURFL Utilities
 mDevInf
GUI to query *your* WURFL, by James McLachlan

Device Thumbnails
 Device Thumbnails
Add device thumbnails to your appliction!

PHP Image Rendering Library (II)
 Dynamically resizing pictures in PHP (a new one)


PHP Image Rendering Library
 Dynamically resizing pictures in PHP


BeeWeeb's MWT
 Mobile Web Toolkit
Open Source library that talks to the same publishing system as your website, but generates a mobile site.

Wallify
 Wallify
Turn a CHTML site into a WALL site.

Image Server
 Image Server
A Java Servlet (and filter) that will intercept requests to picture and resize the picture appropriately by looking at the screen size. Very Cool!

Apache Filter
 Apache Mobile Filter is an Apache module that detects the mobile device and passes the WURFL capabilities on to the other web application as environment variables. It can also be used to resize images on the fly to adapt to the screen size of the mobile device.





SourceForge.net Logo
 

mDevInf - Mobile Device Information
by Jim McLachlan
jim at oss-ltd dot com

Contents

Introduction

Five months have passed since my original article on version 0.5 of mDevInf. There have certainly been a lot of changes since then. At the end of March 2006, mDevInf was released at version 1.1.

The WURFL (Wireless Universal Resource FiLe) continues to be a fantastic resource, crammed with information, constantly growing and updating as new information is provided by its huge user-base. The core of WURFL is the XML file containing information about almost every mobile device worth knowing about. Information is available for over 400 device capabilities grouped together into 20 areas like security, J2ME, sound formats, DRM and many others.

The problem with such a large amount of information is that it very difficult to use in it's raw form.

Luckily, there are several alternative ways of accessing and using this information, Java (JSP tag libraries), PHP, Perl, Ruby, Python, .NET, XSLT and even C++. See the links under the "Deploying WURFL" on the home page.

mDevInf (Mobile Device Information)

mDevInf is a desktop utility, written in Java. It helps to find information contained in the WURFL file and displays this information in a useful format.

Reasons for needing to search the WURFL are many and varied, eg.

  • Are you a developer, wondering exactly how many different devices will be able to use your WAP content?
  • Are you a web administrator and you'd like to know what kind of device is making requests?
  • Do you work in customer support dealing with questions about mobile device capabilities?
  • Do you own a mobile phone and want to see what your device is capable of?
  • Are you about to upgrade your mobile phone, but want to check what other phones can do?

mDevInf can help to answer all of these questions.

mDevInf was created because I needed to answer questions like those above on a regular basis. Originally, I needed to access information from only three starting points:

  1. Device tab - Finding out whether a specific device (make and model) had a particular capability
  2. Search/Results tabs - Finding all devices that matched (or didn't match) certain criteria
  3. User Agents tab1 - Finding the types of devices that were accessing my website (from user-agent info stored in the logs)

As I began to use the tool myself and started receiving feedback and questions from the community, the original tabs became more refined and two further tabs were added to allow other perspectives on the information:

  1. Relationships tab - Identifying the relationships to other devices in the WURFL hierarchy (fall-backs and children)
  2. Comparison tab - To view several devices side-by-side in order to compare them

The following sections explain the purpose and basic use of the main tabs in mDevInf.

Accessing your WURFL Information

The following sections describe the different ways in which you can access the WURFL information using mDevInf.

Device tab

The Device tab is designed to allow easy selection of a device from all those that are available in the WURFL (currently 75062 devices). Two drop-down lists are provided to allow selection of a make and a model. When a make has been chosen, the model drop-down is populated with the devices for that make only. When a model has been selected, all the capability fields (for all 20 WURFL group tabs) are populated.

A description for each of the capabilities used to be provided by a button next to the capability name. It was noted that it would be preferable to change this, so descriptions are now provided as tooltips. Just hover your cursor over the capability name.

When a device is chosen from another tab (eg. the Relationships or Results tabs), the make and model are set on the Device tab automatically.

A new feature in version 1.1 is an additional drop-down list that stores the latest 20 device selections that have been made. Each device that is selected is added (or moved if already present) to the top of the list. Note that this includes devices selected on other tabs.

Here is a typical view of the Device tab. The information being displayed is the J2ME group for the Nokia 6600. As you can see, I also have several other devices that I have recently viewed:

Nokia 6600 J2ME information
Nokia 6600 image format information (click on picture to enlarge)

Search tab

The Search tab is designed to allow a list of devices to be identified that match specified criteria. As many capabilities can be included in the comparison as necessary and hopefully, the way in which the capability tests can be combined should be enough for most purposes.

Capabilities that are boolean, can be checked to see if they are explicitly true or false. Alphanumeric information (eg. model name) can be checked for equality and finally numeric information (eg. screen width) can be compared with the standard numerical comparators: <, <=, =, >> and >.3

When several capabilites are being compared, the way in which they are compared is dependent upon the choice of "Match ALL" or "Match ANY" in the Search Parameters panel at the bottom left of the tab. The selection determines whether each of the comparisons are logically AND'ed to produce a result or logically OR'ed. For example: if you have selected brand_name = Nokia and j2me_midp_1_0 = true, with Match ALL, then only Nokia devices that are MIDP-1.0 compliant would be listed in the Results tab. However, changing that to Match ANY, lists ALL Nokia devices and ALL MIDP-1.0 compliant devices.

The checkbox in the Search Parameters panel allows you some control over the way in which the WURFL data is structured. At the root of the WURFL hierarchy is the generic device. This is not a real device, but is simply a placeholder that defines default values for all subsequent devices. It is configured to have the safest default values. This means that all boolean values are set to false, numeric values (eg. screen width) tend to be set to 0, etc. For search purposes, this can lead to confusing results. For example a search of WURFL version 2.0.2-pre shows that there are 15 devices that are MIDP-1.0 compliant and have a screen width of less than 100 pixels. If you include default values, this figure rises to 181 devices! That is because most (if not all) of the extra devices have not had the j2me_screen_width capability overridden and 0 (the default value) is less than 100.

After a search has been performed and mDevInf has switched to the Results tab, you can save the search with a meaningful name. This means that complex searches don't have to be re-entered each time the application is run.

Each of the matching devices on the Results tab is displayed as an item in a list. This conveniently allows you to click on the device to select it in the Device tab, but has the unfortunate side-effect of preventing you from copying the list of results to the clipboard. To get around this problem, I included a feature on the Results tab pop-up menu to display the results as a list:

Narrow screened MIDP-1.0 devices
Narrow screened MIDP-1.0 devices (click on picture to enlarge)

User Agents tab

The User Agents tab is designed to allow you to find the devices that contain text in their user agent strings.

This is a very simple tab and the only thing worth mentioning in addition to it's basic description is that you can choose to include only actual (real) devices or everything (including fall-back and sub-devices).

Relationships tab

The Relationships tab is designed to allow you to find out how a particular device fits into the WURFL hierarchy and what capabilities have been overridden for it.

There is quite a lot of information expressed in this tab. "Actual" devices are displayed in blue and bold in order to stand out. Devices that simply act as fall-backs (to allow generalisation of capability settings) or are just new releases of the same device with no capability changes are shown in pale grey. Devices with overridden capabilities (regardless of whether they are actual devices or just fall-backs) are shown with a + sign appended. Finally, devices that are overridden in a patch file are shown in green (bright for actual devices, dark for fall-backs).

The following screenshot shows a contrived example where I have overridden a parameter in the Nokia 6600 and, for illustrative purposes only, one of it's sub-devices.

The Nokia 6600 in the WURFL hierarchy
The Nokia 6600 in the WURFL hierarchy (click on picture to enlarge)

Comparison tab

The Comparisons tab is designed to allow you to compare devices side-by-side.

The devices are added from other tabs (eg. Devices or Relationships) from the pop-up menus. After they have been added they can be re-ordered by dragging and dropping the columns. The capabilities to be compared can be selected and, if desired, renamed.

This tab takes advantage of the device thumbnails that are now available on the WURFL site.

Some devices being compared
Some devices being compared (click on picture to enlarge)

Editing your WURFL Information

The following sections describe the different ways in which you can edit the WURFL information using mDevInf.

Editing

Wherever you can select a device, you can choose to edit the device from a pop-up menu. However, I would recommend great care is taken when editing a device from a tab other than Devices or Relationships. This is because of the way a device is identified from the other tabs (Results and User Agents).

When editing a device, the Edit tab appears for the duration of the Edit session. Any changes to a device will be stored in a patch file (see the User Guide for details on naming conventions). Subsequent changes to the same, or other, devices will be saved in the same patch file.

If you select an existing patch file, you will be prompted to replace or append to that file.

You may edit the values of fields and, if necessary, add new capabilities.

Editing the Nokia 6600
Editing the Nokia 6600 (click on picture to enlarge)

Extending

To all intents and purposes, extending a device is the same as editing a device. The key difference is that when you extend a device, you are adding a new device to the WURFL hierarchy. Because the location of the device in the hierarchy is of critical importance, you may only extend devices from the Relationships tab.

When you create a new device through extending an existing one, the fall-back device is set automatically from the currently selected device. You are prompted for a new user-agent and device ID, both of which should be unique. You also have the choice of identifying the device as an actual/real device. ie. You should check this box if you are adding a new handset.

Following the creation of the device, the editing process is the same.

Keeping your WURFL information up to date

mDevInf is normally installed as a single JAR file. Some files are embedded within the JAR file that are required for mDevInf to operate correctly. These include the WURFL data file itself, the device thumbnails and the capability descriptions. By default, mDevInf first looks for these files in the working directory. If it fails to find them, it then looks for the default (pre-packaged) ones in the JAR file.

The wurfl.xml file

New version releases of mDevInf usually contain the latest stable wurfl.xml file, however mDevInf is not re-released when the WURFL data is updated. In order to keep your installation up to date, it is recommended that you check for updates of the WURFL file at regular intervals.

The WURFL data file can be placed in the working directory in one of two formats. The first file that mDevInf looks for is wurfl.zip. If this file is not found in the working directory, mDevInf checks for wurfl.xml, before loading the default one. When you download the latest file from the WURFL site, it is recommended that it is stored in the working directory as wurfl.zip (rename it if necessary).

The device_pix.zip file

In a similar way to the WURFL data file, mDevInf first looks for device_pix.zip in the working directory before loading the default one. Again, to keep your installation up to date, it is recommended that you make regular checks on the WURFL site for updates to the thumbnails file. This file should also be renamed to device_pix.zip.

The capDesc.zip file

This file stores the capability descriptions. This file is not generally available for download, but is mentioned here in case you wish to change or add to the existing descriptions. In this case, you will need to extract the file from the mDevInf JAR file, unzip it, make the changes and zip it back up again. mDevInf does not check for capDesc.xml.

Further Details

For more information about the project, complete installation and build instructions and a full User Guide, please see the mDevInf home page.



1 Due to a combination of misunderstanding and typos, references User Agents in mDevInf have previously been confused with UAProf and User Profiles. I believe that these mistakes have all been addressed in version 1.1.

2 This figure is the result of a simple count of the lines in the wurfl.xml file containing the text "<device" and includes all sub-devices and fall-back devices. Adding "actual" to the search shows that there are 1175 actual devices listed.

3 The "type" of a capability is defined in the capDesc.zip file that contains the capability descriptions. If new capabilities are added (when editing or extending a device), they are assumed to contain alphanumeric information and can thus be tested for equality only.

Copyright © 2007-2009, Luca Passani