snicknet.net

‘Keepin it White n Nerdy’

Feb-18-2009

NFS Share Updated Info

So, I ran into an interesting problem last night while recording a 2hr long TV show, in case you’re wondering it was American Idol. So, as I began watching the recording all was well, when suddenly just around 1hr in the recording stopped and closed. Naturally I assumed something had crashed and tried once more, with the same result. Frustrated I checked the MythWeb, along with the clocks on my VM and frontend. Both were fine, then I turned my attention to the filesize of the recording. I noticed that the file system reported the file as being 2GB, and yet MythWeb thought it was 4.3GB. So, after doing a little research I discovered that the problem stemmed from my using an NFS share to store my recordings on my backend over the network. As it turns out, up to NFS version 2, there was a 2GB maximum filesize like FAT32. It appears based on my research that NFS should default to version 3 which supports larger file sizes, but after running the command: nfsstat -m, which will display your NFS info I was indeed using version 2. Upon further reading I discovered that I should have been using nfs-kernel-server and not nfs-user-server as my backend NFS server. So I swapped out one package for the other. Now with my newly installed nfs-kernel-server package installed I checked nfsstat -m again. The same result, still using version 2. Then I came across a small post online that outlined the same problem I was having it turns out you can force the NFS server to only accept certain versions of connections so the magic command for me was:

sudo nano /etc/init.d/nfs-kernel-server

Look for the RPCMOUNTDOPTS variable and add -N 1 -N 2 so it looks like: RPCMOUNTDOPTS=”-N 1 -N 2″

sudo /etc/init.d/nfs-kernel-server restart

Remount your shares on the remote client using “sudo mount -a” and double check nfsstat -m, you should now be using version 3 or 4 depending on how you setup your /etc/exports file on the NFS server. I’m presently using version 3 which has basically an identical entry line as to my earlier post for creating a share. Hope this helps somebody experiencing the same issue. Everything is recording beautifully tonight.

Digg!
Posted under General
Feb-15-2009

Long Range WiFi & Left4Dead

I noticed this morning on Steam that Left4Dead was discounted by 50% for the weekend. Having heard so many great reviews about the game, I had to give in at that price. I wasn’t quite willing to part with $50 for a game I didn’t know a ton about. I can safely say that I have a new favorite game. If you’re hesitant about buying it one comparison that comes to mind for me is, back on Counter Strike 1.6. At LAN parties a bunch of buddies and I would use the PodBot server to load up our LAN game and we’d stack the teams humans on one team and the rest of the spots all bots on the opposing team. We’d give the bots only knives but bump their skill to the max. This is pretty much identical to what Left4Dead is. Short of the fact that these bots actually have serious skills and numbers you never could do on the original CS. If you’re a gunfire junky who loves surprises this is definitely a game for you.

Also today, I tagged along with Izzie and a few local members of the Engineers Without Borders crew to test out a long range wifi setup. It was pretty amazing, we were able to transmit 1Mbit+ speeds over 2 miles using a basic WRT54G and some aftermarket antennae. Surprisingly I was able to connect to the AP with nothing but my eeePC without an external antennae. I could only get a few pings through, but that was all I needed to be impressed by the little netbook. Ping times for my eeePC were ~15ms. The entire signal was all noise, but it managed to get out a ping. Pretty great day, got some homework to finish up tonight, and then tomorrow I can get a head start on the week thanks to our 3 day weekend.

Digg!
Posted under General
Feb-12-2009

Few Big Updates

So, where to start. I guess I’ll get the sour stuff out of the way. Today I had 2 of my 4 finals, and lets just say it didn’t go super well. I only have myself to be angry at because I should have put more time into studying. That’s all I have to say about that. On a much higher note, after speaking with a guidance counselor at the college I have discovered that I only have 4 classes remaining after my current quarter before being eligible for graduation. So, presuming I can make a 180 turn from my midterms I should be officially done with school in June. This has definitely motivated me to want to get everything turned in and to start focusing harder than ever on school.

