The Perl and Raku Conference 2025: Greenville, South Carolina - June 27-29 Learn more

NAME

Net::FRN - Perl interface to Free Radio Network protocol.

SYNOPSYS

my $client = Net::FRN->client (
Host => '01server.lpdnet.ru',
Port => 10026,
Callsign => 'SP513',
Name => 'Alexander',
Email => 'sp513@example.org',
Password => 'MYPASSWD',
Net => 'Russia',
Type => FRN_TYPE_CROSSLINK,
Country => 'Russian Federation',
City => 'St-Petersburg',
Locator => 'KP50FA'
);
$client->run;

DESCRIPTION

Net::FRN is an implementation of Free Radio Network protocol.

Free Radio Network client/server is a program package which is widely used by radio amateurs to link radio repeaters over Internet. For more information on FRN see http://freeradionetwork.eu

There are 4 components implementing different parts of the FRN service:

  • Net::FRN

    Wrapper around everything else, containing methods to generate Client, Server and AuthServer objects (see below).

  • Net::FRN::Client

    Component implementing fully functional FRN client.

  • Net::FRN::Server

    Not yet implemented.

  • Net::FRN::AuthServer

    Not yet implemented.

GETTING STARTED

Initialization

my $client = Net::FRN->client(
Host => '01server.lpdnet.ru',
Port => 10026,
Callsign => 'SP513',
Name => 'Alexander',
Email => 'sp513@example.org',
Password => 'MYPASSWD',
Net => 'Russia',
Type => FRN_TYPE_CROSSLINK,
Country => 'Russian Federation',
City => 'St-Petersburg',
Locator => 'KP50FA'
);

Acceptable parameters for client() are:

  • Host

    Host name or IP address of FRN server.

  • Port

    Port numer which FRN server listens on.

  • Name

    Operator's real name

  • Callsign

    Operator's callsign

  • Email

    Operator's E-mail address.

  • Password

    The password.

  • Net

    Network (a.k.a. room) name to connect to. To change network even on the same server you should disconnect and connect again to the new network.

  • Type

    Type of FRN client. Use FRN_TYPE_* constants or return value of mkLinkString().

  • Country

    Country name.

  • City

    City where operator is located

  • Locator

    Part of the city or QTH-locator

Handlers

Use handler() method to set handler.

$client->handler('onClinetList', &showClientList);
$client->handler('onMessage', &printMessage);

Available handlers are:

  • onPing()

    onPing() is called every time client sends a ping packet right after buffering ping sequence.

  • onLogin()

    onLogin() is called right after succeccful logging in.

  • onIdle()

    onIdle() calls when client is idle.

  • onClientList(\@clientList)

    onClientList() is called every time the list of clients received from server.

    $_[0]

    Reference to array of client description records.

    Client description structure:

    {
    S => FRN_STATUS_ONLINE,
    M => FRN_MUTE_OFF,
    NN => 'Country',
    CT => 'City - QTH',
    BC => FRN_TYPE_PC_ONLY,
    ON => 'Callsign, Name',
    ID => 11,
    DS => ''
    }
  • onNetworkList(\@networkList)

    onNetworkList() is called every time the list of networks recieved from the server.

    $_[0];

    Reference to array of network names.

  • onMessage(\%message)

    onMessage() is called every time the message is received.

    $_[0]

    Message structure

    {
    from => \%client,
    type => FRN_MESSAGE_BROADCAST,
    text => 'Hello World!'
    }
    from

    Sender client description record.

    type

    Type of the message. Use constants FRN_MESSAGE_PRIVATE and FRN_MESSAGE_BROADCAST.

    text

    Message text.

  • onPrivateMessage

  • onBroadcastMessage

  • onRX

  • onGSM

  • onPCM

  • onBanList(\@banList)

    onBanList() is called every time the list of banned clients received from server.

    $_[0]

    Reference to array of banned client description records.

    Banned client description structure:

    {
    AI => 'ADMIN, Administrator';
    NN => 'Country',
    CT => 'City - QTH',
    BC => FRN_TYPE_PC_ONLY,
    ON => 'Callsign, Name',
    ID => '192.168.0.1',
    }
  • onMuteList(\@muteList)

    onMuteList() is called every time the list of muted clients received from server.

    $_[0]

    Reference to array of muted client description records.

    Muted client description structure:

    {
    AI => 'ADMIN, Administrator';
    NN => 'Country',
    CT => 'City - QTH',
    BC => FRN_TYPE_PC_ONLY,
    ON => 'Callsign, Name',
    ID => '192.168.0.1',
    }

DESCRIPTION

Constants

FRN client types:

  • FRN_TYPE_PC_ONLY

  • FRN_TYPE_CROSSLINK

  • FRN_TYPE_PARROT

AUTHOR

Alexander Frolov <froller@cpan.org>

URL

Up-to-date source and information about Net::FRN::Client can be found at http://orn.froller.net

SEE ALSO

  • perl(1)

  • http://freeradionetwork.eu, Free Radio Network web site

  • http://lpdnet.ru, Russian LPD Network web site

TODO

  • Reorganize parameters of client().

  • Add reconnection to backup server.