Saturday, November 30, 2013

USB Serial Converters, You don't need to buy one for each device.

I've been meaning to write about how to avoid having to buy a USB serial converter for every single radio, wireless router, microcontroller, or home automatic project.  Particularly because of all of the issues with counterfeit Prolific chips and driver woes. FTDI is the most desirable USB serial converter chip to have, but the premium is $10-20 at least for each cable.

You can use one USB to serial converter cable and adapt it to multiple devices, but you need to match voltages.  Devices can either be
  • RS-232 (-12Vdc to +12Vdc, or more commonly -5Vdc to +5Vdc).  This is the good old-fashioned serial that has all but disappeared from modern electronics.
  • TTL (0 - 5Vdc)
  • LVTTL (0 - 3.3Vdc)
[I Still Need to Add a Lot More Here]

The Chinese radio manufacturers (or maybe I should say accessory manufacturers have come up with an answer which could be a blessing or a curse.  They are now selling 6-in-1 or 8-in-1 radio programming cable kits which include one USB serial adapter which brings out 3 wires (RX, TX, Gnd)  in a 3.5mm TRS phone plug/jack set.  There are a set of cables to adapt to a number of different radio styles.

The Good news -- These are available for around $10 and should be useful to peuple who own multiple radios or need to program other people's radios, like clubs and emcomm groups.

The Bad news:
  • The converter is based on, you guessed it, the same crap counterfeit Prolific chips that fill every group I read with the same driver related questions over and over.
  • Because it's plug and pray, it will be easy to experiment and possibly/probably damage some electronics. 
Fortunately, it should be pretty easy to replace the USB serial converter component with one that is based on the FTDI or CP2102 (or CP2103).  I should probably write up a project.  Bonus points would be:
  • Adding TX/RX LEDs to assist with diagnosis
  • Adding over-voltage protection
  • Detecting and protecting against reversed connections
  • Ability to get at RTS/CTS lines for other uses.

Raspberry Pi vs BeagleBone Black Comparisons

The Raspberry Pi has gotten a lot of attention as a DIY microcomputer module for building all sorts of things. The low price, $35 which was in line with what Arduinos were being sold for a few years ago helped attract a lot of attention.

For many projects, the BeagleBone Black may be a better choice.  It's available for $45, but has nearly twice the CPU performance, 2 GB flash built-in, and perhaps most important for some projects, has lots more I/O capabilities.  Sure at $10 more, it seems almost 30% more expensive than an RPi, but in most cases that won't matter especially after adding an SD card, and a cable to the Rasbberry Pi.

There are lots of comparisons already written. Some also try to compare with the Arduino which is really a different beast but it's somewhat understandable given the prices and that it's all "DIY".

Here's a useful comparison:

Without summarizing/rewriting the whole comparison, here are the bits that I think are most useful.

Choose the Raspberry Pi (RPi) if you want to:
  • Build an HDTV connected media player or DIY Linux computer with a full GUI.  The RPi does 1080p 1920x1080 with a regular full size HDMI connector.
  • Learn or give a gift to someone who wants to learn as the RPi has a much larger community and better tutorial coverage.
    • Note the BeagleBone Black, is actually much easier to get started with, and most of the tutorials for RPi should be able to be translated without too much effort, but that might be too daunting for some just learning with no support network.
 Choose the BeagleBone Black (BBB) if you want to:
  • Build projects that need more compute power or lots more I/O connectivity
  • HDTV connectivity at 1080p isn't important to you.
  • Get started more quickly, the OS is already installed.
  • have both USB Host and Client mode.  (The BeagleBone Bone can act like a computer, USB host mode, or it can act like a device that needs a computer to control it.)
Of course you could have one of each for $80 and still not break the bank. ;-)

Wednesday, November 27, 2013

Exploring the Wireless World with Software Defined Radio

From the blog: links to a 12 minute video, and a longer  40 minute version, by Balint Seeber showing some of what is available in the VHF and UHF bands using a computer and a software defined radio receiver.

While the videos are from a company that produce high-end SDRs, most of what is shown can be done with a $20 RTL SDR USB stick and freely available software.

If you are interested in playing with one of these, make sure you get one
that has the R820T tuner chip which can receive from 24 - 1766 MHz.  These
will do FM, AM, Broadcast (wide) FM, LSB, USB.  You will need some
adapters to hook it up to a better antenna.

Good sources are: NooElec and Adafruit:   NooElec also sells through Amazon.
Adafruit is a great source for all sorts of do-it-yourself electronics.

If you are looking to save a few bucks, you can get these from china direct
sites like Deal Extreme, but it will take a few weeks to get to you.


Wednesday, November 20, 2013

HOWTO: Create a bootable Mac OS X Mavericks DVD/.iso (Bonus: uses the command line)

Almost all of the instructions only cover USB thumb drives, figuring that DVDs are dead in the Mac world.. This one makes a bootable .iso from the downloaded installer using only command line utilities. This is aimed at virtualization environments, where an .iso file is often used to bootstrap a virtual machine.

I've tested this, burned to a dual layer DVD and successfully booted a (mid-2011) Mac mini.

Note: you need to have the Mavericks installer already downloaded from the app store. Ideally, you will snag a copy before you upgrade.  If you buy a machine that is already pre-loaded you won't be able to download it from the app store.

HOWTO: Create a bootable Mavericks ISO -,  by user CrEOF. 

