NAME

GSM::ARFCN - Absolute Radio Frequency Channel Number (ARFCN) Converter

SYNOPSIS

use GSM::ARFCN;
my $ga=GSM::ARFCN->new(24);
my $frequency=$ga->fdl;

DESCRIPTION

The Absolute Radio Frequency Channel Number (ARFCN) is a unique number given to each radio channel in GSM Radio Communication Band plan. The ARFCN can be used to calculate the frequency of the radio channel.

The ARFCNs used in GSM-1900 band (US PCS-1900) overlap with the ARFCNs used in GSM-1800 band (DCS-1800). In the GSM-1900 band plan, the ARFCNs 512 to 810 are different frequencies than the same channel numbers in the GMS-1800 band plan. A multiband mobile phone will interpret ARFCN numbers 512 to 810 as either GSM-1800 or GSM-1900 frequencies based on a band plan indicator.

For this package to interpret ARFCN numbers 512 to 810 as either GSM-1800 or GSM-1900 frequencies, set the additional parameter band plan indicator (i.e. "bpi") to either "GSM-1800" or "GSM-1900" (DEFAULT) to make the correct interpretation.

USAGE

use GSM::ARFCN;
my $frequency=GSM::ARFCN->new(24)->fdl; #MHz

Looping without blessing a new object each time

use GSM::ARFCN;
my $ga=GSM::ARFCN->new;
foreach my $channel (0 .. 1023) {
  $ga->channel($channel);  #sets channel and recalculates the object properties
  printf "Channel: %s;\tBand: %s\tUplink: %s MHz,\tDownlink: %s MHz\n", $ga->channel, $ga->band, $ga->ful, $ga->fdl
    if $ga->band;
}

CONSTRUCTOR

new

my $obj=GSM::ARFCN->new;                                  #blesses empty object; no channel set
my $obj=GSM::ARFCN->new(24);                              #default bpi=>"GSM-1900"
my $obj=GSM::ARFCN->new(channel=>24);                     #default bpi=>"GSM-1900"
my $obj=GSM::ARFCN->new(channel=>24, bpi=>"GSM-1800");    #specify band plan indicator

METHODS

channel

Sets or returns the channel. Recalculates properties when updated.

bpi

Set and returns the band plan indicator. Recalculates properties when set.

my $bpi=$ga->bpi("GSM-1900"); #default
my $bpi=$ga->bpi("GSM-1800");

PROPERTIES

band

Returns the GSM band for the current channel. If the current channel is unknown by this package, this property will be false but defined.

print $ga->band;
if ($ga->band) {
  #Channel is valid
} else {
  #Channel is not valid
}

ful (Frequency Uplink)

Returns the channel uplink frequency in MHz.

my $frequency=$ga->ful;

fdl (Frequency Downlink)

Returns the channel downlink frequency in MHz.

fs (Frequency Separation)

Returns the frequency separation between the uplink and downlink frequencies in MHz.

cs (Channel Spacing)

Returns the channel spacing in MHz. Currently, this is always 0.2 MHz. The actual bandwidth of the signal is 270.833 KHz.

BUGS

Submit to RT and email author.

SUPPORT

Try the author.

AUTHOR

Michael R. Davis
CPAN ID: MRDVT
STOP, LLC
domain=>michaelrdavis,tld=>com,account=>perl
http://www.stopllc.com/

COPYRIGHT

This program is free software licensed under the...

The BSD License

The full text of the license can be found in the LICENSE file included with this module.

SEE ALSO

http://www.telecomabc.com/a/arfcn.html, http://wireless.agilent.com/rfcomms/refdocs/gsmgprs/gen_bse_cell_band.php