Thursday, December 15, 2011

Hulu Plus, Netflix, and Other Streaming Video Content on the TouchPad

Disclaimer: This post isn't an outline of a clever hack to get Hulu Plus and Netflix working on the TouchPad. It discusses using the TouchPad in conjunction with an application called PlayOn that runs on Windows. Just wanted to let you know what you'd be reading about so you could bail now if you're not interested in this solution, but if you're not familiar with PlayOn I encourage you to keep reading--it's pretty slick!
One of the major holes in webOS and the HP TouchPad is the lack of video streaming apps such as Hulu Plus and Netflix. Not a problem since you can just go to Hulu and Netflix in your browser, right?
Wrong. Netflix uses Microsoft Silverlight (hopefully not for long) and therefore won't work on the TouchPad, and Hulu for some inexplicable reason actually blocks video from playing in the TouchPad's browser, even though unless I'm missing something it would be perfectly capable of doing so.
So what's a TouchPad-using streaming video junkie to do? I'll cover some native applications like Video Flood HD and BHomePro that handle different types of streaming in a future post, but until someone writes a native Hulu Plus or Netflix app (not sure if Hulu or Netflix would even allow a third-party app to be written), your'e kind of out of luck. For TV content sure, you can try going to the individual network web sites but that's a hassle and is a bit hit or miss, just as it is on a computer.
One of the rules of computing is that all problems can be solved by another level of indirection, so that's what we'll be applying here. The TouchPad can't play Hulu Plus and Netflix content directly, so what we need is something that can play Hulu Plus and Netflix content that the TouchPad can leverage.
Thankfully that something exists, and it's a little Windows application called PlayOn. The long and short of PlayOn is that it's an application that runs on a Windows box that exposes all sorts of online video content--including Hulu Plus and Netflix--both as DLNA and, if you enable the mobile option in PlayOn's settings, via a web browser on any device. (As an aside, being able to run PlayOn with my Moxi is the sole reason I have a Windows box sitting in my basement, but it's proven itself a nice little app to have for many other reasons.)
Now there are indeed native DLNA apps for the TouchPad and they work quite well, but the nature of DLNA in combination with the video formats supported on the TouchPad unfortunately mean that PlayOn can't stream video to the TouchPad via DLNA. (You can read a bit about the issue on the PlayOn forums.)
All this is a rather big lead-up to a pretty simple final solution, but it's a nice one nonetheless. With PlayOn running and with the mobile streaming option enabled you can browse to from either inside or outside your network (or there are also native Android and iOS applications) and access all of what you have in PlayOn, which includes Hulu Plus and Netflix. (This is probably obvious but just in case it's not, you do have to have Hulu Plus and Netflix accounts in order to use these services with PlayOn.)
PlayOn also supports Amazon Video On Demand. I didn't mention Amazon previously because you can watch Amazon VOD in the TouchPad browser, even in full screen, so strictly speaking you don't have to use PlayOn to watch Amazon content on the TouchPad. The organization and navigation of the Amazon content is better on PlayOn than in the browser, so you have the option of going either way here.
In addition to Hulu Plus and Netflix (and Amazon), PlayOn has numerous other channels such as CBS (and much of their content isn't on Hulu Plus--think Big Bang Theory), numerous sports networks (NFL, MLB, NHL), SyFy, Comedy Central, Crackle (check the PlayOn site for the whole list), and all this content can be accessed on the TouchPad.
The other cool thing about PlayOn is that it's scriptable so there are numerous community scripts available as well. This is where the indirection really pays off because if it works on PlayOn, it'll work via the mobile site for PlayOn in the TouchPad browser.
So there you have it--call it a crutch or a cheat if you want, but via an inexpensive Windows application you'll have access to Hulu Plus, Netflix, and a ton of other content on your TouchPad.

Upgrading the HP TouchPad to webOS 3.0.4

If you follow me over on Google+ you'll know my latest favorite gadget is my HP TouchPad. I absoultely love webOS and think it's the greatest mobile OS on the planet (seriously), and the TouchPad hardware is exceptionally well built and polished. I have numerous tablets now (iPad 1, Kindle Fire, Nook Tablet, and the TouchPad) and the TouchPad is far and away the one that's most enjoyable to use. (In case you're wondering, the Fire would be #2, Nook Tablet #3, and iPad somewhere down in the "why the heck would I ever use that thing" range.)
If like me you were lucky enough to nab one of these beauties before they were all gone, you may find that you're running an old version of webOS and even if you go to System Updates it tells you you're running the latest version. In my case my TouchPad was on version 3.0.0 and it said I had the latest, but my brother (from whom my TouchPad was a gift) said his is stuck at 3.0.2.
While I can't tell you the why behind it not updating via System Updates, luckily many people have documented how to update the TouchPad to webOS 3.0.4 by using a tool called webOS doctor.
The step-by-step instructions I used can be found here, but I thought I'd document my experience since I ran into a couple of things they didn't cover there and had to hunt around a bit to find some answers.
1. Download webOS Doctor To a Windows Computer
If your TouchPad is brand-spanking new and you haven't already gone through the initial setup and created an HP webOS account, make sure to do that first since you need to log into your webOS account to download webOS Doctor.
After you have your webOS account created, log into it on your Windows computer (not from the TouchPad) and at the bottom of the screen after you log in you'll see your device listed. Click the "Device Options" and in the little menu that pops up, click on "Get webOS Doctor." This downloads a Java WebStart application to your computer.
Note that you can download this file to any machine but you need to actually run it on a Windows computer, at least that's what I gathered from the various posts I read about doing this upgrade, as well as the fact that when I ran webOS doctor on Linux (LinuxMint 12 64-bit specifically), the application ran fine but it didn't detect the TouchPad when I plugged it into the computer. Part of the installation process for webOS Doctor also seems to run Windows-specific .exe files so just resign yourself to running the application on Windows. (I didn't try this on my Mac, so if that works and someone can confirm that'd be good info to have.)
2. Run webOS Doctor On a Windows Computer (and Related Steps)
Very important step on the Windows computer on which you're going to run webOS Doctor: you need to disable the power saving on your USB ports. I skipped this step and whaddaya know, I had problems. On Windows 7 you can hit the Start button and type "device manager," and once you're in there expand the "Universal Serial Bus Controllers" section. For each "USB Root Hub" you see listed, right click on it and select "Properties," go to the "Power Management" tab, and uncheck the box next to "Allow the computer to turn off this device to save power."
If you don't make these adjustments on your USB ports you may find (as I did) that the port disables during the OS installation when the TouchPad disconnects. Not a good thing.
Another small detour before we run webOS Doctor--if you don't have Java installed on the Windows machine on which you're going to run webOS Doctor you'll need to install Java as well. Go to the Java web site, grab the appropriate version for your machine, and install it before proceeding. I grabbed the full JDK for 64-bit Windows 7 but the JRE or possibly even just the browser-based plugin should do the trick.
With Java installed you should be able to simply double-click the webOS Doctor file (the .jlnp file you downloaded) and have it run. If it doesn't for some reason you want to tell Windows to open the file using Java WebStart, which is located in the bin directory of your Java installation.
Now that you have your USB ports' sleep mode disabled and Java installed, go ahead and launch webOS Doctor. Don't connect your TouchPad yet. We'll get to that in a second. webOS Doctor needs to download and install some things first anyway.
After webOS Doctor launches you'll confirm your language, let it do some stuff, and you'll get to a screen where it will tell you to connect your TouchPad.
3. Wipe Your TouchPad
The reason I waited until this point to tell you to wipe your TouchPad is if you do this too soon, you'll find that when you log into your webOS account you won't see your device and therefore can't download webOS Doctor (at least not directly from your webOS account).
Power up your TouchPad and go to the "Device Info" app, then at the bottom of the screen click the red "Reset Options" button. On the next screen click the "Full Erase" option.
This will erase everything, including files on the device, apps you've downloaded (including ones you've purchased), as well as all your account information. Fear not, however, because once you log back into your webOS account after the OS upgrade it'll re-download all your apps (including ones you've purchased).
What I did lose, and this may be intentional, is all my account information so I had to re-input my Google, IM, VPN, Exchange, etc. information. Not a big deal, just something to be aware of.
After your device is erased it will reboot and you'll find yourself back at the initial setup screen. Power the device off at this point without going through the setup process.
4. Connect Your TouchPad to the Computer Running webOS Doctor and Install webOS 3.0.4
Now we'll put the TouchPad into USB mode and connect it to the computer running webOS Doctor.
With your TouchPad powered off, press and hold down the volume up button while inserting the USB cable into the computer. What I did here was connected the small end of the USB cable to the TouchPad (and again, this is while the TouchPad is powered off), then held down the volume up button and stuck the other end of the USB cable into the computer.
Make sure and hold down the volume up button until you see a large USB logo on the screen of the TouchPad. If it boots normally (i.e. you see the HP logo and then the initial setup wizard), you'll have to power it off and try again.
After you plug the TouchPad into the computer Windows will install some drivers. In my case it didn't tell me what it was installing; it just installed some stuff and said it was successful. On the web page I was using as a guide it mentioned something about being asked to install OMAP--to which you're supposed to say No--and then Palm Novacom (bootie), which you're supposed to allow it to install. As I said I didn't get prompted so whatever it installed was what it needed since I was able to proceed.
At this point you should see that on the screen in webOS Doctor on which you stopped in step 2 above the "Next" button has been enabled. This means that webOS Doctor sees your TouchPad and you can proceed with installing webOS 3.0.4. If the "Next" button isn't enabled, or if you get errors while Windows is installing the drivers after you connect the TouchPad to the computer, the only advice I can really give is to try the process again.
One other tip--in my case since I skipped disabling the power saving on my USB ports, the device did get stuck in USB mode and wouldn't power off by using the power key. All you have to do in that case is hold down the power button and the "home" button at the bottom of the front of the TouchPad for about 10 seconds and the TouchPad will reboot normally. (If it doesn't work, you probably didn't hold the buttons down long enough!)
If all is well up to this point you'll see the installation progress bar in webOS Doctor start to move, and the icon on the screen of the TouchPad will change to an arrow going into a computer chip, indicating the new OS is being installed.
The install takes several minutes (probably less than 10 if I remember correctly), and after it's done you have the latest and greatest version of the greatest mobile OS happily running on your TouchPad! You can read about some of the new features in webOS 3.0.4 here.
5. Hack Away!
Again if you refer to the instructions I used to upgrade webOS you'll see they discuss putting the TouchPad into developer mode, overclocking the CPU, and some other cool hacks. I personally haven't done any of that yet but if/when I do, I'll be sure and share my experiences.

Thursday, December 1, 2011

Setting MySQL to Allow Multiple Statements In a Single Query In JDBC/OpenBD

This came up in a discussion on the OpenBD Google Group today so I figured it was worth a quick blog post.

Depending on what you're doing with MySQL you may be in a situation where you need to run multiple SQL statements separated by a ; as part of a single query. By default this isn't enabled in the JDBC connection with MySQL, but it's easy to enable in your JDBC connection string.

When creating a MySQL datasource in the OpenBD admin, click on the "Advanced Settings" button, and in the "Connection String" box input the following text:

If you're creating the datasource for the first time this will be all you need to do, but if you're adding this to an existing datasource you'll want to bounce OpenBD to make sure the connection pool is cleared out.

To test that the setting change worked, simply write a CFQUERY that contains two statements:
<cfquery name="foo" datasource="foo">

If that doesn't throw an error, then you're all set to run multiple statements in the same CFQUERY tag.
Note that you can enable this setting in bluedragon.xml as well, just make sure your <connectstring> node for your datasource looks like this:

And your <hoststring> node should look something like this: