Posts Tagged ‘technology’

Bluetooth DUN with BlackBerry 9700, T-Mobile and Ubuntu 9.10

Tuesday, December 29th, 2009

I just bought a new laptop (Thinkpad T500) but the only WWAN cards available built in were for either Verizon or AT&T, which is suboptimal as I use T-Mobile which uses the AWS UMTS bands (1,4,8) instead of the bands used in the US by AT&T (1,2,5,6). Since my Blackberry 9700 supports T-Mobile 3G as well as their implementation of UMA I decided to try to get the Bluetooth DUN working.

Bluetooth DUN, T-Mobile UMA

Bluetooth DUN, T-Mobile UMA

I was hoping that with 9.10, things would have progressed enough that I could pair the phone with the computer and let NetworkManager take care of all of the irritating tedious stuff. With my GPRS PCMCIA card this is basically the case, NetworkManager notices that it is a GPRS WWAN card, and asks me who my carrier is and connects just fine. Unfortunately this is not the case with Bluetooth. I can get the phone paired but for some reason it exclaims that this is not a GPRS modem and refuses to let me tell it otherwise, so I’m forced to go about this the hard way.

After much searching, this post got me the closest though recent changes either with the new OS 5.0 on the 9700 or T-Mobile’s network have made some tweaks necessary.

http://pegelinux.wordpress.com/2008/06/11/blackberry-curve-8310-as-bluetooth-modem-on-ubuntu-hardy/

I will not go into all the step-by-step details as it is covered above and elsewhere, but first you need to get your computer to bind to the Blackberry DUN service via Bluetooth, I chose to edit /etc/bluetooth/rfcomm.conf to make this happen automatically, but BlueManager also seems to be able to do the same thing with a much more friendly UI if you want to try that route, anyway you cut it, you need to have the DUN service show up as a /dev/rfcomm# device. Once you have completed that you will want to setup pppd(8) much like the above article suggests.

This resulted in a session that looked like the following for me:

mernisse@mernisse-laptop:/etc/chatscripts$ pppd call gprs
Press CTRL-C to close the connection at any stage!
defining PDP context...

OK

OK
waiting for connect...

CONNECT
Connected.
If the following ppp negotiations fail,
try restarting the phone.

