Category Archives: WAP

Wireless Application Protocol

Perl Module to check OMA DRA support for a mobile device

Last Month in one of articles, I covered a topic on how to get the screen size of a mobile device, someone is wondering about how to check the Open Mobile Alliance (OMA) Digital Rights Management (DRM) support.

To check Forward-Lock, you need to ensure that the following content-type is accepted by the device:

  • application/vnd.oma.drm.message

To check Combined Delivery, you need to ensure that the following content-type is accepted by the device:

  • application/vnd.oma.drm.message
  • application/vnd.oma.drm.rights+xml

To check Separate Delivery, you need to ensure that the following content-type is accepted by the device:

  • application/vnd.oma.drm.rights+xml
  • application/vnd.oma.drm.rights+wbxml
  • application/vnd.oma.drm.content

One more thing is that the device may support (for example) Combined Delivery DRM, but you may not be able to use that in MMS. Thus, further check on “MmsCcppAccept” tag of the User Agent Profile (UAProf) to ensure that it is supported.

Some may wonder why I don’t just check the “DrmClass” tag instead. Well, you can, however, during my investigation, I found out that some mobile phone manufacturers do not include this in the UAProf. Thus, it is much safer to check the DRM’s content-types instead.

I have further modified the previous Mobile::UserAgentProfile library and include this checking into that. I have also make changes to the method calling so that I can hold the profile in memory rather than load the profile from file every time I need to check on the UAProf.

INSTALL

To install, do the following:

perl Makefile.PL
make
make install

Continue reading Perl Module to check OMA DRA support for a mobile device

Perl Module to get the Screen Size of a mobile device

As mobile devices are created differently, there are a lot of different Screen size available in the market. Due to the small screen size, mobile application developers had always find it hard to optimize the WAP portal for different devices. Keeping a record of the screen size is also difficult as there isn’t a standard way for mobile devices manufacturers to communicate to the mobile application developers.

User Agent Profile (UAProf) specification is the answer to this problem. It is used to capture capability and preference information for mobile devices. This information can be used by content providers to produce content in an appropriate format for the specific device.

In this article, we will discuss the Perl module which use UAProf to get the screen size of the mobile devices. For further information, you can download a copy of UAProf’s specification at:

Specification of UAProf

INSTALL

To install, do the following:

perl Makefile.PL
make
make install

Continue reading Perl Module to get the Screen Size of a mobile device

Perl Module to encapsulate OMA DRM format for a media type

Open Mobile Alliance (OMA) is a standards body founded by telecommunication companies which develops open standards for the mobile phone industry. In order to ensure interoperability across all implementations for Digital Rights Management (DRM), the OMA provides DRM specifications so that content providers, operators and mobile phone manufacturers can easily integrate the DRM solution as smoothly as possible.

I have created Net::OmaDrm Perl module so that content providers can format the content-type quickly.

