Category: software

How To Use The Raspberry Pi As A Wireless Access Point/Router, and other Raspberry Pi tricks

Just some quick links for the Raspberry Pi fans out there, from a multi-part series of articles on “How To : Use The Raspberry Pi As A Wireless Access Point/Router” via a blog called The Rantings and Ravings of a Madman:

Part 1 — How to create a Wireless Network On Your RPi
Part 2 — How to make your RPi into a Wireless Access Point
Part 3 — How to make your RPi into a Router
Part 3B – Issues with HostAPD ? Click here!

But the author of this blog didn’t stop there. Here are a few of his more recent articles, in a similar vein:

Script : WiFi Checker Script
Script : Starting hostapd when WiFi goes down
How To : Turn the Raspberry Pi Into a Shaping WiFi Router
Script : Web Configuration Page for Raspberry Pi
RaspAP WebGUI
How To : Use A RT5370 USB WiFi NIC In A Bridge

And in case you are thinking that the only things he knows how to do with a Raspberry Pi involve WiFi, guess again! Here is a link to all his Raspberry Pi related posts.

If you have an RSS newsreader, you might want to add his feed, or follow him on Twitter to get notifications of his latest blog posts.

If you know of any other great blogs for Raspberry Pi users that are of the same caliber as this one, please feel free to let us know in the comments!

FreePBX: Receive a daily e-mail of the Call Detail Report for the previous day

If you use FreePBX you might have wished that you could get a daily report of call activity e-mailed to you, if only to remind you to check for suspicious activity, so that you don’t get hacked and not know about it for weeks because you fell out of the habit of checking the log. It turns out that there is a fairly easy way to do it, as explained in a post by user Boolah in this thread in the PBX in a Flash forum:

EDIT (December, 2017): The method shown at that link and below doesn’t work at all in newer versions of FreePBX. It seems like every new version requires some tweaking. This is the line that works in FreePBX 14:

/usr/bin/mysql -u freepbxuser -ppassword -e "select calldate AS Timestamp, clid AS CallerID, did AS DID, dst AS Destination, disposition AS Disposition, duration AS Duration, userfield AS Userfield from cdr where calldate > date_sub(now(), interval 24 HOUR)" -H asteriskcdrdb | mail -a "From: PBX <asterisk@youraddress.com>" -a "Content-Type: text/html" -s "Custom Call Report" you@youremail.com

The above is all one long line. You must replace the above values:

-u freepbxuser -ppassword (that’s not a typo – there really is NO SPACE after the -p) – replace freepbxuser and password with the correct values for YOUR system. You will usually find these in one of two places. You can look in /etc/amportal.conf and look for the variables AMPDBUSER and AMPDBPASS — these will usually be near the bottom of the file in newer installs, in a “— CATEGORY: Bootstrapped or Legacy Settings —” section, but they can be anywhere in the file.

Another place they may be found is in the file /etc/freepbx.conf — in that file, look for lines similar to:

$amp_conf[‘AMPDBUSER’] = ‘freepbxuser’;
$amp_conf[‘AMPDBPASS’] = ‘password’;

Those will give you the values to use to replace freepbxuser and password

-a “From: PBX <asterisk@youraddress.com>” – replace asterisk@youraddress.com with a valid outgoing email address for your system. If you have a Dynamic DNS address, you may be able to use that after the @ in the email address. It mostly depends on how you send outgoing email from your system. Note that using “root” before the @ sign may not work, particularly if you are routing mail through an ISP’s mail servers – one major ISP now appears to silently drop any email that appears to originate from root@anything, so use “asterisk” or “pbx” or something else other than “root”.

-s “Custom Call Report” you@youremail.com – replace you@youremail.com with the address you want the reports emailed to.

What follows is the rest of the original article. The mysql line shown there probably will not work, unless perhaps you are running a very old version of FreePBX (end of edit).

This is very basic, but should get you the info you need. Add it as a cron to run once a day and it will email the date/time of the call along with the CNAM and CID for all incoming calls for the previous day:

mysql -u root -ppassw0rd asteriskcdrdb -e 'SELECT calldate, clid FROM cdr WHERE DATE(calldate) = SUBDATE(CURDATE(), 1) AND did <> ""' | mail -s "Yesterday's Calls" you@youremail.com

Replace the you@youremail.com with your actual email address.