Script /etc/chatscripts/gprs-connect-chat finished (pid 14835), status = 0x0
Serial connection established.
using channel 1
Using interface ppp0
Connect: ppp0 < --> /dev/rfcomm0
sent LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x5db98b32>
rcvd LCP ConfReq id=0x0 <asyncmap 0x0> <auth pap>
sent LCP ConfAck id=0x0 <asyncmap 0x0> <auth pap>
rcvd LCP ConfRej id=0x1 <magic 0x5db98b32>
sent LCP ConfReq id=0x2 <asyncmap 0x0>
rcvd LCP ConfAck id=0x2 </asyncmap><asyncmap 0x0>
sent PAP AuthReq id=0x1 user="mernisse-laptop" password=""
rcvd PAP AuthAck id=0x0
PAP authentication succeeded
sent CCP ConfReq id=0x1 <deflate 15> </deflate><deflate (old#) 15>
sent IPCP ConfReq id=0x1 <addr 0.0.0.0> <ms -dns1 0.0.0.0> </ms><ms -dns2 0.0.0.0>
rcvd LCP ProtRej id=0x1 80 fd 01 01 00 0c 1a 04 78 00 18 04 78 00
Protocol-Reject for 'Compression Control Protocol' (0x80fd) received
rcvd IPCP ConfReq id=0x2 <addr 169.254.1.1>
sent IPCP ConfAck id=0x2 </addr><addr 169.254.1.1>
rcvd IPCP ConfNak id=0x1 <ms -dns1 0.0.0.0> </ms><ms -dns2 0.0.0.0>
sent IPCP ConfReq id=0x2 <addr 0.0.0.0> <ms -dns1 0.0.0.0> </ms><ms -dns2 0.0.0.0>
rcvd IPCP ConfNak id=0x2 </ms><ms -dns1 0.0.0.0> </ms><ms -dns2 0.0.0.0>
sent IPCP ConfReq id=0x3 <addr 0.0.0.0> <ms -dns1 0.0.0.0> </ms><ms -dns2 0.0.0.0>
rcvd IPCP ConfNak id=0x3 </ms><ms -dns1 0.0.0.0> </ms><ms -dns2 0.0.0.0>
sent IPCP ConfReq id=0x4 <addr 0.0.0.0> <ms -dns1 0.0.0.0> </ms><ms -dns2 0.0.0.0>
rcvd IPCP ConfNak id=0x4 </ms><ms -dns1 0.0.0.0> </ms><ms -dns2 0.0.0.0>
sent IPCP ConfReq id=0x5 <addr 0.0.0.0> <ms -dns1 0.0.0.0> </ms><ms -dns2 0.0.0.0>
rcvd IPCP ConfNak id=0x5 </ms><ms -dns1 0.0.0.0> </ms><ms -dns2 0.0.0.0>
sent IPCP ConfReq id=0x6 <addr 0.0.0.0>
rcvd IPCP ConfNak id=0x6
sent IPCP ConfReq id=0x7 </addr><addr 0.0.0.0>
rcvd IPCP ConfNak id=0x7
sent IPCP ConfReq id=0x8 </addr><addr 0.0.0.0>
rcvd IPCP ConfNak id=0x8
sent IPCP ConfReq id=0x9 </addr><addr 0.0.0.0>
rcvd IPCP ConfNak id=0x9
sent IPCP ConfReq id=0xa </addr><addr 0.0.0.0>
rcvd IPCP ConfNak id=0xa </addr><addr 14.36.76.18>
sent IPCP ConfReq id=0xb
rcvd IPCP ConfAck id=0xb
Could not determine local IP address
Connect time 0.1 minutes.
Sent 186 bytes, received 120 bytes.
sent IPCP TermReq id=0xc "Could not determine local IP address"
rcvd IPCP TermAck id=0xc
sent LCP TermReq id=0x3 "No network protocols running"
rcvd LCP TermAck id=0x3
Connection terminated.

Sending break to the modem

PDP context detached
Script /etc/chatscripts/gprs-disconnect-chat finished (pid 14843), status = 0x0
Serial link disconnected.

As you can see, a number of Naks have been received for things that do not work and the connection fails. Tracking each error down step by step I removed noauth from the peers file and replaced it with user “” to force a null user-name in the PAP authentication. I also removed userpeerdns as it appears that the Blackberry was refusing to give it to me. The final piece was that I was hitting what I assumed to be a race condition, as the Blackberry did not have an IP address to give me yet, it kept sending ConfNak to me until it finished setting up the tunnel to T-Mobile on my behalf… (see inset)

Tunnel List

Tunnel List

To overcome this I had to up the ipcp-max-configure to accomidate, the default according to pppd(8) is 10 so I set it to 20. This, along with a few other tweaks allowed me to connect successfully.


mernisse@mernisse-laptop:/etc/ppp/peers$ pppd call gprs
Press CTRL-C to close the connection at any stage!
defining PDP context...

OK

OK
waiting for connect...

CONNECT
Connected.
If the following ppp negotiations fail,
try restarting the phone.

Script /etc/chatscripts/gprs-connect-chat finished (pid 15068), status = 0x0
Serial connection established.
using channel 12
Using interface ppp0
Connect: ppp0 < --> /dev/rfcomm0
sent LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x448e9c82>
rcvd LCP ConfReq id=0x0 <asyncmap 0x0> <auth pap>
sent LCP ConfAck id=0x0 <asyncmap 0x0> <auth pap>
rcvd LCP ConfRej id=0x1 <magic 0x448e9c82>
sent LCP ConfReq id=0x2 <asyncmap 0x0>
rcvd LCP ConfAck id=0x2 </asyncmap><asyncmap 0x0>
sent PAP AuthReq id=0x1 user="" password=<hidden>
rcvd PAP AuthAck id=0x1
PAP authentication succeeded
sent IPCP ConfReq id=0x1 <addr 0.0.0.0>
rcvd IPCP ConfReq id=0x1 </addr><addr 169.254.1.1>
sent IPCP ConfAck id=0x1 </addr><addr 169.254.1.1>
rcvd IPCP ConfNak id=0x1
sent IPCP ConfReq id=0x2 </addr><addr 0.0.0.0>
rcvd IPCP ConfNak id=0x2
sent IPCP ConfReq id=0x3 </addr><addr 0.0.0.0>
rcvd IPCP ConfNak id=0x3
sent IPCP ConfReq id=0x4 </addr><addr 0.0.0.0>
rcvd IPCP ConfNak id=0x4
sent IPCP ConfReq id=0x5 </addr><addr 0.0.0.0>
rcvd IPCP ConfNak id=0x5
sent IPCP ConfReq id=0x6 </addr><addr 0.0.0.0>
rcvd IPCP ConfNak id=0x6
sent IPCP ConfReq id=0x7 </addr><addr 0.0.0.0>
rcvd IPCP ConfNak id=0x7
sent IPCP ConfReq id=0x8 </addr><addr 0.0.0.0>
rcvd IPCP ConfNak id=0x8 </addr><addr 14.34.55.230>
sent IPCP ConfReq id=0x9 </addr><addr 14.34.55.230>
rcvd IPCP ConfAck id=0x9 </addr><addr 14.34.55.230>
replacing old default route to wlan0 192.168.196.1
Cannot determine ethernet address for proxy ARP
local IP address 14.34.55.230
remote IP address 169.254.1.1
Script /etc/ppp/ip-up started (pid 15070)
Script /etc/ppp/ip-up finished (pid 15070), status = 0x0
^CTerminating on signal 2
Connect time 4.7 minutes.
Sent 300422 bytes, received 1437245 bytes.
restoring old default route to wlan0 192.168.196.1
Script /etc/ppp/ip-down started (pid 15112)
sent LCP TermReq id=0x3 "User request"
rcvd LCP TermAck id=0x3
Connection terminated.

Sending break to the modem

PDP context detached
Script /etc/chatscripts/gprs-disconnect-chat finished (pid 15117), status = 0x0
Serial link disconnected.
Script /etc/ppp/ip-down finished (pid 15112), status = 0x0
mernisse@mernisse-laptop:/etc/ppp/peers$

Looking at the phone it appears that it snuck into Modem Mode and I was able to ssh around and perform the speedtest that adorns the top of this post. I used the gprs-disconnect-chat file unmodified from the post I linked to, but modified the gprs and gprs-connect-chat files which you can get by clicking on their names or looking at http://www.ub3rgeek.net/gprs/

Modem Mode, UMA

Modem Mode, UMA

Hopefully this will help someone get past this needlessly difficult hurdle and also enjoy wireless data anywhere in T-Mobile’s coverage area. Cheers.

Backups!

Saturday, December 5th, 2009

With hard drive capacity growing by leaps and bounds it is not uncommon for most people to have computers with several hundred Gigabytes worth of internal storage. While drives have gotten much more reliable the importance of good backups have only increased with more and more of our data being stored on our computers. Digital photos, movies, music, financial documents, e-mails, all live on our computers and could easily be deleted, or corrupted by user error, application faults, or a physical failure of a part in your computer.

Backups prevent:

  1. Data loss from computer error. (Operating System or Application Crash)
  2. Data loss from drive failure.
  3. Data loss from user error. (Accidental deletion, alteration, etc)
  4. Data loss from disaster. (House burns down, computer lost or stolen)

It is important to note that RAID systems ONLY address drive failures and should NOT be thought of as a backup solution.

My Goals:
I really like Time Machine. Apple did an AMAZING job with that application and bundled with the Time Capsule you get a really robust, high-capacity versioned backup solution that solves 90% of the problems that backups are supposed to solve. If you periodically copy your Time Machine backup to an external hard drive and store that at a friend’s house or in a safe deposit box or at the office, then you get 100% of the backup goals in a neat little package. You can even restore a Time Machine backup from the OS X restore CD. Slick.

Since I don’t run OS X I have to engineer a solution myself. I want a system that allows me to produce versioned backups on the network without much interaction. It must be encrypted on disk as my laptop’s /home is encrypted and storing the backup unencrypted would be a super-easy attack vector. Ideally the storage would be swappable so I can have 2 drives and swap it with an off-site drive periodically and so I could fairly easily restore the data to a new drive when the drive in my laptop (or the backup drive) scorches itself.

My Solution:

I have an old IBM ThinkPad R42 laptop that I’m not using for anything anymore so I tossed Ubuntu 9.10 on it and plugged it into the network. (I would use my server but I do not have any USB 2.0 ports on that machine currently.) I connected a 250GB USB hard drive to the ThinkPad and encrypted a partition using dm-crypt to store the backups and meta-data.

I then setup ssh on the ThinkPad to trust my ssh key from my laptop and I setup sudo(8) to allow my user to run rdiff-backup without entering my password. Combined with my backup.sh script, i can fire off a backup in the background from cron(8) that doesn’t really affect the performance of my laptop over the network.

I am a big fan of jwz and this is how he does backups.

13 years with Linux

Wednesday, September 16th, 2009

I first installed Linux from floppy disks back in 1996 on an old computer I had laying around. A friend of mine whom I knew through a local BBS had told me about this thing “Linux”, it was like Unix but for cheap Intel computers. I was amazed and after some tinkering I was also completely hooked. From that point I have always had at least one Linux machine running in my home. I got my mother to buy our first Internet connection with the promise that everyone in the house could use it, all thanks to Linux and this new thing called IP Masquerading.

That first Linux distribution was Slackware, a distribution by Patrick J. Volkerding which has always focused on simplicity, stability and having a sane collection of packages and defaults right out of the box. It is kind of like the OpenBSD of Linux if I was to try to make a really unnecessary analogy. Over the years my home server has always been Slackware, it was what I was the most comfortable with and it has never let me down. I even ran Slackware on my workstations up until a few years ago when World of Warcraft came around and I needed something a little more bleeding edge to get an X server with all the fancy direct rendering and 3d acceleration bits to make wine happy. I have trusted literally TeraBytes of data to Slackware and have not once been let down.

Over the last few days I have been struggling with a number of problems with my Sirius transcoder scripts. Between Sipie being unloved and requiring some work, and vlc being a royal pain sometimes I decided to upgrade my home server to Slackware 13.0. I have to start by saying i’m impressed with Slackware and the progress it has made over the years, a very small team (usually of one) has been able to make a stable, secure, reliable distribution for a very long time and the new version is no exception. And Slackware 13.0 is no exception to this rule, now bringing in amd64 support into the core distribution.

After a good 2 days of fighting the realization came that I just had to embrace, I have changed. The sad truth is that as with hardware I have come to expect software to Just Work(tm) and leave me out of it. I spend 60 hours a week wrestling with hardware and software in my job as a Systems Administrator for an ISP and I just don’t enjoy fighting it when I get home like I used to. My server acts as a media server for my PS3 so I can enjoy media content on my TV, a VOIP server for my home (I do not have a land line any longer) and hosts a number of status monitoring applications and stream recorders that I turn into podcasts for my private consumption. I need it all to just quietly work and cause me as little grief as possible.

So sadly it became time for me to go from loyal Slackware user for over a decade to full-on Ubuntu convert. We use Debian (and now Ubuntu) at work and I have been using Ubuntu in varying places since a friend of mine gave me a link in a chat pointing to what he promised was going to be a new Linux distribution that would change how people looked a Linux. It just made sense to convert, it meant I didn’t have to maintain 2 local mirrors anymore for security updates, I am much more comfortable with apt(8) and dpkg(8) and utilities like slapt-get(8) and swaret(8) are just kind of (very good) 3rd party hacks on top of the Slackware package management system.

It is amazing to see how far this dream has come, more and more I find myself quietly relying on various Free Software products to make my life simpler, easier and better and Slackware and Ubuntu have both been huge parts of that software stack. Thanks Pat, for 13 years of reliability, stability, security and sanity. Thanks also to Mark and Matt and the entire Ubuntu/Canonical gang for literally changing how thousands of people think of Linux. I converted my Mother a few weeks ago and have had less calls about the computer than I ever did with Windows.

BlackBerry SMS logger and site changes

Friday, August 21st, 2009

Firstly let me apologize for the mess, right now I have moved the WordPress installation to a standalone domain for back-end architecture reasons. There are redirects in place for most things but some things may be broken. Accept my apologies in advance for the inconvenience.

Secondly I have removed my old Gallery instance. I’ve been using Gallery 1 for ages because I don’t see a good reason to upgrade to Gallery 2 which I consider HIGHLY inferior due to the reliance on a RDBMS. As a replacement I have redirected all /gallery/ URLs to my Flickr page.

Thirdly, as a result of moving to Bazaar from CVS, much of the code that has been linked in previous entries is now over at repo.ub3rgeek.net.

Finally, for anyone with a BlackBerry that would like to get the SMS messages off the device so they can save the memory without losing the messages, or just to be able to use Unix tools to manipulate the messages I have written a small Python script which can be used, alongside the Barry Project’s btool program to extract the SMS messages to a set of files sorted by Phone Number of the person you are corresponding with.
You can get the script at http://repo.ub3rgeek.net/branches//top/bbtools/files. Feel free to let me know if you find it useful.

Revision Control Revision

Monday, June 1st, 2009

I’ve been using CVS for revision control for quite some time for a number of different things here, not the least of which being a public repository of scripts and miscellany that I have tossed into the Internet for public consumption. Recently I have started to feel the desire to change to one of the newer version control systems out there. Git and Hg smell a lot of ‘ooh shiny’ syndrome and we use Subversion at work so I was sort of naturally drawn towards Bazaar. It doesn’t help that I’m a huge fan of Canonical and Ubuntu, and as that seems to be the VCS du jour over there these days I figured that this would give me a good excuse to learn it.

The moral of this story as I’m sure no one cares why I chose which VCS is to say that any of the code hosted on my CVSweb and linked to in one of my previous posts is likely to have moved to the new loggerhead interface over at repo.ub3rgeek.net. If you happen to follow me on FriendFeed or watch the home page here, you will see updates from my bazaar commits as they happen.

Fancy, eh?

Processing my digital photos

Sunday, December 21st, 2008

I’ve finally gotten to the point where I HAD to do something about my digital photos. The ~/Photos/lumix folder has over 1100 images in it and it’s just painful loading it up anymore. Nautilus takes like 45 seconds just loading the thumbnails for the folder during which time the scroll bar is jumping all over the place making navigation impossible.

So here is how I finally made this work out in a really manageable way.
1) I wrote a Python script image-process.py that moves the image file to a place in the format of CCYY/MM_Month/CCYY-MM-DD_HH-MM-SS_Exif Make-Exif_Model.jpg, so a photo from my Panasonic Lumix called P1020411.JPG gets moved to 2008/12_December/2008-12-21_19-08-17_Panasonic-DMC-FZ7.jpg

