Net::FRN - Perl interface to Free Radio Network protocol.
use Net::FRN; 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;
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
use Net::FRN; 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
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.
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.
Reference to array of network names.
onMessage(\%message)
onMessage() is called every time the message is received.
Message structure
{ from => \%client, type => FRN_MESSAGE_BROADCAST, text => 'Hello World!' }
Sender client description record.
Type of the message. Use constants FRN_MESSAGE_PRIVATE and FRN_MESSAGE_BROADCAST.
Message text.
onPrivateMessage
onBroadcastMessage
onRX
onGSM
onPCM
onBanList(\@banList)
onBanList() is called every time the list of banned clients received from server.
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.
Reference to array of muted client description records.
Muted client description structure:
FRN client types:
FRN_TYPE_PC_ONLY
FRN_TYPE_CROSSLINK
FRN_TYPE_PARROT
Alexander Frolov <froller@cpan.org>
Up-to-date source and information about Net::FRN::Client can be found at http://orn.froller.net
perl(1)
http://freeradionetwork.eu, Free Radio Network web site
http://lpdnet.ru, Russian LPD Network web site
Reorganize parameters of client().
Add reconnection to backup server.
To install Net::FRN, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::FRN
CPAN shell
perl -MCPAN -e shell install Net::FRN
For more information on module installation, please visit the detailed CPAN module installation guide.