tej dhawan's random musings

Author: Tej (Page 2 of 6)

The probability of a Mea Culpa

Approximately 28 years ago the department chair and a junior in his department entered into a debate. The style of debate wasn’t uncommon for a liberal arts campus and the professor seemed to cherish the opportunity to discuss a topic dear to his heart. The professor had taught multiple classes to me, the student, since freshman year at Central College.  That common area of the Math/CompSci department had hosted many such conversations and faculty were well aware of my preference for applied computer science. My disdain for the abstract and theory were well-known. The debate lasted a couple of hours and ended in stalemate.
Fast forward to this week when I spent a few days at an artificial intelligence conference hosted by O’Reilly. The conference was hosted by a book publisher focused on applied programming – from languages to systems, from the esoteric to the mainstream. A few hundred people came together to learn the concepts and applications in artificial intelligence to produce AI systems capable of machine learning.
It was a keynote by Peter Norvig , a director of research at Google, that reminded me of the three decade old debate. In the keynote, Peter spoke about the changing paradigm of programming from where we teach machines to “DO” to where we teach machines to “LEARN”. The learning achieved through probabilities assigned to outcomes. The binary trees of outcomes with a statistical probability. The literal mashup of Comp/Sci theory and statistics.  I realized then why I’d struggled with the workshops and some of the sessions. I was fine understanding the SQL queries and python code but was lost when it came to understanding the probabilities assigned to query results and analyses!
So, Dr. Meyer, you win. Our debate was about whether a Computer Science degree was earned without classes in statistics. You maintained that it wasn’t as Statistics was a core member of the curricula. I disagreed and seemed to remain right for 26 years in the profession. If I am to proceed any further into the reaches of AI and machine learning, however, I must first begin with a mea culpa and then put my liberal arts education to work and reopen the book on statistics before delving further into AI and ML.

Archive | Segregation isn’t the solution to lack of diversity

I submitted this rebuttal to an article in Clay & Milk on May 16, 2017  and am saving it here on my blog for archival.


Sometimes you set aside your vulnerability just to curtail chances of preventing harm. As a guy who frequently sees the stories about a lack of women at the table in venture capital, I too wonder why. As a state comprising of a fairly even male to female ratio of workers, it is puzzling to see why more women aren’t investing as VCs and angels, especially since many Fintech employees in Des Moines’ are women.
The recent Clay & Milk article, “Making the case for female-focused investment firms in the Midwest”, highlights the core problems as there being simply too few women partners at venture funds and too few venture funded companies have women CEOs.
More investment groups focused on women-led businesses and women-specific groups for investors and strong communities were two of the solutions highlighted. I’m not sure that would work to solve the original issues.

A brief history

I was exposed to many of our city (and state’s) startups during my time at StartupCity Des Moines.  The core problem of access to capital led several of us to the table to discuss options, one of which was simply a directory of capital resources. The directory’s limited success led us back to the table and formation of a Des Moines based Plains Angels investment network. At its onset its membership saw as many as 125 members, 14 of which were women.

Progress

The network grew and, over its 4 year history has made 19 investments from 400 applications. As I reviewed applications, I looked for the business growth characteristics, capabilities of its leadership team, and the financials. Not once did the demographics – men, women, foreign-born, native-born, black, white, Asian or any other diversity factor come into play because they weren’t relevant to the investment.  As I look back, four were led by women – a datum I know only because I went back to look.
I believe our city is different from the larger cities of the coasts and elsewhere in the world. Either due to size or relative economic homogeneity, we have been lucky to operate more as a melting pot than larger cities like Chicago, New York, and London (England). We’ve largely avoided the separation inherent in a little-India, Chinatown, little Italy or mini Mexico here. Our city’s diversity is distributed throughout Des Moines and suburbs.
As evidenced by our own citizens and others, we are a prosperous and growing community.

Our strength, therefore, is not in division but unity.