2) Setup Gnome to run my script upon mounting of a device:
Under Ubuntu, navigate to System -> Preferences -> Removable Drives and Media then under the Digital Camera section I enabled “Import digital photographs when connected” and pointed the Command to my script using the %m macro and my script’s -d flag. This passes the location that Gnome mounted my camera at to my script as a directory and lets it do the rest.

3) My laptop is backed up periodically to an external hard drive, so all my photos are more or less safe, barring a catastrophic failure of both my laptop’s hard drive and the external drive.

I am hoping to get bbtrack working on my BlackBerry so I can save GPS tracks, then using the Exif Capture Date and the GPS track my image-process.py can geolocate the photos automatically. I’m sure I will post an update if I ever get that working.

I’d be interested to hear how other people solve this particular problem. Also any suggestions of a decent photo viewing application for Gnome that I can point at my directory hierarchy, that won’t go through and try to move the photos into it’s own crap like F-Spot does?

Why social networks are lying bastards.

Monday, November 17th, 2008

You’ve seen it I’m sure. Myspace purports “a place for friends”, Bebo says it “is a social media network where friends share their lives and explore great entertainment” and Facebook says it “helps you connect and share with the people in your life.”

They all are lying. Granted it may be a lie of omission, but that’s a lie just the same. What they are forgetting to tell you is that they are little islands of popularity that are only as useful as the percentage of your friends that they have already tempted onto their bosom. Which means that most of us are constantly taunted to join up to one or more of them to connect to our friends, and we can’t shake the nagging feeling that we’re missing out on re-connecting with what’s-her-name, the cutie you snogged back in grade 12 and have been wondering about lately when the lights are low. And pretty soon my friends we have 2 or 3 or 12 different sites maintaining lists of our ‘friends’ with varying (infuriating in some cases) levels of overlap and omission.