Now, for the more entertaining stuff. I received my USB to Serial adapter on Tuesday. I passed it through to my home automation VM and I’m back in business. I was very impressed, Ubuntu recognized the device immediately, the only thing to note on these types of devices is that they appear as /dev/ttyUSB0. Once I figured that out, I updated my scripts and I can now have the lights turn on when I walk in my room again. Just in time too, I was starting to trip and fall as I was trying to make my way to my lamp.

I have been doing some reading on various topics trying to get some other things going for myself. I picked up a Home Buying for Dummies book and have read about 25% through so far. I decided a while back that after graduating that I’d continue living at home for about another year while working full time to save up a down payment for a condo/home. The timing appears to be perfect, the market is still going down and rent prices are starting to fall in response. So, right around the time I will be ready to buy the market should be apexing and about to swing up making my purchase a great investment. I also have been reading up on how music effects your mood. I’m not usually all into psychology, but I have been picking up some interesting information. My reason for delving into the subject is that I’m playing with the idea of making an intelligent music selector. Ideally when I enter my room, my room should figure out my mood, and play either supportive or correcting music depending on how its setup. I’m definitely overwhelmed by the amount of data I’d have to collect and process, but I’m excited at the prospect of creating such an algorithm. I haven’t made any moves in terms of code or design, so I’m not sure if anything will materialize, but I liked the idea so I thought I should put it up here.

With regard to the new server, I have run into what appears to be a known Linux bug with VMware. After migrating my Linux VMs, my clocks all started to drift wildly on my VMs. Now normally this is no big deal for me, because I don’t need to use those clocks, but what it is having a terrible effect on is my Mythbuntu Backend. The clock on the master backend decides when the slave frontends all start recording, so I’ve been missing my shows. I attempted several fixes, but upon checking up on it again today I discovered I was 1hr behind again. I think I will just have to delete the VM and start fresh. The good news is that I did get my first recording to transcode on my Master Backend and using only one core on the i7 I can achieve 175FPS trancodes.

Digg!
Posted under General
Feb-6-2009

Taxes as a Consultant and Student

I’m a full time student, working as a consultant on a part time basis around my school schedule. This is how I have been doing things for as long as I can remember. This year for some reason it bothers me more than ever as I gather up my information for tax season to see how high the tax rate is for someone like me. This past year I made around $14,000. I live at home so no major living expenses, but I do commute every day to school, pay for my school supplies and books as well as eat lunch out each day while at school. This year I will be paying nearly 20% of my income to taxes, because I work on a 1099 basis. One out of every five dollars I make, I will never see. My question is, how is someone in that position ever supposed to be able to sustain themself in the real world? And why am I the little guy who’s making next to nothing being hung out to dry by the government?

Teenagers and students in their early 20’s make up the base level of the work industry, we do that jobs that are boring and repetitive. We make next to nothing, work lots of hours and try to cram in social lives or free time to do what we like. How is the government taking 20% of $14k going to help anyone? Taking 20% from say Bill Gates, or 20% from a CEO, now that would help the country. From the beginning we should have had a flat tax policy. No loop holes, no excuses, no write offs, you give the government 10% of what you make no matter how much or how little. Not only would the government make more money in the end, but the little guy like myself would have a shot at actually creating a life for myself down the road. I hope that President Obama can see this and will bring change to this situation. I applaud him for his efforts on freezing and setting max pay for these Wall Street jerks, but now it’s time for the government to take back some of that money we threw away on the first bail out by taxing those that received it on a flat rate basis. Imagine, CEO gets $500k the maximum allowed at the moment, chances are since the companies are all broke right now, that came straight out of bailout funds. Now, if the government instituted a flat tax rate then $50k would be going straight back to them to start recouping what they dished out. In 10 years time, any debt incurred by the government from the stimulus package would be repaid and we would be back on track to a healthier and more equal democracy. Basically we would be giving out interest free loans over 10 year periods. Now that is democracy functioning at a higher IQ.

Digg!
Posted under General
Feb-2-2009

HowTo: Mount an NFS Share in Mythbunutu/Ubuntu

I ran into the problem of having recordings taking place on my MythTV frontend not recording to my backend server. So, I was told I should mount an NFS share and place my recordings there. Never having done an NFS mount I wasn’t too sure how difficult it was going to be, and it turned out to be way easier than I expected.

We’ll start on the server machine, the machine that has the files or space that you want access too.

1. Install NFS Server

sudo apt-get install nfs-user-server

2. Edit the exports file which outlines which folders are shared in NFS

sudo nano /etc/exports

Add a line with the following information:

(folder to share) (IP Address of machine with access to the share)

/var/lib/mythtv/recordings 192.168.1.5

3. Restart the NFS server to forcing it to re-read our new exports entry

sudo /etc/init.d/nfs-user-server restart

Now for the client machine:

1. Install the NFS client

sudo apt-get install nfs-common

2. Edit fstab to mount the nfs share

sudo nano /etc/fstab

Add a line as follows:

(IP Address of the Server):(Share Name) (Where to mount the Share) nfs

192.168.1.3:/var/lib/mythtv/recordings /mnt/recordings nfs

3. Remount fstab shares

sudo mount -a

That’s it, you now now have read and write access to the given share on the remote machine. Good luck.

Digg!
Posted under General
Jan-28-2009

Buried Alive

I feel like an avalanche of work has covered me and I’m never going to get caught up. Everytime I move one step forward two more things have been added to my list. I’m tempted to cut my losses and drop some work so that I can get a head start on the next bit and maybe get ahead for once. At the same time if I do that and don’t get ahead and the cycle continues then I’ll actually end up further behind. No idea what to do, hopefully I can figure it out soon.

On a side note I do seem to be cruising full speed ahead on my personal projects. I have successfully setup a PulseAudio server on my MythTV frontend machine which is attached to my stereo. So now I can play music from my music server virtual machine out through my stereo. I found that periodically my music would cut out only for a second or so, but consistently. I figure it must be related to the way that VMware Server handles audio devices. This new solution seems to work quite well, the only downside is that PulseAudio uses a good amount of processing power to transmit your audio over you network. So, I went from occasional hiccups all the time, to no music during heavy loads. I think the trade off is worth it. Eventually when I can afford a more powerful server I won’t have the problem.

I have also begun experimenting with Python. After doing a little reading online I have begun learning a little about wxPython. It is a basic application library for Python which includes many graphics based objects. I’m not sure if it will work for everything I want to do, but it is assisting me in learning the ins and outs of Python which is very different from any language I’ve learned before.

My MythTV Master Backend virtual machine is powering ahead. It has successfully been running for several days flagging commercials for my little Atom frontend without incident. I must say that it does take a good amount of network bandwith to do such a setup, so I recommend that you have at least a 10/100 connection and you’d be wise to push for gigabit. I ran into one problem in which a single machine on our home network is connected to a 10/100 leg of a full gigabit network. As soon as commercial flagging began the 10/100 computer which was streaming an HD TV show lost connection and had to wait until the commercial flagging job was done before resuming playback. On the gigabit section of network I was able to play the same TV show without incident during the commercial flagging.

I have built my first micro ITX Atom machine for a client. I will deliver it later this week. I’m hoping to get more and more of my clients to adopt the smaller machines. It bothers me to think about how little people do on their machines and yet they continue to buy more and more powerful systems to do the same things we have been doing for the last 10 years, email, surfing the web, listening to music, and writing documents. None of these tasks require more than a miniscule amount of processing power. I hope that soon IT managers around the world will understand this and start to consider the power cost of the machines they put into production environments. Not only is there the power savings which adds up there is the initial cost savings. You can make an Atom machine for about $200 plus the cost of the OS which if you use Linux is $0. $200 for a machine that can play 1080p video and consumes roughly 30watts while doing it is a huge step forward for the computing world.

Digg!
Posted under General
Jan-24-2009

MythTV is Alive