This module support the OMA DRM version 1.0 method of sending content to the handset. A device will declare the support for OMA-DRM by including one of the method which is provided by this module:

  • Forward-lock
  • Content-Type
  • application/vnd.oma.drm.message
  • Combined delivery
    • Content-Type
    • application/vnd.oma.drm.message
    • application/vnd.oma.drm.rights+xml
  • o-ex:permission
    • o-dd:display
    • o-dd:play
  • o-ex:constraint
    • o-dd:count
    • o-dd:interval

    A detailed document of OMA-DRM can be found at:
    http://www.openmobilealliance.org/release_program/drm_v1_0.html

    I have tested this module on perl v5.8.5.

    INSTALL
    To install, do the following:

    perl Makefile.PL
    make
    make install
    

    Continue reading Perl Module to encapsulate OMA DRM format for a media type

    Perl Module to access Clickatell HTTP API

    I’ve written a perl module to access to Clickatell HTTP API. This module supports the API from Clickatell’s HTTP API Specification v.2.2.7.

    The following are all the available APIs and whether they are supported or not:

    Basic Commands

    • http://api.clickatell.com/http/auth
    • Yes (But session Not support)
  • http://api.clickatell.com/http/ping
    • Yes (But session Not support)
  • http://api.clickatell.com/http/querymsg
    • Yes
  • http://api.clickatell.com/http/sendmsg
    • Yes

    Additional Commands

    • http://api.clickatell.com/http/delmsg
    • No
  • http://api.clickatell.com/http/getbalance
    • Yes
  • http://api.clickatell.com/http/routeCoverage.php
    • Yes
  • http://api.clickatell.com/mms/ind_push.php
    • Yes
  • http://api.clickatell.com/mms/si_push.php
    • Yes
  • http://api.clickatell.com/http/getmsgcharge
    • Yes
  • http://api.clickatell.com/http/token_pay
    • No

    Batch Messaging

    • http://api.clickatell.com/http_batch/startbatch
    • No
  • http://api.clickatell.com/http_batch/senditem
    • No
  • http://api.clickatell.com/http_batch/quicksend
    • No
  • http://api.clickatell.com/http_batch/endbatch
    • No

    I tested this module on perl v5.8.5.

    INSTALL

    To install the module, perform the usual perl module installation procedures. The following is the steps:

            perl Makefile.PL
            make
            make install
    

    Continue reading Perl Module to access Clickatell HTTP API

    Check Device’s User-Agent using Perl

    There is a CPAN library that helps to parse the User-Agent. You can download the Perl library at:

    http://search.cpan.org/~cmanley/Mobile-UserAgent-1.05/lib/Mobile/UserAgent.pm

    After you download the library, perform the usual installation procedures:

    perl Makefile.PL
    make
    make install
    

    The following is the source code:

    
    #!/usr/local/bin/perl
    use strict;
    
    use Mobile::UserAgent;
    my $uaobj = new Mobile::UserAgent();
    

    The codes above is the standard declaration so that you can call “Mobile::UserAgent” library. The following 3 lines are used for testing purposes. Uncomment the following 3 lines and comment the above 1 line to do some testing.

    
    #my $useragent = 'Nokia6600/1.0 (4.09.1) SymbianOS/7.0s Series60/2.0 '.
    #   'Profile/MIDP-2.0 Configuration/CLDC-1.0';
    #my $uaobj = new Mobile::UserAgent($useragent);
    

    The following lines check the User-Agent string and pass the output to the subroutine “printWml” if the device suppose WML or the subroutine “printHtml” if the device doesn’t.

    
    if ($uaobj->success()) {
       my $out='Vendor: ' . $uaobj->vendor()     . "
    \n"; $out.='Model: ' . $uaobj->model() . "
    \n"; $out.='Version: ' . $uaobj->version() . "
    \n"; $out.='Series60: ' . $uaobj->isSeries60() . "
    \n"; &printWml($out); } else { &printHtml("Connecting Client is not a mobile user-agent \n"); }

    Continue reading Check Device’s User-Agent using Perl

    How to convert SI message to GSM SMS User Data

    After publishing the article on “How to send WAP Push data through SMPP”, there is a lot of requests on how to formulate the GSM SMS User Data.

    Basically, the following is an example in java with remark in the code to explain how this is done:

      public String toSmsBinary() {
        /**
         GSM SMS User Data
         06: UDH Length which is 6
         05: 16 bit address
         04: Length(4)
         0B84: Destination Port(2948)
         23F0: Source Port(9200)
         
         Wireless Session Protocol 
         90: Transaction ID
         06: PDU Type(Push)
         01: Headers Length is 1
         AE: Content-Type is application/vnd.wap.sic
         
         */
        StringBuilder ud = new StringBuilder().append("0605040b8423f0900601ae");
        ud.append(toWBXML());
        return ud.toString();
    
      }
    

    The above function creates the GSM SMS User Data and Wireless Session Protocol (WSP) header. Continue reading How to convert SI message to GSM SMS User Data

    How to send WAP Push data through SMPP

    After publishing the article on “How to send WAP Push data through SMPP”, there is a lot of requests on how to formulate the GSM SMS User Data.

    Basically, the following is an example in java with remark in the code to explain how this is done:

      public String toSmsBinary() {
        /**
         GSM SMS User Data
         06: UDH Length which is 6
         05: 16 bit address
         04: Length(4)
         0B84: Destination Port(2948)
         23F0: Source Port(9200)
         
         Wireless Session Protocol 
         90: Transaction ID
         06: PDU Type(Push)
         01: Headers Length is 1
         AE: Content-Type is application/vnd.wap.sic
         
         */
        StringBuilder ud = new StringBuilder().append("0605040b8423f0900601ae");
        ud.append(toWBXML());
        return ud.toString();
    
      }
    

    The above function creates the GSM SMS User Data and Wireless Session Protocol (WSP) header. Continue reading How to send WAP Push data through SMPP