Contents
- About WifiFred
- Change Log
- Wish List
- WifiFred on APRS
- WifiFred on MSN
- WifiFred on BlackBerry
- Listing of WifiFred commands
- Things Fred can do
- XMLRPC Interface
- Questions and Answers
About WifiFred
WifiFred is our sleepless secretary who hangs out in #bcwireless on irc.bcwireless.net, #wireless on irc.freenode.net, WIFIFRED on APRS and as info@bcwireless.net on MSN.
Fred listens in on conversations, transcribes public conversations, keeps track of websites we're poking around in and provides all sorts of answers to mundane questions we should all know by heart, but are to conventional to remember.
You can find a list of channels that WifiFred is listening on from here.
WifiFred listens to commands prefixed with a !. For example, typing !help would display information about how to use him, while typing !stats would display some statistics about his operational status.
Change Log
Wish List
WifiFred on APRS
WifiFred is connected via the Amateur Radio APRS Network. He can be queried by sending an APRS short message to: "WIFIFRED".
WifiFred on MSN
WifiFred sometimes hangs out on the MSN messenger network. Here is a list of special commands that are only relevant to him on MSN.
%picture |
Displays information about his currently displayed picture |
%help
Lists MSN specific commands
WifiFred on BlackBerry
A WML interface is available for BlackBerry and other cellular device users. Use http://www.bcwireless.net/wififred/wml.php.
Some functions are not available including messaging.
Listing of WifiFred commands
Amateur Radio
!irlp |
displays irlp status. !irlp on its own displays general stats. !irlp <nodeid> displays info about nodeid !irlp <callsign> displays info about <callsign>. !irlp -to <node id> displays nodes currently connected to <node id> specify -c to display only connected nodes. |
!callsign or !c |
looks up a callsign. if not a ham callsign, returns a tafl record instead |
!cq |
logs a QSO. specify <callsign_of_heard_station> <where_you_heard_them> <any notes you want to add>. |
RF Calculators
!fresnel |
caclulates fresnel clearance. specify frequency in MHz and distance in miles |
!fsl |
calculates free space loss. specify frequency in MHz, distance in miles (and optionally 3rd parameter of max miles to display fsl between starting and end miles. |
!psl |
calculates the path loss of a passive reflector. specify distance of path 1 from the reflector in meters, distance 2 of the reflector in meters, and (optionally) the square footage of the reflector in meters |
!rxsl |
calculates expected signal level at receiving node. specify: <frequency in mhz> <miles> <TxPower dBm> <TxCableLoss dB> <TxAntennaGain dBi> <RxAntennaGain dBi> <RxCableLoss dBi> |
!change |
changes things. specify: <howmany> <what> to <what> |
!range |
displays receive level at an averaged amount of mileage based on the starting and ending mile. defaults to 1-5 miles. usage: !range <frequency in Mhz> <TxPower dBm> <ant gain dBi> <starting mile> <ending mile> <receiving side antenna gain> |
!wl |
displays the full, half and quarter wavelengths of a frequency. specify: <frequency in MHz> |
!horiz |
displays distance to horizon, specify: <height of antenna in feet> |
!knife |
calculates knife edge diffraction. usage: !knife <freq in mhz> <distance from site A to obstruction> <height of obstruction> |
!vswr |
calculates the VWSR, specify: specify: <power forward in mW> <power reflected in mW> |
!loss |
displays cable loss. usage: !loss <cable type> <length of cable>.[[br]]example: !loss lmr-400 9 meters |
!cantenna |
calculate the frequency response of a can by diameter (ala CantennaHowto formula). usage: !cantenna <diameter in inches> |
!poe |
PowerOverEthernet calculator. usage: <device input voltage> <device input amperage> <wire gauge> <# pairs> <cable length> [feet|meters |
RF Databases
The RF databases are still under construction pending work on the main WaveCaster database.
!cable |
searches the cable database and displays specifications (presently only feed loss). usage: !cable <cable type>, ie: !cable lmr-400 |
TAFL Lookups
TAFL is Industry Canada's public interface to the Advanced Spectrum Licensing system. You can use WifiFred to query through the BC Wireless TAFL tools.
!emis |
decodes an ITU EmissionCode |
!freq |
lookup a frequency |
!callsign |
looks up a call sign. if its a ham callsign, returns the ham record, otherwise returns an Industry Canada TAFL record |
TCP/IP commands
!port |
looks up TCP/UDP port number/name. |
!proto |
looks up IP Protocol number/name |
!dns |
perform a DNS lookup |
!mx |
resolve's a host's Mail eXhanger record |
!ping |
pings an internet host |
!whereis |
display the country an IP address is in |
!long2ip |
converts an IP address in integer form to dotted octet. |
!ip2long |
converts an IP address in dotted octet form to integer. |
Internet Standards and References search
!rfc |
searchs for a rfc. usage: !rfc <number> - or - !rfc <search words> |
!fyi |
searchs for a fyi. usage: !fyi <number> - or - !fyi <search words> |
!bcp |
searchs for a bcp. usage: !bcp <number> - or - !bcp <search words> |
!std |
searchs for a std. usage: !std <number> - or - !std <search words> |
!whois |
queries the geektools whois server. usage: !whois <what> |
Miscellaneous Commands
!seen |
displays where user was last seen. usage: !seen <user>. with no parameters, !seen will display last 10 users heard. also: !seen ~<regexp>, !seen #channel |
!date |
displays current discordian date. optional parameters are julian, unix, jewish. french is presently broken |
!url |
searches observed url database for key-word. usage: !url dwl-650 |
!stop |
aborts the current output to the channel, useful if Fred is flooding |
!news |
displays news headlines from wireless and news sites. usage: !news <site> <article # to display>. to retrieve a list of sources, use !news by itself only. additional info below. |
searches google. |
|
!lucky |
i'm feeling lucky! |
!freshmeat, !fm |
searches freshmeat. |
!wiki |
searches the BC Wireless Wiki |
!homeland |
retrieve the current department of homeland security terror level |
!rot13 |
rot13's some text |
!urlencode |
urlencode's text. |
!urldecode |
decodes urlencoded text |
!trivia |
starts the trivia game. see below for more info |
!95crave |
returns the current streaming server urls for 95crave |
Telephony
!call |
test call a voip address, announces that this is a test call and sets up an echo test for 30 seconds. specify the voip address as url (ie: sip:// foo@bar.com ) or as an asterisk dial string (SIP/ foo@foo.com , IAX/ foo@iaxserver.com , etc.) |
!bridge |
bridges two voip addresses. dials first voip addresses, announces that it's a test bridge, then connects to the second. usage: !bridge <your voip address> <other voip address> |
!npa |
(experimental). Looks up an NPA and NNX. usage: !npa NNX NPA, eg: !npa 604 322 |
Misc.
!postal |
lookup latitude and longitude of a canadian postal code. usage: !postal <postalcode> |
!mac |
Looks up a MAC address |
!atr |
Looks up a smartcard ATR or searches for an atr by description. usage: !atr 3F2F008069AF0307035200000A0E833E9F16 |
User Commands
!send |
send a message to a user. usage: !send aml blah! |
!away |
mark yourself as being away. usage: !away gone fishing. use !away with no paramaters to disable |
!identify |
identify yourself to WifiFred. usage: !identify password |
!register |
register yourself with WifiFred. usage: !register password email@address |
!set |
set a user variable. |
!show |
show your variables |
Administrative Commands
!topic |
set the current !topic |
!op |
op a user. usage: !op user #channel, or !op -user #channel |
!voice |
voice a user. usage: !voice user #channel, or !voice -user #channel |
!silence |
silence a user. usage !silence user #channel |
!invite |
invite a user into the channel. won't work if the channel is set to invite only, get a human to do it instead |
!motd |
set channel message of the day. usage: !motd #channel welcome to our channel |
!announce |
schedule an announcement. !announce #channel when | the message. note: | must proceed the message. |
!meeting |
start a meeting. usage: !meeting meeting topic |
Things Fred can do
Range Guestimating
WifiFred can give you estimated signal levels based on the frequency and antenna gain used in a link. You need to specify the frequency in MHz, and the gain of antenna being used. The antenna gain is used on both Transmitting and Receiving sides. Use !rxsl if you want finer control over the calculation.
You can also specify a starting point, in miles, and an end point.
Some examples..
Calculating the range of an Orinoco and 8 dBi antenna
<matthewa> !range 2450 15 8 <WifiFred> 2450 MHz, tx gain 8 dBi, rx gain 8 dBi, no cable loss. <WifiFred> 1 miles: -73.38 dBm <WifiFred> 2 miles: -79.4 dBm <WifiFred> 3 miles: -82.93 dBm <WifiFred> 4 miles: -85.42 dBm <WifiFred> 5 miles: -87.36 dBm <WifiFred> 6 miles: -88.95 dBm
By default !range assumes the same antenna gain is used on both sides. You can specify a seperate antenna gain for the receiving side as the last parameter, but you must also specify starting and end miles.
ie:
<matthewa> !range 2450 15 8 1 2 24 <WifiFred> 2450 MHz, 15 dB xmit, tx gain 8 dBi, rx gain 24 dBi, no cable loss. <WifiFred> 0.4 miles: -49.42 dBm <WifiFred> 0.8 miles: -55.45 dBm <WifiFred> 1.2 miles: -58.97 dBm <WifiFred> 1.6 miles: -61.47 dBm <WifiFred> 2 miles: -63.4 dBm <WifiFred> 2.4 miles: -64.99 dBm
Calculating the range of an Orinoco and an 18 dBi antenna after 10 miles
This will display the receive levels based on an Orinoco and an 18 dBi antenna, after 10 miles.
<matthewa> !range 2450 15 18 <WifiFred> 2450 MHz, tx gain 18 dBi, rx gain 18 dBi, no cable loss. <WifiFred> 10 miles: -73.38 dBm <WifiFred> 11 miles: -74.21 dBm <WifiFred> 12 miles: -74.97 dBm <WifiFred> 13 miles: -75.66 dBm <WifiFred> 14 miles: -76.31 dBm <WifiFred> 15 miles: -76.91 dBm
Calculating the range of an Orinoco and a 30 dBi antenna between 40 and 80 miles
<matthewa> !range 2450 15 30 40 80 <WifiFred> 2450 MHz, tx gain 30 dBi, rx gain 30 dBi, no cable loss. <WifiFred> 47.2 miles: -62.86 dBm <WifiFred> 55.4 miles: -64.25 dBm <WifiFred> 63.6 miles: -65.45 dBm <WifiFred> 71.8 miles: -66.51 dBm <WifiFred> 80 miles: -67.45 dBm
URL Monitoring
URL's pasted into monitored channels are stored in a database. If a description is included on the same line as the url, it is also copied.
someuser> http://www.cryptome.org spooky stuff someuser> !url spook WifiFred> http://www.cryptome.org - spooky stuff
You can later search for the URL using the above !url command, or the Web Based URL Search Tool (which is a bit more flexible!)
Seen Users
You can see who's been active within the last hour using !seen with no parameters:
someuser> !seen <WifiFred> 7 people/bots/feds/pimps seen within the last hour across 1 servers: <WifiFred> matthewa jam^ bowlie x4m brento evilbunny darkkro
To see the last active users in a specific channel:
someuser> !seen #wireless <WifiFred> jam^ 12 minutes and 58 seconds ago saying: are you going to give collord back when you're done with him? <WifiFred> bowlie 17 minutes and 36 seconds ago saying: oh dear, that won't sit very well <WifiFred> x4m 17 minutes and 51 seconds ago saying: nope! <WifiFred> nemith 4 hours, 8 minutes and 44 seconds ago saying: <WifiFred> wilco 4 hours, 17 minutes and 42 seconds ago saying: Hm, yeah <WifiFred> vacamike 5 hours, 10 minutes and 28 seconds ago saying: what a jerk <WifiFred> bubba 5 hours, 38 minutes and 25 seconds ago saying: nite ...
and a particular user:
someuser> !seen soandso <WifiFred> soandso was last seen in #hwug 8 hours, 24 minutes and 36 seconds ago saying: hehe
You can use a MySQL Regular Expression by prepending ~ to the user, ie:
<matthewa> !seen ~Wiredb
<WifiFred> Wiredboy was last seen in #bcwireless 16 minutes and 11 seconds ago
saying: heh
<WifiFred> neuteredwiredboy was last seen on irc.bcwireless.net in
#freenetworks 90 days, 20 hours, 29 minutes and 36 seconds ago
saying: l8r
<WifiFred> wiredb0y was last seen in #bcwireless 91 days, 18 hours, 9
minutes and 32 seconds ago saying: y0
<WifiFred> wiredboy3 was last seen in #bcwireless 93 days, 21 hours, 3
minutes and 37 seconds ago saying: why does everything have to
be so difficulty
<WifiFred> wiredboy_ was last seen on irc.openprojects.net in #bcwireless
159 days, 21 hours, 14 minutes and 40 seconds ago saying:
dude... this is soooo sweet
Prescheduled Announcements
Announcements can be scheduled using the !announce command. When the set day and time occur, Fred will announce the message.
The Syntax for this command is:
!announce #channel time/date_of_announcement - the message
Note that you *must* specify '-' after the date, and before the message.
Only identified users can use this command. Use the !identify command to login to WifiFred.
Possible day/time expressions are:
+<minutes from now>
- Oct 21, 2002 11:55 pm
someuser> !announce #channel +1 - this is a test WifiFred> Announcement on #channel set for 10/29/02 20:07:23 PST -WifiFred:#channel - Announcement from someuser: - this is a test
<someuser> !announce #channel January 1, 2007 - We're still here?!? <WifiFred> Announcement on #channel set for 01/01/07 00:00:00 PST
Quasi Instant Messaging
Users can send each other messages using the !send command. When the recipient logs into a channel where WifiFred is the message is delivered. If a recipient has a msgsendto variable set to an Email address, WifiFred will Email the message instead.
Messages can be sent to users on other IRC networks as well:
!send @irc.efnet.org matthewa don't forget to bring home a senao
News Headlines
WifiFred can pull syndicated headlines and RecentChanges from various websites. He knows about CNN, the BBC, and IndyMedia. Most news sources are flat and can be retrieved using:
!headlines <source>
ie:
<someuser> !headlines bbc <WifiFred> Iraq reels under air assault | RAF Tornados join air strikes | 'Bomb' suspect charged | Turkish troops 'enter Iraq' | Thousands due at anti-war rallies | Iraq action 'noble' - Tory leader | Blair meets Chirac after rift | Two killed in anti-war protests | In pictures: British forces in action | Base closure proposals revealed | Ricin 'linked to militants' | Family leads Milly's funeral procession | 'Screams heard' say Hannah police | Quiz major denies row
however some sources have many sub feeds, like IndyMedia.
You can also display a specific article #, ie:
<someuser> !headlines dje 3 <WifiFred> Thursday [ http://weblog.decentric.net/home/2003/10/thursday.html ] <WifiFred> One of my closer friends (in mentality rather than location) called today. Danny is planning his honeymoon in Thailand. I spouted off all the beaches to the south I could recall; Pi Leh Bay being the mind bender of them...
IndyMedia Syndicated News
usage:
!headlines indymedia locale <sub-feed>
the locale is a city/country specific feed. <sub-feed> is a specific news area, like "news", "video", "audio", "features" and "free porn".
some examples:
<someuser> !news indymedia alberta <WifiFred> Calgarians Protest Bush's Attack | Calgary War Updates | Talisman Directly Linked to Genocide in Sudan: Evidence being presented in US lawsuit | Calgary to Resist the War | RALLY AGAINST BILL 27 Noon March 20 Edmonton | poster for Calgary's emergency peace demonstration | Pincher Creek Rallies for Peace | edmonton NDP Anti War Committee meeting | Anti War Resolution for Edmonton City Council | Lethbridge Peace Rally excerpts | Democracy is Coming - to the <WifiFred> * other sub-feeds: video audio features
the "other sub-feeds" are video, audio, and features.
Now let's say you wanted to see what features are presently available from the alberta chapter, it would go something like:
<someuser> !news indymedia alberta features <WifiFred> Angry Cow assaults Bush | David Swann in Iraq | Albertans React to Kyoto | Alberta War Opposition | talisman_sudan | iraq_war | calgary_poverty_actions | native_labour_union | calgary_take_back_night | hudson_bay | Sudan Eyewitness <WifiFred> * other sub-feeds: news video audio
Trivia
To start a trivia game, use !trivia begin .
To stop trivia, use !trivia stop .
You can pause and resume the game by using !trivia pause and !trivia resume .
Scores are kept in the local database on an overall basis (not per game, maybe that'll change). Use !trivia scores <username> to view scores.
The game works like this:
- A random question (that hasn't been asked recently) gets asked.
- You get up to 4 hints before the question is considered unanswerable.
If a question is not correctly guessed it goes back into the queue. Correctly answered questions are ignored for an unspecified amount of time.
Send in trivia questions!
We need some Wireless/geeky q&a. Preferred format is:
The question,The answer
Meeting management
We're building some meeting management tools into WifiFred.
A moderater calls the meeting using the !meeting command. WifiFred then puts the channel into moderater and topic lock mode.
Users who wish to participate in the meeting must then send WifiFred the private message, "!join meeting #channel". When users join a meeting they are given voice on the channel.
As dialogue occurs WifiFred logs the text and files it under the current channel topic. Meeting moderators can change the topic using /topic, or !topic.
Meeting Resolutions can be recorded using the !resolution command.
Voting is being worked on.
XMLRPC Interface
There is an XMLRPC interface available for projects to announce messages in their respective IRC channels. Messages can be posted as regular messages or notices.
Some examples of the XMLRPC interface are channel announcements when new messages are posted to a discussion forum, new callers dialin to a public voice room, new meetings, etc.
For obvious reasons this interface isn't documented anywhere, but is available to anyone who asks for it. Email matthewa for access to the API.
Questions and Answers
Why is Fred ignoring me?
Did you do something mean to him? Caused flooding? Something else nasty? If you're actually being ignored, chances are you had it coming.
Another couple of possibilities are:
- You triggered the flood protection. Don't ask a bunch of things from Fred so fast.
- You used the '|' symbol in the command. Don't do that!
Is Fred's source code available?
Yup. Every few months a new release of Fred's code is made available, somewhere on the Internet. Be warned, it's ugly!
In fact, evilbunny rebuilt Ziggy around phpIRC, which he snagged out of WifiFred.
Who is WifiJane? Is she related to Alice?
WifiJane is WifiFred's love slave. She's around, doing things in the background.
Can you make WifiFred post multiline results to a person directly instead of the channel?
No.
People are responsible for what they do. If a person is spamming a channel by asking for a gazillion results from google, you should deal with the person directly, not the mechanism.
Can I add a function to WifiFred?
Writing command functions
Since the author is to lazy to publish up-to-date source code anywhere, the best thing to do is write a php function like the example below.
If you want to add code to WifiFred, Email it to <matthewa@bcwireless.net> with a description of what it is supposed to do. I'll be glad to help you with it.
function do_command($foo)
{
return("some text to speak");
}
where $foo is an array of space parsed words. Command parsing works like this:
matthewa> !beat aoler with cluestick
is converted into an array like:
array(
"!beat",
"aoler",
"with",
"cluestick"
);
of course this doesn't *have* to be the way to do it, but is the general interface. The following variables can be passed to a function:
* $nick - The user's nickname * $host - The user's hostname * $destination - The channel the command was received on (ie: #wireless, or username if a privmsg) * $text - The full command string
Return values
The return value from the function can be:
- Some text, this will be replied to in $destination.
- An action, ie: /me passes keegan a beer
- Nothing.
User Variables
Determining if a user is logged in, and their security value.
global $_USER;
If the user is logged in (via !identify), $_USER['nickname'] will be set.
The user's security level is contained as $_USER['nickname']['security'].
- Normal users have a security level of 100.
Miscellaneous commands
irc_privmsg($destination,"text to send")
Writing a remote function
WifiFred supports remote functions as well via XMLRPC. Here's an example:
function wififred_hello($a,$argv)
{
// $argv is the $argv array passed from the bot.
// $argv[0] - the command
// $argv[1] - first parameter
// $argv[...]
return("Hello World! - ".$argv[0]);
}
ini_alter("always_populate_raw_post_data",1); // needed to populate HTTP_RAW_POST_DATA
$s = xmlrpc_server_create();
$req = $_SERVER['HTTP_RAW_POST_DATA'];
xmlrpc_server_register_method($s,'wififred.hello','wififred_hello');
$ret = xmlrpc_server_call_method($s,$req,'');
echo $ret;
xmlrpc_server_destroy($s);
The command must be registered with WifiFred as well. Let matthewa know the URL of the xmlrpc server, and the command requested.