Well, after much trial and error I have successfully gotten a Virtual Machine backend and an Atom based Secondary Backend/Frontend talking. I ran into several problems while trying to set everything up from version mismatches to IP addresses not being entered just so. I’m recording a show to test out the backend based commericial flagging and transcoding. The Atom box has the tuner in it and will be used for all matter of frontend activities like watching HD movies, live TV and recorded TV. The backend for the moment will simply manage whats going on and lend a helping hand to jobs. Eventually the plan is to use a USB TV tuner and pass the device to the VM so that the backend does all of the work. For the time being this is a great proof of concept.

Digg!
Posted under General
Jan-24-2009

Project Update

Well, I jumped in head first on several of the projects I had listed last night. I’ve made great progress today accomplishing and learning a lot. I got my iPhone to talk to my Amarok VM and am able to stream podcasts and music off of the iPhone wirelessly and play them out my stereo. There is still a good amount of work and planning to move this project along. I realized that I need to come up with a way to launch an application based on location, seeing as the Wifi in the iPhone is off unless it’s available and checking for mail. One solution is to leave Wifi on all the time using Insomnia, but this drains my battery WAY too fast. So, some kind of location based turning on and off of Insomnia would be perfect.

I installed my PVR-150 card in my Atom box today in an attempt to see if I could use it as a Secondary Backend and Frontend. I ran into problems getting to tuner to be accessible though for playing TV under MythFrontend. I believe it to be a version issue and am creating a new MasterBackend VM to test the theory. If this works out I should be able to record TV shows on my Atom box while leaving the heavy lifting to my server such as transcoding and commercial flagging.

I installed a fresh copy of Ubuntu Server on my old laptop to start on trying to write the software for my Digital Picture frame . I also came up with a software concept for the touch screen when I get that far. I should be able to pull pictures from Flickr or some other online source, as well as using local or saved content. I would also like to be able to see the currently playing song in my Amarok VM on the screen with Song Name, Album and Artist along side the Cover Art. Adding a weather widget in the corner would be nice. I really like how the concept is coming together, but I’m having trouble deciding the best way to start as well as what language to use. I’m leaning towards Python, but my lack of knoweldge in the language is holding me back. We’ll see what happens, might just have to dive in and try it out.

On a rather grim note, I’m having trouble with USB devices in my Windows 2008 Server. Every time I plug in a device I get a malfunction error. I’m thinking it might be related to a USB network program I was experimenting with. Hopefully removing and rebooting should fix the issue, as of right now I can’t attach my Bluetooth dongle to my VM that controls the lights in my room. More to come soon.

Digg!
Posted under General
Jan-24-2009

What’s Next

