<?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/"
	xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Rob Hardwick's Blog</title>
	<atom:link href="http://robhardwick.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://robhardwick.wordpress.com</link>
	<description>Some hardware hacks that you may find interesting</description>
	<lastBuildDate>Mon, 21 Jul 2008 12:09:37 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='robhardwick.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/c0fda3e33f34ed8218eea81130488f80?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Rob Hardwick's Blog</title>
		<link>http://robhardwick.wordpress.com</link>
	</image>
			<item>
		<title>DIY Wireless Music Streamer</title>
		<link>http://robhardwick.wordpress.com/2008/07/21/3/</link>
		<comments>http://robhardwick.wordpress.com/2008/07/21/3/#comments</comments>
		<pubDate>Mon, 21 Jul 2008 12:09:08 +0000</pubDate>
		<dc:creator>rob2910</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://robhardwick.wordpress.com/?p=3</guid>
		<description><![CDATA[Here&#8217;s how            i managed to turn a wireless router into a remote controlled music streamer.            I am showing how to do this so that people can do the same
What you    [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=robhardwick.wordpress.com&blog=2946403&post=3&subd=robhardwick&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;">Here&#8217;s how            i managed to turn a wireless router into a remote controlled music streamer.            I am showing how to do this so that people can do the same</span></p>
<p><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;">What you            need:</span></p>
<ul>
<li><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;">A              Netgear WGT634U &#8211; £30 on ebay</span></li>
<li><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;">USB              2.0 Hub (mains powered) &#8211; £5-10 on ebay</span></li>
<li><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;">USB              Audio Card (linux compatible) &#8211; £10 from <a href="http://www.aria.co.uk/">aria</a></span></li>
<li><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;">USB              LCD compatible with lcdproc (see here). &#8211; £20 from BWCT plus              a cheap £5-10 HD44780 LCD module from ebay</span></li>
<li><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;">USB              infrared reciever compatible with lirc &#8211; £5-10 from ebay</span></li>
<li><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;">Siemens              C25, C35, C45 Data Cable</span></li>
<li><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;">A              computer running linux with a few GB spare on the Hard Disk</span></li>
</ul>
<p><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;">If you&#8217;re            lucky you may be able to make this for under £90. It may not be            as cheap as a second hand Netgear MP101 but the knowledge you can gain            from doing this is extremely valuable.</span></p>
<p><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;">I            started with the project after reading nate true&#8217;s <a href="http://devices.natetrue.com/musicap/">Wireless            Music Player</a>. He has sucessfully turned a Netgear WGT634U into a            wireless music streamer. However it is remotely managed, meaning that            you have to control it from a PC over telnet/ssh. I wanted a music player            that could be controlled using a remote so that a PC does not have to            be on. The system is based on OpenWrt (a linux distribution for wireless            routers).</span></p>
<p><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;"><a href="http://i218.photobucket.com/albums/cc58/rob2910/mplayer.jpg"><img style="border:2px solid black;margin-left:33px;margin-right:33px;" src="http://i218.photobucket.com/albums/cc58/rob2910/mplayersmall.jpg" border="2" alt="" hspace="33" width="248" height="187" align="right" /></a></span></p>
<p><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;"><em><strong>Getting            Started</strong></em></span></p>
<p><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;">The            first thing to do is to build an image for the WGT634U by running the            OpenWrt buildroot. See <a href="http://wiki.openwrt.org/OpenWrtDocs/Hardware/Netgear/WGT634U">this            page</a> for more details</span></p>
<p><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;">To            do this you will need to run from a terminal window.</span><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;">root@robert-linux:~$                  <em>svn co </em><strong>https://svn.openwrt.org/openwrt/trunk/</strong></span></p>
<p><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;">then cd into            the trunk directory and run</span><span style="color:#c0c0c0;"><em><strong></strong></em></span></p>
<p><span style="color:#c0c0c0;"><em><strong><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;">root@robert-linux:~/mydocs/trunk$                  make menuconfig </span></strong></em><br />
</span> <span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;">this will            give you a screen as opposite. Now make the            correct alterations to the config to suit your needs. Make sure you            select Broadcom BCMxxxx&#8230;.. with the Linux 2.6 kernel. Also ensure            you have selected the Atheros Wifi Profile. You will also need kmod-usb-core,            kmod-usb-soundcore, kmod-usb-2.0, kmod-usb-ohci,for the usb facilities.            Also select the nfs and cifs filesystems. You may also need zlib. When            you have selected the correct modules, libraries etc. just type:</span></p>
<p><span style="color:#c0c0c0;"><strong><em><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;">root@robert-linux:~/mydocs/trunk$ make</span></em></strong></span></p>
<p style="text-align:left;"><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;">is will            take a long time and it will take up a GB or so disk space. Once this            is done you will get a wgt634u bin file in the /trunk/bin directory.            This is the router&#8217;s image file which will be programmed into the flash<strong><em></em></strong></span></p>
<p style="text-align:left;"><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;"><strong><em>Modifying            the Data Cable</em></strong></span></p>
<p style="text-align:left;"><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;">In order            to program the router you will need modify the Siemens Data Cable to            fit the serial pins on the router board. To do this you simply take            the small end apart. There should be 3 wires connected to three different            pins. Here&#8217;s which pins to use, from left to right:</span><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;"><a href="http://i218.photobucket.com/albums/cc58/rob2910/cable.jpg"><img class="aligncenter" style="margin-left:33px;margin-right:33px;" src="http://i218.photobucket.com/albums/cc58/rob2910/cable.jpg" alt="" hspace="33" width="204" height="152" align="right" /></a></span></p>
<ul>
<li><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;">Pin #              1 &#8211; GND (Black) </span></li>
<li><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;">Pin #              5 &#8211; TX (Blue)</span></li>
<li><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;">Pin #              6 &#8211; RX (White)</span></li>
</ul>
<p><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;">Next            you will need to connect these to the pins on your router. I chose to            use a spare servo cable i had from a model airplane. These are pretty            cheap &#8211; less than £2. The plastic end of the servo cable fits            neatly on the pins of the router. </span></p>
<p><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;">The pins            on the router are as follows &#8211; from top to bottom:</span></p>
<p><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;">&#8211; 3v<br />
&#8211; TX<br />
&#8211; RX<br />
&#8211; GND</span><span style="color:#c0c0c0;"><img class="alignnone" src="http://i218.photobucket.com/albums/cc58/rob2910/pins1.jpg" alt="" width="218" height="162" /></span></p>
<p><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;">You only            need the TX, RX and GND pins. I discovered how to build the serial console            on the SarWiki site. See <a href="http://sarwiki.informatik.hu-berlin.de/Serial_console">here</a> for more details on how to contruct the data cable.</span></p>
<p><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;"><em><strong>Programming            the router</strong></em></span></p>
<p><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;">You will            need to setup a tftp server to program the router since the data cannot            be programmed entirely down the serial cable. Instead you have to connect            the WAN port on the router to the LAN port on your linux box with an            ethernet cable and the router will be programmed via the ethernet cable            using the tftp server. I used the TFTP server available at <a href="http://sourceforge.net/projects/tftp-server/">http://sourceforge.net/projects/tftp-server</a>.            It is easy to use. Simply specify a folder to use as a server in the            tftpserver.ini file and copy it to /etc. Then run something like:</span></p>
<p><span style="color:#c0c0c0;"><em><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;">root@robert-linux:~$ sudo /home/yourusername/tftpservermt/tftpserver -v</span></em></span></p>
<p><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;">practice            by getting and putting a test file to and from the tftp folder.</span></p>
<p><span style="color:#c0c0c0;"><em><strong><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;">root@robert-linux:~$                  tftp localhost<br />
tftp&gt; get test.txt</span></strong></em></span></p>
<p><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;">Now that            you know your tftp server is working correctly copy the <strong>openwrt-wgt634u-2.6-squashfs.bin</strong> (or similar) file into the tftp folder. You can now start programming            the router. Connect your modifyed serial cable into the serial port            on the back of your linux box. Then connect the other end to the serial            pins on your router as above. You cannot simply connect them directly            because they work on different levels. The router works on ttl level            serial where as the pc uses RS-232 level. Next connect an ethernet cable,            which you should get supplied with the router, to the WAN port on the            WGT634U and to the LAN port on your linux computer. I used minicom (a            serial communication technology) to interface with the router. If your            run debian or ubuntu, you can simply run apt-get install minicom</span></p>
<p><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;">Run            minicom from a terminal window and then hold down Ctrl + C at the same            time as inserting power into the WGT634U. This will halt the bootup            operation so that you can write a new image. IF this doesn&#8217;t work straight            away, as it didn&#8217;t for me then it is likely that you have the wrong            device configured in minicom. To change this just hold Crtl + A and            then Z. A help window should appear. Press O to go to configuration            and go to serial port setup. if it says device: /dev/ttyS1 try changing            it to /dev/ttyS0. This worked for me. Now I followed the intructions            in the official <a href="http://wiki.openwrt.org/OpenWrtDocs/Hardware/Netgear/WGT634U">doc            page</a>. I decided to use a static address rather than using the dhcp            server. I did something like the following:</span></p>
<p><span style="color:#c0c0c0;"><em><strong><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;">CFE&gt;                  ifconfig eth0 -addr=192.168.1.10 -mask=255.255.255.0</span></strong></em></span></p>
<p><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;">Next is the            command to write the image to the flash. Note, replace 192.168.1.4 with            the ip address of the linux box with your tftp server. To find out simply            type ifconfig eth0 from a blank terminal window.</span></p>
<p><span style="color:#c0c0c0;"><em><strong><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;">CFE&gt;                  flash -noheader 192.168.1.4:openwrt-wgt634u-2.6-squashfs.bin flash0.os</span></strong></em></span></p>
<p><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;">Once this            is done boot into OpenWrt with reboot.</span></p>
<p><span style="color:#c0c0c0;"><em><strong><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;">CFE&gt;                  reboot</span></strong></em></span></p>
<p><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;">.</span><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;"><strong><em>Configuration</em></strong></span></p>
<p><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;">You cannot            have the serial cable connected to the router the whole time so you            need a way of communicating with the router wirelessly. This can be            done via ssh. Before you can do that, you need to configure the router&#8217;s            with network settings. First of all set a password for the root user            to keep it secure. </span></p>
<p><span style="color:#c0c0c0;"><em><strong><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;">root@OpenWrt:~#                  passwd</span></strong></em></span></p>
<p><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;">Next the            WGT634U needs to be setup for use in Client Mode rather than as a router.<a href="http://openwrt.pbwiki.com/"> http://openwrt.pbwiki.com</a> and <a href="http://madwifi.org/wiki/UserDocs/FirstTimeHowTo">http://madwifi.org/wiki/UserDocs/FirstTimeHowTo</a> are good resources for setting up the router in client mode. This is            how i did it:</span></p>
<p><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;">root@OpenWrt:~#                  wlanconfig ath0 destroy<br />
root@OpenWrt:~# wlanconfig ath0 create wlandev wifi0 wlanmode                  sta<br />
root@OpenWrt:~# iwconfig ath0 essid &lt;your essid&gt;<br />
root@OpenWrt:~# iwconfig ath0 key &lt;your wep key&gt;<br />
root@OpenWrt:~# ifconfig ath0 192.168.1.10 netmask 255.255.255.0                  up</span><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;"> root@OpenWrt:~# route add default gw 192.168.1.1</span></p>
<p><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;">To search            for available networks to connect to use the following command:</span></p>
<p><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;">root@OpenWrt:~#                  iwlist ath0 scan</span></p>
<p><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;">I created            a script in /etc/rc.d which runs every time OpenWrt boots up. Note it            must start with S followed by a number. I called it S70wifi. You will            need to use the legendary vim editor. Use the command vi /etc/rc.d/S70wifi.            Commands for the vim editor are &#8220;i&#8221; to start writing &#8220;q&#8221;            to quit and &#8220;wq&#8221; to save and quit. You need to press Esc before            issuing these commands.</span></p>
<p><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;">#!/bin/sh<br />
wlanconfig ath0 destroy<br />
wlanconfig ath0 create wlandev wifi0 wlanmode sta<br />
iwconfig ath0 essid &lt;your essid&gt;<br />
iwconfig ath0 key &lt;your wep key&gt;<br />
ifconfig ath0 192.168.1.10 netmask 255.255.255.0 up</span><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;"> route add default gw 192.168.1.1</span></p>
<p><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;">Also you            may need to edit the /etc/config/network file so that it is similar            to mine. The main alterations are that the lan interface sgould be only            &#8220;ath0&#8243; and so should the wan interface. Then fill in the network            settings as required.</span></p>
<p><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;">####                        VLAN configuration<br />
config switch eth0<br />
option vlan0 &#8220;0 1 2 3 5*&#8221;</span><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;"> option vlan1 &#8220;4 5&#8243;</span></p>
<p><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;">#### Loopback configuration<br />
config interface loopback<br />
option ifname &#8220;lo&#8221;<br />
option proto static<br />
option ipaddr 127.0.0.1</span><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;"> option netmask 255.0.0.0</span></p>
<address><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;">#### LAN configuration</span><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;"> </span></address>
<address><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;">config interface lan</span></address>
<address><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;">option ifname &#8220;ath0&#8243;<br />
option proto static<br />
option ipaddr 192.168.1.10<br />
option netmask 255.255.255.0<br />
option dns 192.168.1.1</span><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;"> option gateway 192.168.1.1</span></address>
<p><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;">####                        WAN configuration<br />
config interface wan<br />
option ifname &#8220;ath0&#8243;</span><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;"> option proto dhcp</span></p>
<p><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;">Finally you            can test whether everything works:</span></p>
<p><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;">root@OpenWrt:~#                  ping google.co.uk</span></p>
<p><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;">Just play            around with this and read the madwifi wiki until you have it working.            SSH uses port 22 so you need to open this port in the firewall. Edit            the /etc/config/firewall file and add this line to it.</span></p>
<p><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;">accept:proto=tcp                  dport=22 </span></p>
<p><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;">There is            also another firewall file /etc/firewall.user which i also edited with            the following: This should            enable ssh to work correctly. Install putty and try accessing the router            via ssh.</span><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;"><a href="http://i218.photobucket.com/albums/cc58/rob2910/putty.jpg"><img style="border:0 none;margin-left:33px;margin-right:33px;" src="http://i218.photobucket.com/albums/cc58/rob2910/puttysmall.jpg" border="0" alt="" hspace="33" align="right" /></a></span></p>
<p><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;"><em><strong>Installing            the Packages</strong></em></span></p>
<p><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;">This is perhaps            the most difficult and time consuming part of the whole project. The            router works on the mipsel architechture so the software needs to be            cross-compiled. This can be done with the OpenWrt SDK or using the buildroot            environment. Personally I prefer to use the buildroot environment that            was created when you make the wgt634u image. Each package needs a Makefile            which tells the software which configuration options to use and it tells            the buildroot which files should be included in the ipk. Some official            Makefiles are available at <a href="https://svn.openwrt.org/openwrt/">svn.openwrt.org</a> but i had to write my own for irmp3 and i used third party Makefiles            for lcdproc and lirc. I have included a package repository (Not Complete            Yet) of all my packages but you can compile your own for some of the            packages using the Makefiles i have published as well. To compile a            package make sure the makefile is located in the trunk/packages/&lt;package_name&gt;/            directory and any patches are in the trunk/packages/&lt;package_name&gt;/patches            directory. Then cd into the trunk directory and issue the following            command:</span></p>
<p><span style="color:#c0c0c0;"><em><strong><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;">root@robert-linux:~/mydocs/trunk$                  make package/&lt;package_name&gt;-install V=99</span></strong></em></span></p>
<p><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;">for example            to install libusb issue the following command:</span></p>
<p><span style="color:#c0c0c0;"><em><strong><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;">root@robert-linux:~/mydocs/trunk$                  make package/libusb-install V=99</span></strong></em></span></p>
<p><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;">The OpenWrt            forum <a href="http://forum.openwrt.org/viewtopic.php?pid=31794">page</a> is a good information resource for the buildroot environment. To remove            all assosciated files from the build_dir and staging_dir_mipsel directories.</span></p>
<p><span style="color:#c0c0c0;"><em><strong><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;">root@robert-linux:~/mydocs/trunk$                  make package/&lt;package_name&gt;-clean V=99</span></strong></em></span></p>
<p><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;">*Note,            the irmp3 Makefile will not compile correctly since argv.h is not present            in the buildroot. Use my edited build directory. When the error message            is shown copy the contents of <a href="///files/irmp3-build-dir.tar.gz">irmp3-build-dir.tar.gz</a> into trunk/build_dir/irmp3-v0.5.7-pre2 and recompile it. All i have            done is remove the 2 references to argv.h in the sources. This does            not effect irmp3&#8217;s operation. NOT UPLOADED YET.</span></p>
<p><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;">Extra packages            that need to be installed are:</span></p>
<p><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;">kmod-alsa</span><span style="color:#c0c0c0;">,</span><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;">lcdproc,libid3tag,libmad,libmagic,libncurses,libusb,lirc, mpg123 (</span><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;">from <a href="http://sokrates.mimuw.edu.pl/%7Esebek/openwrt/packages/">http://sokrates.mimuw.edu.pl/~sebek/openwrt/packages/</a> &#8211; Note that the version here is 0.61 and i had some buffering issues with this so i copied the /usr/bin/mpg123 file from <a href="http://ipkg.nslu2-linux.org/feeds/unslung/wl500g/">http://ipkg.nslu2-linux.org/feeds/unslung/wl500g/</a></span></p>
<p><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;">To install            the packages on your pc either edit the /etc/ipkg.conf to read http://www.robhardwick.co.uk/packages            and then go:</span></p>
<p><span style="color:#c0c0c0;"><em><strong><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;">root@robert-linux:~$ipkg                  install lirc</span></strong></em></span></p>
<p><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;">or you can            do each one individually like:</span></p>
<p><span style="color:#c0c0c0;"><em><strong><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;">root@robert-linux:~$ipkg                  install http://www.robhardwick.co.uk/packages/lirc-0.8.1-1_mipsel.ipk</span></strong></em></span></p>
<p><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;"><strong><em>Mounting            your Windows Share<a name="mount"></a></em></strong></span></p>
<p><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;">My mp3s were            located on shared documents on a windows pc. I decided to create an            nfs server on my windows machine which linux can easily read provided            it has kmod-fs-nfs installed. Follow the instructions at <a href="http://www.csparks.com/CygwinNFS/index.xhtml">http://www.csparks.com/CygwinNFS/index.xhtml</a> to setup an nfs server on a windows machine. It should be possible to            mount a windows share using the cifs filesystem or smbfs but share but            I got errors when trying to do it using cifs. The nfs server is failsafe.            When your nfs server is setup you can mount the share to a mount point            on your router. A sensible place is /mnt/shared. This is done using            the following command:</span></p>
<p><span style="color:#c0c0c0;"><em><strong><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;">root@OpenWrt:~# mount -t nfs &lt;ip address of server&gt;:&lt;location/of/share/in/cygwin&gt; /mnt/shared -o nolock, nfsvers=2</span></strong></em></span></p>
<p><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;">For me the            actual command was:</span></p>
<p><span style="color:#c0c0c0;"><em><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;">root@OpenWrt:~#                  mount -t nfs 192.168.1.2:/mnt/shared /mnt/shared -o nolock, nfsvers=2</span></em></span></p>
<p><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;">When this            is done check that you can see your share by issuing something like:</span></p>
<p><span style="color:#c0c0c0;"><em><strong><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;">root@OpenWrt:~#                  ls /mnt/shared</span></strong></em></span></p>
<p><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;"><strong><em>Configuring            the Packages<a name="configure"></a></em></strong></span></p>
<p><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;">Before you            can staret using pacakages you need to configure them according to your            hardware and system setup. There are 4 important config files which            need to be edited.</span></p>
<p><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;"><strong>LCDd</strong></span></p>
<p><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;">Edit the            /etc/LCDd.conf file to suit your lcd</span></p>
<p><span style="color:#c0c0c0;"><em><strong><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;">root@OpenWrt:~#                  LCDd</span></strong></em></span></p>
<p><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;"><strong>Lirc</strong></span></p>
<p><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;">For lirc            i have a Packard Bell X10 RF remote with a USB reciever for which i            used the atilibusb driver. This was simple simple because i didn&#8217;t have            to use any kernel modules. When compiling edit the Makefile to use your            driver. I reccommend an X10/ATI RF remote as they can be used without            kernel modules. You can get one for as little as £6 on ebay. Yuu            can skip this step if there is already a lircd.conf file published on            <a href="http://www.lirc.org/">lirc</a> website. You will need to create            a lircd.conf file for your remote. First of all run the lircd daemon.            Then run irw to see if you get any response when pressing a button.            If all of this works then you can use the following to create a new            lircd.conf file:</span></p>
<p><span style="color:#c0c0c0;"><em><strong><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;">root@OpenWrt:~#                  irrecord /etc/lircd.conf</span></strong></em></span></p>
<p><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;"><strong>Irmp3</strong></span></p>
<p><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;">The irmp3d.conf            file determines all the settings regarding the music player. Most importantly            where the music files are located. There is also the lircirmp3.conf            file which should be called lircrc.conf but i followed angerman&#8217;s instructions.            This conf file maps buttons on your remote to functions of irmp3. Edit            the file to suit your liking and then aknowlege it in irmp3d.conf Once            done you can run irmp3 by running:</span></p>
<p><span style="color:#c0c0c0;"><em><strong><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;">root@OpenWrt:~#                  irmp3d</span></strong></em></span></p>
<p><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;">Here are            my conf files:<a href="/Robert%27s%20shared%20documents/web/LCDd.conf"></a></span></p>
<p><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;"><a href="/Robert%27s%20shared%20documents/web/LCDd.conf">LCDd.conf</a><br />
<a href="/Robert%27s%20shared%20documents/web/lircd.conf">lircd.conf</a><br />
irmp3d.conf (Watch this space)</span><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;"> lircirmp3.conf (Watch this space)</span></p>
<p><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;">Finally you            will need to add some lines to the /etc/rc.d/S70wifi init script you            made earlier so that irmp3, lirc and LCDd start up when the box is rebooted.            Your final S70wifi file should look like this:</span></p>
<p><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;">#!/bin/sh<br />
wlanconfig ath0 destroy<br />
wlanconfig ath0 create wlandev wifi0 wlanmode sta<br />
iwconfig ath0 essid xxxx<br />
iwconfig ath0 key xxxxxxxx<br />
ifconfig ath0 192.168.1.10 netmask 255.255.255.0 up<br />
route add default gw 192.168.1.1<br />
mkdir tmp<br />
mount -t nfs 192.168.1.2:/mnt/shared /mnt/shared -o nolock,nfsvers=2<br />
lircd<br />
LCDd -w 9999</span><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;"> irmp3d</span></p>
<p><span style="font-size:x-small;font-family:Geneva,Arial,Helvetica,san-serif;color:#c0c0c0;">That&#8217;s it,            you should now have a working wireless music streamer. </span></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/robhardwick.wordpress.com/3/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/robhardwick.wordpress.com/3/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/robhardwick.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/robhardwick.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/robhardwick.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/robhardwick.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/robhardwick.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/robhardwick.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/robhardwick.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/robhardwick.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/robhardwick.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/robhardwick.wordpress.com/3/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=robhardwick.wordpress.com&blog=2946403&post=3&subd=robhardwick&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://robhardwick.wordpress.com/2008/07/21/3/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5cbae28601db73ddc67ccf544e4ac5fc?s=96&#38;d=identicon" medium="image">
			<media:title type="html">rob2910</media:title>
		</media:content>

		<media:content url="http://i218.photobucket.com/albums/cc58/rob2910/mplayersmall.jpg" medium="image" />

		<media:content url="http://i218.photobucket.com/albums/cc58/rob2910/cable.jpg" medium="image" />

		<media:content url="http://i218.photobucket.com/albums/cc58/rob2910/pins1.jpg" medium="image" />

		<media:content url="http://i218.photobucket.com/albums/cc58/rob2910/puttysmall.jpg" medium="image" />
	</item>
	</channel>
</rss>