Wednesday, 26 March 2014

moved my htpc to raspberry pi - couple of my answers to my own questions

Basically, there is no _practical_ WoL for the Raspberry Pi. It seem technically possible, at least they say that the NIC+USB chip HW supports it, but nobody f...ing needs it, so no project cares to make it. Everybody seem so happy about having a device consuming 5W max that leaving it on all the time seem more than normal even if it does productive work just a fraction of the time. Ok, let the time solve this, I'm happy too :)

Btw, there is WoL functionality for XBMC and their mobile remote. So, guys using it on the HW consuming tens of watts of energy, I encourage to try and to use it!

Cool feature of XBMC, Apple's AirPlay protocol, doesn't seem to work stable on Raspbmc. First, I was surprised by the functionality, you can't put the screen on the screen, you can just share photos, videos, music. Second, video is _very_ unstable and there are screen stretching issues which doesn't seem trivial to solve, you need to really dig into configuring the thing. I do not recommend it for now.

Btw, I had 1 Raspbmc crash since start, it just stopped to play internet radio once without obvious reason.

Otherwise, I'm still very happy with it.

Monday, 24 March 2014

moved my htpc to raspberry pi

Today I unwillingly decided to change my HTPC. It happened by the combination of two events.

First, I was thinking to add a Raspberry Pi to my multi-room audio system for some time already in order to stream saved music and internet radio and manage it by the mobile devices.

Second, I mixed up PSU's between above mentioned multi-room audio system and current HTPC after dusting them. Bad thing, multi-room has higher voltage (24V instead of 12-17V) than HTPC, so HTPC decided to get to be offended. I don't know what exactly broke, still need to find what got burned there. Good thing, I had urgent need for a new HTPC on my hands, thus motivation to act immediately.

NB It's a pity that you actually can't rely on all those different PSU and charger producers that plugs doesn't match...

So, XBMC on Raspberry Pi it is. Quickly googled and decided on Raspbmc. Very simple setup, just download it, dd it to flash card, plug it in and let it setup itself. After that you get your usual XBMC interface.

XBMC official iPhone app is even easier. And it's interface is better than XBMC's default one. Just easiness of the search function tells.

Btw, if you connect your Raspbmc to the network server for the media, be aware that XBMC may not be very efficient in the networking by default. My config stuttered HD videos by default via Samba and NFS. This helped my thinking, optimised it to flawless playback :) 

Now, some observations and, unfortunately, pitfalls, even thou hopefully short-term:

  • Major one for me for now. If you take a look at the Raspberry Pi specs you will NOT notice that it supports HDMI revisions 1.3 and 1.4. My audio-video receiver (AVR) which I bought in 2008 supports 1.1 and back. Sorry guys, no backwards compatibility, it won't work, at least it doesn't for me. I noticed that HDMI is up to 2.0 now. So, now I'm thinking about changing the AVR, but those versions...
  • Btw, talking HDMI revisions, my TV, bought the same year, is using HDMI revision 1.3. Conclusion: Philips was ahead of Marantz back in 2008 :D
  • Annoyances. So, I can't put HDMI through AVR. It IS a pity because of the sound. Video I can put directly to TV. Of course, I could use just TV sound, but my Marantz's sound is sooooo much better. Fortunately, Raspberry Pi has a simple analog audio 3.5mm jack, so I can have a good sound. And you can switch on audio output to both HDMI and analog ports in XBMC. The annoyance: not all those digital wonders of nowadays like Dolby Digital or DTS, just a plain simple stereo. So, it works. The annoyance: I need one more analog audio output for the multi-room, which I haven't. And one more for the headphones... And I couldn't use my AVR for switching even if HDMI revisions were OK, because my AVR doesn't convert digital sound to analog (ask for this when buying an AVR).
  • One of the best things happened. I'm going to save some electricity definitely: Raspberry Pi can't go much over 5W :) Previous HTPC's PSU was at 110W max and I'm quite sure it used 50W to max.
  • There is no power-on button on Raspberry Pi :D You can switch it OFF from software. What about ON? WoL you say? WoL is much, much more sophisticated... And my children are so used to use a power button. For switching on, at least, because switching something off is what older people do, isn't it?


So, todo for me now is to:

  • find a soundcard for my Raspberry Pi, that would solve my DD-and-DTS-like "problems", plus offload the processor of decoding those, I hope 
  • buy 3.5mm audio jack splitter
  • change my AVR
  • invent a power button for Raspberry Pi or configure WoL (from iPhone app should it work)
  • or all of those options...