One of the basic tenets of sound investment philosophy is diversification. Any investment in a vacuum is an island in itself.  Removal of bias is necessary to make sound investment decisions. The removal of bias happens naturally during investment discussions amongst a diverse group at the table. Investing, as a discipline, is agnostic to gender, geography, culture, religion and age.
Since the recent creation of women-only investment groups, I have seen Plains Angels membership of women fall. The group that once had up to 14 women in the room, 3 extremely regular, now rarely sees one. And without diversity of opinion over time, I can see the group dwindle further; a receding tide lowering all boats.
I strongly urge my fellow female angel investors, government sponsors and non-government organizations to collaborate not separate. We have wonderful examples of cities around the world that have struggled with these battles when it was too late – cities such as New York, Sydney and London built up cultural enclaves as the ethnic groups populating them supported from within, propped up new entrants, and removed the early struggles of language, economics and religion. Clustering, which once was part defense and part survival, now displays indelible borders.
As alluded to by the original article, women engage in deeper understanding of an investment. It also states that despite deep professional expertise, women aren’t yet used to making such angel investment decisions. Assuming both to be true, wouldn’t it be beneficial to engage in dialogue across genders, geographies and experiences? Better investment decisions can be made when men and women come together to harmonize their diverse ways of thinking, acting, researching, and evaluating. The silos being constructed in our community aren’t the way to achieve harmony.
If an end goal is more women partners at venture funds, let’s not begin by separating men from women.
Segregation doesn’t work as a mechanism to resolve lack of diversity. It makes it worse.

Liar-in-Chief

I found myself at an unlikely venue the other night – a high-school basketball game. Though never a sports spectator, I was there to watch the high school dance team perform. Watching the game was, well, my ‘pre-game show’.  The first game had strong teams, fairly matched, and the visitors maintained a leading spread by 3-5 points. Sometime around the half-time point, the tables turned. Our team began to lead. Not by much but 2-3 points. Consistently.
It didn’t take much to see why – the opposing team was committing more fouls and our team was using the resulting free throws effectively. This continued to the fourth period and, with a few minutes left in the game, an edict came from the visitors’ coach – ‘no more fouls’. Fouls ceased, game returned to normal, and after two overtimes, the visitors won.
The integrity of the game, once restored, allowed the stronger players to perform, and their team to win.
I was watching a political volley of such fouls today from Kellyanne Conway on “This week with George Stephanopoulos”. She remained consistently belligerent in trying to defend and cover up statements of suspect truth. Seasoned journalists and panelists on a subsequent debate remained baffled by the strategy. Like Ms. Conway, they wanted the conversation and debate to rise above reality TV yet were encumbered by the responsibility to report on the facts and call out the lies when obvious.
It was the following sentence that made me connect the current politics to the basketball game –

Now we’re in a position where every time Sean Spicer takes the podium or the president says something, they don’t need to just be fact-checked, you have to presume that they’re not telling the truth.
-Stephanie Cutter, panelist with Stephanopoulos, 1/22/2017

Think about this for a second – when the pattern of bending or ignoring the truth becomes the new normal, then the only final conclusion is that NOTHING stated by the President or his official spokesperson is trustworthy. Just like every offensive or defensive strategy of the basketball game is supposed to be suspect for a foul first, strategy second.
I hope the President’s office can shake the contemporary moniker of “liar in chief”, lest the White House be reduced to a sorry farce.

The culture of romancing the automobile

