Category Archives: Technology

Enable Wifi on Wandboard Quad Ubuntu 14.04

There are no clear instructions for enabling the Broadcom wifi chip in the Wandboard Quad. What follows is an aggregation of information stemming from the research I did to get the chip working on my board.

What I’ve learned

The Wandboard Quad uses the 4330 chip, unlike the other Wandboards that use the 4329 chip. I found some instructions for Debian and Ubuntu on the Wandboard, but between the different chips and firmware, it was difficult to piece together.

You have to download the nvram.txt file for the Broadcom chip separately. Why it is not included in the images, I don’t know.

Ubuntu 14.04 disk image

I have a Wandboard Quad purchased in Oct 2014. I am running this image:
http://s3.armhf.com/dist/wand/ubuntu-trusty-14.04-rootfs-3.10.17.1-wand-armhf.com.tar.xz
from this Web site:
http://www.armhf.com/boards/wandboard/#trusty
The bottom line is that it was far more stable than the image on the official Wandboard site.

Enabling the Broadcom Wifi chip

Once I cobbled together the info, it was actually a piece of cake. You have to download the nvram.txt for the 4330, and then make symbolic links to the proper files so they are found on boo. You also have to create a config file (wpa_supplicant.conf) with your ssid and password:

sudo wpa_passphrase myssid mypassprase > /etc/wpa_supplicant.conf
cd /lib/firmware/brcm
sudo wget https://github.com/Freescale/meta-fsl-arm-extra/blob/master/recipes-bsp/broadcom-nvram-config/files/wandboard/brcmfmac4330-sdio.txt
sudo ln -s bcm4330_nvram.txt brcmfmac-sdio.txt
sudo ln -s brcmfmac4330-sdio.bin brcmfmac-sdio.bin
sudo reboot

Configure your Wifi interface
Now just go to /etc/network, open your favorite editor, and edit the “interfaces” file:

sudo nano /etc/network/interfaces

Then configure the wlan0 interface like normal:

# wireless network interface
auto wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant.conf

You can test by entering:

sudo ifup wlan0

Move your Linux installation to a new Solid State Drive – even a smaller one

Overview
Solid State Drives (SSD) are all the rage these days – and for good reason. They’re fast, silent, and have no mechanical parts to go wrong (although firmware bugs can and do bite people).
They’re also horribly expensive. For this reason many people who take the plunge buy drives that are smaller than the mechanical drives that are being replaced. This can be a problem. ┬áIf you’re moving to a larger drive, Clonezilla or other imaging programs do a fine job, but moving to a smaller drive can be daunting. If you do a Google search there are articles all over the Web that will give you bits and pieces of advice. The following is a procedure that I know will work, because I just moved my installation from a 300GB hard drive to a 240GB Intel 520 SSD.

First things first – preparation
First of all, make sure that all of your data will fit on your new drive. No article in existence can explain how to fit 400GB of data onto a 200GB drive. So check out how much space you are using and start housecleaning. Remember that you want to have some free working space as well.

Second, back up your drive. I said BACK UP YOUR DRIVE! Better yet, download a copy of Clonezilla and image it. Then you can recover from even the worst screwup by restoring the image. Clonezilla, learn it, love it, live it.
Finally, your /etc/fstab file should be using UUIDs instead of device ids to identify drives. Open /etc/fstab, and if you have entries that look like this:

/dev/sda2 / ext4 defaults,errors=remount-ro 0 1

instead of this:

UUID=ec9de201-c1f1-44d1-b398-5977188d4632 / ext4 defaults,errors=remount-ro 0 1

Then start Googling until you can boot with UUIDs. Although I won’t cover the difference between device designations and UUIDs in this article except to say that the reason for using UUIDs is that the device IDs and partition numbers on the new drive may not match the old ones, so fstab could be incorrect. Once you can boot with UUIDs, we are in a position to assign new drives the same UUIDs as the old drive had, ensuring that fstab will not have to be edited.

Create and copy your partitions
For this part you will need a Linux Live CD or USB flash drive. Hopefully, you already have one handy in case of emergency. Boot from the live CD or USB flash drive. Attach the old and the new drive to the system.
Ok, here we go.
To copy partitions:
1. Partition the new drive. If you have “/boot” and “/” partitions on the old drive, create them on the new drive.
2. Format the partitions with the same file systems as the old drive partitions.
3. Boot from a live CD or USB flash drive
4. Open a terminal
5. mount the partitions from both the old and the new drives (use “sudo blkid” to see the devices and partitions).
6. For each partition, run:
sudo cp -afv source_mount_point/. destination_mount_point
So for example:

sudo cp -afv /mnt/old_drive_boot/. /mnt/new_drive_boot

7. run “sudo blkid” and make note of the UUIDs of the old drive (open text editor and copy and paste from the terminal).
8. Unmount the old drive partitions (“sudo umount MOUNT_POINT”)
9. For each partition, set the GUID to match the ones on the old partitions:

sudo tune2fs -U UUID /dev/sdXX

10. Turn off your machine, remove the old drive and boot from the Live CD/USB again.
11. Follow the next section derived from http://zeasite.com/blog

Install GRUB2 to your new drive
1. In Terminal type

sudo fdisk -l (or "parted" and "list" if you are using GPT instead of MBR)

2. Mount the / partition drive

sudo mount /dev/sdXX /mnt

(example ‘sudo mount /dev/sda11 /mnt’ ,don’t miss the spaces.)
3. Only if you have a separate boot partition:

sudo mount /dev/sdYY /mnt/boot

4. Mount the virtual filesystems:

sudo mount --bind /dev /mnt/dev
sudo mount --bind /proc /mnt/proc
sudo mount --bind /sys /mnt/sys

5. To ensure that only the grub utilities from the LiveCD get executed, mount the /usr directory:

sudo mount --bind /usr/ /mnt/usr

6. Ok, now we can chroot onto the new drive.

sudo chroot /mnt

7. Ensure that there’s a /boot/grub/grub.cfg

update-grub2

8. Now reinstall Grub

grub-install /dev/sdX

(eg. grub-install /dev/sda – do not specify the partition number.
9. Verify the install

sudo grub-install --recheck /dev/sdX

10. Exit chroot : CTRL-D on keyboard (or “exit”)
11. Unmount virtual filesystems:

sudo umount /mnt/dev
sudo umount /mnt/proc
sudo umount /mnt/sys

12. If you mounted a separate /boot partition:

sudo umount /mnt/boot

13. Unmount the LiveCD’s /usr directory:

sudo umount /mnt/usr

14. Unmount last device:

sudo umount /mnt

15. Reboot.

sudo reboot

16. After you successfully reboot, make sure that you change fstab and other files to tweak your system for your new SSD:
https://wiki.archlinux.org/index.php/Solid_State_Drives
Enjoy your new SSD!

Dr. Jekyll and Mr. Jobs – Is Apple Becoming Arrogant?

Let’s keep this short; the answer is “Yes”. Why do I say that? It’s an attitude thing.
Back in primitive times (the 1970s and 80s) there was a common expression in the Information Technology business; “no one ever got fired for buying IBM”. IBM was the safe, dependable choice for IT needs. Most people have forgotten that the US Dept of Justice filed an antitrust lawsuit against IBM in 1969. By 1982, when it was settled, it was already becoming irrelevant. IBM was beginning to see cracks in its business model. By the early 1990s, it was fighting for it’s life against competition that it never saw coming; commodity PCs and networks. Lou Gerstner came aboard as CEO and transformed the company from a maker of big iron mainframes to a provider of software and services. The company was humbled and then saved by his leadership.
In the 1980s and 90s, Microsoft was so preeminent that every other software company’s strategic plan had to account for Microsoft’s response to their product. Would Microsoft copy their idea, produce a competitor, and destroy the market? Would they withhold critical technical information, making it difficult or impossible to support the product? Would they issue a press release stating that they “planned” on entering the market with a similar product at some future date (known in the industry as “vaporware”) and create so much FUD that the market would stall? Microsoft was so distrusted in the industry that it was terrifying to even partner with them. They might just steal your ideas, make a poor imitation, include it in Windows and kill the market. Like IBM, Microsoft was sued by the Dept. of Justice for antitrust violations. In fact, you can mark the beginning of the implosion of the dotcom bubble to the date that the lawsuit was decided, April 3, 2000. At that point, the Nasdaq index was 10% below its all-time high. One week later it was 34% below the peak. The party was over.
Microsoft is still around and still very powerful. In a future blog entry, I will make the case that Microsoft’s days as a dominant force in the market are numbered, but for now here are just a few general points;
1) Their stock was $36.50 in June of 2001. Today it is at $25. Not a good investment, even with dividends.
2) When you hear “Windows”, is your initial reaction positive or negative? “Windows” is Microsoft’s most valuable trademark. Do you associate it with solid, trouble free computing or has it become something of a cultural joke?
3) How has Microsoft’s foray into online computing panned out? They started 15 years ago in 1995. Are they a player? Would you trust Microsoft with your personal or corporate information?
4) If you were a graduating computer science student and you had a choice to work for Google, Apple, some exciting new startup, or Microsoft, would you pick Microsoft? In the software industry, we believe that talent is our future (credit to Whitney Houston)..
5) Microsoft has made attempts to diversify into a dizzying array of products. Aside from a modest success with the XBox, how has that worked out? They just killed their latest mobile phone attempt (“Kit”) after just two months due to a total lack of demand. Ask yourself, would you rather have a Windows mobile phone, an iPhone, an Android based phone, or a Blackberry? Would you rather have an iPod or a Microsoft Zune? The only reason that Microsoft is still powerful is because they have a cash cow in Office and Windows, but knowledgeable people are beginning to discover that other products (like the free OpenOffice suite) meet their needs just fine. How long will it be before corporations catch on and stop paying Microsoft billions of dollars when instead they can either use free software or an application on the Web? Linux and the Mac run indefinitely with nary a crash and with little worry about viruses and spy ware. How many times have you reinstalled Windows on the same PC? What’s Microsoft’s competitive position on the Internet? In the mobile device field? Unless Microsoft can change public perception and move into hot new markets, they have peaked and will begin to decline. 5 years is an eternity in tech. I look forward to reviewing their position in 2015.
Why review the history of IBM and Microsoft? Because today, there is a new dominant tech company. It’s always hard to imagine how such dominant companies can lose their position. Companies like IBM, Microsoft, AT&T, GM. And Apple.
You know Apple. The scrappy underdog. The company that the brilliant Steve Jobs brought back from the dead and turned into a media darling. The company that can do no wrong. I own a MacBook Pro and an iPhone 3GS. I love Apple products. But Apple is changing. They are morphing from an underdog to a bully. They are beginning to become downright Microsoftian in attitude. To wit:

  • How many modern smartphones don’t allow you to use removable memory cards? Answer: one, the iPhone. This allows Apple to sell models differentiated only by the amount of storage. It also forces users to use iTunes to transfer music, video, or applications. Either use iTunes or get a different phone.
  • If your iPhone battery won’t keep a charge any more, you can’t replace it yourself (like any other phone). You have to go to www.apple.com, find the closest Apple Retail Store, bring your phone to them, and pay a technician to install a new battery for you. The closest store to where I am typing this entry is an hour and a half away. Traveling and short on time? Tough luck. Of course, you could mail your iPhone to Apple and they will replace the battery and mail it back. That’s not too much time, expense, and hassle just to change a battery is it? “Apple; it’s all about the user experience.”
  • If you are a developer who has created an iPhone or iPad app, Apple may or may not approve your application. There are certain no-nos that are well publicized. On the other hand, there are a whole lot of things that can disqualify you that you don’t know about and can’t determine in advance. It’s on a case-by-case basis, you know, more like guidelines than rules. So spend what little cash that you have on R&D and roll the dice. Your app might get accepted. Then again, it may not. Steve Jobs insists that Apple must have complete control over the user experience. Remember Apple’s most famous commercial? How ironic. By contrast, the Android OS is completely open, so as a developer or a user, you can deliver software any way that you’d like and run anything that you want. There are a lot of very good Android phones out there . . .
  • On the product front, Apple is starting to show some cracks in its armor. Go ahead and Google “MacBook trackpad click”. My MacBook trackpad now requires me to push when I click or it doesn’t register. Of course all vendors have occasional hardware issues, but check out how long people have been complaining about this. What has Apple’s response been? “Apple Store”.
  • It looks to me like the iPhone OS 4 saga may be the beginning of a story akin to Microsoft Vista. The Internet is rife with stories like mine. I have a 1 year old 32GB iPhone 3GS. I upgraded to OS 4.0 and the phone became almost unusable. Many times it just wouldn’t respond, and when it did it was sloooooow. It couldn’t connect to Wifi networks that I had been using for a year without any problems. It would drop Wifi connections and refuse to reconnect. There were at best some mild benefits to the vaunted new “multitasking” features, but not nearly enough to offset the really major issues. In short, it was a disaster. Worse yet, Apple provides no downgrade mechanism. Once OS 4 is installed, you are stuck with it. Apple actually wrote specific code into iTunes to prevent you from downgrading. Finally, after 2 days of my phone not working correctly, I used a complex hack that I found on the Internet to downgrade to OS 3.12 and it is working perfectly again. The Internet is filled with complaints, and most users are not software engineers.
  • Apple’s response to the iPhone 4’s external antenna flap is instructive. Their response can be summed up as “quit your whining”. Their only solution is to offer a free iPhone condom so that the user’s skin will not touch the external antenna and cause reception problems. I don’t want to be too forward, but would you mind undressing your new iPhone 4 so I can take a look?

Apple hasn’t blown it by any means, but the direction they’re taking is making me uncomfortable. Hubris has a way of biting tech companies in the ass (see IBM and Microsoft). Am I predicting the decline of Apple? Absolutely not. They are still the preeminent design and marketing company in tech. Apple has always had four major advantages; beautiful designs, great marketing, flawless execution, and fanatically loyal users. I don’t expect their designs and marketing to fall off, but for the first time in a long time there are questions regarding their execution. It remains to be seen how loyal their users will remain now that Apple has morphed from a scrappy little underdog to a borderline arrogant giant.
Stay tuned, this could get interesting.

Software Engineers and Musicians

There is almost no difference between a preening, tattooed rock star and a Star Trek worshipping, Cheetos-eating computer geek.
Ok, maybe I’m overstating that just a tad. I am an executive at a software company. I started as a software engineer and still consider myself a software engineer (of course as soon as one moves into a management role, former colleagues snicker behind your back when you continue to refer to yourself as a “software engineer”). I have worked in the software industry for 27 years. With all the seismic changes that have occurred over that time, from green screen terminals, to PCs, to networks, to desktop supercomputers, to the Internet and mobile computing, one fact has remained constant; an inordinate percentage of software engineers are also amateur or semi-professional musicians.
I have personally observed this phenomenon through the years. I can’t count the number of times that I have been out to dinner with new acquaintances who work in the software industry. The talk turns to music, and inevitably a majority of the group actively plays an instrument. One colleague of mine recently quoted a study (I have no idea if this is true) which showed that 85% of IT workers were also musicians.
The question is; why should this be so? Believe me; my friends and I have batted around a number of theories. There are some obvious similarities; the stereotypical rock star exists on Jack Daniels and cocaine, the software engineer on Twinkies and Jolt cola. Rock stars rebel against bureaucracy and the “suits” at the big companies (or at least they used to when the music was more important than commercial success). Software engineers do the same (that’s why so many good ones opt to work at small companies and open source projects). Rock stars have their band. Software engineers have their team. Both choose jobs that don’t require a dress code (just turn out good tunes or good code) and have more flexible hours (or just more hours). Rock stars work towards the CD release, software engineers the product release. Just as many software engineers are amateur musicians, many musicians are amateur computer geeks.
I have a theory that I think neatly explains the significant overlap in interest and skill between these two groups. Like most good theories, this one is forehead-slappingly obvious once you hear it. In a nutshell, software engineers and musicians do virtually the same thing. Allow me to explain. Most people who do not work in the high-tech industry assume that software engineering is mathematical in nature. Ask any teenager why he or she is uninterested in programming and I’ll bet you that most will say “I’m not good at math”. There is a perception that programming is a mathematically based calculation, probably because the parallel idea persists that computers are nothing more than giant, blindingly fast calculators. But the truth is that programming is not a mathematical exercise, it is a creative exercise. Programmers are given a language syntax, programming interfaces, and a toolset which together form a structured framework. Within that framework they can be inventive, creative, and imaginative. Truly great programmers create elegant, almost beautiful solutions to complex problems. Peer recognition of their creativity and expertise is a large part of their reward. Sound familiar? Musicians are also given a “language syntax” and a set of rules that form a structured framework. Within that very structured framework they are also called upon to be inventive, creative, and imaginative. A software engineer hones the same skills that are required of the musician. If he or she also happen to have a good ear, why not pick up an instrument and leverage those skills in a different and equally interesting realm? All that is required is that he or she learn another language and a different structure.
I have no idea how one would go about attempting to prove whether my theory is correct, but I will admit to having a hidden agenda. My hope is that the next time the reader meets a software engineer, the first thought that comes to mind will not be “computer geek”. It will be “artist”.