Accessing your eBook collection managed by Calibre without Calibre Server

This post is about how I’ve been going about enabling access to my eBook purchases that are managed with Calibre without actually using the built in Calibre Server.  All of this is running on Linux, with my eBooks and Calibre Library sitting on a remote Linux File Share.

The reason that I’m not using the Calibre Server to do the distribution is because:

  1. I actually store all the eBooks and the Calibre database on a Linux file share that is then shared on my network using Samba.
  2. I use multiple computers to interact with that Calibre database (not at the same time).  They are all setup to open the database on the samba share.
  3. The file share is headless and does not have X installed

So to do this, the first thing I had to do was setup the directory on my file share and then setup samba to share it out to the network.  Once that was done, I then mounted the share on my client computer.  With that done, when I started Calibre for the first time, I just change the configuration to use the samba share directory.  Now whenever I open Calibre, all the eBooks and database files are now stored and shared internally on my file share.

Read more »

Subversion diff from url to local directory working copy

For some reason there is some bad information out there on comparing a local working copy in a branch to that of a subversion url.  In this case, I really wanted to know how far off this branch code that wasn’t commited is from the trunk.  To do that, you just need to use the ‘–old’ and ‘–new’ flags.

$ cd ./branches/one
$ svn diff --old=svn://server/Project/trunk --new=. > working.diff

Then all that needs to be done to update a branch of trunk to that is:

$ patch -p0 -i workingdiff.diff

My IOIO for Android is here

The IOIO for Android that I recently purchased has shown up!!!  I haven’t had time to play with it or even know much about how to start playing with it, but I will be figuring it out quickly.  If you’re not sure what it is, a quick description from their website is:

The IOIO (pronounced “yo-yo”) is a board specially designed to work with your Android 1.5 and later device. The board provides robust connectivity to an Android device via a USB or Bluetooth connection and is fully controllable from within an Android application using a simple and intuitive Java API – no embedded programming or external programmer will ever be needed!

So setup as it’s default use, it’s not using the new Google Open Accessory (ADK) protocol, which is what I really want to develop with once I get far enough along in Android programming and being able to do some prototypes on the board.  I figure once I get far enough along, that I’ll be turning on blinking LED’s, and from there the worlds the limit, even though I do know what I want the end result to be with it.

The bad news at this point is that the ADK firmware on it is still very beta.  Even to update the device, I need a PIC programmer capable of programming PIC24FJ128DA206.  So that means until it comes out of beta, I can’t use it for the ADK protocol or I ask some EE friends if they have one laying around.  Even if I take the friend route to update it to the beta, it still has the following problematic caveat:

Due to problems with the accessory library implementation (i.e. the Android OS code supporting the protocol) – the IOIO connection will not be properly closed when pausing (and exiting) your IOIO app. When the app is resumed (restarted) it will hang. The current workaround is to physically disconnect and reconnect the IOIO (or power-cycle it).

This is because of a problem in the Android OpenAccessory library preventing the app from gracefully closing the ADK connection. To work around this problem, detach and re-attach the IOIO when that happens (or power-cycle it). Another option is to force-close the app.

Not something that I would call usable in a real life situation.  Hopefully it does get resolved though.  At this point though, since my original plan is for a single use at this point, if all else fails, I’ll just use their implementation of the communication protocol for the initial project.  Either library I use in the end, both will be good learning experiences on making and developing for new accessories to work with Android.

DVR Software So Far

I am no where done tweaking with the software and trying to get everything working perfectly. This is just a post to document what I have done so far. Until I have a better internet connection, I will not be playing with streaming services such as Netflix and Hulu.

Operating System – Windows 7 Ultimate

I’ve decided to go with Windows 7 Ultimate. This version comes with Windows Media Center by default, which I will get into later. I know this is surprising to everyone that knows me, since it’s not Linux. The reason that I’ve done this is because Linux doesn’t allow the DVR to meet it’s needs. I wouldn’t be able to stream netflix or many other websites through boxee. In addition, it does come with DVR software for free that provides listings for free.

DVR Software – Windows Media Center (MWC)

I’m using Windows Media Center for the DVR software. It does decent, but is free with Windows 7 and comes with free listings. It does a good job of setting up with the tuner card. It allows for some plug-ins also. I haven’t spent much time trying to tweak it, but I need to find a way to modify the main menu to remove a lot of junk I don’t want. The movie section also leaves a lot to desire, as it does not break things down by folder and just displays all files it finds regardless of which folder it is in.

I have it setup so that when the DVR starts up, that WMC will startup in full screen. With this setup, there is no need for a mouse or keyboard.

Air Video

Air Video can stream videos in almost any format to your iPhone, iPad and iPod touch. You don’t need to copy your videos to the device just to watch them. The program runs in the background and starts automatically when the DVR starts up. With the recent Beta version of the server, it can stream the drm laden wtv format without having to convert them first.

My Channel Logos – MCE Plug-In

This is only a minor plug in, but it adds nice Broadcaster logo’s to the channel listings. It’s a minor touch, but a nice one.

Media Browser – MCE Plug-In

I use this for accessing, organizing, and viewing my shows on the remote server. If you loved how XMBC populated information about shows and movies, you will love this plug-in for watching all your backed up media. It will key off the title, download all the information about the media, and also pictures. Much better than the stock movie lister that came with WMC

Remote Potato – MCE Plug-In

I’ve used this for setting web access to the DVR. It allows for viewing the listings and setting up recordings using a web browser. It also allows you to stream already recorded shows to windows and os x web browsers that support silverlight. This doesn’t include the implementation on linux though.

A new feature that I haven’t had time to test out is streaming to iOS devices. I might try it out in the next couple weeks and update this post. Currently, it does not support native mode on the iPad.

Streaming Windows Media Center DVR Shows to the iPad

I had started this article out about how I use all these different applications, such as using MCEBuddy to convert videos to a non-drm stream on a nightly basis, save to a separate location, and then using Air Video Server to stream it to the iPad or iPhone.

So while I was getting the links together, I realized that Air Video Server now has a beta server out that does that all for you. Air Video now has the ability to stream the DRM WTV video format that WMC saves the shows in!

Software Used

Instructions

  1. Navigate to http://www.inmethod.com/air-video/index.html and there will a box announcement link in the top left of the page that there is a new Air Server beta. Click the box, which will take you to the forum to choose either Windows or Mac in the first post. Download the software and then install on your application.
  2. If the server hasn’t been started yet, start it now (either in task bar or going to applications). Under the “Shared Folders” tabl, click the “Add Disk Folder” button. For a default WMC installation, you should add the folder “C:UsersPublicRecorded TV”. At this point, if you have other video file locations (MKV, mp4, divx, avi), you can add those in there also. Now start the server by clicking the button at the top left. You are all done on the server side.
  3. Download “Air Video” from the App Store. Once you start up the app, click the “+” button and if you are on the same network as the DVR, the server should pop up. Just navigate to the shared videos and start. It’s that simple.

One of the additional benefits of Air Video is that you can also stream at a lower resolution from your DVR over the internet, but you will need to go to the Air Video Website for more detailed instructions on that.

Ubuntu 10.10 Grub Update for OS X

This article builds upon Triple Booting Windows 7, OS X (Chameleon), and Ubuntu 9.10 (Grub2).

I recently updated my desktop to Ubuntu 10.10 and noticed that the grub commands have changed ever so slightly. With the new installation, I just needed to create the /boot/chameleon/ directory again and copy the boot0 from Chameleon 2.0-RC4 into the directory.

One thing that I noticed is that the new grub script also presents 32-bit and 64-bit options for my OS X installation now, which I’m up to 10.6.3. I take care of loading 64-bit through chameleon though. Here is my new entry for loading OS X through Cameleon.

 menuentry "Mac OS X Chameleon (on /dev/sda2)" {
     insmod hfsplus
     set root='(hd0,msdos2)'
     search --no-floppy --fs-uuid --set 62d3496cb25b59d8
     parttool (hd0,2) boot+
     chainloader (hd0,msdos4)/boot/chameleon/boot0
}

Sometimes it doesn’t copy correctly, but it should be two hyphens in front of no-floppy, fs-uuid, and set

You can find your uuid of your partitions by running blkid.

My current partition setup is:

  • /dev/sda1: Windows 7
  • /dev/sda2: OS X
  • /dev/sda3: Swap
  • /dev/sda4: Ubuntu Linux 10.10

OTA DVR Equipment Build

I’ve decided to drop cable / satellite, and create a DVR that will record programming from over the air. This first entry is just going to outline the what I wanted out of the DVR and what equipment I purchased and why. The main intention is for a DVR, and not a gaming system. In the chance that I did decide I want to go that route, I tried to purchase equipment so that I would only need to purchase a video card to allow it to play games.

Requirements

  • Quiet. Should not be audible when watching tv
  • Stream online content
  • DVR over the air content
  • Stream shows and movies from home file server (NFS or Samba)
  • Should be able to play multiple containers and formats (xvid, divx, mkv, H.264)
  • No keyboard and mouse should be required for use