It has been an interesting week of car conversations. The topic emerged as I needed to replace my own car when its predecessor started being my teen’s mode of transport. Coincidentally, the topic has also remained front and center due to a variety of car related conversations. How can a tool evoke such myriad emotions?
My personal relationship with an automobile is purely practical – a safe and reliable way to get from point A to point B. A bluetooth adapter and accessible controls always win above the horsepower or look/feel. A faux wood trim seems as pointless as the skeuomorphic designs of bookshelves on computer tablets. The time and money on rims and trim, underbody lights etc have never appealed to me but I marvel at those who keep a love for it and support an economy here and abroad to support that hobby.
Converstion 1 – with my own family as I was looking to replace my four-year old Camry. I researched and test drove a few cars, including the Mini cooper. The small MC seemed to depart from my usual car, efficient in its recent rendition, safe per those to test that stuff, and fits four. I see it on the road in cutesy renditions and thought why not give it a shot. The test drive took me back to the cars of 70s and 80s – the closest memory that of the Ambassador cars in India. Loud, uncomfortable, rough and downright blah. 2 miles of test drive and it was back at the dealer. We would go back to the brand that had been comfortable and get the smaller vehicle to fit what I needed.
I heard of similar practicality from another friend who buys vehicles for his farm and doesn’t mind a $80K Range Rover through muddy stream and gravel lots – a truck built for that environment and not for the pristine suburbia where its brethren are washed weekly to display the badges of honor. A truck that is at serious odds with the Ford, Dodge and Chevy variations on the adjoining farms.
Conversation 2 – with friends who are techies and love the computers that now drive the cars. I was surprised to be a part of a conversation that spoke of a desire to buy the one badass, loud, rumbling engine one LAST time before the battery operated automatons take over and not a Tesla! Nerds, cool nerds, eschewing tech for the rumble. This is a group that wouldn’t just buy a Tesla to show off its prettiness and eco-cred, but want to hack it with modifications. One who’d buy every gadget to monitor aspects of the car and share it on custom built websites and report the car’s behavior to bespoke home automation systems.
Conversation 3 – with friends whose cars and trucks are additional tokens of prestige. Where a Lexus, Mercedes or BMW SUV is purchased to show that you are at par with your neighbors. The position in suburbia where a desire for conformity drives the home purchase, the career choice, the car, and even travel. A conformity born as part of the American dream. Conversation where the questioner wondered why I would buy a 30K Prius if I could easily afford a loan on a 80K asset?
The disconnect was clear — a car is a position in society – a Lexus no different than my Camry. I was buying for the green cred not to show off the amount of green I could spend. I was still buying my car to be at a place in society.
Cars in my world are not assets. They are a tool to move me (and fellow passengers) from one place to another. Unless I start using my car on the Uber network to transport passengers for money – the car never generates income for me (the definition of an asset – one that creates money). At best, my car protects my ability to earn. It depreciates the moment I drive off the lot and continues to do so for its entire life.
As Americans, our infatuation with the automobile is a century old. This infatuation has traversed the oceans and is now shared in places where guts (England – power!), glory (China – prestige), and practicality (Europe – smaller cars for smaller streets and commutes) drive purchases. I wonder, though, what the current generation of teens will do with this infatuation – will they perpetuate it in their own way or, like other skins of their predecessors, car ownership will fall the way of home ownership, nuclear family, suburbia, and corporate employment.
I will continue to ponder as I watch a friend rebuild a 60s Porsche from frame-up, watch a fellow electronics geek drive a low-riding powerhouse, and watch previous car owners ride a bicycle on a 20-mile commute each way in Iowa (until the weather wins).

Barley and coffee-magical spirits of people and place

I just finished watching Caffeinated, the story of people behind the mighty coffee bean. Originating in a thin tropical band at just the right altitude around the globe, the end-product of the bean ends up as espresso, americano, drip, pour-over, lattes, and more. As I sat listening to the stories of farmers in Nicaragua, Ethiopia, India and beyond, told through translators and purveyors of fine coffees in US, Italy and elsewhere, I couldn’t resist drawing parallels to my other favorite spirit – Whisky.
Coffee grows as a berry, and looks suspiciously like a cranberry on those plants. The bright red shell protects the sugars and bean contained within, clustered in various stages of ripeness. When separated by color, size, shape, and smell, the beans are extracted, allowed to ferment for 27-32 hours, washed, dried on concrete surfaces, and packed away for shipment. Arriving at culinary centers around the world, the coffee bean (white, in color) is roasted for a perfect aroma, sheen, and readiness for grind. What ends up in our cup is a marvelous drink – sweet on its own, intoxicating in its own way, and communal in spirit. Additions like milk and flavors address the palate in fruity, woody, and body.
Barley seeds are immersed in water to allow them to open and release their sugars. Dried on concrete floors for 48 to 72 hours, some are infused with smoke from peat for their own aroma. Yeast converts the sugar to alcohol, ready for a drink. Allowed to relax patiently in wood, the spirit adopts the flavors of the casks. Enjoyed in communal celebrations, the spirit is enjoyed globally. So much like coffee.
The thing that struck me in the movie was how the farmers are resistant to change. A coffee plant may reach production ability in about four years – an eternity of risk before rewards are available. The story no different in whisky producing regions that religiously protect everything from the malting process and the shape (including dents) of the still to maintain uniformity. Unlike coffee, whisky has an even longer patience test – often lasting seven or more years.
If you subscribe to Amazon Prime, movies about both drinks are available as Caffeinated and Whisky.
Ancient processes to produce drinks that mark the beginning and end to a perfect day.

Entrepreneurship lessons and takeaways from the movie, Joy

We saw the movie, Joy, last night. I’ve enjoyed the onscreen chemistry between Bradley Cooper and Jennifer Lawrence in previous movies, and this particular movie, based (loosely) on a true story offers another opportunity to enjoy these fine actors. Though (this is not a movie review) the first 30ish minutes are excruciatingly slow, once the story of entrepreneurship and inventing takes off, you will be hooked.