This is pretty cool, I learned a few things, but I need to learn more about hdiutil and sparse bundles. I suspect that older tutorials for making bootable OS X Lion DVDs would probably work the same way for OS X Mavericks.

# Mount the installer image
hdiutil attach /Applications/Install\ OS\ X\ -noverify -nobrowse -mountpoint /Volumes/install_app

# Convert the boot image to a sparse bundle
hdiutil convert /Volumes/install_app/BaseSystem.dmg -format UDSP -o /tmp/Mavericks

# Increase the sparse bundle capacity to accommodate the packages
hdiutil resize -size 8g /tmp/Mavericks.sparseimage

# Mount the sparse bundle for package addition
hdiutil attach /tmp/Mavericks.sparseimage -noverify -nobrowse -mountpoint /Volumes/install_build

# Remove Package link and replace with actual files
rm /Volumes/install_build/System/Installation/Packages
cp -rp /Volumes/install_app/Packages /Volumes/install_build/System/Installation/

# Unmount the installer image
hdiutil detach /Volumes/install_app

# Unmount the sparse bundle
hdiutil detach /Volumes/install_build

# Resize the partition in the sparse bundle to remove any free space
hdiutil resize -size `hdiutil resize -limits /tmp/Mavericks.sparseimage | tail -n 1 | awk '{ print $1 }'`b /tmp/Mavericks.sparseimage

# Convert the sparse bundle to ISO/CD master
hdiutil convert /tmp/Mavericks.sparseimage -format UDTO -o /tmp/Mavericks

# Remove the sparse bundle
rm /tmp/Mavericks.sparseimage

# Rename the ISO and move it to the desktop
mv /tmp/Mavericks.cdr ~/Desktop/Mavericks.iso
Now copy the .iso file or burn it to DVD with Disk Utility 

Opinion: Infinite Scrolling Web Pages Considered Harmful,

This article could also be titled:
  • Bring Back Pagination - it worked fine for all those years
  • Why does Slashdot suck (keep crashing Safari) on my iPad?
Lately, it seems that the new shiny is to have web pages that automatically load more content as you scroll down.  This saves you from having to hit a link to go to the next page of older content. At first this seems very cool and intuitive. Auto-filling in content saves you from reloading all of the page's chrome and ads again. However, if you need to go back any more than that and this feature winds up being a step back in functionality.

Consider what happens when you come across a new blog you've never read and you might want to do something unheard of like read the whole thing.  How do you know where you are?  How do stop and come back to it?  How do you access one of the pages in the middle?  All of the pagination controls are now gone. If you need to come back to it, say because your browser crashed, you need to start at the beginning and reload all of the content all over again, scrolling, scrolling, scrolling until you find what you've last read.

Where this really blows up, literally, is devices with limited amount of memory like tablets. A guaranteed way to crash Safari on iOS is to access one of these infinite pages. As soon as the page gets big enough, iOS will run out of memory, and kill Safari as the largest process.

Slashdot doesn't actually auto-fill, but requires you to hit a button to load more into the current page. (The regular "desktop" version of the site still uses classical pagination, where there is a "more / older" button to go back a page.)  Depending on the state of my iPad, between two and five loads of additional content will cause Safari to crash. Slashdot has it exactly backwards from what it should be. "Desktops" have oddles of (virtual) memory when compared to mobile devices.

How bad this behaviour is depends on how much memory your device has.  The first iPad had 256MB. Ok, that's old news, what about current models?  The iPad 2 which is still being sold for an astonishingly small discount of $100 less than the current fifth generation iPad only has 512 MB.  The last three generations of iPads (third though the fifth) have maxed out at 1 GB of ram. Clearly Apple doesn't believe more is needed, while there are web designers who feel an infinite amount of memory available and their content is the only thing you'd be looking at on your device. Am I surprised, unfortunately no.  Hopefully this yet another new trend will fade away when it's no longer the current new shiny.

Tip of the day:
At least for Slashdot you can get a paginated version if you can find the links for "classic" mode and bookmarking those. tries to be smart and redirects you to if it thinks you are on a mobile device.

Wednesday, November 6, 2013 Additional resource for amateur radio information using social/community technology.

Summary: New site for amateur radio questions and answers that could become very useful.

The background (aka my editorial):

For a number of years, software developers have been using web sites like stackoverflow (part of stack exchange) as a way of getting questions answered and using the results to build a searchable resource of higher quality information that avoids many of the problems associated with the typical forum or mailing list.  Questions and answers have plus and minus buttons that allow members to vote them up or down.  Higher rated questions and their answers appear closer to the top which makes useful information much easier to find. This "crowd moderation" helps move the noise of unhelpful responses that are typical on forums and mailing lists out of the way of the useful nuggets.

Members get reputation points as they get voted up and down.  Messages can be edited after they are posted which helps improve the quality of the information.

This type of community driven Q&A system has also been used to help make the free on-line college courses (aka Massive Online Open Courses or MOOCs) such as those offered by Coursera, edX, much more feasible by having students help other students rather than relying on the professor.

In my (not so) humble opinion, good on-line sources of information are critical to getting (and keeping) new, more technology literate people involved with amateur radio. Looking at the quality of tutorial information for the maker movement and things like Arduino, show why there are so many more people involved.

Here's a relevant example: What's a cost effective way to boot the range of my cheap handheld?