Guys, if anybody wants to buy used medium-class AVR in a good condition, just let me know. It's a Marantz SR4001, just looked inside, there is minimal dust and capacitors look good.

Monday, 17 March 2014

retired my cisco linksys e3000 as router/firewall, moved to pfSense

For some time I felt like my home Cisco Linksys e3000 wireless router was not able to perform according to requirements of today's traffic at home. There are four of us, everybody use Internet, we have 20+ devices with IP address, so it could be quite normal that signs of overload appeared more and more often. Slowness sometimes, sometimes router even hung.

Historically, I tried out dd-wrt project, which has great functionality, but stability of the router brought me back to default Cisco firmware. Recently even default firmware was not good enough.

One of the steps I've taken already was switching DHCP and DNS servers off and giving those functions to a Raspberry Pi. But that was more because I wanted to try out Pi :)

I've been thinking about a change to more powerful router, but somehow took a look at my "server room" wall, where one of two Intel Atom D525MW boards hung without a proper job and decided to take a look at what opensource is doing in router / firewall space.

Does this wiring look ok? No way...

I found very nice review by David Pavlina which led me to choose between pfSense and Sophos UTM Home Edition (scroll down a bit). pfSense looked better to me just for one reason: it's not limited version of commercial SW like Sophos. So let's try it.

First of all I was quite excited because it was first time I was going to try something that is based on FreeBSD project. And I have to say that first impression - install - was very good. I'll see later what it takes to do basic OS things there.

Install of pfSense is quite straightforward and easy.

Initially I tried to put it on USB stick, but I gave it up after several iterations of failed formatting and partitioning... Or should I say: slicing? :D As I had spare SSD on shelf I decided that USB I will try some other time.

Initial config is trivial. Basically, you just need to notice NIC names and feed those back to pfSense as you decide on WAN and LAN side. Autodiscovery didn't work for me, but who cares when manual one is so easy, right?

Connected to webConfigurator interface, nice one. I took a look at menu and saw there all I could imagine I would need from home firewall/router. Except for QoS, but then googled that this is named Traffic Shaping here and and decided to go further with it.

I put in basic things like hostname, domain, etc, switched off DHCP and DNS for now, checked that firewall is on (I have to say "once more", because during install pfSense told that it will be on) and get to putting actual wires into NIC's. 

NB It is always interesting to come up with a new hostname. I will not publish actual one, but my thinking came out of this terrible animal, watch out for:

Regal horned lizard (Phrynosoma solare)

It took me some time to redo wiring, now it looks even more terrible than previously, but this absolutely is a matter of the another project :) Plus, switching my e3000 to "just wireless access point" also took a few hard resets because it kept becoming unavailable after I assigned it a "normal" IP to it. Obviously, didn't want to give up being router and firewall :D

So, here I am, typing this blog in the new network :)

Now, just switch DHCP and DNS servers from Raspberry Pi to new server. DHCP works like out-of-the-box :) DNS forwarder (the same dnsmasq actually) doesn't want to resolve FDQN for some reason :( But this shouldn't be a big problem, I just need to get to be used to the new one. And DNS is one of the most weird-built things in IT as you all know - already or just now.

Thursday, 6 March 2014

cybersecurity day today for me #security #linux #truecrypt #opensource #keychain #apple #keychain2go

All of the following in one day (+night...)

Twitter told me that Critical Linux Flaw Threatens More Systems Than You Think today.

Updated my Linux-es tonight (Ubuntu server 13.10 and raspbian), noticed that simple update doesn't affect package in question :D Need to be persistent and upgrade package from source...

And left my XBMC box for the other day, it also runs on Ubuntu.

As mounting Apple's encrypted disk failed me last week plus it makes duplicate copies in my Dropbox, decided to look for alternatives. Moved to open software, namely TrueCrypt.

Interesting and convincing. Plus, now I can view it on my mobile iOS devices too :)

I used to store some passwords in some files... Finally it got me, too hard to manage and search. Need some password manager. For me as Apple user the obvious first choice was keychain plus Keychain2Go app to get it on iOS devices. Set up sync, nice! :) Now need to move passwords there gradually. The question remains, what about being dependent on Apple? Noticed 2 nice things about it: keychain is in Apple's opensource domain actually (!) and there are tools for export available. So, some day there will be integration.