Sunday, January 11, 2015

LANcache on Ubuntu Linux for PS4 and PlayStation Network (PSN)

I recently picked up a PS4 and having been out of the gaming scene for a few years was a bit shocked to see the size of game downloads and updates off the PSN Store. When I got back home with the brand new PS4 I just wanted to pop in the free Destiny disc and get to playing, but ended up waiting 2 hours for the 2.5GB update to finish before I could actually start. Battlefield 4 was a whole different story at a 36GB download which took almost 2 days to retrieve.

The PS4 I got has a 500GB HDD on it and considering the size of these games and the free monthly games available with a PlayStation Plus subscription I expect to have to upgrade the HDD at some point in the not so distant future. Luckily for me the PS4 HDD is user upgradeable. Unluckily for me it'll take me quite a few days, if not weeks, to redownload all the games. I'd rather use one of the few 1TB External USB HDDs I've got laying around as backup storage for the downloaded files. Just one problem... there's no way to save the game files from the PS4 to external or network storage.

The Solution: LANcache

Monday, November 17, 2014

Polar H7 Bluetooth LE Device Name

While messing around with my Polar H7 trying to figure out how to read real time heart rate information I inadvertently overwrote the device name. I didn't even realize that this was possible, but apparently it is.

When running a hcitool lescan I would no longer get the device name listed. I was getting a weird character.


This made life a bit harder. On my Android devices when scanning for the device I'd just get a blank name. I thought for sure I royally screwed something up. I decided to give fixing it a shot, and luckily I have another unit which I could use to compare the values in the different characteristics.

It turns out I didn't even need to do that. If I'd just looked at the Bluetooth specification and especially org.bluetooth.characteristic.gap.device_name I'd have had it figured out pretty quick. But, I guess the 30 mins I spent on this wasn't too bad either.


Sunday, November 2, 2014

Polar H7 Bluetooth LE Heart Rate Sensor on Ubuntu 14.04

I recently picked up the Polar H7 Heart Rate Sensor (Bluetooth Low Energy). The long term goal is to connect up the sensor to my HTPC running XBMC so that I can see my heart rate on the screen while I work out. I usually work out to music playing on the HTPC or watching P90X videos. So, it'd be nice to be able to see the heart rate information real time as well as record it in a file/db for historic purposes.

Now, I haven't really played with low level communication with Bluetooth devices. It seems that Bluetooth Low Energy (BLE) is a lot different from Bluetooth Classic, but for me it didn't matter much since it's the first time I'm messing around with Bluetooth in general.

The first challenge in connecting to the Polar H7 turned out to be a lack of a BLE compatible adapter. My laptop has a Broadcom BCM2070 chip which only provides Bluetooth 3.0. It turns out that BLE is only available with 4.0+. So, I needed to purchase a USB dongle. Once I had that it was time to figure out how to connect to it. I thought it'd be a lot easier than it actually was.

Long story short... it took me a few days of digging around on Google Search to find the information I needed. I was surprised at how little information there really was for connecting to and communicating with BLE HRM devices and specifically the Polar H7. Here's how I got the initial connection established to be able to get some data from the device on Ubuntu 14.04 using hcitool and gatttool.