Configuring Cradlepoint PHS300 for Blackberry on AT&T

I configured this for my Torch, I’m certain it will work on the Bold as well. Although not officially supported by cradlepoint, it does indeed work.

For starters, upgrade the firmware to the latest provided by cradlepoint. For me this was version 2.6.1. For the sake of brevity I am only going to cover the changes to make it work with the modem. I am not going to do the whole configuration (ie I am excluding lan configuration). Its pretty simple in the end …

Basic -> WAN
    password: cingular1
Modem -> Settings
    uncheck: Aggressive Modem Reset
    Access Point Name (APN): wap.cingular
    Modem Password: your blackberry screen password

Thats it, thats all I had to modify. For full configuration explanation for other carriers, and other possible troubleshooting tips go to cradlepoints site.

Posted in Tech | Tagged , , , | Comments Off on Configuring Cradlepoint PHS300 for Blackberry on AT&T

Creating a media pc with Gentoo and XBMC

I am using an old broken laptop I have (Samsung N130) to work as a media pc. Its hardware is fairly typical of laptops, and is fully supported by Linux. I like using System Rescue CD to install with, I’m presuming you already have a working knowledge of Gentoo.

  • Intel 915 Video
  • eth0 RTL8101E/RTL8102E
  • wlan0 RTL8192E/RTL8192SE
  • Intel HD Audio

Basic Setup

  1. Boot into System Rescue CD
  2. /etc/init.d/ntp-client start
  3. Follow the basic setup here, stop after the first reboot.
  4. Setup wpa_supplicant if you are using wireless
  5. emerge and setup ntp

Config Tweaks


USE="X gif jpeg png tiff opengl samba dbus gtk alsa aac mp3 wma 
     xvid win32codecs mpeg dvd ogg sdl vcd a52 flac gnutls"
VIDEO_CARDS="intel vesa vga"
INPUT_DEVICES="evdev keyboard mouse synaptics"
MAKEFLAGS="-j2 -l2"

media-tv/xbmc ~x86

dev-libs/libxml2 python
media-tv/xbmc alsa xrandr udev
sys-fs/udev extras
sys-auth/consolekit policykit
sys-auth/pambase consolekit

Install Packages

These 2 major packages pull in everything you need.

  1. emerge xorg-server
  2. emerge xbmc


  1. rc-update add alsasound default (make sure to unmute alsa)
  2. rc-update add consolekit default
  3. useradd -m -c “XBMC” xbmc
  4. usermod -G audio,cdrom,cdrw,video xbmc

Create ~xbmc/.xinitrc

exec /usr/bin/dbus-launch \
    --exit-with-session \

Create /etc/init.d/xbmc with the following, and add it to the default boot level

depend() {
        need dbus
        need consolekit
        need net
        after alsasound

start() {
        ebegin "Starting ${SVCNAME}"
        su -l xbmc -c startx > /tmp/xbmc.log 2>&1 &
        eend 0

stop() {
        ebegin "Stopping ${SVCNAME}"
        xbmc-send --host= --port=9777 --action="XBMC.Quit"
        eend 0

If you are using DRI, /usr/share/X11/xorg.conf.d/90-dri.conf
Section "DRI"
    Mode 0660

Create /etc/polkit-1/localauthority/50-local.d/custom-actions.pkla
[Actions for xbmc user]

Alternatively, for newer polkit versions, you’ll need to create a rules script /etc/polkit-1/rules.d/10-xbmc.rules
polkit.addRule( function( action, subject )
        if( subject.user == "xbmc" )
                if( "org.freedesktop.udisks." ) == 0
                        || "org.freedesktop.power." ) == 0
                        || "org.freedesktop.consolekit.system." ) == 0 )
                        return "yes";

That’s it! Reboot and your good to configure XBMC and watch movies!

Posted in Gentoo | Tagged , , , , , , , , , , , , , , , , , , , | Comments Off on Creating a media pc with Gentoo and XBMC

Hidden binary message on coyote creek trail

I came across this while I was out running today. Its on coyote creek trail next to Metcalf road. Its a binary message engraved into a piece of granite on the right side of the trail when heading south. I have been running on this trail for 4 years and I have never seen it before, however the county came through and cleared out the brush and it caught my eye while I was out.

Coyote Creek Trail Binary Message

The message isn’t anything fantastic, but just the fact that someone from the county (I presume) had the gumption to put this on a bike path heading through Santa Clara County is really quite cool.

The GPS Coordinates for this are N 37° 13.66′, W 121° 44.67′

I found this on Google …., however the binary does NOT decode to “Silicon Valley” 🙂

I emailed San Jose city who owns the website above, we’ll see if they fix the 2 typos (its not etched in 2 languages)

Posted in Uncategorized | Tagged , , , | Comments Off on Hidden binary message on coyote creek trail

Chocolate Stout

Chocolate StoutI brewed this once, this now includes pictures and some adjustments which will be my next brew attempt. I don’t have a good name for it yet, but I usually do that after I play with the recipe and make a couple batches. Even though this was my first batch, I feel it came out really clean with a really great taste. The chocolate wasn’t over powering, but on the next batch I think I will add some carapils for better head retention.


  • 6 pounds Briess Sparkling Amber DME
  • 1 pound Briess Caramel 80L
  • 1 pound Briess Organic Roast Barley
  • 1 pound Briess Organic Chocolate
  • 1/4 pound Briess Carapils
  • 2 oz Tettnang Whole Leaf Hops
  • 2 Packages Safale US-05 Yeast
  • 1 teaspon Irish Moss
  1. Mash grains in 4 quarts of water @ 165 dgrs for 30 minutes
  2. Rinse grains with additional 4 quarts of water at 155 dgrs
  3. Bring 10 quarts of water to a boil, add grain extract
  4. Add 3 pounds DME
  5. Boil 15 minutes
  6. Add 1 oz Tettnang hops
  7. Boil 30 minutes
  8. Add remaining 3 pounds DME
  9. Boil 10 Minutes
  10. Add remaining 1 oz Tettnang hops
  11. Add 1 teaspoon of Irish Moss
  12. Boil 15 minutes
  13. Cool off to about 70 dgrs, and fill water level to 5.5 gallons
  14. Pitch yeast!
Stout 12 hours after yeast pitched

Stout 12 hours after yeast pitched

  • OG: 1.063
  • FG: 1.020
  • ABV: 5.64%
  • IBU: 29
  • SRM: 50
Posted in Home Brewing | Tagged , , , , , , , , , | 4 Comments

Creating a threaded QObject in QT

There are times when you need a worker thread in QT, that is more then just fired off to do work and forget. In the past, I have derived from QThread, implemented Run() and did the work I needed to do and exit. But there are times where you want to create a thread that can interact with QT like the main thread, handling events and slots, and do so asynchronously without being blocked or blocking the main thread. The process to do this is really not obvious, but its a pretty slick setup that is new to QT 4.4, and from I can tell the documentation is lacking and still showing common practice in having the user derive from QThread.

The steps I usually take to do this is create my object (QObject or QWidget derivitive) that I want to thread, and make the QThread a member of that class.

class CWorker : public QObject
    explicit CWorker(QObject *parent = 0);
    virtual ~CWorker();
    QThread    * m_pThread;

My intention, is that I want my Worker object, that is going to be receiving events is going to live in the context of its member thread.

In the CTOR of CWorker, I setup the thread, and change the context of CWorker to this new thread.

CWorker::CWorker(QObject *parent) :
    m_pThread = new QThread;
    moveToThread( m_pThread );

In the DTOR, I allow it to exit the thread, join it back and then delete it entirely. The premise is that QThread, without overriding Run(),  calls exec() and allows for normal typical execution of the object and slots its monitoring. Calling moveToThread() moves the event handling from the global event loop into the event loop within the new QThread.
    m_pThread->exit( 0 );
    delete m_pThread;

So now, If I add a slot to CWorker, any code executed to that object will be executed on that objects thread. For example ….


class CWorker : public QObject
    explicit CWorker(QObject *parent = 0);
    virtual ~CWorker();
public slots:
    void SayHello();
    QThread        * m_pThread;

void CWorker::SayHello()
    qDebug() << "Er, Hello. My ThreadId is: ";
    qDebug() << QThread::currentThreadId();


void MainWindow::on_pushButton_clicked()
    qDebug() << "MainWindow ThreadId: ";
    qDebug() << QThread::currentThreadId();
    if( !m_pWorker )
        m_pWorker = new CWorker;
     QMetaObject::invokeMethod( m_pWorker, "SayHello", Qt::QueuedConnection );

I created a button on my mainwindow, that when pushed creates the worker thread on the first call (Lazy Instantiation). It then executes the method in its thread space via invokeMethod. The net result is code executing in two separate threads.

Starting /home/jimster/Foo/Foo...
MainWindow ThreadId:  3057285904
Er, Hello. My ThreadId is:  3055655792
MainWindow ThreadId:  3057285904
Er, Hello. My ThreadId is:  3055655792
/home/jimster/Foo/Foo exited with code 0

There I started the application, pressed my button twice, and then closed the application. I should refer to people who wish to read more on this subject to start at this blog entry from a QT author.

Posted in Software | Tagged , , , | 3 Comments

limbgomp causing cerr to segfault in perlxs

I was messing around with swig, its really a quite nifty. I wanted to see how simple it was to make a C++ library available to language of your choice, and really it is indeed quite simple. Everything was beautiful, until …

I hit a snag …

Whenever I sent data out cerr my application would segfault. Whenever I did _anything_ with cerr, my application would segfault. I googled like a mad man ….

Damn near identical, except with python. I did the _exact_ same work around with vaccine.i, and sure as shit that worked! WTF!

I started stripping off libraries (I have quite a few in my code), and killing ImageMagick did the trick. My segfault disappeared. So I started debugging what libraries ImageMagick was bringing in …

imaginos@rosebud /home/work/tools $ Magick++-config --libs
-L/usr/lib -lMagick++ -lMagickWand -lMagickCore -ltiff -ljpeg -lbz2 -lz -lm -lgomp -lpthread -lltdl
imaginos@rosebud /home/work/tools $

And I noticed libgomp, that bastard. Putting all that back except libgomp, and everything ran perfectly. Dropping libgomp back in, and segfault returned.

I googled some more ….

I tried the “solution” at the bottom …

imaginos@rosebud /home/work/tools $ LD_PRELOAD=/usr/lib/gcc/i486-pc-linux-gnu/4.4.4/ ./
some data from cerr
imaginos@rosebud /home/work/tools $

Damn, so It really is libgomp.

Unfortunately, as of right now, I have no fix for this. My only workaround is to compile ImageMagick without openmp support. I don’t need it, I don’t need ImageMagick to need it. I don’t need libgomp for anything else. The weird thing, is my laptop has a slightly more up-to-date installation of Gentoo, and its fine. Even with libgomp enabled. So there must be some other additional underlying issue that is causing this.


Posted in Gentoo, Software | Tagged , , , | Comments Off on limbgomp causing cerr to segfault in perlxs