<?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>GilesBathgate &#187; Linux</title>
	<atom:link href="http://www.gilesbathgate.com/tag/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.gilesbathgate.com</link>
	<description>Things I want to tell the world</description>
	<lastBuildDate>Wed, 14 Dec 2011 08:23:37 +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>OpenSCAD</title>
		<link>http://www.gilesbathgate.com/2010/04/openscad/</link>
		<comments>http://www.gilesbathgate.com/2010/04/openscad/#comments</comments>
		<pubDate>Fri, 02 Apr 2010 21:18:13 +0000</pubDate>
		<dc:creator>Giles Bathgate</dc:creator>
				<category><![CDATA[Reprap]]></category>
		<category><![CDATA[CAD]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.gilesbathgate.com/?p=415</guid>
		<description><![CDATA[I have been hacking around with OpenSCAD. First I added an exponent operator to the language because I felt that writing pow(x,2) was a bit more cumbersome than x^2 . Then I added a few more operators like a component-wise multiply and component-wise divide I wanted these to make it easier to translate points so [...]]]></description>
			<content:encoded><![CDATA[<p>I have been hacking around with OpenSCAD. First I added an exponent operator to the language because I felt that writing pow(x,2)  was a bit more cumbersome than x^2 . Then I added a few more operators like a component-wise multiply and component-wise divide I wanted these to make it easier to translate points so I could use them as datums. I even implemented an experimental rotation operator. Then I decided to get a little bit more adventureous. What I wanted to do was make the OpenSCAD editor have syntax highlighting. Investigating doing this using <a href="http://qcodeedit.edyuk.org/">qcodeedit</a> is on the OpenSCAD todo list, so I thought I would give it a try<br />
<a href="http://www.gilesbathgate.com/wordpress/wp-content/uploads/2010/04/openscad-qcodeedit1.png"><img class="aligncenter size-medium wp-image-421" title="openscad-qcodeedit" src="http://www.gilesbathgate.com/wordpress/wp-content/uploads/2010/04/openscad-qcodeedit1-300x203.png" alt="" width="300" height="203" /></a><br />
I was quite pleased with the results and it wasn&#8217;t to complex to implement, QCodeEdit&#8217;s QEditor is <strong>almost</strong> a drop in replacement for QTextEdit. I created a wrapper which allows somone compiling the source to choose which editor they want to use with compile time flags. In fact, to disable QCodeEdit support all one has to do is uncomment out the line with</p>
<pre>CONFIG += qcodeedit</pre>
<p>in openscad.pro</p>
<p><strong>EDIT:</strong> All the changes have been merged into the main github repository which can be checked out using</p>
<pre>git clone https://github.com/openscad/openscad.git</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.gilesbathgate.com/2010/04/openscad/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Music Player Daemon on the MusicPal</title>
		<link>http://www.gilesbathgate.com/2009/08/music-player-daemon-musicpal/</link>
		<comments>http://www.gilesbathgate.com/2009/08/music-player-daemon-musicpal/#comments</comments>
		<pubDate>Sat, 08 Aug 2009 19:15:45 +0000</pubDate>
		<dc:creator>Giles Bathgate</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[MPD]]></category>
		<category><![CDATA[Music]]></category>
		<category><![CDATA[MusicPal]]></category>
		<category><![CDATA[UPnP]]></category>

		<guid isPermaLink="false">http://www.gilesbathgate.com/?p=158</guid>
		<description><![CDATA[Some time ago I recived a MusicPal as a gift. Out of the box the device is great fun, and made a very good present. The device is designed to work as an internet radio, It can connect to a wireless network and stream radio from various internet radio stations. However the device does have [...]]]></description>
			<content:encoded><![CDATA[<p>Some time ago I recived a <a href="http://musicpal.info/">MusicPal</a> as a gift. Out of the box the device is great fun, and made a very good present. The device is designed to work as an internet radio, It can connect to a wireless network and stream radio from various internet radio stations. However the device does have a few limitations when you want to play your own music. The device can connect to <a href="http://mediatomb.cc/">Media servers</a> that use the <a href="http://en.wikipedia.org/wiki/UPnP_AV_MediaServers">UPnP Media Devices Protocol</a> and the device is operated using two rotary knobs. For me the combination of these two features is the major design flaw in the product.  I don&#8217;t want to walk over to the device, twiddle some knobs and play a tune that is on my laptop, instead I want to select songs from my laptop and queue them up for playing on the device. There are two remote control applications for the MusicPal, one which is accessible through a web interface, and another which is Windows™ software. However both of the remote control applications are useless, all one can do is pause music, you can&#8217;t select a new song to be played, change the position of playback or even fast-forward and rewind!</p>
<p>Well a while ago,  I found a blog from someone who goes by the name of <a href="http://nerdytoad.blogspot.com/2008/11/progress-with-musicpal-sound.html">Nerdy Toad</a> who was trying to run <a href="http://mpd.wikia.com/wiki/Music_Player_Daemon_Wiki">Music Player Deamon</a> on his MusicPal.  At the time he had only managed to make a test sinewave come out of the devices internal speaker, and we worked together to see if we could get output from the line-out of the device. We were somewhat unsuccessful. However, about half a year later, someone called <a href="http://nerdytoad.blogspot.com/2009/07/re-programming-musicpal.html">Maz took our research further</a>. He was able not only to get sound fully working on the device, he was also able to patch Music Player Deamon to work on the device aswell.</p>
<p>For anyone else who has a MusicPal and wants to use it in conjunction with Linux you will need to do the following. First you have to enable the telnet interface for the device. You can enable it via a hidden web interface page:</p>
<p>http://musicpal/admin/cgi-bin/debug</p>
<p>You can then telnet to the device, login as root, and issue the following command.<br />
<code>wget http://musicpal.v3v.de/cifs/cifs.ko</code></p>
<p>This will get you a kernel module will will allow you to access a samba share on the device. This is important because the device has very limited disk space, and so its preferable to put mpd, config files, etc. In a samba share. Of course you will probably have your mp3 files in a samba share aswell. You will need to create an smb.conf on the machine that you will be sharing files from, (not the MusicPal). This is my smb.conf</p>
<p><code>[global]<br />
server string = masala<br />
security = SHARE<br />
guest account = giles<br />
[mpd]<br />
comment = mpd<br />
path = /home/giles/mpd<br />
guest ok = Yes<br />
read only = No<br />
[music]<br />
comment = Music<br />
path = /home/giles/Music<br />
guest ok = Yes</code></p>
<p>In my setup I have mpd on the machine sharing music, this is because of the limited space on the MusicPal, so still on this machine download the mpd binary</p>
<p><code>wget http://musicpal.v3v.de/mpd-testing/mpd.tar.gz</code></p>
<p>Then expand the gzip into the mpd directory. You will have to modify the mpd.conf file so that the directories are correct. Once you have done all this, you can mount the shares from the MusicPal telnet session</p>
<p><code>mount -t cifs //192.168.2.4/mpd /tmp/mnt/mpd</code><br />
<code>mount -t cifs //192.168.2.4/music /tmp/mnt/mpd/music</code></p>
<p>Finally from the telnet session you can launch mpd. Back on the client you should now be able to connect to mpd via your favorite mpd client program.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gilesbathgate.com/2009/08/music-player-daemon-musicpal/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Webcam in Linux on Sony VGN-BX61MN</title>
		<link>http://www.gilesbathgate.com/2009/07/webcam-linux-sony-vgnbx61mn/</link>
		<comments>http://www.gilesbathgate.com/2009/07/webcam-linux-sony-vgnbx61mn/#comments</comments>
		<pubDate>Wed, 22 Jul 2009 21:29:17 +0000</pubDate>
		<dc:creator>Giles Bathgate</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Richoh]]></category>
		<category><![CDATA[Sony]]></category>
		<category><![CDATA[Webcam]]></category>

		<guid isPermaLink="false">http://www.gilesbathgate.com/?p=143</guid>
		<description><![CDATA[For anyone interested in using linux on this laptop, the following should be of help. The camera is labeled as Motion Eye but lsusb reports the device as: 05ca:1839 Ricoh Co., Ltd Visual Communication Camera VGP-VCC6 [R5U870] After alot of messing around and installing defunct kernel modules, that seem to work, but actually include the [...]]]></description>
			<content:encoded><![CDATA[<p>For anyone interested in using linux on this laptop, the following should be of help. The camera is labeled as Motion Eye but lsusb reports the device as:</p>
<p><code>05ca:1839 Ricoh Co., Ltd Visual Communication Camera VGP-VCC6 [R5U870]</code></p>
<p>After alot of messing around and installing <a href="http://www.palmix.org/r5u870-en.html">defunct kernel modules</a>, that seem to work, but actually include the wrong firmware versions. I found that the work being done by <a href="http://alexhixon.com/p/">Alex Hixon</a> on a generic R5U87x driver to be the most up to date. Previously the project rolled its own kernel module to support the camera, However the current version works by providing userspace tools to upload firmware to the device so that the standard uvcvideo driver in the kernel can communicate with the camera.</p>
<p>Unfortunately there wasn&#8217;t much around in the way of a howto to explain how to use the code. So I had to figure out the following for myself.</p>
<p>First of all install mercurial and some other project dependencies</p>
<p><code>sudo apt-get install mercurial libglib2.0-dev libusb-dev</code></p>
<p>Now you can download the source</p>
<p><code>hg clone http://bitbucket.org/ahixon/r5u87x/</code></p>
<p>Change into the source directory and issue the following three commands.</p>
<p><code>cd r5u87x</code><br />
<code>make</code><br />
<code>make rules</code><br />
<code>sudo make install</code></p>
<p>If your user isn&#8217;t part of the video group you will probably have to modify /etc/group and make yourself a member of that group otherwise you might experience Permission Denied errors.</p>
<p>After you have rebooted you can test using mplayer</p>
<p><code>mplayer tv:// -tv driver=v4l2</code></p>
<p>Also make sure you can record because uploading the wrong firmware will in some cases allow you to see output but not record it.</p>
<p><code>mencoder tv:// -tv driver=v4l2:device=/dev/video0 -nosound -ovc lavc -o test.avi</code></p>
<p>If you want to clean things up afterwards you can run the following commands<br />
<code>sudo apt-get --purge remove mercurial libglib2.0-dev libusb-dev</code><br />
<code>sudo apt-get --purge autoremove</code><br />
<code>rm -r r5u87x</code></p>
<p>You may find the above steps also work for the following devices:</p>
<p><code>05ca:1830 Ricoh Co., Ltd Visual Communication Camera VGP-VCC2 [R5U870]</code><br />
<code>05ca:1832 Ricoh Co., Ltd Visual Communication Camera VGP-VCC3 [R5U870]</code><br />
<code>05ca:1833 Ricoh Co., Ltd Visual Communication Camera VGP-VCC2 [R5U870]</code><br />
<code>05ca:1834 Ricoh Co., Ltd Visual Communication Camera VGP-VCC2 [R5U870]</code><br />
<code>05ca:1835 Ricoh Co., Ltd Visual Communication Camera VGP-VCC5 [R5U870]</code><br />
<code>05ca:1836 Ricoh Co., Ltd Visual Communication Camera VGP-VCC4 [R5U870]</code><br />
<code>05ca:1837 Ricoh Co., Ltd Visual Communication Camera VGP-VCC4 [R5U870]</code><br />
<code>05ca:1839 Ricoh Co., Ltd Visual Communication Camera VGP-VCC6 [R5U870]</code><br />
<code>05ca:183a Ricoh Co., Ltd Visual Communication Camera VGP-VCC7 [R5U870]</code><br />
<code>05ca:183b Ricoh Co., Ltd Visual Communication Camera VGP-VCC8 [R5U870]</code><br />
<code>05ca:183e Ricoh Co., Ltd Visual Communication Camera VGP-VCC9 [R5U870]</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.gilesbathgate.com/2009/07/webcam-linux-sony-vgnbx61mn/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>How to write an operating system</title>
		<link>http://www.gilesbathgate.com/2008/04/how-to-write-an-operating-system/</link>
		<comments>http://www.gilesbathgate.com/2008/04/how-to-write-an-operating-system/#comments</comments>
		<pubDate>Tue, 01 Apr 2008 17:52:03 +0000</pubDate>
		<dc:creator>Giles Bathgate</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Computers]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.gilesbathgate.com/?p=46</guid>
		<description><![CDATA[This is a quick guide to creating a &#8216;Hello World&#8217; Operating system that can be booted by Grub First of all you will need to create the assembly file the contains the entry point for grub. Call this &#8216;start.S&#8216; /* * initial stack */ .data .globl _os_stack .align 4, 0x90 .space 0x100 _os_stack: .long 0 [...]]]></description>
			<content:encoded><![CDATA[<p>This is a quick guide to creating a &#8216;Hello World&#8217; Operating system that can be booted by <a href="http://www.gnu.org/software/grub">Grub</a> First of all you will need to create the assembly file the contains the entry point for grub. Call this &#8216;<strong><a href="/wordpress/wp-content/uploads/2008/04/start.S">start.S</a></strong>&#8216;</p>
<p><span id="more-46"></span></p>
<pre>/*
* initial stack
*/
.data

.globl	_os_stack
.align 	4, 0x90
.space 	0x100
_os_stack:
.long 0

/*
* let's roll
*/
.text

.globl 	_start
.align 	4, 0x90
_start:
jmp	boot_entry

/*
* multiboot compliant header
* the layout of this thing depends on image format
*/

.align 4, 0x90
boot_hdr:

.long	0x1BADB002		/* magic */
.long   0x00000000		/* no flags if ELF */
.long	0-0x1BADB002-0x00000000	/* checksum */

/* the actual code starts here ... */
boot_entry:
/*
* clear NT, learned the hard way...
*/
pushl 	$0
popfl

/*
* setup our stack
*/
lea   	_os_stack, %edx
movl  	%edx, %esp

/*
* mulitboot compliant loader (read: grub)
* should put magic value in %eax
*/
pushl	%eax

/*
* clear bss
*/
xorl  	%eax, %eax
movl  	$edata, %edi
movl  	$end, %ecx
subl  	%edi, %ecx
cld
rep
stosb

/*
* call our C code initialization ...
*/
pushl 	%ebx
call  	main

/*
* NOTREACHED
*/
darn:
incw	(0xb8000)
jmp	darn</pre>
<p>Now you will need to create your &#8216;<strong><a href="/wordpress/wp-content/uploads/2008/04/main.c">main.c</a></strong>&#8216; program</p>
<pre>
int main(){
	char * vidmem = (char*)0xB8000;
	vidmem[0]  = 'H';
	vidmem[1]  = 0x7;
	vidmem[2]  = 'e';
	vidmem[3]  = 0x7;
	vidmem[4]  = 'l';
	vidmem[5]  = 0x7;
	vidmem[6]  = 'l';
	vidmem[7]  = 0x7;
	vidmem[8]  = 'o';
	vidmem[9]  = 0x7;
	vidmem[10] = ' ';
	vidmem[11] = 0x7;
	vidmem[12] = 'W';
	vidmem[13] = 0x7;
	vidmem[14] = 'o';
	vidmem[15] = 0x7;
	vidmem[16] = 'r';
	vidmem[17] = 0x7;
	vidmem[18] = 'l';
	vidmem[19] = 0x7;
	vidmem[20] = 'd';
	vidmem[21] = 0x7;
	vidmem[22] = '!';
	vidmem[23] = 0x7;
}</pre>
<p>Now we need to compile our program</p>
<pre>gcc -nostdinc -c main.c -o main.o
gcc -nostdinc -c start.S -o start.o
ld -nostdinc -Ttext 0x100000 main.o start.o -o kernel</pre>
<p>&#8230;And thats it, you add an entry to your grub &#8216;<strong>menu.lst</strong>&#8216;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gilesbathgate.com/2008/04/how-to-write-an-operating-system/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Linux on Tom Tom</title>
		<link>http://www.gilesbathgate.com/2008/02/linux-on-tom-tom/</link>
		<comments>http://www.gilesbathgate.com/2008/02/linux-on-tom-tom/#comments</comments>
		<pubDate>Fri, 01 Feb 2008 20:13:09 +0000</pubDate>
		<dc:creator>Giles Bathgate</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[TomTom]]></category>

		<guid isPermaLink="false">http://www.gilesbathgate.com/?p=32</guid>
		<description><![CDATA[I recently discovered how Hacker Friendly My Tom Tom is. Here is a screenshot of TomTom running a text console with on screen keyboard.]]></description>
			<content:encoded><![CDATA[<p><img src="/wordpress/wp-content/uploads/2008/02/tomtom-one-xl-screenshot.png" alt="Screenshot of TomTom ONE XL running BusyBox" /></p>
<p>I recently discovered how <a href="http://www.opentom.org">Hacker Friendly</a> My Tom Tom is. Here is a screenshot of TomTom running a text console with on screen keyboard.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gilesbathgate.com/2008/02/linux-on-tom-tom/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