Everyone claims the web 2.0 is all about communities and openness and sharing and blah blah blah lies. What we really have is a bunch of people who see what they think is a problem. And they have this grandiose idea of how to organize us and the stream of information we generate daily into useful and manageable pieces. Granted some of these apps work great, but the problem is that they all either seek to lock your entire online world into their framework, or do one thing really well… but only that one thing. The sheer hubris of FaceBook and MySpace trying to lock your friends, and pictures, and videos all up inside their walls is staggering and yet the omission of anything other than the one thing that Flickr of Vimeo does leaves them somewhat lacking. Someday, probably soon; someone will come invent something better than whatever the social network site du-jour is and users will go running abandoning their old profiles to become husks as a snake shedding its used skin. That is life in the big bad void. MySpace becomes GeoCities becomes Prodigy and the cycle repeats.

What I want to see some pervasive, accepted way of having one giant friend list that is bound to me that I take from site to site so I don’t EVER have to rebuild it (or worse: harass my friends to join the new hotness so I can ‘friend’ them.)

I don’t care what it is under the covers be it FOAF, or XFN, or some other thing that someone else invents, or hell all of them. I just want one goddamn friend list that I can take everywhere.
Granted this means something like XFN is going to have to get into bed with something like OpenID, but damnit the technology is there and wouldn’t you rather keep all these little husks of Internet identities all tied together and relevant?

