Friday, February 14, 2014

The not so great thing about standards.

It has been my personal experience that standards are great! They define things, simplify interactions, and reduce learning time. Except when they don't. A simple standard is easy to understand. If it's well written, it can even work. But as standards become more complex it is not so easy to make sure that all situations are accounted for.

Every big standard has “wiggle” room in it. Don't believe me? They why are there so many different implementations of individual standards. It's this “wiggle” room that is so appealing to so many of the companies and organizations that implement a standard. It provides for a perceived competitive advantage, regardless of the reality.

Standards are all around us, but we've become so accustomed to them that we seldom take notice. For instance, I own two DVD players. Each remote is different. The simple standard like a “play/pause” button is there, but they are not in the same place or even laid out the same. On one remote the play is a little button and the navigation buttons are arranged in a circular pattern with the “select/ok” in the middle. On the other remote the “play, stop, forward, rewind” buttons are arranged in a circular pattern and the navigation buttons are buried down in the middle of other nondescript buttons. Of course the simple solution would be to buy two universal remotes and stop thinking about it, but that's too easy and covers the symptoms.

So what's the solution? Unfortunately there isn't an all encompassing one. As we go about out lives we make choices that tend to limit what “wiggle” room we as consumers will take. This tends to promote those good implementations, though not always. Sometimes a good marketing campaign can overcome weaknesses in implementation, generating enough consumer desire that a bad implementation will dominate the market. This results in a slew of “me-to” re-implementations. The world hiccups a bit, and then goes on with life.

Standards are great! Really. There are so many to choose from and so much “wiggle” room in them that any two implementations of a tool (ie. dvd remote, cellphone charger, etc.) accomplish the same task, while being significantly different. It's all in what makes life more effective and convenient to us the consumer/user.

Oh, it's that "wiggle" room that keeps most of us employed. Trying to make all the different standards and nonstandard implementations work together is expensive. So standards are great, except that they aren't all that standard, and don't always solve the problem that they were devised to solve.

BTW: Today I picked on DVD players, mostly because picking on other things like cars or computers didn't interest me at the moment. It would be just as easy to make the same points about them, but I'll let you think about it instead.

Wednesday, February 12, 2014

My OpenELEC & MythTv (mythbuntu12.04 LTS) setup

The real key is step 6 the other steps were needed, but it was step 6 that makes the difference!

I'm now running Raspberry Pi frontends with a MythTV backend.  In short it works. But you need the decoder licenses and willingness to seriously overclock it. 

WARNING I VOIDED THE WARRANTY ON MY Pi TO MAKE THIS WORK. I'M NOT RESPONSIBLE FOR ANY CONSEQUENCES OR EVENTUAL REPERCUSSIONS.

Beyond the obvious, "Can I do it" question, my other driver was to cut power. Ok it's not a great savings, the power cost of a 500+ watt computer is small compared to a refrigerator or a air conditioner.  In contrast, when comparing the aforementioned computer's power demands and heat generated, a Raspberry Pi is negligible, even when running as hard as I'm pushing them.  And not having fan noise, or extra heat in the media cabinet was a plus as well.

Now, go get the decoder licenses. It took about 5 hours for them to come, so ordering them early isn't bad. Also I'm using a powered usb hub that is capable of powering the pi and serving three usb ports for processing you will need this. I'm using this sd card, some people have problems, so get two and keep a hot backup image, just in case.  And finally, for a remote control I'm using StreamZap. I did try a Logitech mini diNovo but for now wanted the look of a typical remote. Extra stuff: male to male audio cable, for music playback without using the tv; usb extension cables to get the usb Wi-Fi dongle away from the tv; Tenda 300Mbps Dual Band Wireless N USB Adapter (W522U), heat sinks.

(all the above links are to the actual items I used, except for the audio cable. I bought mine at a local parts store years ago.)

Steps

  1. Install OpenELEC
  2. Fix the double press issue with the remote.
    1. Windows, 
      1. open an explorer window to the pi and go to the Configfiles folder.
      2. create a folder for udev.rules.d.
      3. create a file named remote-control-lirc.rules and put the following in it as one line. SUBSYSTEM=="rc", ATTRS{protocols}=="*rc-5-sz*" RUN+="/bin/sh -c 'echo rc-5-sz > /sys$env{DEVPATH}/protocols'"
    2. SSH
      1. cd or mkdir to /storage/.config/udev.rules.d
      2. follow step 3 above
  3. Change shutdown button to reboot. 
    1.  Windows
      1. explorer...  Userdata\keymaps
      2. create a file called keymaps.xml and add:
        <keymap>
          <global>
            <remote>
              <power>XBMC.Reboot()</power>
            </remote>
          </global>
        </keymap>
    2. SSH
      1. /storage/.xbmc/userdata/keymaps
      2. step 2
  4. Overclock
    1. your on your own, but here's my settings
      gpu_mem=100
      gpu_mem_512=128
      arm_freq=1000
      arm_freq_min=900
      core_freq=500
      core_freq_min=450
      gpu_freq=600
      sdram_freq=600
      over_voltage=7
      over_voltage_min=7
      current_limit_override=0x5A000020
      force_turbo=1
      hdmi_force_hotplug=1
      hdmi_group=1
      hdmi_mode=5
      hdmi_ignore_cec_init=1

  5. Adjust the XBMC advanced settings
    1. Windows
      1. Userdata
      2. advancedsettings.xml
        <advancedsettings>

          <network>
            <cachemembuffersize>134217728</cachemembuffersize>
          </network>

        </advancedsettings>

    2. SSH
      1. /storage/.xbmc/userdata/advancedsettings.xml
  6. Adjust the Network Buffer Size! (CRITICAL)
    1. Windows
      1. Configfiles\sysctl.conf

        net.core.wmem_max=67108864
        net.core.rmem_max=67108864
        net.core.rmem_default=67108864
        net.core.wmem_default=67108864

        net.ipv4.tcp_rmem= 67108864 67108864 67108864
        net.ipv4.tcp_wmem= 67108864 67108864 67108864

         
    2. SSH
      1. /storage/.config/sysctl.conf
  7. config the cmyth pvr plugin.

Tuesday, February 11, 2014

Firefox sync server on a Raspberry Pi running Raspbian: Update. One step install

This is my one step install for weave-minimal.  Originally for Raspbian, it seams to work on kubuntu as well.

In my previous post I documented a way to get a Firefox sync server running on a Raspberry Pi.  After some re-working of things I started that system over and discovered that I'd made a few mistakes in my documentation.  Rather then make the same mistakes again, I re-documented in the a form that guarantees, that all the steps are tested and working.  Here's my bash install script that I used to re-install the weave-minimal server on my clean copy of Raspbian .


Download complete script from here:


After installing, on the Pi,

 I went to Tools/Sync and entered the following:


(Incidently, the server is the ip address of the my Pi.  I use dhcp address reservation on to assign it the same address every time.)

after clicking next I was rewarded with