Written by Dan on Tue, Jun 5, 2012 at 8:55am
Filed under Hardware, OS X, Unix
There has quite a bit of buzz about the RTL-SDR project that is going on over at reddit on the rtl-sdr subreddit. Most of it has been about using the RTL2832/e4000 devices under Windows and Linux. Since I primarily use Mac OS I decided to cobble together the various hints of other people who have successfully used the devices on Mac OS and document them in a gist on github:
https://gist.github.com/2874757
Update: After some feedback on reddit for the previous gist I decided to revisit my build to that I would have a more up to date version of GNURadio. After much hacking I came up with these directions for getting GNURadio 3.6.0 working on 10.7:
https://gist.github.com/2eb4ff8e240164d0f751
After following those directions you’ll want to then install the rtl-sdr driver and then gr-osmocomm so that you’ll be able to use the RTL tuner with gnuradio.
Written by Dan on Fri, Nov 19, 2010 at 1:35am
Filed under Linux
My Asus EeePC 1000HE netbook was recently upgraded from Ubuntu 10.4 to 10.10. The upgrade was smooth except for wireless which became extremely flaky.
The wireless connection would disconnect when I unplugged my laptop or woke it up when not directly connected to power. Attempting to disable and re-enable the wireless interface did not fix it. Even unloading and reloading the driver modules did not fix it. The only fix was to reboot.
The following two things are both required to fix wireless issues with the rt2860sta driver.
First, Ubuntu was loading unnecessary drivers for my wireless card. I addressed this by adding the following lines to: /etc/modprobe.d/blacklist.conf
blacklist rt2800pci
blacklist rt2800lib
blacklist rt2x00usb
blacklist rt2x00pci
blacklist rt2x00lib
It seems that these additional modules were interfering with the rt2860sta driver during wake up.
In addition I needed to have Ubuntu to unload and reload my wireless driver before and after going to sleep. This is done putting the following line in /etc/pm/config.d/unload_wireless
SUSPEND_MODULES="rt2860sta"
Note that the file name there is not actually important. The line just needs to be in a file in the /etc/pm/config.d/ directory.
Rebooting once after making these changes has solved the problem.
Written by Dan on Sat, Aug 14, 2010 at 9:59am
Filed under BBS, Linux
In setting up a yet to be announced BBS system I discovered that Legend of the Red Dragon does not work on Ubuntu 10.04 Server installation under DOSEMU. When I ran the config program LordCfg it would fail with the following error:
This version of LordCfg is not meant for your version of Lord
When running the start.bat script or lord.exe it would fail with this error:
# Firing Up LORD.OVR
# Using EMS for faster overlay swapping.
Internal error #38019
Cannot continue.
I did few preliminary searches for these errors on Google and finding only complaints about them. I contacted Gameport which currently distributes the game and they pointed me to an obscure link on the authors website which has a patch for this bug.
The url to the patch for this issue is: http://lord.lordlegacy.com/dosemu/
There is also single forum posting on the authors site about this issue as well but it lacks useful keywords to make it findable. That forum posting is here: http://lord.lordlegacy.com/phorum/read.php?5,196
Written by Dan on Tue, Dec 16, 2008 at 9:45am
Filed under iTunes, OS X
The recent post on TUAW about streaming your iTunes library over the internet inspired me to stop using SimplifyMedia and to roll my own solution. The downside was that I found that the software TUAW linked to did not consistantly work. Worse was that the Mac specific version of the application did not work on Leopard.
I compiled a fresh version of the application that works on Leopard. Its much nicer than the generic Java version. When you run it you’ll notice a new icon in your menu bar.