I find myself searching for the next project. I haven’t quite settled on what I want to do. Having gotten my Atom box to its present state is quite wonderful. I find myself looking at hardware more and more rather than software. I really want to make something and program it. The downside to this is that hardware costs money, and that’s a luxury that is still just out of reach at the moment. I have some billing to catch up on and several projects that are about to pay out which is good news. Perhaps laying out the projects I have considered will help me organize my thoughts. So here goes:

  • Wireless iPhone Music Sync/Transfer - Since the iPhone was released Linux has been able to mount the iPhone wirelessly not only to syncronize music to the phone, but to play music off of it as well. This is very appealing as being able to have fresh music on my phone without the hassel of syncing would be wonderful. So, the plan for this one would be to write a script to push/pull music from the phone upon me entering my room. This could tie directly into my current Bluetooth proximity script assuming I put in an IP reservation or a static IP for my iPhone.
  • IR Transmitter - This one is also proximity based. I would like to add IR control to my Bluetooth Proximity scripts so that when I enter my room my stereo and/or TV could turn on automatically. This would be a nice feature and tie in IR which is something I have wanted to do for a while. The downside is that the device I want to use to do this is rather expensive.
  • Power Savings for LCD TV - Another project that peeked my interest having read up a bit more on LCD TV power efficiencies would be to measure my TV’s power consumption while off. I hear that LCD TV’s use a large amount of power to keep the backlight bulbs warm. I have only heard this as a rumor and have yet to try and hook my Kill-A-Watt unit up to check this. If this is in fact a true statement then I could wire in an Insteon Applican module to turn on the backlight bulb power only when I’m present in the room and might use the TV, otherwise there is no point in keeping it primed. Edit: This peeked my interest rather quickly and I can say without a reasonable doubt, that my Vizio LCD TV uses 0 watts while sitting off. It maxes at around 140 watts while watching video. Looks like this one is Busted, for LCDs at least.
  • Sunset/Sunrise Times for Lights - I still need to come up with a way to integrate sunrise and sunset times into my Bluetooth Proximity script. As it stands my light will turn on whether it is light or dark out.
  • Bluetooth Device Class - I need to try pairing my iPhone with my machine on a different device class. I’m running into problems when I receive a call in my room since my computer appears as a Bluetooth Headset to my iPhone it keeps passing off my clients to a silent machine. I need the iPhone to pair to something, but not use it.
  • Build another Atom Box - Having established the Atom as a great MythTV frontent I would like to build another one for my day to day use. I’m once again using my gaming machine for daily work and it is not the best machine for it.
  • Digital Picture Frame - I have several old monitors and laptops just begging to be used again. I have wanted to build a little digital picture frame for as long as I can remember. The thought of being able to wirelessly transfer media to a free floating object is very appealing for some reason. I would like to make it touch screen usable as this would allow me to do much more with the device including control my room or look at headlines. I’d love to be able to set my alarm in the morning using it if I keep it next to my bed.
  • Serial/USB Temperature Sensor - With Summer coming up in a few months I would love the ability for my fan to be able to turn on automatically if my room is stuffy. Plus, knowing the exact temerature in your room from anywhere in the world seems like a neat thing. So, I’ve found a bunch of serial based thermometers as well as some pre-fabricated USB ones that might fit the bill.

These are just some of the ideas I have rattling around in my head at the moment. I’ll have to pick one and start down that path and see where it leads. Hopefully I can come up with one that is fun, involves new hardware, and doesn’t break the bank.

Digg!
Posted under General
Jan-22-2009

Dual Core Atom + 1080p Video = Possible

I purchased a dual core atom mini ITX system a few months ago in the hope of running it as a MythTV frontend. This doesn’t sound very challenging, after all just about any machine can run TV now days. The challenge for me is that I love HD movies. So this begged the question, could a $90 computer consuming roughly 30watts play an HD movie that normally takes a 150+ watt computer running at high clock speeds with a high end graphics card? Well, last night I got my answer. After installing a fresh copy of Mythbuntu 8.10 on my Atom box I started working on the Core AVC for Linux installation. Core AVC is an amazing application developed originally for Windows. It allows you to multithread H264 decoding. Most HD movies and TV shows people get today over the Internet use this codec. It is amazing the quality that can be retained while keeping file sizes down. The down side to all of these purks is that to decode these films you need a lot of processing power. Traditionally a single core very high clock speed CPU would do. The problem is that recently multi-core CPUs are all the rage, and they have lower clock speeds than say the old P4 processors. On current Core2Duo’s or Core2Quads this is no longer an issue, but on lightweight hardware or older hardware it is a major problem. That is until the Core AVC codec was released. It allows you to harness the power of both of your smaller cores to tag team on the task of decoding the video. This allows you to use a very cheap, energy efficient, and low clock speed processor to decode high quality video normally reserved for high end PCs. So, people could watch these high def movies on Windows, but the Linux community was lagging behind in this area. There has been much work completed recently especially on the ffmpeg codecs to try and mimic the same performance gains as the Core AVC codecs, but in my opinion they just aren’t all the way there yet. So, a project was started to allow you to use the Windows based Core AVC codecs under Linux. The key here is the Wine project which allows Windows based applications to be run under Linux. After I completed the install everything is working better than I expected. Movies in 1080p that my 2.2GHz AMD Athlon 64 struggled with are cake for my 1.6GHz dual core Atom to cut through. Albeit there are some limitations still as too how high a quality stream it can handle, but for the most part it is astounding what it can do. I’m hopeful that the Linux community will continue to push forward with it’s efforts to build native forms of these codecs, but until then the Core AVC for Linux project is here to the rescue.

Digg!
Posted under General