I started thinking about this a little while ago and was set off by an update by jwz on his livejournal. My irritation at this phenomenon became even worse when I started to organize all the profile pages I had out there. It is getting so cluttered that most of the information out there about me is old, unloved and abandoned.

Something really needs to be done.

PS, you can follow me on:

to name a few…

twitterpy and lastfriends

Tuesday, October 21st, 2008

I keep forgetting to write something about these guys. I wrote a pair of Python scripts to watch my Last.FM and Twitter friends and pop up a little bubble when something new happens.

There are Ubuntu packages available in my PPA over on Launchpad for both of these guys that should work just fine on 8.04, and hopefully will be updated to 8.10.

For those of you not using Ubuntu, my CVS repository has the scripts themselves that you are welcome to try out.

~mernisse’s Launchpad PPA
my CVS web interface

Mutt and Google Calendar

Monday, October 20th, 2008

I’ve been meaning to throw this out there for a bit. I wrote a little python shim to connect mutt to Google Calendar. My particular use-case is as follows. I use fetchmail to connect to a Microsoft Exchange Server at work which delivers mail into an IMAP account that I check with mutt. Appointments and conference calls show up as .ics files attached to messages. I use Google Calendar connected to my BlackBerry to keep track of all the stuff I do so I need a quick and easy way to get those events out of mutt into my Google Calendar.

Enter ics-gcal.py.

I associate this script to the ics / vcs files and simply exec the attachment from within mutt. This adds it to my Google Calendar.

You can find the script in my CVS web repository.

I’d be super interested if anyone else finds this useful.

Sirius Radio on my PS3? Yes Please!

Friday, October 3rd, 2008

So it looks like the svn version of mediatomb (which will become 0.12.0) now supports streaming PCM audio to the PlayStation(R) 3! This is super good news. So I went and updated my Python shim between Sipie and Mediatomb to output PCM.

You can get mediatomb-sirius.py from my CVS repository by visiting this url:

http://bagend.ub3rgeek.net/cgi-bin/cvsweb.cgi/misc-scripts/mediatomb-sirius.py