Click on it and you will be able to set up the hosts as they describe in the directions at TUAW.
Download RendezvousProxy for Mac.
Written by Dan on Tue, Oct 28, 2008 at 9:34am
Filed under OS X
TextMate makes sure that the project you are working on has an up to date file list. One of the ways that it does this is by scanning the directory tree of your project every time TextMate regains focus. This is usually good. However, when working with large projects or a project based on file server via NFS or CIFS, TextMate can take seemingly forever to actually regain focus when switching back to it from another application.
Luckily there is ReMate, which gives the ability to disable the project refresh feature. This option is added under the Window menu and also if you right click on any file inside a project there is a new menu item in there called Refresh All Projects.
Written by Dan on Wed, Oct 22, 2008 at 7:30pm
Filed under OS X
The newer Blackberry models all have media players installed on them out of the box. I recently started using a Blackberry Curve and wanted to transcode some of my podcast videos I download to watch on the bus.
ffmpegX handles this conversion well. You’ll need to use the following settings for the transcoded video to work on a Blackberry.
These are the important settings for the video to work.
- Video Codec: MPEG4 (MP4) (ffmpeg)
- Video Bitrate: 600–800 kbit/s (higher bitrates will lead to stuttering)
- Video Size: 320×240
- Autosize: 4:3
- Audio Codec: AAC (MOV/MP4/3GP)
- Audio bitrate: 96kbit/s
- Sampling: 44100Hz
To save everyone time, I saved these settings to a ffmpegX preset file.
Written by Dan on Wed, Oct 22, 2008 at 7:31am
Filed under Ruby
I generally code in python and am used to the default features of the ipython interactive python shell. One of the features that I use a lot is tab completion. It helps me locate method names and also just do exploration inside modules that are new to me.
Wirble is a gem for ruby that enhances the irb interactive ruby shell to have tab completion, syntax coloring, and a few other irb tweaks that I haven’t looked in to yet.
Its pretty easy to install wirble on most unix systems with ruby gem support installed:
gem install wirble
Then, add the following lines to your ~/.irbrc
require 'rubygems'
require 'wirble'
require 'irb/completion'
Wirble.init
Wirble.colorize
Next time you start up irb save typing using tab completion and relax your eyes using the syntax coloring.
Written by Dan on Mon, Oct 20, 2008 at 11:46am
Filed under Unix
We talked about port forwarding recently. This helps you get access to single resources but it requires a lot of planning and configuration. It would be pretty awesome if SSH had a proxy feature.
Lucky for us all there is the -D option for the ssh command. This option turns the ssh connection in to a SOCKS proxy on the remote server. The potential uses for this are huge. I often use this feature to gain quick access to my whole network.
Setting it up
superbox$ ssh -D 31337 someserver
Using it
To use this you will need to configure your applications to connect through the SOCKS proxy. Firefox is pretty easy to configure. The settings for the proxy live in the Preferences under the Advanced section in the Network tab. Click the Settings… button to bring up a dialog similar to the one on the right. Set the SOCKS host to localhost and the port to the one you chose when connecting.
Now that the proxy is setup you can test out that you’re proxy is working by visiting http://whatismyipaddress.com/ to check to see if it looks like you are accessing the site from a new IP address.
In the next installment of SSH Tricks we’ll talk about using ssh config files to save time and energy.
Written by Dan on Sun, Oct 19, 2008 at 9:57am
Filed under iTunes
This is apparently really old news however it was news to me a few days ago.
iTunes 7+ has an option for tracks to “remember playback position”. This feature is pretty handy for those 30 minute long progressive rock tracks and also for things like MIT’s OpenCourseWare.
It can be set in the Info for any item in iTunes. Right click on any item in iTunes and click Get Info or ⌘+i on a Mac. Under the Options tab in the Info box that shows you’ll find the Remember playback position option.
Written by Dan on Fri, Oct 17, 2008 at 9:17am
Filed under Unix
SSH is the ultimate tool for shifting bits around networks in a secure manner. This is the first of a series of articles on SSH tips. This article is all about the basics; as the tips progress, we will get trickier.
Overview
Port forwards are a way of mapping a TCP from one side of the ssh connection to the other. They are established using the -L and -R parameters to the ssh command. These stand for local and remote port forwards. A local forward takes a port on the local machine and connects it to an IP address and port from the remote machine. As you suspect, a remote forward takes a port on the remote machine and connects is to an IP address and port from machine you are connecting from.
Examples
You could forward port 80 from an internal web server to port 8188 on the machine you are connecting from. This is a sort of poorman’s VPN. You can gain access to resources inside your network via SSH local port forwards. After connecting to your gateway machine you would be able to access the web server at http://localhost:8188. To actually do this the command would look like this:
superbox$ ssh -L 8188:internalweb:80 homerouter
Another common use for this is securing VNC access. Many VNC servers offer the option to only accept connections from localhost. By combining this option with a ssh local forward you can create an encrypted VNC session. This would be done by doing:
superbox$ ssh -L 5900:localhost:5900 vncserver
Remote port forwards are much less common. Lets say you have a local web server running on your workstation and you’d like your friend to take a look at an error on a hot new web app. you’re developing. The catch is you don’t want to let them login to your machine to do a local forward to gain access to your server. In this case you could use a remote port forward like this:
superbox$ ssh -R 8188:localhost:80 untrusted-friend
Your somewhat trustworthy friend could then access your web server at http://localhost:8188.
In the next installment of this series we will reveal a way to make your SSH connection behave even more like a VPN.