<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>MightyOhm &#187; USB</title>
	<atom:link href="http://mightyohm.com/blog/tag/usb/feed/" rel="self" type="application/rss+xml" />
	<link>http://mightyohm.com/blog</link>
	<description>Join the resistance.</description>
	<lastBuildDate>Tue, 07 Feb 2012 00:07:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>David Nichols&#8217; Tweetster, a wireless Twitter display</title>
		<link>http://mightyohm.com/blog/2009/07/david-nichols-tweetster-a-wireless-tweets-display/</link>
		<comments>http://mightyohm.com/blog/2009/07/david-nichols-tweetster-a-wireless-tweets-display/#comments</comments>
		<pubDate>Tue, 28 Jul 2009 22:47:02 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[DIY]]></category>
		<category><![CDATA[Embedded Linux]]></category>
		<category><![CDATA[Asus]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[twitter]]></category>
		<category><![CDATA[USB]]></category>
		<category><![CDATA[wireless router]]></category>
		<category><![CDATA[WL-520GU]]></category>

		<guid isPermaLink="false">http://mightyohm.com/blog/?p=2152</guid>
		<description><![CDATA[David Nichols made this awesome wireless twitter display by combining a hacked Asus WL-520gU wireless router with a Sparkfun serial-enabled LCD display.  The router is running the same OpenWrt distribution I used for my Wifi Radio project, plus a USB thumbdrive that provides some additional flash storage space.  I really like the custom laser cut [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.makezine.com/archive/2009/07/tweetster_-_wireless_tweets_display.html?CMP=OTC-0D6B48984890"><img class="alignnone" src="http://mightyohm.com/blog/wp-content/uploads/2009/07/tweetster2.jpg" alt="" width="500" height="375" /></a></p>
<p><a href="http://www.dotmatrixdesign.net/">David Nichols</a> made this awesome wireless twitter display by combining a hacked <a href="http://mightyohm.com/blog/2008/10/detailed-specs-for-the-asus-wl-520gu-uber-hacking-platform/">Asus WL-520gU wireless router</a> with a <a href="http://www.sparkfun.com">Sparkfun</a> <a href="http://www.sparkfun.com/commerce/product_info.php?products_id=9069">serial-enabled LCD display</a>.  The router is running the same <a href="http://www.openwrt.org">OpenWrt</a> distribution I used for my <a href="http://mightyohm.com/wifiradio/">Wifi Radio project</a>, plus a USB thumbdrive that provides some additional flash storage space.  I really like the custom laser cut base that holds the LCD display and the router!</p>
<p>For more pics and info, check out David&#8217;s <a href="http://www.flickr.com/photos/davidnin/sets/72157621842283574/">flickr set</a> for the project.</p>
<p>via Make: Online &#8211; <a href="http://blog.makezine.com/archive/2009/07/tweetster_-_wireless_tweets_display.html?CMP=OTC-0D6B48984890">Tweetster &#8211; Wireless tweets display</a></p>
]]></content:encoded>
			<wfw:commentRss>http://mightyohm.com/blog/2009/07/david-nichols-tweetster-a-wireless-tweets-display/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Building a Wifi Radio &#8211; Part 5, Let&#8217;s Make Some Noise!</title>
		<link>http://mightyohm.com/blog/2008/11/building-a-wifi-radio-part-5-lets-make-some-noise/</link>
		<comments>http://mightyohm.com/blog/2008/11/building-a-wifi-radio-part-5-lets-make-some-noise/#comments</comments>
		<pubDate>Sat, 08 Nov 2008 08:01:31 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[DIY]]></category>
		<category><![CDATA[Embedded Linux]]></category>
		<category><![CDATA[mpd]]></category>
		<category><![CDATA[music]]></category>
		<category><![CDATA[OpenWRT]]></category>
		<category><![CDATA[project]]></category>
		<category><![CDATA[Streaming Radio]]></category>
		<category><![CDATA[USB]]></category>
		<category><![CDATA[wifiradio]]></category>

		<guid isPermaLink="false">http://mightyohm.com/blog/?p=598</guid>
		<description><![CDATA[This is the fifth part of an ongoing series at mightyOhm about building a low cost, open source streaming internet radio.  If you haven&#8217;t already, check out the previous parts below for some background about the project. Building a Wifi Radio &#8211; Part 1, Introduction Building a Wifi Radio &#8211; Part 2, Choosing an Embedded [...]]]></description>
			<content:encoded><![CDATA[<p><em>This is the fifth part of an ongoing series at mightyOhm about building a low cost, open source streaming internet radio.  If you haven&#8217;t already, check out the previous parts below for some background about the project.</em></p>
<p><a href="http://mightyohm.com/blog/2008/10/building-a-wifi-radio-part-1-introduction/">Building a Wifi Radio &#8211; Part 1, Introduction</a></p>
<p><a href="http://mightyohm.com/blog/2008/10/building-a-wifi-radio-part-2-choosing-an-embedded-platform/">Building a Wifi Radio &#8211; Part 2, Choosing an Embedded Platform</a></p>
<p><a href="http://mightyohm.com/blog/2008/10/building-a-wifi-radio-part-3-hacking-the-asus-wl-520gu/">Building a Wifi Radio &#8211; Part 3, Hacking the Asus WL-520GU</a></p>
<p><a href="http://mightyohm.com/blog/2008/11/building-a-wifi-radio-part-4-installing-openwrt/">Building a Wifi Radio &#8211; Part 4, Installing OpenWrt</a></p>
<h4>Note:</h4>
<p>The instructions that follow assume that you have an Asus WL-520GU wireless router with the following modifications: an externally accessible serial port, OpenWrt installed and working, and a configured network connection on the router.  If not, check out the previous parts of the series to learn more.</p>
<h3>Using opkg to customize OpenWrt:</h3>
<p><a href="http://openwrt.org">OpenWrt</a> includes a utility called <a href="http://wiki.openwrt.org/OpenWrtDocs/Packages#head-483764faec3e847c48e0794e875a7823eb4fd3aa">opkg</a> that allows the end user to easily add and remove optional software packages.  These packages include functionality that is not a part of the OpenWrt base image, such as hardware drivers (including USB), optional software, and utilities.  Most packages are not installed by default (after all, the router only contains 4MB of flash storage).  The <a href="http://wiki.openwrt.org/OpenWrtDocs">OpenWrt Community Wiki</a> includes a <a href="http://wiki.openwrt.org/OpenWrtDocs/Packages">very helpful page about Packages</a> that contains a lot of useful information about configuring and using opkg.</p>
<p>Before we can use opkg we need to configure it.  The file <em>/etc/opkg.conf</em> contains a few options, including the URL of the server opkg uses to find and download packages.  We need to change this server from the default by modifying the config file:</p>
<blockquote>
<pre>root@OpenWrt:~# vi /etc/opkg.conf</pre>
</blockquote>
<p>Modify the first line to look like this:</p>
<blockquote>
<pre>src/gz snapshots <strong>http://mightyohm.com/files/kamikaze-2.4/packages/mipsel </strong></pre>
<pre>dest root /</pre>
<pre>dest ram /tmp</pre>
<pre>lists_dir ext /var/opkg-lists</pre>
</blockquote>
<p>You can also download the <a href="http://mightyohm.com/files/kamikaze-wl520gu.zip">complete set of packages</a> and set up a server of your own for opkg to access.  I have had great success using the <a href="http://www.apache.org/">apache</a> server included with OS X, but I won&#8217;t cover the setup here.</p>
<p>The following command tells opkg to fetch a list of available packages from the server:</p>
<blockquote>
<pre>root@OpenWrt:~# opkg update</pre>
</blockquote>
<p>You should see the following response:</p>
<blockquote>
<pre>Downloading http://mightyohm.com/files/kamikaze-2.4/packages/mipsel/Packages.gz</pre>
<pre>Connecting to mightyohm.com (72.32.209.132:80)</pre>
<pre>Packages.gz          100% |*******************************|  8326  --:--:-- ETA</pre>
<pre>Inflating http://mightyohm.com/files/kamikaze-2.4/packages/mipsel/Packages.gz</pre>
<pre>Updated list of available packages in /var/opkg-lists/snapshots</pre>
<pre>Signiture check for snapshots skipped because GPG support was not enabled in this build</pre>
</blockquote>
<p>Now we can start installing packages.  To access our <a href="http://mightyohm.com/blog/2008/10/inside-the-syba-sd-cm-uaud-usb-stereo-audio-adapter/">USB-audio converter</a>, we need to install USB 1.1 (OHCI) support and some sound drivers:</p>
<blockquote>
<pre>root@OpenWrt:~# opkg install kmod-usb-audio kmod-usb-ohci</pre>
</blockquote>
<p>This should automatically install <em>kmod-usb-core</em> and <em>kmod-sound-core</em>, but if not you can also install them manually with the <em>opkg install</em> command.</p>
<p>At this point you should insert the USB-audio converter if you haven&#8217;t already.  Then reboot the router:</p>
<blockquote>
<pre>root@OpenWrt:~# reboot</pre>
</blockquote>
<p>As the router is booting again, watch for new status messages like these:</p>
<blockquote>
<pre>...
usb-ohci.c: USB OHCI at membase 0xb8003000, IRQ 6</pre>
<pre>usb-ohci.c: usb-00:03.0, PCI device 14e4:471a</pre>
<pre>usb.c: new USB bus registered, assigned bus number 1</pre>
<pre>usb.c: registered new driver audio</pre>
<pre>audio.c: v1.0.0:USB Audio Class driver</pre>
<pre>usbaudio: device 2 audiocontrol interface 0 has 1 input and 1 output AudioStreaming interfaces</pre>
<pre>usbaudio: device 2 interface 2 altsetting 1 channels 1 framesize 2 configured</pre>
<pre>usbaudio: valid input sample rate 48000</pre>
<pre>usbaudio: valid input sample rate 44100</pre>
<pre>usbaudio: device 2 interface 2 altsetting 1: format 0x00000010 sratelo 44100 sratehi 48000 attributes 0x01</pre>
<pre>...
usbaudio: registered dsp 14,3</pre>
<pre>usbaudio: constructing mixer for Terminal 6 type 0x0301</pre>
<pre>...</pre>
</blockquote>
<p>If you see this, the USB-audio converter is most likely working and the correct drivers have been loaded.  At this point the green LED inside the USB-audio converter should be lit, another sign that everything is working correctly.</p>
<h3>Installing mpd:</h3>
<p>To actually play some tunes we need to install some additional software.  We can use opkg to do this, as follows:</p>
<blockquote>
<pre>root@OpenWrt:~# opkg update

root@OpenWrt:~# opkg install mpd mpc</pre>
</blockquote>
<p>This command installs <a href="http://mpd.wikia.com/wiki/Music_Player_Daemon_Wiki">mpd</a>, the music player daemon.  mpd is an open source music server that can be accessed locally or across a network by using a variety of <a href="http://mpd.wikia.com/wiki/Clients">clients</a>, which are available for many different platforms.  This includes the command line client <a href="http://mpd.wikia.com/wiki/Client:Mpc">mpc</a> which is also now installed on the router.</p>
<p>mpd requires some setup before we can use it:</p>
<blockquote>
<pre>root@OpenWrt:~# cd ~</pre>
<pre>root@OpenWrt:~# mkdir .mpd</pre>
<pre>root@OpenWrt:~# mkdir music</pre>
<pre>root@OpenWrt:~# mkdir .mpd/playlists</pre>
<pre>root@OpenWrt:~# vi /etc/mpd.conf</pre>
</blockquote>
<p>Scroll down and look for the audio_output section of the mpd configuration file, and change the reference to <em>/dev/dsp</em> to make it look like this:</p>
<blockquote>
<pre># An example of an OSS output:
#
audio_output {
        type                    "oss"
        name                    "My OSS Device"
        device                  <strong>"/dev/sound/dsp"</strong>
        format                  "44100:16:2"
}</pre>
</blockquote>
<p>There are many other options you can play with; mpd is very powerful.  There is a list of features <a href="http://mpd.wikia.com/wiki/Features">here</a> and a lot more information on the <a href="http://mpd.wikia.com/wiki/Music_Player_Daemon_Wiki">mpd wiki</a>.</p>
<p>Exit vi, saving the changes to mpd.conf.  Now launch mpd with the following command:</p>
<blockquote>
<pre>root@OpenWrt:~# mpd</pre>
</blockquote>
<p>The player should start silently, without errors.  Run mpc and verify that it can talk to the server:</p>
<blockquote>
<pre>root@OpenWrt:~# mpc
volume:100%   repeat: off   random: off</pre>
</blockquote>
<p>If you see this, good news, the server is running and we have the ability to control it with mpc!</p>
<p>Now would be a good time to connect speakers or headphones to the USB-audio adapter&#8217;s headphone output.  <strong>Warning &#8211; the initial volume can be </strong><strong>VERY LOUD.</strong> Don&#8217;t wear headphones during testing!  PC speakers with a volume control are best.  Start at a low volume.  (My ears are still ringing!)</p>
<p>We can add a streaming radio server to the playlist by executing</p>
<blockquote>
<pre>root@OpenWrt:~# mpc add http://relay3.slayradio.org:8000/
adding: http://relay3.slayradio.org:8000/</pre>
</blockquote>
<h3><strong>And finally, the moment of truth:</strong></h3>
<blockquote>
<pre>root@OpenWrt:~# mpc play</pre>
<pre>http://relay3.slayradio.org:8000/</pre>
<pre>[playing] #1/1   0:00/0:00 (100%)</pre>
<pre>volume:100%   repeat: off   random: off</pre>
<pre>root@OpenWrt:~#</pre>
</blockquote>
<p>If all goes well, within a few seconds you should hear <a href="http://slayradio.org/">Slay Radio</a> playing on your headphones or speakers.  The Air light on the router should flicker as traffic crosses the WiFi interface, and the green light on the USB-audio converter should flash repeatedly to indicate that audio is being sent to the device.</p>
<p>If you&#8217;ve made it this far, I recommend celebrating with your <a href="http://www.flickr.com/photos/mightyohm/2680813515/">favorite beverage</a> and enjoying some tunes!  Congratulations!</p>
<p>You can add other servers to the playlist by executing the <em>mpc add</em> command again, and then play them with the <em>mpc play n </em>command, where <em>n</em> is the position of the server in the playlist.  <em>mpc playlist</em> will display the current playlist. <em>mpc help</em> will give you a list of available commands.</p>
<p>One very powerful feature of mpd is that it operates as a server on port 6600 of the router, so it can be controlled from any other device on your local network.  If you download an mpd client such as <a href="https://theremin.sigterm.eu/cgi-bin/trac.cgi">Theramin</a>, you can control the router remotely from your desktop computer.  There is an excellent <a href="http://www.katoemba.net/makesnosenseatall/mpod/">client for the iPhone</a> too.</p>
<p>That&#8217;s it for part five.   I hope you have enjoyed the series thus far.  In part six, we&#8217;ll start writing some scripts to control mpd and talk about options for a user interface.  If you are building a Wifi Radio of your own, I&#8217;d love to hear about it &#8211; leave a comment below!</p>
<p><strong>Update:</strong> <a href="http://mightyohm.com/blog/2008/12/building-a-wifi-radio-part-6-a-conversation-with-mpd/">Part six</a> is now available.</p>
]]></content:encoded>
			<wfw:commentRss>http://mightyohm.com/blog/2008/11/building-a-wifi-radio-part-5-lets-make-some-noise/feed/</wfw:commentRss>
		<slash:comments>83</slash:comments>
		</item>
		<item>
		<title>Inside the SYBA SD-CM-UAUD USB Stereo Audio Adapter</title>
		<link>http://mightyohm.com/blog/2008/10/inside-the-syba-sd-cm-uaud-usb-stereo-audio-adapter/</link>
		<comments>http://mightyohm.com/blog/2008/10/inside-the-syba-sd-cm-uaud-usb-stereo-audio-adapter/#comments</comments>
		<pubDate>Wed, 29 Oct 2008 15:21:36 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Electronics]]></category>
		<category><![CDATA[Embedded Linux]]></category>
		<category><![CDATA[Audio]]></category>
		<category><![CDATA[Embedded]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[pcb]]></category>
		<category><![CDATA[Streaming Radio]]></category>
		<category><![CDATA[USB]]></category>
		<category><![CDATA[wifiradio]]></category>

		<guid isPermaLink="false">http://mightyohm.com/blog/?p=464</guid>
		<description><![CDATA[I am using this tiny USB-audio adapter as part of my Wifi Radio project.  It&#8217;s a ridiculously cheap $8 at Newegg.com and contains a C-Media CM119 chip targeted at VoIP applications.  I have no idea why they chose to use a VoIP chip for this application because it contains a lot of bells and whistles [...]]]></description>
			<content:encoded><![CDATA[<p><a class="tt-flickr tt-flickr-Medium" title="SYBA SD-CM-UAUD USB Stereo Audio Adapter" href="http://www.flickr.com/photos/mightyohm/2979795890/"><img class="alignnone" src="http://farm4.static.flickr.com/3286/2979795890_b29ce48e3e.jpg" alt="SYBA SD-CM-UAUD USB Stereo Audio Adapter" width="500" height="375" /></a></p>
<p>I am using this tiny USB-audio adapter as part of my <a href="http://mightyohm.com/blog/2008/10/building-a-wifi-radio-part-1-introduction/">Wifi Radio project</a>.  It&#8217;s a ridiculously cheap <a href="http://www.jdoqocy.com/click-3238164-10440897?url=http%3A%2F%2Fwww.newegg.com%2FProduct%2FProduct.aspx%3FItem%3DN82E16812186035%26nm_mc%3DAFC-C8Junction%26cm_mmc%3DAFC-C8Junction-_-Adapters%2Band%2Bgender%2Bchangers-_-Syba-_-12186035&#038;cjsku=N82E16812186035" target="_top">$8 at Newegg.com</a><img src="http://www.awltovhc.com/image-3238164-10440897" width="1" height="1" border="0"/> and contains a <a href="http://www.cmedia.com.tw/?q=en/USB/cm119">C-Media CM119 chip</a> targeted at <a href="http://en.wikipedia.org/wiki/Voip">VoIP</a> applications.  I have no idea why they chose to use a VoIP chip for this application because it contains a lot of bells and whistles that are not being used in this device, such as support for a matrix keypad!</p>
<p><a class="tt-flickr tt-flickr-Medium" title="SYBA SD-CM-UAUD USB Stereo Audio Adapter" href="http://www.flickr.com/photos/mightyohm/2979796540/"><img class="alignnone" src="http://farm4.static.flickr.com/3006/2979796540_a07d6c17aa.jpg" alt="SYBA SD-CM-UAUD USB Stereo Audio Adapter" width="500" height="375" /></a></p>
<p>Unfortunately, I have not been able to locate a datasheet for the CM119 so for now I will be using it only for it&#8217;s intended application &#8211; adding an audio output to a wireless router with USB.  Come to think of it, that is probably not it&#8217;s intended application, but it&#8217;s close enough.  Hooray for <a href="http://www.openwrt.org">embedded Linux</a>!</p>
<p><a class="tt-flickr tt-flickr-Medium" title="SYBA SD-CM-UAUD USB Stereo Audio Adapter" href="http://www.flickr.com/photos/mightyohm/2978939643/"><img class="alignnone" src="http://farm4.static.flickr.com/3277/2978939643_056d1d8d3f.jpg" alt="SYBA SD-CM-UAUD USB Stereo Audio Adapter" width="500" height="375" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://mightyohm.com/blog/2008/10/inside-the-syba-sd-cm-uaud-usb-stereo-audio-adapter/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
	</channel>
</rss>