When copying the above, note that it’s all one single line, even though it wraps in this blog post, and also beware that WordPress likes to change single and double quotation marks into the “prettified” versions, so make sure you change those characters back to the plain old ASCII versions or it won’t work correctly. Or, you could just visit the thread mentioned above and copy the line from there.

Link: How to watch Netflix (Watch Instantly) in Linux

EDIT: After publishing this article we learned of another article that gives additional information on what is probably the easiest method so far:

Yesterday, developer and programmer extraordinaire Erich Hoover and I spent several hours working out all of the Netflix Desktop kinks. Most users will have no problems with installation now.

Here is how to install the Netflix Desktop App on Ubuntu. …

Full details here:
PPA for Netflix Desktop App (iheartubuntu)

Should you have problems getting it to work, see:
Report Netflix App Bugs on Launchpad (iheartubuntu)

What follows is the original text of this post, which also mentions this method as one of the two choices:

Running Netflix is entirely possible in Ubuntu Linux 12.04 (and most likely any other modern distribution). See the section below “Running with Wine”.

Until recently there was no simple solution to watching streaming movies via Netflix (Watch Instantly) in Linux for any Linux distros besides Android based computers. Netflix has not released a player that will install natively in any of the others.

Read the full article here:
How to watch Netflix (Watch Instantly) in Linux (How To Wiki)

Video: Turning the Raspberry Pi into an FM transmitter with PiFM

Direct link to YouTube video

Link to page that describes how it’s done: Turning the Raspberry Pi Into an FM Transmitter

The interesting thing about this: Other than the Raspberry Pi and its power supply, the only external hardware required is a piece of wire to act as an antenna, and a way to connect it to the correct pin on the device!

Useful SSH How-Tos

These are from an interesting site called Make Tech Easier, listed in order from oldest to newest:

Link: Sikuli (Automation Tool Using Images) 1.0.0 Released

Sikuli is a tool available for Linux, Windows and Mac OS X which automates tasks using images: you take a screenshot of what you want to click, right click, hover, drag and drop and so on and Sikuli performs those actions automatically, when you need it, either by using the GUI or running it via command line.

It can be useful for running repetitive tasks automatically, running some actions remotely via the command line and so on.

Article continues here:
Sikuli (Automation Tool Using Images) 1.0.0 Released (WebUpd8)

Do-it-yourselfers: Raspberry Pi with Asterisk installed to act as a door entry system

This is for those that are really into building their own hardware, in addition to being familiar with Asterisk. From Reddit’s Asterisk section comes this post:

I’m working on using a Raspberry Pi with Asterisk installed on it to act as a door entry system integrated with my home phone system (also running Asterisk). The operation I would like is this:

    Doorbell pushed.
    Raspberry Pi detects push and its asterisk originates a call from the local console channel to some predefined extension on the main asterisk server, which routes to the appropriate house extensions.
    Person at door hears either ringing or music, whatever.
    Call is eventually answered.
    Caller talks to owner and owner decides to let caller in.
    ????
    Asterisk in Raspberry Pi activates a local GPIO pin to open the door strike.

I believe I’ve got all of the above described parts working, or at least workable. The “????” line — I haven’t.

The post continues to explain the thinking that has bee put into solving this problem. Then others chime in, and finally a solution is found that involves some lines added to Asterisk’s features.conf file, and a small program in C. We’re not into hardware hacking but this solution seems like it would be a lot less expensive, and probably more fun to build than some, than an equivalent commercial unit.

Link and Video: Drastically Speed up your Linux System with Preload (and other speed-ups)

Preload is an “adaptive readahead daemon” that runs in the background of your system, and observes what programs you use most often, caching them in order to speed up application load time. By using Preload, you can put unused RAM to good work, and improve the overall performance of your desktop system.

Most Linux users should install Preload using their distribution’s Software Center or repository, and simply installing the program will be all that is needed.  But this article explains much more about Preload, including various configuration options:

Drastically Speed up your Linux System with Preload (TechThrob)

Preload is also featured in this video:

View on YouTube

Is elitism the reason many open source projects self destruct?

The author of this article seems to think so. He appears to be primarily talking about Ubuntu here, but we strongly suspect that the same thing has happened with several other open source projects:

The Achilles Heel of Open Source: Elitism (Linux Advocates)

Related:

Mark Shuttleworth: Canonical leads Ubuntu, not ‘your whims’ (The Register)

Recent Posts

Recent Comments

Archives

Categories

Meta

GiottoPress by Enrique Chavez