Hardware Purchase

  • Case: nMEDIAPC HTPC 1000B
  • Power Supply: SeaSonic S12II 430B 430W
  • Motherboard: ASUS M4A785TD-M EVO
  • Processor: AMD Athlon II X2 250 Regor 3.0GHz
  • Memory: CORSAIR XMS3 4GB (2 x 2GB) DDR3 (PC3 10666)
  • Hard Drive: Seagate SV35.5 ST31000525SV 1TB
  • Tuner: Hauppauge WinTV-HVR-2250 Media Center Kit

Note: I also purchased the LCD that goes along with the case, but after having used it, I would not have purchased it. It is too difficult to read at a distance and it is poorly made. I thought it would be cool to have showing time and what was playing and recording, but I have to get up close to the tv to see it.

nMEDIAPC HTPC 1000B
I was looking for a good case that would fit my media center stand. This case had the identical shape of my current audio receiver and even matched it’s dimensions perfectly. There is a front panel on the front that hides one IEEE 1394 port, one e-SATA port, two HD Audio ports, one SDHC 2.0 Card Reader and three USB 2.0 ports. It does not come with a power supply. You can buy an optional lcd for the front, but as I mentioned before, I would skip on purchasing it. A Micro ATX will fit in it. It has 1 5.25″ Drive Bays and 4 3.5″ Drive Bays, but you will only probably be able to use 2 out of the 4 3.5″ Drive Bays due to things getting to tight and reducing air flow. It has 2 60mm Fans in the back and 1 90mm Fan on the side which are very quiet. I’m very pleased with this case and would highly recommend to others.

SeaSonic S12II 430B 430W
This power supply is enough power for what I need. It’s also very quiet and has excellent reviews. Unfortunately, it is not modular, but I had no problem bundling up the extra cables and putting them in one of the empty 3.5″ drive bays.

ASUS M4A785TD-M EVO
This seems to be a good motherboard. The reasons that I purchased this one in particular is that it is a Micro ATX form, allows for DDR3 memory, has both a PCI Express 2.0 x16 and PCI Express x1 slots, has a integrated ATI Radeon HD 4200 GPU with 128MB DDR3 1333 memory, has a HDMI output, and a S/PDIF Out optical out.

The reason that I wanted both a PCI Express 2.0 x16 and a PCI Express x1 slot is for the tuner card and a future video card upgrade if I choose to upgrade it to a gaming system. The HDMI out is self explanatory and I really wanted a S/PDIF optical out so that I could hook it up to my receiver.

I wanted a motherboard with the integrated ATI Radeon HD 4200 so that I could offload the video decoding of the H.264 to the video card from the CPU. With this video card, I can watch every mkv that I have with no stuttering and very little cpu usage. I also don’t have to worry about the additional heat and fan sound from having a video card in the machine, and also the price of having to buy a video card.

The only downside to this motherboard is the bios settings. It’s hard to get it just right to get in there and the bios menu leaves a lot of wanting. It does horrible for setting boot sequence since if you want to boot from usb, a bootable usb needs to be in there to set it to boot from it in the order and it only works for that particular device. Luckily, you only need to mess around with the menu once.

AMD Athlon II X2 250 Regor 3.0GHz
I bought this cpu for two reason: 1) 65 watt tdp and 2) price per performance.

I could have bought a much nicer processor that runs cooler and faster, but then it would have increased the cost of the dvr quiet a lot. This is a dual core processor, for when I’m running multiple things at once, which every computer is doing anymore. It handles everything wonderfully and without stutter. It’s also powerful enough for doing the tv re-encoding and if I want to use it for playing video games in the future. The 65 watt tdp means that it uses less power and runs cooler. The fan that comes with it is very quiet also.

CORSAIR XMS3 4GB (2 x 2GB) DDR3 (PC3 10666)
Since DDR3 is dropping in price and is getting close to the cost of DDR2, I decided to go the faster route and get DDR3. There is no special reason I bought the CORSAIR, it was just on a very good sale when I found it. I decided to go with 4 gigs, because I planned on having multiple programs running at the same time and heard that if I wanted to run Boxee, that it was a memory hog.

Seagate SV35.5 ST31000525SV 1TB
I figured a one tb drive would be more than enough to use as a dvr, since I wouldn’t be storing anymore besides recorded tv shows on it. I made sure to stick with a drive that is 7200 RPM, even though the green drives (5400 RPM) run cooler and with less power consumption. In my mind, recording two shows at once while watching another show would probably tax a 5400 drive a little too much and have some stuttering. This drive had good reviews and was designed to be used for security cameras, which matches very closely to what I’m going to be using it for. In use, this drive is super quiet and I have no complaints with it at all. Beyond that, the reason I picked this one out of the other recommended DVR drives is that it was on sale.

Hauppauge WinTV-HVR-2250 Media Center Kit
I chose this card after viewing my friends DVR that had it in there. It just has wonderful picture. That card fits a PCI-Express x1 slot. The card is a dual tuner, which means you can either watch 1 show and record another or record two shows at once. The “Media Center Kit” edition comes with a remote and ir receiver.

Triple Booting Windows 7, OS X (Chameleon), and Ubuntu 9.10 (Grub2)

So wouldn’t you know it, my video card died and I decided to get around to installing Windows 7 and Ubuntu 9.10 at the same time.  Of course, installing Windows 7 took over the booter, then installing Ubuntu 9.10 took over the booter and did a great job at identifying Windows 7 and OS X.  In fact, it did too good identifying OS X.

The new version of grub2 is able to work directly with OS X to start it up natively.  Unfortunately,  I like to try to not patch OS X as much as possibly, so I use Chameleon, which grub2 was bypassing.  I don’t know what a beautiful solution is, but I do know what a working solution is.

OS with Loaders:

  • Windows 7 (Default Boot Loader)
  • Ubuntu 9.10 (Grub2)
  • OS X 10.5.6 (Chameleon 2.0-RC4)

The first step is to install OS X however you usually do it.  Once it is installed, I chose to upgrade to the latest version of Chameleon for some of the additional video card identification that it was able to provide.  All that requires is downloading from the link above and following the directions.  Before you reboot, copy the boot0 file to removable media.

The next step is to install Windows 7.  Once this is done, Windows has now taken over the boot system and you can no longer start OS X.

Finally, it is time to install Ubuntu 9.10.   Once the install has finished, it has taken over the boot screen and you will see entries for Ubuntu, Windows, and OS X.  The only issue is, if you try to start OS X, it will bypass Chameleon and start the kernel directly.

To fix this issue, make the directory /boot/chameleon and then copy the boot0 from the removable media into that directory.  Then add or update the OS X section to the following:

menuentry "Mac OS X Chameleon (on /dev/sda2)" {
        insmod hfsplus
        set root=(hd0,2)
        parttool (hd0,2) boot+
        search –no-floppy –fs-uuid –set 88e76bb6d81f12fb
        chainloader (hd0,4)/boot/chameleon/boot0
}

The “88e76bb6d81f12fb” is the uuid of the partition. You can find the uuid by:

# user@teh-lunix:~$ ls -l /dev/disk/by-uuid/

OS X and Truemobile 1940 Issues Fixed

I currently picked up a $21 Dell Truemobile 1490 wireless card to put in my MSI Wind instead of the Realtek that’s in it. It install just fine, I got it working in Windows and Linux with no issues, but OS X was another story.

It wouldn’t connect to a wireless network at all by itself. On the menu bar it wouldn’t show any wireless networks. It did show “AirPort: Not configured”. If I opened the network preferences, it would show up as Ethernet 2 off. I would have to turn it back on each time I rebooted. I would then have to select the drop down box to pick a network because it still wouldn’t show any networks in the menu bar (and the menu bar would still say not configured). I could join my network and get an IP address, but the menu bar icon would not show any bars at all. It would be right next to the access point and I could surf the net just fine though.

Thanks to a post at InsanelyMac, I was able to finally fix this issue.

  1. Open Network Preferences
  2. Remove all devices except Firewire by highlighting the device and then clicking on the minus sign below the device list
  3. Reboot the machine
  4. Open Network Preferences
  5. Click the plus sign under the device list and select AirPort
  6. Click Apply

Since doing that, my menu bar works, networks are connected to automatically, even after reboots.

MSI Wind and Triple Booting

So I just purchased an MSI Wind from Microcenter and have already removed all the OS’ from it. I’m planning on installing Windows XP, Mac OS X, and Ubuntu Linux. Like most of my laptops, things are just plug and play to get it working, so I have a page to help me remember how I did it at: http://james.jamesandkristin.net/setting-up-msi-wind-to-triple-boot-windows-mac-os-x-linux

So far it looks like it’s perfect for what we need. A nice little laptop that will fit in Kristin’s purse and that will fit in little safes on vacation. Luckily my friend had a usb to ide adapter, so I didn’t have to purchase an external hard drive. I had looked into making a usb boot disks for all three os’s and even looked at using netboot to install. Netboot would have been cool, but I don’t have that much time to get it setup for all three OS’s.

One important note, you need to install Windows XP before anything else.