Industry rags have already created their listicles of “5 lessons” from Joy, and “lessons entrepreneurs can learn” from Joy. In my role as mentor and investor in startups, I notice items in current startups that Joy experienced as told through the movie. Here they are in no particular priority order.

  1. Pick your advisers carefully – we naturally turn to our parents, relatives, friends, siblings and business associates for advice. However, advice from a family practice attorney isn’t appropriate for patents, and a bookkeeper doesn’t necessarily make the COO. A parent’s natural role is to protect you from perceived and real adversaries – not exactly the person who is prepared to help through risk-assessment.  Joy’s best advisers ended up being a close friend and ex-husband – who do you trust?
  2. Read your contracts fully – you needn’t be an attorney to understand the minutiae of legal docs. Your legal counsel exists to understand the documents fully. But you as the business owner need to read each of your documents cover to cover. Yes, that includes the operating agreement (30+ pages), the patent application (100+), the tax rules (pub 515 is at least 76 pages), and any contract with a vendor, employee, partner, co-founder, and even the real estate lease for your office. When shit hits the fan – you’ll  need to revert back to these very documents. Having read them during peace, they’ll be far easier to manage at times of duress.  Though Joy managed to get through the minutiae during severe duress in the movie, this is not a common occurrence.
  3. Receive input from many, but decide from within – be the basic building block of our bodies – the cell. Receive input from all directions – positive and negative. Collect the various inputs without defending or supporting. Then, when you’re ready, find your place of solace, close your eyes, filter the inputs, and make your decision. Joy makes such decisions while shooting at a range, alone in her bedroom, scared witless at a hotel, and confident on a street. The place of solace will change, but your nucleus is constant – focus and decide.
  4. No one cares about your business EXCEPT you  – Employees, shareholders, investors, advisers, friends are all there in good times and bad, but their focus is forever on themselves – their job, their investment, their dividends, their billing and reputation, and their social standing. So, while you may be focused on growth, survival, collapse, payroll, contract, customer and security – they are not. So, survival depends on your ability to perform perfect CPR. Growth depends on your ability to spot opportunity. Collapse depends on your strength to perform euthanasia. Employee payroll may take money away from your own paycheck. Your business -> you are responsible.
  5. The littlest pieces of your entrepreneurial journey are worth cherishing – this one got me at the end of the movie. Through the early years of your journey, the tiniest elements set your direction. They may be a sketch, a photo, a piece of clothing, whatever. They were important then and will be imminently important in other parts of your journey.  Keep a time capsule through the journey and visit it occasionally. You may be surprised at the feelings that capsule unleashes.

In the end, it was a movie. Probably 50% true story of Joy Mangano and 50% artistic license derived by David O’Russell.  It was entertainment but left me with enough parallels to daily life that I felt worth sharing. Worth a matinee investment.

The critical elements of a term sheet

The “Term sheet” carries an air of mystery and intrigue in the entrepreneurial community. Founders are either nervous or giddy about them, want to get one and celebrate its arrival. Investors are eager to sign them (while tending to wait for a lead investor to generate them).
Working with startups and angels in my community gives me a perspective on term sheets.  Since the landscape that governs capital here is markedly different than that in VC hotspots, I’m sharing the elements I see ignored/problematic/contentious, here, in Des Moines, Iowa.
Disclaimer: Getting introduced to Brad Feld’s Venture Deals, following a number of blogs, and ultimately digging through dozens (hundreds now?) of term sheets, I feel like the 4-10 page document is boiled down to a few critical elements that trip up entrepreneurs and angel investors alike. I am not a VC, nor do I represent a fund, so the motivators behind VC decisions are still largely remote to me.
Oh, and also – I am not a securities attorney – use this as a starting point in your journey on term sheet education but seek competent advice at the time you begin working with these documents.
What is a term sheet?

When an entrepreneur chooses to accelerate the journey of building or scaling a business with outside capital, the term sheet is a formal document that outlines the summary terms of exchanging a portion of the company (equity) for cash from an investor (investment). Though filled with legalese about a variety of important topics, it sets the initial terms of engagement, specifically through core elements that would fit on a napkin.
Untitled
The elements boil down to three simple drivers –  economic, team and control. Drivers that control the money aspects of the transaction, those detailing the people building the company, and how the power will be shared once the investment is initiated, respectively.
Economics (equity, valuation…)
Though it should come later, this is frequently the starting point of a negotiation.  A placeholder for the amount the two parties think a company is worth, valuation is a key point of the negotiation. Of course, like any parent, the entrepreneur values their company higher than the dispassionate observer. Similarly, the investor tries to justify the entrepreneur’s assessment or comes up with their own yardstick for evaluation. The mid-western investor rarely puts down a $1M or higher value on a company that has no product, no real customers, and an incomplete team. Ideas alone seem to rarely receive outside funding, and when they do, the term sheets are skewed toward a great deal of control in the investor’s hands for significant share of equity.
What’s an entrepreneur to do?  If the desire is to raise local money and not travel nationwide pitching to investors, then appealing to the local investors motivators is key. Those motivators, at this point in time, are product, revenue, and team:

  • Product – a company needs a minimum viable product (MVP) that demonstrates the founding team’s vision. It must be usable, demonstrable, available on the relevant platform (web, mobile, physical goods etc.), and one or more customers be able to speak to its viability and use.
  • Customers – Revenue comes from customers, so this is important. The history of a product’s sale to an unrelated customer — one with whom the entrepreneur didn’t have an established relationship –is important. Customers provide external validation of an idea and are key to an investor’s ability to preview a product’s market viability.
  • Team – a complete team is generally a pre-requisite for a company raising funds and must include founder (with a concrete role – not just title) marketing, product development, and ability to execute. These people and roles will change over time, so, a complete team needs to reveal the people who fill to roles to adequately guide the minimum viable company to the market where their products are sold, licensed, and used by real customers.
  • Exit – there will be discussion, however premature it may seem, about the liquidity or liquidation event. It could be brief, or a full buy-sell analysis, but there will be one. READ THIS CAREFULLY, especially the section related to liquidation preference that establishes rights to the funds received at a liquidity/sale event.

Team
Though the term sheet will have a signor on behalf of the company, the team does not need titles like CEO, CTO, COO, etc. At this stage, there really isn’t a true CEO or CTO – but rather founders, builders, designers and hackers. The first developer on a team will very likely NOT be the CTO of the fully baked company — the skill sets for the two are vastly different. Similarly, the founder will very likely be replaced as the CEO over the venture-backed lifetime of the company. The team, therefore, needs to be able to present a diversity of opinion that will lead the company to grow, but show a unified front through consensus building.
Rented CEOs and other titles are a let down – angel investors invest in passionate founders, and founders who have given up critical equity for a part-time CEO in early stages of building a product can actually hurt themselves. So, for the purposes of showing off the MVP and raising capital, founders (not a bunch of rented suited professional CEOs) should demonstrate their wares .  Business attorneys do a far better job negotiating terms.
Control
Once money and equity exchange hands, those providing the money will often desire control over the operation of the company in material areas. These terms change the daily behavior of the company and its founders, and must be negotiated early and clearly. If legalese in the documents is not understood, clarify – it’s a lot easier to do before the deal is done than after.  Any attorney worth their salt understands that the legalese in the documents is a necessary evil, and can summarize the entire document in a page of plain English. That page is worth its weight in gold for us mere mortals.  Key elements of control include such things as

  • Information rights – this gives the investor a right to receive regular (quarterly or otherwise) updates from the company that summarizes financials without divulging too much information that may be proprietary. Though angel investors have significant insight into a company and operate like many insiders, this right is still necessary to document and usually a requirement for an angel investment.
  • Founders salaries – investors know that the first influx of cash can alter the incentives and behavior in a company, including such major items as founder compensation as well as minor items like benefits. Thus, term sheets may dictate how much or if the founder can give themselves a raise.
  • New stock/dilution – investors understand there will be dilution during successive raises but want to have a say in when/how much/rules surrounding such raises. Expect a clause allowing the angel investor to participate in future rounds to maintain their ownership percentage, participate in sale of stock by the founder, and advance warning about upcoming events that can cause dilution.
  • Board Seat  – though many investors would love to be on the board for their new portfolio company, angel investors in particular, frequently decide against it and choose to serve instead as informal advisers, rainmakers, network connectors, and  supporters. Still, a paragraph or two will be dedicated to this element.

In closing, remember, a term sheet is not the final definitive document that guarantees an investment. It is simply the first formal document used to begin the conversation. Treat it with care.
 
Additional Resources
Venture Deals: Be Smarter Than Your Lawyer and Venture Capitalist
Ideal First Round Terms, Chris Dixon on cdixon.org

When taking care of employees matters

I saw the newsflashes this afternoon about how Costco had just had a stellar November and beat analyst expectations. This despite their decision to stay closed on Thanksgiving day and bucking the trend established by their competition. Bravo, Costco; I’m glad to be a shareholder and a part of your ‘extended’ family.

Costco came to the Des Moines metro about ten years ago, opening its warehouse in the newest commercial district around the Jordan Creek mall. My dad, a retired worker keeping himself busy working at a local grocer decided to give employment there a try. I remember his interview process well, and he was hired as temporary staff over the holidays. Each time we spoke that winter, I heard things from him about this employer that were different than any other in his prior life. He had spent a majority of his life working at the US Embassy in New Delhi, India and had risen from a low wage job to a fairly critical position. Once retired, he came to Iowa and has lived and worked here ever since. Despite his experiences working for the embassy, the benefits, the management style, and the work ethic expected and developed seemed remarkable.
I had just read Jim Collins’ book, Good to Great, (G2G) and kept hearing things about Costco from my dad that sounded eerily like those of “great” companies in Collins’ research. So, like I had invested in most of the G2G companies, I bought Costco stock over the next several months. All in all, I dollar cost averaged my purchases over a six month period.  My cost basis for these purchases amounts to about $46 a share.
As dad’s employment continued and age happened, I continued to marvel at how the company worked with him – accommodating his age, restrictions, style, idiosyncrasies and all. I had to assume this was the norm – and saw this in employees’ faces at each shopping trip. I held onto the stock.
Costco sells higher-end merchandise than the normal grocer or home improvement store. I like to refer to Costco as the ‘bulk Target’. Sort of like Sams Club being the bulk Walmart. I’ve enjoyed their Kirkland branded beer, milk, vodka, breads, coffee and much more. A weekly trip is norm for me, and the adage that Costco has a ‘minimum $100 spend’ holds true for me – not because they force it, but because I can usually fill most of my grocery items there. At a great price. With traffic increasing per their annual reports, I held onto the stock.
It was encouraging to see that Costco retained its policy of putting employees first this Thanksgiving. When the doorbusters and Thursday sales were driving America’s craziness, not only did Costco remain closed, it didn’t seem to put notices up about being closed. There were no apologies masked as notices from Costco. It was closed so employees could stay with their families.
I am glad they did… sales up. Customers up. Volume up. Stock up.
costco10yr

Solving my projector dilemma with Raspberry PI and XBMC

I don’t watch sports. In fact, no one in my household cares about any sport on TV. So, it is no surprise that we cut the cord (to cable and satellite) many years ago. In fact, the advent of Netflix streaming and Amazon Prime have made it incredibly easy to receive entertainment without a cable bill.
There remains a problem – getting broadcast TV in my home theater. The home theater setup consists of a 12-ft wide section of wall and a HD projector across from it. The projector doesn’t have a built-in tuner, unfortunately, so I can’t watch live TV in the room. The only other equipment in the room is a PS3 for streaming Netflix and Amazon VOD, and playing Blu-ray discs. Most past and present solutions are either gone, woefully inadequate, or so low-rated that I didn’t want to bother spending my energy on them.
I’ve read a lot of XBMC on a variety of platforms, and having used it on the original XBOX, am familiar with it. With some time to spare and a technical problem to solve, I decided to give this a shot last night. An hour of digging for items and some configuration later – it all worked! Here is how:
Hardware used
I didn’t buy anything for this project – everything below just happened to be at home from prior tinkering or active devices. Here is the list –

Hardware Preparation
The first step is to get the hardware configured. I snapped the RPI into its plastic case and connected the HDMI cable to a computer monitor. Ethernet connectivity to my network with a CAT5 cable, wireless mouse and keyboard via a dongle, and power using the micro USB cable plugged into a USB charger from an old phone.
To prep the SD card for the OS, I

  • put it into the SD slot on my computer and ensured nothing of value was on it
  • Then I downloaded and installed the Minitool Partition Wizard and launched it
  • Next, I found the SD card in Minitool and removed all partitions from the card
  • Then I formatted it with two primary partitions: a 130MB FAT partition (drive letter S) and a second 7.8GB ext4 partition (no drive letter assigned)
  • I then marked the 130MB partition ACTIVE.

All this done using MiniTool Partition Wizard. When done precisely as above, you should have the SD card running on your computer, assigned the drive letter S
OS Preparation
This is the easy part. Quite simply, do the following:

  • Download the OPENElec distribution as above
  • Extract the distribution to a folder
  • Copy target\KERNEL to S:\kernel.img
  • copy target\SYSTEM S:\
  • copy 3rdparty\bootloader\*.* S:\
  • copy openelec.ico S:\

I then created a file on the root of S called cmdline.txt that contained the following command on a single line:

boot=/dev/mmcblk0p1 disk=/dev/mmcblk0p2 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 ssh

That out of the way, I took the SD card out of my computer and put it into the Raspberry PI and connected the power to boot it up.  The lights on the RPI lit up and screen showed the normal Linux boot activity. Once complete, I had XBMC interface up and running. Beautiful!
I shut RPI down and took the card back out and put it into the laptop for further configuration.
XBMC Preparation
Here, I decided to test recorded video playback before going to the complexities of live TV. To do this, I hit the Video menu, All files and added my Network Storage Unit (NAS) as a source. Once added, I selected one of my kids’ performances as a video file and XBMC streamed and played it. I then tested various other formats and sizes and everything worked perfectly!
I’ve had HDHomeRun from Silicon Dust running for quite some time as it provides my homebrew PVR with two tv tuners. More about that in another post, but suffice to say that HDHomeRun has run smoothly for a very long time. Though XBMC can use HDHomeRun as a source, there seems to be little available to configure it from within. So, I launched the HDHomeRun software on my Windows laptop first and scanned all channels, selecting only the ones I care about. When done, HDHomeRun had created a series of files in my c:\users\myname\HDHomeRun XBMC TV folder.
We need all these files on the SD card, so I created a new folder at the root of the SD card (calling it Live TV sources) and copied the files to this newly created folder.  The files were named like 13.1 WHO-HD.strm referring the a stream of channel 13.1 named WHO-HD.
I ejected the card from the laptop, put it back into the RPI and powered it up.
XBMC Live TV Configuration
This step added the available TV channels to my XBMC. I clicked the Videos, All Files and add source. From the resulting screen, I browsed to the root of the SD card and added the Live TV sources folder. Saving that led me back to the Videos, Files menu from where I clicked on Live TV sources, picked the channel and began hearing audio. No video.
A little more hunting and I remembered that the MPEG decoder license is necessary for live TV, but I had luckily purchased it earlier anyway. To add it to the configuration, I shutdown RPI once again, took the card out and back into the laptop. Browsed on over to the root of the card and loaded config.txt in my text editor (Notepad++). Scrolled down to the License Keys section and added my license key for decode_MPG2, saved the file and exited the editor.
This is a relatively inexpensive license (2 GBP or approx $3.20). Ejected the card, put back into the RPI and booted it.
This time, when I picked Videos, Files, Live TV Channels and 13.1 WHO-HD, I saw crystal clear video and received audio but there was a problem. The RPI, in its default state, wasn’t able to handle the onslaught of 1080p video. Time to add some “power” through overclocking. Again, I shutdown RPI once again, took the card out and back into the laptop. Browsed on over to the root of the card and loaded config.txt in my text editor (Notepad++). Scrolled down to the Overclock mode section and added the following:

force_turbo=1
arm_freq=1000
gpu_freq=333
core_freq=500
sdram_freq=600
current_limit_override=0x5A000020
over_voltage=6
over_voltage_sdram=4

Once again, I ejected the card, put back into the RPI and booted it. Voila! Beautiful, uninterrupted video and audio. Mission accomplished.
Final Configuration
I have since removed the wireless keyboard and mouse and attached a Firefly USB remote to the configuration, though I am certain it too will be replaced with a mobile remote control in near term. The RPI is connected to my amplifier and powered through it as well to remain off when the amp is off. Next time I’m in the home theater for a tornado warning or the latest Downton Abbey release, the RPI will be streaming the video using my HDHomeRun tuners.
Resources Leveraged
My lack of linux knowledge is clear from all the ejecting and rebooting I did… but I had Windows and the bunch of hardware and wanted to make it work. This couldn’t have been at all possible without these fantastic resources –

Remember, the RPI is an educational computer and the resources on the web are equally transitory and experimental. If you brick your RPI when messing with this – don’t blame the authors but use the experience and experiment on.

« Older posts Newer posts »

© 2022 Tej Dhawan

Theme by Anders NorenUp ↑