Tuesday, October 28, 2014

Installing GNU Octave packages on Mac OSX

I had some issues installing packages for GNU Octave 3.8.0 on OS X Mavericks.  It seems a make file was not setup correctly in the octave folder.

pkg install <package_name> would fail

After searching around for a bit I came across the solution here:

http://lists.gnu.org/archive/html/octave-bug-tracker/2014-02/msg00691.html

The solution is replicated below:


edit /usr/local/octave/3.8.0/bin/mkoctfile-3.8.0 with the following:

> diff mkoctfile-*
53c53,54
< DEFAULT_INCFLAGS="-I$OCTINCLUDEDIR/.. -I$OCTINCLUDEDIR"
---
> #DEFAULT_INCFLAGS="-I$OCTINCLUDEDIR/.. -I$OCTINCLUDEDIR"
> DEFAULT_INCFLAGS="-I$OCTINCLUDEDIR/.. -I$OCTINCLUDEDIR
-I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include"


Thursday, October 23, 2014

Ubuntu 14.04 and RTL-SDR

Hello all -

Sorry for the long absence: It is mostly do to me starting to use OneNote to keep all my hard to find information together instead of using this blog.    It is a terrific program for keeping organized digital notebooks, and if you have a Surface Pro or other watcom compatible windows tablet, amazing for handwritten notes.

That aside, I started playing with my USB RTL-SDR with GNURadio again, and was surprised at how much easier it was to setup this time.  Previously I had to compile but the GNURadio and the RTL-SDR drivers myself, but now with Ubuntu 14.04 you can simply

sudo apt-get install gnuradio
sudo apt-get install gnuradio_dev
sudo apt-get install rtl_sdr

These commands will install all required to get started with the DVB-T2 receiver.

I ran into an issue where Ubuntu was autoloading a driver, giving an error when I would try and run an rtlsdr capture:

Found 1 device(s):
  0:  Realtek, RTL2838UHIDIR, SN: 00001096

Using device 0: Generic RTL2832U OEM

Kernel driver is active, or device is claimed by second instance of librtlsdr.
In the first case, please either detach or blacklist the kernel module
(dvb_usb_rtl28xxu), or enable automatic detaching at compile time.

usb_claim_interface error -6
Failed to open rtlsdr device #0.


lsusb showed...
Bus 002 Device 002: ID 8087:8000 Intel Corp. 
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:8008 Intel Corp. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 004: ID 0bda:2838 Realtek Semiconductor Corp. RTL2838 DVB-T
Bus 003 Device 003: ID 0b38:0010 Gear Head 107-Key Keyboard
Bus 003 Device 002: ID 192f:0416 Avago Technologies, Pte. ADNS-5700 Optical Mouse Controller (3-button)
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub


dmesg | grep dvb
[ 1326.816881] usb 3-6: dvb_usb_v2: found a 'Realtek RTL2832U reference design' in warm state
[ 1326.873974] usb 3-6: dvb_usb_v2: will pass the complete MPEG2 transport stream to the software demuxer
[ 1326.914525] usb 3-6: dvb_usb_v2: schedule remote query interval to 400 msecs
[ 1326.915830] input: MCE IR Keyboard/Mouse (dvb_usb_rtl28xxu) as /devices/virtual/input/input15
[ 1326.919675] rc rc0: lirc_dev: driver ir-lirc-codec (dvb_usb_rtl28xxu) registered at minor = 0
[ 1326.929266] usb 3-6: dvb_usb_v2: 'Realtek RTL2832U reference design' successfully initialized and connected
[ 1326.929302] usbcore: registered new interface driver dvb_usb_rtl28xxu

The hell!  Get off of my USB stick.  It isn't for you!  Let's temporarily remove it

sudo rmmod dvb_usb_rtl28xxu

Ah, there we go.  Capturing data.  This sequence will unfortunately need to be repeated overtime you plug in the RTLSDR, unless you permanently blacklist it in your mod probe file