Once I have the config sorted out, I will post more.

Edit:
I got FLAC streaming working, and shot a quick video of it in action.


Showing off Mediatomb transcoding FLAC to the PlayStation 3 from Matthew Ernisse on Vimeo.

Edit 2:
I got the sirius stuff working finally, had to overcome a few really annoying behaviours of all the bits involved, but it seems like it is working pretty well. You can head on over to the http://www.ub3rgeek.net/wp/sirius-on-the-playstation-3/ page for more details and another video.

Things I demand…

Monday, September 22nd, 2008

Dear Roku / Sony
Hulu.com support now please. If the PS3 gets it first I may still buy a Roku box once NetFlix has a better selection of stream-able movies. Though if the Roku box gets Hulu first I’d buy the thing RIGHT NOW. And while I’m ranting, Sony, you still have to address all the other things I bitched about

BBC iPlayer Guys:
I would subscribe to get access to iPlayer right now. Please figure out a way to take my money!! I would also like PS3 streaming akin to the Wii one, it shouldn’t be hard, the dude at PS3 iPlayer made it work.

Also: a pony.

BlackBerry reboot loop :(

Friday, June 13th, 2008

So last night I went and cleaned a bunch of stuff off the crackberry, like midpssh, which the 7100t is too slow to really use, and a few advanced themes (like the Dimension Zen theme) which were also slow on the 7100t. I rebooted to finish the removal and the crackberry went into a reboot loop. Terrified that I had hosed the system up big-time I tried to recover it using the awesome howto on crackberry.com (http://crackberry.com/blackberry-101-lecture-12-how-reload-operating-system-nuked-blackberry). Unfortunately vmware-player on linux takes too long to detect the USB device that I couldn’t interrupt the boot process and re-flash the device. Thankfully vmware on the Mac was quick enough to blow the OS back on.

Now to restore all my settings and themes…

Roadrunner and IPv6?

Sunday, June 8th, 2008

So I was at my buddy’s house and he has Roadrunner hooked up to an Apple Airport Extreme and I just noticed that my last login to my colocated server at the Frontier CyberCenter was from a IPv6 IP. The EUI-64 part matches my laptop’s MAC address. The prefix isn’t familiar to me. It was: 2002:4a4a:ca8b:0:213:2ff:feba:83cc

Is Roadrunner quietly rolling out IPv6? It would explain why my ssh(1) connections were flaky.

Edit:

Screenshot ftw.OSX IP Control Panel

Transclusioning Images without permission is bad, mmmkay?

Tuesday, May 20th, 2008

Why do people think that it is ok to steal my bandwidth to host images for them? I guess this internet thing must be free.

Another dork thought it was a good idea to use an image off my website in their forum profile. http://forum.dzmusique.com/discussion-generale/se-separer-a-cuase-du-voile-t1298.75.html

Not only that, but it happened to be a 1280×1360px image that was being sized down to 100×100 by the forum, so each page hit was 350kb of data off my server. Thanks dude, how about instead you get a 680byte .gif called “i-suck-balls.gif”

i suck balls

For those interested, the following code block is responsible for this. Thanks apache and mod_rewrite:


RewriteCond %{HTTP_REFERER} habboxforum\.com [NC,OR]
RewriteCond %{HTTP_REFERER} forum\.dzmusique\.com [NC]
RewriteCond %{REQUEST_URI} !^/images/i-suck-balls.gif [NC]
ReWriteRule .*\.(gif|jpg|png|jpeg)$ http://www.ub3rgeek.net/images/i-suc
k-balls.gif [L]

Why the computer should think for you.

Thursday, April 24th, 2008

I am tired of thinking for the computer. So instead of having to learn the gritty irritating useless internal details about every single piece of software I need to use I think it makes more sense to have a set of sensible defaults that work for as much of the user base as possible and then if need be allow customization away from the defaults to encompass the rest of your potential users.

A few (4?) years ago I wrote a RSS feed reader because I wanted to think for the computer and didn’t like any of the readers out there at the time. Similarly I have found myself writing things instead of using software that is out there for trivial tasks because the software that was out there was too infuriating, or complex, or just broken by design.

Working, as I do now, in an environment that needs to scale beyond that of the typical open source geek I find the short-sighted-ness of much of the community depressing. So much otherwise good software is written to ’scratch an itch’ and is only engineered to work in the author’s basement. Scaling to a million users and many tens to hundreds of megabits/sec of traffic in a lot of cases is a huge headache where we have to work around shortcoming after shortcoming.

As such I’ve started to look for services that do most if not all of the work for me that I can just tap into and think less. The front page of www.ub3rgeek.net is a perfect example. That is 30 or 40 lines of python using the FriendFeed API to aggregate all the various stuff I do on the internet down into one easily manageable stream of data. I don’t have to think about sorting the RSS feeds, or tracking down the links, I just parse some standardized markup from FriendFeed and I am done.

More software needs to be written with the understanding that the user doesn’t want to have to think, that’s why we use the computer.

PlayStation 3 with MediaTomb on Linux and OpenBSD

Thursday, April 17th, 2008

I have posted a few journal entries on this subject, but this page is here to be sort of a more general overview. There is some detailed information in these posts if you are interested.

  1. How to make the Playstation 3 co-exist with Linux and OpenBSD
  2. More Playstation 3 Media Fun

Nat Type 3
I run an OpenBSD router, and some port forwarding needs to be done to make sure that the PlayStation 3 can properly communicate with the internet. I have verified the following works for WarHawk, including voice chat, as well as the PlayStation Store, and the voice chat built into the XMB.

Allow Outbound (only necessary in some cases with extremely restrictive firewall rulesets)
TCP: 80, 443, 5223 and UDP: 3478, 3479.

Port Forward inbound
TCP: 9293 and UDP: 3658
TCP/9293 is the port for Remote Play, and 3658 is for other users to connect to you. If you do not forward 3658 you will get the dreaded NAT Type 3.

Media sharing with MediaTomb
Since MediaTomb is the only Linux UPnP media server that I have found that can do transcoding I have been using it for some time now. It is highly configurable and fairly stable. I tend to track the SVN version fairly closely, but now that 0.11.0 is out the transcoding features are available to anyone. Most of the new transcoding features are really well documented on the MediaTomb site, so I won’t reproduce my entire config here, but my transcoding stuff looks like:

  <transcoding enabled="yes">
     <mimetype-profile-mappings>
        <transcode mimetype="video/quicktime" using="vlc-sh"/>
        <transcode mimetype="video/x-matroska" using="vlc-sh"/>
        <transcode mimetype="video/mp2p" using="ffmpeg-sh"/>
        <transcode mimetype="video/ogg" using="ffmpeg-sh"/>
        <transcode mimetype="video/mp4" using="ffmpeg-sh"/>
        <transcode mimetype="video/avi" using="ffmpeg-avi"/>
    </mimetype-profile-mappings>
    <profiles>
        <profile name="ffmpeg-sh" enabled="yes" type="external">
            <mimetype>video/mpeg</mimetype>
            <accept-url>no</accept>
            <first-resource>yes</first>
            <agent command="/staff/mernisse/bin/ffmpeg-tr" arguments="%in %out"/>
            <buffer size="6144000" chunk-size="131072" fill-size="2048000"/>
        </agent></profile>
        <profile name="ffmpeg-avi" enabled="yes" type="external">
            <mimetype>video/mpeg</mimetype>
            <accept -url>no</accept>
            <first-resource>yes</first>
            <agent command="/staff/mernisse/bin/ffmpeg-tr" arguments="%in %out"/>
            <buffer size="6144000" chunk-size="131072" fill-size="2048000"/>
            <avi-fourcc-list mode="ignore">
                <fourcc>XVID</fourcc>
                <fourcc>DIVX</fourcc>
                <fourcc>DX50</fourcc>
                <fourcc>WVC1</fourcc>
            </avi>
        </agent></profile>
        <profile name="vlc-sh" enabled="yes" type="external">
            <mimetype>video/mpeg</mimetype>
            <accept-url>yes</accept>
            <first-resource>yes</first>
            <agent command="/staff/mernisse/bin/vlc-tr" arguments="%in %out"/>
            <buffer size="6144000" chunk-size="131072" fill-size="2048000"/>
        </profile>
    </profiles>
  </transcoding>

Some notes about that config:

  • I transcode MP4 – You may not have to if your MP4 files are all playable on the PS3, I would try it out without first and then transcode if necessary. I have more files that don’t work than files that do.
  • Audio transcoding doesn’t work right now on the PS3 – A number of weird things that the PS3 does is keeping this from working, hopefully the MediaTomb guys will nail it and make it work, it sounds like the on the horizon ‘built in transcoding’ might fix this issue, but that is still a bit off.

The MacBook bites it

Tuesday, April 15th, 2008

So last week I get to work and the MacBook’s LCD backlight doesn’t turn on. An trek to the Apple Store confirms that it is in fact broken and not something loose that they could fix in the store. So they tell me to go home, back it up and call AppleCare so I can get a prepaid shipping container and label to send the thing back in. The good news — Ubuntu 7.10 appears to have hfsplus support built in so I just booted the MacBook in Firewire Target mode (hold t down while you power the thing on) and was able to copy all my crap off.

I called AppleCare and amazingly was spared most of the usual tech support pain. They looked me up in their system and saw that I had in fact seen a “Genius” and opened me up a case so I could return the unit for service. All told I was without the laptop for a week.
Monday – Go to Apple Store, call Apple Care.
Tuesday – Receive prepaid shipping carton, pack MacBook.
Wednesday – Schedule pickup with DHL, carton ships.
Thursday – Apple gets, repairs and ships my MacBook
Friday – Receive Doortag — This kind of sucks, I hate door tags, I really wish people would stop assuming that no one works and is home all the time.

Monday – Receive MacBook.

All in all a good experience, Kinda wish the Retail Store was a little less useless but I can understand that they may not be stocked for such things.

Fixing Kruft

Sunday, March 23rd, 2008

This internet thing is really taking off. A short 11 years ago I found my first mp3 files, this new format along side the Real Media .rm files of the day on a bootleg Nine Inch Nails site. I spent hours dowloading these 3 and 4 meg 128k mp3 files of albums I couldn’t afford, over a 14,400bps (no K, nor M for all you web 2.0 generation kiddies) dial-up link. Waiting literally HOURS for each file. At some point in the early 2000’s my mp3 collection broke 20GB and I was forced to buy an even bigger hard drive just for my media, because Windows, Games, and my mp3 files just were getting to cramped and too hard to backup on my one internal 30GB hard drive.

Then came video. My media server swelled from 30G to 182G (6×36.4G FC hard drives RAID5) to 250G to 690G (4×250 RAID5). Now, my video collection has broken 400GB and I’ve moved up to a 1.5T (3×750GB RAID5) RAID array.

I guess instead of deleting things, I just decided I will continue to grow my storage capacity.
Pictures for the interested are over at Gallery -> Everyday Everything -> Equipment Pictures -> Apollo (1.5T Array Build), and for anyone who has a Tyan Tiger MP (AMD 790-MP, S2460) motherboard who needs to figure where the hell Tyan hid the docs so you can plug in your front panel LEDs, the pinout refs are in the user docs at ftp://ftp.tyan.com/manuals/m_S2460_103.pdf or you can find them attached to this post (if Tyan moves / finally deletes them)

S2460 Manual

Now, hopefully I can go back to not having to fight with computers at home for a while. I have so stopped enjoying it as much as I used to. I guess that’s the drawback of turning your hobby into a profession.

catch up if you can

Tuesday, March 18th, 2008

The last week or so has been pretty crazy. I booked my travel for my England/Scotland trip on Sunday, so I will be flying from ROC to EDI on 27 Oct, and then back from LHR to ROC on 3 Nov — just in time to vote in this year’s presidential election. I also converted one of my laptops to use dm-crypt for /home. Clearly this is not perfect and if someone wants to come and snatch the laptop while it’s on and snarf a copy of the RAM to find the key they’ll get the data, but that is a smaller subset of people than who would be able to get data off the machine without encryption. If you use Ubuntu of a recent version, I found the community docs here helpful. The system prompts me for a passphrase at boot now, all automagically. A real testament to the Ubuntu guys and all the work they do.

I have also been playing around with the new release of mediatomb and have been futzing with the new fourcc features to try to get the largest subset of avi’s working on my PS3 that I can — it doesn’t detect the audio type so there are still some that don’t work, and there is still that freaky glitch where Dattebayo encoded fansubs either don’t play at all or freeze after a few seconds. My PS3 transcoding profile now looks something like this:

<profile name="ffmpeg-avi" enabled="yes" type="external">
<mimetype>video/mpeg</mimetype>
<avi -fourcc-list mode="ignore">
<fourcc>XVID</fourcc>
<fourcc>DIVX</fourcc>
<fourcc>DX50</fourcc>
<fourcc>WVC1</fourcc>
</avi>
<accept -url>no</accept>
<agent command="/staff/mernisse/bin/ffmpeg-tr" arguments="%in %out"/>
<buffer size="6144000" chunk-size="131072" fill-size="2048000"/>
</profile>

So basically I transcode any AVI files other than DiVX 4, 5 XViD and VC1 video streams. I will have to adjust this a bit but until I find a command line app that can read the fourcc code without needing X11, that’s going to be somewhat tricky I think, it would be nice if they offered the ability to filter by filename / pathname regexes as well, maybe I’ll open a feature request.

In other news (related to the PS3 and mediatomb because that’s what I use to watch this stuff since I’m too cheap to pay for cable/sat) the Formula 1 season started last weekend. I can’t wait to see how this season turns out. The three-way grudge match between Alonso, Räikkönen, and Hamilton will be killer to watch, not to mention the up and coming challanges from the Red Bull & Toro Rosso teams as well as Honda and Super Aguri. Another exciting year begins!

Goodbye GoDaddy

Sunday, March 9th, 2008

So, for a while I’ve been less than impressed with GoDaddy. Not withstanding their asinine behavior suspending names at the drop of a hat without informing the registrant, their website is utter crap, cluttered and unusable. Since my domain name is about to expire, I have started the process to transfer it to gandi.net — a european registrar that is much friendlier, with a much nicer and easier to use webiste. So please forgive any whackyness over the next day or so, hopefully the transfer will go smoothly and nothing will break.

Back to watching Ukie play Super Smash Brothers Brawl!