<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://wiki.gumstix.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Jsarao</id>
		<title>Gumstix User Wiki - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://wiki.gumstix.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Jsarao"/>
		<link rel="alternate" type="text/html" href="https://wiki.gumstix.com/index.php/Special:Contributions/Jsarao"/>
		<updated>2026-06-10T02:44:27Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.25.3</generator>

	<entry>
		<id>https://wiki.gumstix.com/index.php?title=Qtopia_platform_howto&amp;diff=3941</id>
		<title>Qtopia platform howto</title>
		<link rel="alternate" type="text/html" href="https://wiki.gumstix.com/index.php?title=Qtopia_platform_howto&amp;diff=3941"/>
				<updated>2009-10-15T20:55:47Z</updated>
		
		<summary type="html">&lt;p&gt;Jsarao: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;we need qtopia to find the compiler (symlinks &amp;amp; path)&lt;br /&gt;
&lt;br /&gt;
  $ cd path-to/gumstix-oe/tmp/cross/bin ; for f in arm-angstrom-linux-gnueabi-*; do n=$(echo $f|cut -b 28-); ln -s $f arm-linux-$n; done&lt;br /&gt;
  $ PATH=$PATH:path-to/gumstix-oe/tmp/cross/bin/ ; export PATH&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
download and unpack&lt;br /&gt;
&lt;br /&gt;
  $ wget ftp://ftp.trolltech.com/qtopia/source/qtopia-opensource-src-4.3.1.tar.gz&lt;br /&gt;
  $ tar xfzv qtopia-opensource-src-4.3.1.tar.gz&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
configure, make and make install&lt;br /&gt;
&lt;br /&gt;
  $ mkdir qtopia-platform ; cd qtopia-platform&lt;br /&gt;
  $ ../qtopia-opensource-4.3.1/configure -separate-debug-info -little-endian -edition platform -xplatform arm -arch arm -no-telephony -prefix /qtopia &lt;br /&gt;
  $ make ; make install&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
tar image and move it to gumstix&lt;br /&gt;
&lt;br /&gt;
  $ cd image ; tar cfv ~/qtopia-platform.tar .&lt;br /&gt;
&lt;br /&gt;
  gumstix: $ mkdir /media/cf/qtopia ; tar xvf qtopia-platform.tar -C /media/cf/qtopia ; ln -s /media/cf/qtopia/ /qtopia&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
qtopia needs libstdc++, move it to your gumstix's /lib or somewhere it can be found&lt;br /&gt;
&lt;br /&gt;
  $ cd path-to/gumstix-oe/tmp/staging/arm-angstrom-linux-gnueabi/lib/&lt;br /&gt;
  $ tar cfv ~/libstdc++.tar libstdc++.so*&lt;br /&gt;
&lt;br /&gt;
  libstdc++.so&lt;br /&gt;
  libstdc++.so.6&lt;br /&gt;
  libstdc++.so.6.0.8&lt;br /&gt;
&lt;br /&gt;
  gumstix: $ tar xvf libstdc++.tar -C /lib&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
set variables for qtopia &amp;amp; run&lt;br /&gt;
&lt;br /&gt;
  $ export QWS_MOUSE_PROTO='LinuxTP:/dev/input/touchscreen0'&lt;br /&gt;
  $ /qtopia/bin/qpe -qws &amp;amp;  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
calibrate touchscreen&lt;br /&gt;
&lt;br /&gt;
  $ /qtopia/bin/qcop service send Launcher &amp;quot;execute(QString)&amp;quot; &amp;quot;calibrate&amp;quot; &amp;amp;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''incomplete''' touchscreen and keyboard not working. mouse works&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:How_to_-_general]]&lt;/div&gt;</summary>
		<author><name>Jsarao</name></author>	</entry>

	<entry>
		<id>https://wiki.gumstix.com/index.php?title=Qtopia_platform_howto&amp;diff=3940</id>
		<title>Qtopia platform howto</title>
		<link rel="alternate" type="text/html" href="https://wiki.gumstix.com/index.php?title=Qtopia_platform_howto&amp;diff=3940"/>
				<updated>2009-10-15T20:55:19Z</updated>
		
		<summary type="html">&lt;p&gt;Jsarao: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;we need qtopia to find the compiler (symlinks &amp;amp; path)&lt;br /&gt;
&lt;br /&gt;
  $ cd path-to/gumstix-oe/tmp/cross/bin ; for f in arm-angstrom-linux-gnueabi-*; do n=$(echo $f|cut -b 28-); ln -s $f arm-linux-$n; done&lt;br /&gt;
  $ PATH=$PATH:path-to/gumstix-oe/tmp/cross/bin/ ; export PATH&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
download and unpack&lt;br /&gt;
&lt;br /&gt;
  $ wget ftp://ftp.trolltech.com/qtopia/source/qtopia-opensource-src-4.3.1.tar.gz&lt;br /&gt;
  $ tar xfzv qtopia-opensource-src-4.3.1.tar.gz&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
configure, make and make install&lt;br /&gt;
&lt;br /&gt;
  $ mkdir qtopia-platform ; cd qtopia-platform&lt;br /&gt;
  $ ../qtopia-opensource-4.3.1/configure -separate-debug-info -little-endian -edition platform -xplatform arm -arch arm -no-telephony -prefix /qtopia &lt;br /&gt;
  $ make ; make install&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
tar image and move it to gumstix&lt;br /&gt;
&lt;br /&gt;
  $ cd image ; tar cfv ~/qtopia-platform.tar .&lt;br /&gt;
&lt;br /&gt;
  gumstix: $ mkdir /media/cf/qtopia ; tar xvf qtopia-platform.tar -C /media/cf/qtopia ; ln -s /media/cf/qtopia/ /qtopia&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
qtopia needs libstdc++, move it to your gumstix's /lib or somewhere it can be found&lt;br /&gt;
&lt;br /&gt;
  $ cd path-to/gumstix-oe/tmp/staging/arm-angstrom-linux-gnueabi/lib/&lt;br /&gt;
  $ tar cfv ~/libstdc++.tar libstdc++.so*&lt;br /&gt;
&lt;br /&gt;
  libstdc++.so&lt;br /&gt;
  libstdc++.so.6&lt;br /&gt;
  libstdc++.so.6.0.8&lt;br /&gt;
&lt;br /&gt;
  gumstix: $ tar xvf libstdc++.tar -C /lib&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
set variables for qtopia &amp;amp; run&lt;br /&gt;
&lt;br /&gt;
  $ export QWS_MOUSE_PROTO='LinuxTP:/dev/input/touchscreen0'&lt;br /&gt;
  $ /qtopia/bin/qpe -qws &amp;amp;  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
calibrate touchscreen&lt;br /&gt;
&lt;br /&gt;
  $ /qtopia/bin/qcop service send Launcher &amp;quot;execute(QString)&amp;quot; &amp;quot;calibrate&amp;quot; &amp;amp;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''incomplete''' touchscreen and keyboard not working. mouse works&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:How_to_]]&lt;/div&gt;</summary>
		<author><name>Jsarao</name></author>	</entry>

	<entry>
		<id>https://wiki.gumstix.com/index.php?title=Category:How_to_-_i2c&amp;diff=3939</id>
		<title>Category:How to - i2c</title>
		<link rel="alternate" type="text/html" href="https://wiki.gumstix.com/index.php?title=Category:How_to_-_i2c&amp;diff=3939"/>
				<updated>2009-10-15T20:53:05Z</updated>
		
		<summary type="html">&lt;p&gt;Jsarao: add category yags&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Background==&lt;br /&gt;
&lt;br /&gt;
I2c is a 2-wire serial 8 bit communications protocol from the old days. It is mainly used to communicate between on-board components when the design does not allow for a data and address bus. Typical components are elapsed timer chips, ee-proms, FRAM's, A/D and D/A chips. Some cpu's have the I2c hardware shift registers built in. &lt;br /&gt;
&lt;br /&gt;
The 2 wires are the SCL or clock wire and the SDL or data wire. The clock high to low transition is used to signal that the data wire has a stable 1/0 data value and that the receiver should shift this into the data results register. The clock line is high when the bus is idle. A special high to low transition on the clock line followed by a high to low transition on the data line signals the start of a message sequence. the end of a message sequence is a low to high transition in the data line followed by a low to high transition in the SCL line.  An important aspect of this communication standard is that each device is assigned a unique 7 bit address, (oh yea the 8th bit is the Read/write indicator to complete the byte). The device address is the first byte sent in any communication. Subsequent bytes of a message depend on the device you are talking to. &lt;br /&gt;
&lt;br /&gt;
Because of patents that have since expired, other companies had to use slightly differnet ways to do the same thing so a very similar serial communicatinos method called SPI uses 4 wires and another called TWI uses the same 2 wires.&lt;br /&gt;
&lt;br /&gt;
==Further information==&lt;br /&gt;
&lt;br /&gt;
Another source of I2C information can be found [http://www.gumstix.net/wiki/index.php?title=I%C2%B2C here].&lt;br /&gt;
&lt;br /&gt;
[[Category:How_to_-_general]]&lt;/div&gt;</summary>
		<author><name>Jsarao</name></author>	</entry>

	<entry>
		<id>https://wiki.gumstix.com/index.php?title=Category:How_to_-_bluetooth&amp;diff=3938</id>
		<title>Category:How to - bluetooth</title>
		<link rel="alternate" type="text/html" href="https://wiki.gumstix.com/index.php?title=Category:How_to_-_bluetooth&amp;diff=3938"/>
				<updated>2009-10-15T20:51:39Z</updated>
		
		<summary type="html">&lt;p&gt;Jsarao: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Essentials ==&lt;br /&gt;
&lt;br /&gt;
Install the basic bluetooth stuff with&lt;br /&gt;
&lt;br /&gt;
 ipkg install bluez-utils&lt;br /&gt;
&lt;br /&gt;
First off, I had to move the &amp;quot;sleep 1&amp;quot; from after &amp;quot;sdptool add ...&amp;quot; to before the sdptool command. The startup script seemed to be failing to run to completion before I did that.&lt;br /&gt;
&lt;br /&gt;
== Networking: pan access point ==&lt;br /&gt;
&lt;br /&gt;
 ipkg install dnsmasq&lt;br /&gt;
&lt;br /&gt;
/etc/dnsmasq.conf needs to contain (among other things it comes with):&lt;br /&gt;
&lt;br /&gt;
 interface=bnep0&lt;br /&gt;
 dhcp-range=10.0.1.10,10.0.1.200,2h&lt;br /&gt;
&lt;br /&gt;
/etc/network/interfaces:&lt;br /&gt;
&lt;br /&gt;
 allow-hotplug bnep0&lt;br /&gt;
 iface bnep0 inet static&lt;br /&gt;
        address 10.0.1.1&lt;br /&gt;
        netmask 255.255.255.0&lt;br /&gt;
        network 10.0.1.0&lt;br /&gt;
&lt;br /&gt;
/etc/default/bluetooth:&lt;br /&gt;
&lt;br /&gt;
 PAND_ENABLE=true&lt;br /&gt;
 PAND_OPTIONS=&amp;quot;--listen --role NAP&amp;quot;&lt;br /&gt;
&lt;br /&gt;
/etc/network/if-up.d/btap&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 iptables -A POSTROUTING -t nat -j MASQUERADE -s 10.0.1.0/24&lt;br /&gt;
 echo 1 &amp;gt; /proc/sys/net/ipv4/ip_forward&lt;br /&gt;
 iptables -P FORWARD ACCEPT&lt;br /&gt;
&lt;br /&gt;
You may need to re-run pand or re-run the post-up script.&lt;br /&gt;
&lt;br /&gt;
== Networking: pan client ==&lt;br /&gt;
&lt;br /&gt;
/etc/network/interfaces:&lt;br /&gt;
&lt;br /&gt;
 allow-hotplug bnep0&lt;br /&gt;
 iface bnep0 inet dhcp&lt;br /&gt;
&lt;br /&gt;
/etc/default/bluetooth:&lt;br /&gt;
&lt;br /&gt;
 PAND_ENABLE=true&lt;br /&gt;
 PAND_OPTIONS=&amp;quot;--role PANU --search&amp;quot;&lt;br /&gt;
&lt;br /&gt;
For some reason pan can't find my access point so I have to hardcode it&lt;br /&gt;
&lt;br /&gt;
 PAND_OPTIONS=&amp;quot;-c 00:0B:5D:44:33:22&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Dialup networking: server ==&lt;br /&gt;
&lt;br /&gt;
ipkg install pppd&lt;br /&gt;
&lt;br /&gt;
ipkg install (some kernel modules iirc)&lt;br /&gt;
&lt;br /&gt;
I'm not sure if both the bridging and masquerading scripts are required. The pan0 device would need to be created in advance (with brctl iirc)&lt;br /&gt;
&lt;br /&gt;
/etc/default/bluetooth:&lt;br /&gt;
&lt;br /&gt;
 DUND_ENABLE=true                                                         &lt;br /&gt;
 DUND_OPTIONS=&amp;quot;--master --channel 3 --auth --encrypt --secure --pppd /bin/mypppd&amp;quot;&lt;br /&gt;
&lt;br /&gt;
/bin/mypppd:&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh                                                                      &lt;br /&gt;
 LEASES=/var/run/mypppd.leases                                                  &lt;br /&gt;
 grep -q $DUN_BDADDR $LEASES || echo $DUN_BDADDR &amp;gt;&amp;gt;$LEASES                      &lt;br /&gt;
 LOCAL=192.168.32.10                                                            &lt;br /&gt;
 REMOTE=192.168.42.`grep -n $DUN_BDADDR $LEASES | cut -d : -f1`                 &lt;br /&gt;
 pppd $LOCAL:$REMOTE $*                                                    &lt;br /&gt;
&lt;br /&gt;
/etc/ppp/peers/dun:&lt;br /&gt;
&lt;br /&gt;
 460800                                                                         &lt;br /&gt;
 crtscts                                                                        &lt;br /&gt;
 debug                                                                          &lt;br /&gt;
 local                                                                          &lt;br /&gt;
 noipdefault                                                                    &lt;br /&gt;
 passive                                                                        &lt;br /&gt;
 connect &amp;quot;/etc/ppp/peers/at-command.pl&amp;quot;                                         &lt;br /&gt;
 noauth                                                                         &lt;br /&gt;
 nodefaultroute                                                                 &lt;br /&gt;
 noipx                                                                          &lt;br /&gt;
 noaccomp                                                                       &lt;br /&gt;
 nobsdcomp                                                                      &lt;br /&gt;
 nodeflate                                                                      &lt;br /&gt;
 ms-dns 198.60.22.2&lt;br /&gt;
&lt;br /&gt;
/etc/ppp/peers/at-command.pl:&lt;br /&gt;
&lt;br /&gt;
 #!/usr/bin/perl                                                                &lt;br /&gt;
                                                                               &lt;br /&gt;
 $/ = &amp;quot;\r&amp;quot;;                                                                     &lt;br /&gt;
 while(&amp;lt;STDIN&amp;gt;)                                                                 &lt;br /&gt;
 {                                                                              &lt;br /&gt;
        $_ = uc;                                                               &lt;br /&gt;
        if(/^ATD/) {                                                           &lt;br /&gt;
                print &amp;quot;CONNECT\r\n&amp;quot;;                                           &lt;br /&gt;
                exit(0);                                                       &lt;br /&gt;
        } elsif(/^AT/) {                                                       &lt;br /&gt;
                print &amp;quot;OK\r\n&amp;quot;;                                                &lt;br /&gt;
        }                                                                      &lt;br /&gt;
 }                                    &lt;br /&gt;
&lt;br /&gt;
/etc/ppp/ip-up.d/09nat&lt;br /&gt;
&lt;br /&gt;
 iptables -F -t nat                                                             &lt;br /&gt;
                                                                               &lt;br /&gt;
 echo &amp;quot;1&amp;quot; &amp;gt; /proc/sys/net/ipv4/ip_forward                                       &lt;br /&gt;
 echo &amp;quot;1&amp;quot; &amp;gt; /proc/sys/net/ipv4/ip_dynaddr                                       &lt;br /&gt;
                                                                               &lt;br /&gt;
 iptables -t nat -A POSTROUTING -s 192.168.42.0/24 -j MASQUERADE                &lt;br /&gt;
 iptables -t nat -A POSTROUTING -s 10.0.1.0/24     -j MASQUERADE                &lt;br /&gt;
 iptables -P FORWARD ACCEPT                        &lt;br /&gt;
&lt;br /&gt;
/etc/ppp/ip-up.d/10bridge&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh                                                                  &lt;br /&gt;
 brctl addif pan0 $2&lt;br /&gt;
&lt;br /&gt;
== Dialup networking: client ==&lt;br /&gt;
&lt;br /&gt;
== GPS repeater ==&lt;br /&gt;
&lt;br /&gt;
Install gpsd and configure it for your gps connection.&lt;br /&gt;
&lt;br /&gt;
In /etc/init.d/bluetooth, change &lt;br /&gt;
&lt;br /&gt;
 $RFCOMM_EXEC -r watch 0 1 /sbin/getty -w -L rfcomm0 115200 vt100 &amp;amp;&lt;br /&gt;
to&lt;br /&gt;
 $RFCOMM_EXEC -r watch 0 1 sh -c &amp;quot;gpspipe -r &amp;gt;/dev/rfcomm0&amp;quot; &amp;amp;&lt;br /&gt;
&lt;br /&gt;
Unfortunately, advertising your gps uses the same sdp record as advertising your bluetooth console, so this knocks out your console. You can bring it back on an unadvertised channel:&lt;br /&gt;
&lt;br /&gt;
 $RFCOMM_EXEC -r watch 1 2 /sbin/getty -w -L rfcomm1 115200 vt100 &amp;amp;&lt;br /&gt;
&lt;br /&gt;
but then you'll have to be able to manually choose channel 2. That's not a problem from linux, but problematic for others.&lt;br /&gt;
&lt;br /&gt;
== Keyboard or mouse ==&lt;br /&gt;
&lt;br /&gt;
Put your keyboard or mouse in pairing mode and run:&lt;br /&gt;
&lt;br /&gt;
 hidd --search&lt;br /&gt;
&lt;br /&gt;
The keyboard should connect and on subsequent runs it will reconnect automatically if you boot up with this in /etc/default/bluetooth&lt;br /&gt;
&lt;br /&gt;
 HIDD_ENABLE=true&lt;br /&gt;
 HIDD_OPTIONS=&amp;quot;--master --server&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Voice audio ==&lt;br /&gt;
&lt;br /&gt;
Currently the way to use voice over bluetooth requires a vx board and a USB bluetooth adapter with a CSR chip in it.&lt;br /&gt;
&lt;br /&gt;
== High-fidelity audio ==&lt;br /&gt;
&lt;br /&gt;
You can use A2DP with either the internal bluetooth adapter (model 08 or newer) or any brand of USB adapter if you have a vx board.&lt;br /&gt;
&lt;br /&gt;
Install the packages you'll need:&lt;br /&gt;
&lt;br /&gt;
 ipkg install bluez-utils bluez-utils-alsa alsa-utils-aplay madplay&lt;br /&gt;
&lt;br /&gt;
Edit /etc/bluetooth/audio.service to enable autostart:&lt;br /&gt;
&lt;br /&gt;
 [Bluetooth Service]&lt;br /&gt;
 Identifier=audio&lt;br /&gt;
 Name=Audio service&lt;br /&gt;
 Description=Bluetooth Audio service&lt;br /&gt;
 Autostart=true&lt;br /&gt;
&lt;br /&gt;
Reboot now if you had to change this.&lt;br /&gt;
&lt;br /&gt;
You'll likely need the passkey agent running, at least the first time you connect. A few itech headsets need &amp;quot;8888&amp;quot; but most need &amp;quot;0000&amp;quot; for the pin:&lt;br /&gt;
&lt;br /&gt;
 passkey-agent --default 0000 &amp;amp;&lt;br /&gt;
&lt;br /&gt;
put your headset in pairing mode. Usually this means starting from off and holding the power button down until it flashes. Then find the headset's address:&lt;br /&gt;
&lt;br /&gt;
 hcitool scan&lt;br /&gt;
&lt;br /&gt;
edit your /etc/asound.conf with an adapter for bluetooth with the address you just found. My headset is made by itech, so I name the adapter after it:&lt;br /&gt;
&lt;br /&gt;
 pcm.itech {&lt;br /&gt;
  type bluetooth&lt;br /&gt;
  device &amp;quot;00:0D:3C:8A:13:06&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
now try playing something to it:&lt;br /&gt;
&lt;br /&gt;
 madplay song.mp3 -r 44100 --output=wave:- | aplay -D itech&lt;br /&gt;
&lt;br /&gt;
you can also live-encode the line in source to a2dp:&lt;br /&gt;
&lt;br /&gt;
 arecord -c 2 -f s16 -r 44100 | aplay -D itech&lt;br /&gt;
&lt;br /&gt;
unfortunately for live encoding, the delay is pretty bad and for some reason I can never get stereo audio from the line-in source.&lt;br /&gt;
&lt;br /&gt;
== Debugging connection problems ==&lt;br /&gt;
&lt;br /&gt;
The best way to figure out what is happening is to use hcidump.&lt;br /&gt;
&lt;br /&gt;
 ipkg install bluez-hcidump&lt;br /&gt;
&lt;br /&gt;
In a separate window, or in the background, start the dump:&lt;br /&gt;
&lt;br /&gt;
 hcidump -XV&lt;br /&gt;
&lt;br /&gt;
And then in another window, try out your bluetooth command that isn't working. hcidump output is very verbose, but you'll probably be able to zero in on the issue by studying it a little.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Bluetooth advice from Australia==&lt;br /&gt;
===kick-start===&lt;br /&gt;
The Infineon v1.01 modules require a once-only 'kick-start' to become operational at a speed of 921600.&lt;br /&gt;
We have found the kick-start procedure below must be adhered to exactly, in order for the module to properly invoke the 'infineon manufacturer mode' function (that changes the speed) within  hciattach.&lt;br /&gt;
&lt;br /&gt;
The kick-start procedure is as follows-&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/etc/init.d/S30bluetooth stop&lt;br /&gt;
&lt;br /&gt;
echo \&amp;quot;AF1 out\&amp;quot; &amp;gt; /proc/gpio/GPIO12&lt;br /&gt;
echo \&amp;quot;GPIO out clear\&amp;quot; &amp;gt;/proc/gpio/GPIO7&lt;br /&gt;
sleep 1&lt;br /&gt;
echo \&amp;quot;GPIO out set\&amp;quot; &amp;gt;/proc/gpio/GPIO7&lt;br /&gt;
sleep 1&lt;br /&gt;
echo \&amp;quot;AF1 in\&amp;quot;  &amp;gt; /proc/gpio/GPIO42&lt;br /&gt;
echo \&amp;quot;AF2 out\&amp;quot; &amp;gt; /proc/gpio/GPIO43&lt;br /&gt;
echo \&amp;quot;AF1 in\&amp;quot;  &amp;gt; /proc/gpio/GPIO44&lt;br /&gt;
echo \&amp;quot;AF2 out\&amp;quot; &amp;gt; /proc/gpio/GPIO45&lt;br /&gt;
/usr/sbin/hciattach -s 115200 ttyS1 gumstix 115200&lt;br /&gt;
/etc/init.d/S30bluetooth stop&lt;br /&gt;
echo \&amp;quot;AF1 out\&amp;quot; &amp;gt; /proc/gpio/GPIO12&lt;br /&gt;
echo \&amp;quot;GPIO out clear\&amp;quot; &amp;gt;/proc/gpio/GPIO7&lt;br /&gt;
sleep 1&lt;br /&gt;
echo \&amp;quot;GPIO out set\&amp;quot; &amp;gt;/proc/gpio/GPIO7&lt;br /&gt;
sleep 1&lt;br /&gt;
echo \&amp;quot;AF1 in\&amp;quot;  &amp;gt; /proc/gpio/GPIO42&lt;br /&gt;
echo \&amp;quot;AF2 out\&amp;quot; &amp;gt; /proc/gpio/GPIO43&lt;br /&gt;
echo \&amp;quot;AF1 in\&amp;quot;  &amp;gt; /proc/gpio/GPIO44&lt;br /&gt;
echo \&amp;quot;AF2 out\&amp;quot; &amp;gt; /proc/gpio/GPIO45&lt;br /&gt;
/usr/sbin/hciattach -s 115200 ttyS1 gumstix 921600  &amp;lt;-- (Infineon Manufacturer Mode is invoked here, within hciattach)&lt;br /&gt;
/etc/init.d/S30bluetooth stop&lt;br /&gt;
echo \&amp;quot;AF1 out\&amp;quot; &amp;gt; /proc/gpio/GPIO12&lt;br /&gt;
echo \&amp;quot;GPIO out clear\&amp;quot; &amp;gt;/proc/gpio/GPIO7&lt;br /&gt;
sleep 1&lt;br /&gt;
echo \&amp;quot;GPIO out set\&amp;quot; &amp;gt;/proc/gpio/GPIO7&lt;br /&gt;
sleep 1&lt;br /&gt;
echo \&amp;quot;AF1 in\&amp;quot;  &amp;gt; /proc/gpio/GPIO42&lt;br /&gt;
echo \&amp;quot;AF2 out\&amp;quot; &amp;gt; /proc/gpio/GPIO43&lt;br /&gt;
echo \&amp;quot;AF1 in\&amp;quot;  &amp;gt; /proc/gpio/GPIO44&lt;br /&gt;
echo \&amp;quot;AF2 out\&amp;quot; &amp;gt; /proc/gpio/GPIO45&lt;br /&gt;
/usr/sbin/hciattach -s 921600 ttyS1 gumstix 921600 &amp;lt;-- (Will now connect at 921600 using this command only)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
--------------------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
===BlueZ utilities===&lt;br /&gt;
The BlueZ utilities version we were using was too old- V2.24, and it did not contain the appropriate 'infineon manufacturer mode' functions required to change the speed of the module. It gave the following output when trying to bring up the module-&lt;br /&gt;
&lt;br /&gt;
----Read wrong response size: 4&lt;br /&gt;
----0x04 0xff 0x01 0x00&lt;br /&gt;
&lt;br /&gt;
We upgraded to BlueZ V3.24 and this solved the above problem, however&lt;br /&gt;
we had to comment out the following lines in the 'gumstix_reset'&lt;br /&gt;
function of 'hciattach.c'-&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//system(&amp;quot;echo clear &amp;gt; /proc/gpio/GPIO12&amp;quot;);&lt;br /&gt;
//system(&amp;quot;echo set &amp;gt; /proc/gpio/GPIO12&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We felt these were more appropriate in S30Bluetooth.&lt;br /&gt;
--------------------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
===HCIATTACH commands===&lt;br /&gt;
The Bluetooth appears to be on ttyS1, where previously it was present on ttyS3.&lt;br /&gt;
Thus the following changes needed to be made to /etc/default/bluetooth-&lt;br /&gt;
&lt;br /&gt;
HCIATTACH_TTY=ttyS1&lt;br /&gt;
&lt;br /&gt;
...and we also had to put in new speed parameters to bring the module up properly after a kick-start-&lt;br /&gt;
&lt;br /&gt;
HCIATTACH_START_SPEED=921600&lt;br /&gt;
HCIATTACH_SPEED=921600&lt;br /&gt;
--------------------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
===Configure extra GPIOs===&lt;br /&gt;
Lastly, some extra GPIOs needed to be configured as appropriate. We only discovered this when we looked at the Open Embedded version of /etc/init.d/bluetooth and discovered that it had some mysterious extra GPIOs being set, that were not present in the buildroot script or any documentation. These are the following-&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
echo AF1 out &amp;gt; /proc/gpio/GPIO12&lt;br /&gt;
sleep 1&lt;br /&gt;
echo GPIO out clear &amp;gt;/proc/gpio/GPIO7&lt;br /&gt;
sleep 1&lt;br /&gt;
echo GPIO out set &amp;gt;/proc/gpio/GPIO7&lt;br /&gt;
sleep 1&lt;br /&gt;
echo &amp;quot;AF1 in&amp;quot;  &amp;gt; /proc/gpio/GPIO42      #(Not present in buildroot)&lt;br /&gt;
echo &amp;quot;AF2 out&amp;quot; &amp;gt; /proc/gpio/GPIO43      #(Not present in buildroot)&lt;br /&gt;
echo &amp;quot;AF1 in&amp;quot;  &amp;gt; /proc/gpio/GPIO44      #(Not present in buildroot, not documented)&lt;br /&gt;
echo &amp;quot;AF2 out&amp;quot; &amp;gt; /proc/gpio/GPIO45      #(Not present in buildroot, not documented)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The last two GPIOs (44/45) do not seem to be documented anywhere?- http://docwiki.gumstix.org/Gumstix_UARTs&lt;br /&gt;
--------------------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
All of these changes were required to make the modules work properly.&lt;br /&gt;
&lt;br /&gt;
We have also identified that the new v1.01 infineon module has improved pairing ability over its predecessor. Its predecessor required that a passkey be entered every time the unit connects to a paired device. The new module only requires a passkey once, and subsequent connection attempts are automatically connected, as they should be.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Tomas Targownik&lt;br /&gt;
&lt;br /&gt;
[[Category:How_to_-_general]]&lt;/div&gt;</summary>
		<author><name>Jsarao</name></author>	</entry>

	<entry>
		<id>https://wiki.gumstix.com/index.php?title=Category:How_to_-_bluetooth&amp;diff=3937</id>
		<title>Category:How to - bluetooth</title>
		<link rel="alternate" type="text/html" href="https://wiki.gumstix.com/index.php?title=Category:How_to_-_bluetooth&amp;diff=3937"/>
				<updated>2009-10-15T20:49:01Z</updated>
		
		<summary type="html">&lt;p&gt;Jsarao: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Essentials ==&lt;br /&gt;
&lt;br /&gt;
Install the basic bluetooth stuff with&lt;br /&gt;
&lt;br /&gt;
 ipkg install bluez-utils&lt;br /&gt;
&lt;br /&gt;
First off, I had to move the &amp;quot;sleep 1&amp;quot; from after &amp;quot;sdptool add ...&amp;quot; to before the sdptool command. The startup script seemed to be failing to run to completion before I did that.&lt;br /&gt;
&lt;br /&gt;
== Networking: pan access point ==&lt;br /&gt;
&lt;br /&gt;
 ipkg install dnsmasq&lt;br /&gt;
&lt;br /&gt;
/etc/dnsmasq.conf needs to contain (among other things it comes with):&lt;br /&gt;
&lt;br /&gt;
 interface=bnep0&lt;br /&gt;
 dhcp-range=10.0.1.10,10.0.1.200,2h&lt;br /&gt;
&lt;br /&gt;
/etc/network/interfaces:&lt;br /&gt;
&lt;br /&gt;
 allow-hotplug bnep0&lt;br /&gt;
 iface bnep0 inet static&lt;br /&gt;
        address 10.0.1.1&lt;br /&gt;
        netmask 255.255.255.0&lt;br /&gt;
        network 10.0.1.0&lt;br /&gt;
&lt;br /&gt;
/etc/default/bluetooth:&lt;br /&gt;
&lt;br /&gt;
 PAND_ENABLE=true&lt;br /&gt;
 PAND_OPTIONS=&amp;quot;--listen --role NAP&amp;quot;&lt;br /&gt;
&lt;br /&gt;
/etc/network/if-up.d/btap&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 iptables -A POSTROUTING -t nat -j MASQUERADE -s 10.0.1.0/24&lt;br /&gt;
 echo 1 &amp;gt; /proc/sys/net/ipv4/ip_forward&lt;br /&gt;
 iptables -P FORWARD ACCEPT&lt;br /&gt;
&lt;br /&gt;
You may need to re-run pand or re-run the post-up script.&lt;br /&gt;
&lt;br /&gt;
== Networking: pan client ==&lt;br /&gt;
&lt;br /&gt;
/etc/network/interfaces:&lt;br /&gt;
&lt;br /&gt;
 allow-hotplug bnep0&lt;br /&gt;
 iface bnep0 inet dhcp&lt;br /&gt;
&lt;br /&gt;
/etc/default/bluetooth:&lt;br /&gt;
&lt;br /&gt;
 PAND_ENABLE=true&lt;br /&gt;
 PAND_OPTIONS=&amp;quot;--role PANU --search&amp;quot;&lt;br /&gt;
&lt;br /&gt;
For some reason pan can't find my access point so I have to hardcode it&lt;br /&gt;
&lt;br /&gt;
 PAND_OPTIONS=&amp;quot;-c 00:0B:5D:44:33:22&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Dialup networking: server ==&lt;br /&gt;
&lt;br /&gt;
ipkg install pppd&lt;br /&gt;
&lt;br /&gt;
ipkg install (some kernel modules iirc)&lt;br /&gt;
&lt;br /&gt;
I'm not sure if both the bridging and masquerading scripts are required. The pan0 device would need to be created in advance (with brctl iirc)&lt;br /&gt;
&lt;br /&gt;
/etc/default/bluetooth:&lt;br /&gt;
&lt;br /&gt;
 DUND_ENABLE=true                                                         &lt;br /&gt;
 DUND_OPTIONS=&amp;quot;--master --channel 3 --auth --encrypt --secure --pppd /bin/mypppd&amp;quot;&lt;br /&gt;
&lt;br /&gt;
/bin/mypppd:&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh                                                                      &lt;br /&gt;
 LEASES=/var/run/mypppd.leases                                                  &lt;br /&gt;
 grep -q $DUN_BDADDR $LEASES || echo $DUN_BDADDR &amp;gt;&amp;gt;$LEASES                      &lt;br /&gt;
 LOCAL=192.168.32.10                                                            &lt;br /&gt;
 REMOTE=192.168.42.`grep -n $DUN_BDADDR $LEASES | cut -d : -f1`                 &lt;br /&gt;
 pppd $LOCAL:$REMOTE $*                                                    &lt;br /&gt;
&lt;br /&gt;
/etc/ppp/peers/dun:&lt;br /&gt;
&lt;br /&gt;
 460800                                                                         &lt;br /&gt;
 crtscts                                                                        &lt;br /&gt;
 debug                                                                          &lt;br /&gt;
 local                                                                          &lt;br /&gt;
 noipdefault                                                                    &lt;br /&gt;
 passive                                                                        &lt;br /&gt;
 connect &amp;quot;/etc/ppp/peers/at-command.pl&amp;quot;                                         &lt;br /&gt;
 noauth                                                                         &lt;br /&gt;
 nodefaultroute                                                                 &lt;br /&gt;
 noipx                                                                          &lt;br /&gt;
 noaccomp                                                                       &lt;br /&gt;
 nobsdcomp                                                                      &lt;br /&gt;
 nodeflate                                                                      &lt;br /&gt;
 ms-dns 198.60.22.2&lt;br /&gt;
&lt;br /&gt;
/etc/ppp/peers/at-command.pl:&lt;br /&gt;
&lt;br /&gt;
 #!/usr/bin/perl                                                                &lt;br /&gt;
                                                                               &lt;br /&gt;
 $/ = &amp;quot;\r&amp;quot;;                                                                     &lt;br /&gt;
 while(&amp;lt;STDIN&amp;gt;)                                                                 &lt;br /&gt;
 {                                                                              &lt;br /&gt;
        $_ = uc;                                                               &lt;br /&gt;
        if(/^ATD/) {                                                           &lt;br /&gt;
                print &amp;quot;CONNECT\r\n&amp;quot;;                                           &lt;br /&gt;
                exit(0);                                                       &lt;br /&gt;
        } elsif(/^AT/) {                                                       &lt;br /&gt;
                print &amp;quot;OK\r\n&amp;quot;;                                                &lt;br /&gt;
        }                                                                      &lt;br /&gt;
 }                                    &lt;br /&gt;
&lt;br /&gt;
/etc/ppp/ip-up.d/09nat&lt;br /&gt;
&lt;br /&gt;
 iptables -F -t nat                                                             &lt;br /&gt;
                                                                               &lt;br /&gt;
 echo &amp;quot;1&amp;quot; &amp;gt; /proc/sys/net/ipv4/ip_forward                                       &lt;br /&gt;
 echo &amp;quot;1&amp;quot; &amp;gt; /proc/sys/net/ipv4/ip_dynaddr                                       &lt;br /&gt;
                                                                               &lt;br /&gt;
 iptables -t nat -A POSTROUTING -s 192.168.42.0/24 -j MASQUERADE                &lt;br /&gt;
 iptables -t nat -A POSTROUTING -s 10.0.1.0/24     -j MASQUERADE                &lt;br /&gt;
 iptables -P FORWARD ACCEPT                        &lt;br /&gt;
&lt;br /&gt;
/etc/ppp/ip-up.d/10bridge&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh                                                                  &lt;br /&gt;
 brctl addif pan0 $2&lt;br /&gt;
&lt;br /&gt;
== Dialup networking: client ==&lt;br /&gt;
&lt;br /&gt;
== GPS repeater ==&lt;br /&gt;
&lt;br /&gt;
Install gpsd and configure it for your gps connection.&lt;br /&gt;
&lt;br /&gt;
In /etc/init.d/bluetooth, change &lt;br /&gt;
&lt;br /&gt;
 $RFCOMM_EXEC -r watch 0 1 /sbin/getty -w -L rfcomm0 115200 vt100 &amp;amp;&lt;br /&gt;
to&lt;br /&gt;
 $RFCOMM_EXEC -r watch 0 1 sh -c &amp;quot;gpspipe -r &amp;gt;/dev/rfcomm0&amp;quot; &amp;amp;&lt;br /&gt;
&lt;br /&gt;
Unfortunately, advertising your gps uses the same sdp record as advertising your bluetooth console, so this knocks out your console. You can bring it back on an unadvertised channel:&lt;br /&gt;
&lt;br /&gt;
 $RFCOMM_EXEC -r watch 1 2 /sbin/getty -w -L rfcomm1 115200 vt100 &amp;amp;&lt;br /&gt;
&lt;br /&gt;
but then you'll have to be able to manually choose channel 2. That's not a problem from linux, but problematic for others.&lt;br /&gt;
&lt;br /&gt;
== Keyboard or mouse ==&lt;br /&gt;
&lt;br /&gt;
Put your keyboard or mouse in pairing mode and run:&lt;br /&gt;
&lt;br /&gt;
 hidd --search&lt;br /&gt;
&lt;br /&gt;
The keyboard should connect and on subsequent runs it will reconnect automatically if you boot up with this in /etc/default/bluetooth&lt;br /&gt;
&lt;br /&gt;
 HIDD_ENABLE=true&lt;br /&gt;
 HIDD_OPTIONS=&amp;quot;--master --server&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Voice audio ==&lt;br /&gt;
&lt;br /&gt;
Currently the way to use voice over bluetooth requires a vx board and a USB bluetooth adapter with a CSR chip in it.&lt;br /&gt;
&lt;br /&gt;
== High-fidelity audio ==&lt;br /&gt;
&lt;br /&gt;
You can use A2DP with either the internal bluetooth adapter (model 08 or newer) or any brand of USB adapter if you have a vx board.&lt;br /&gt;
&lt;br /&gt;
Install the packages you'll need:&lt;br /&gt;
&lt;br /&gt;
 ipkg install bluez-utils bluez-utils-alsa alsa-utils-aplay madplay&lt;br /&gt;
&lt;br /&gt;
Edit /etc/bluetooth/audio.service to enable autostart:&lt;br /&gt;
&lt;br /&gt;
 [Bluetooth Service]&lt;br /&gt;
 Identifier=audio&lt;br /&gt;
 Name=Audio service&lt;br /&gt;
 Description=Bluetooth Audio service&lt;br /&gt;
 Autostart=true&lt;br /&gt;
&lt;br /&gt;
Reboot now if you had to change this.&lt;br /&gt;
&lt;br /&gt;
You'll likely need the passkey agent running, at least the first time you connect. A few itech headsets need &amp;quot;8888&amp;quot; but most need &amp;quot;0000&amp;quot; for the pin:&lt;br /&gt;
&lt;br /&gt;
 passkey-agent --default 0000 &amp;amp;&lt;br /&gt;
&lt;br /&gt;
put your headset in pairing mode. Usually this means starting from off and holding the power button down until it flashes. Then find the headset's address:&lt;br /&gt;
&lt;br /&gt;
 hcitool scan&lt;br /&gt;
&lt;br /&gt;
edit your /etc/asound.conf with an adapter for bluetooth with the address you just found. My headset is made by itech, so I name the adapter after it:&lt;br /&gt;
&lt;br /&gt;
 pcm.itech {&lt;br /&gt;
  type bluetooth&lt;br /&gt;
  device &amp;quot;00:0D:3C:8A:13:06&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
now try playing something to it:&lt;br /&gt;
&lt;br /&gt;
 madplay song.mp3 -r 44100 --output=wave:- | aplay -D itech&lt;br /&gt;
&lt;br /&gt;
you can also live-encode the line in source to a2dp:&lt;br /&gt;
&lt;br /&gt;
 arecord -c 2 -f s16 -r 44100 | aplay -D itech&lt;br /&gt;
&lt;br /&gt;
unfortunately for live encoding, the delay is pretty bad and for some reason I can never get stereo audio from the line-in source.&lt;br /&gt;
&lt;br /&gt;
== Debugging connection problems ==&lt;br /&gt;
&lt;br /&gt;
The best way to figure out what is happening is to use hcidump.&lt;br /&gt;
&lt;br /&gt;
 ipkg install bluez-hcidump&lt;br /&gt;
&lt;br /&gt;
In a separate window, or in the background, start the dump:&lt;br /&gt;
&lt;br /&gt;
 hcidump -XV&lt;br /&gt;
&lt;br /&gt;
And then in another window, try out your bluetooth command that isn't working. hcidump output is very verbose, but you'll probably be able to zero in on the issue by studying it a little.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Bluetooth advice from Australia==&lt;br /&gt;
===kick-start===&lt;br /&gt;
The Infineon v1.01 modules require a once-only 'kick-start' to become operational at a speed of 921600.&lt;br /&gt;
We have found the kick-start procedure below must be adhered to exactly, in order for the module to properly invoke the 'infineon manufacturer mode' function (that changes the speed) within  hciattach.&lt;br /&gt;
&lt;br /&gt;
The kick-start procedure is as follows-&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/etc/init.d/S30bluetooth stop&lt;br /&gt;
&lt;br /&gt;
echo \&amp;quot;AF1 out\&amp;quot; &amp;gt; /proc/gpio/GPIO12&lt;br /&gt;
echo \&amp;quot;GPIO out clear\&amp;quot; &amp;gt;/proc/gpio/GPIO7&lt;br /&gt;
sleep 1&lt;br /&gt;
echo \&amp;quot;GPIO out set\&amp;quot; &amp;gt;/proc/gpio/GPIO7&lt;br /&gt;
sleep 1&lt;br /&gt;
echo \&amp;quot;AF1 in\&amp;quot;  &amp;gt; /proc/gpio/GPIO42&lt;br /&gt;
echo \&amp;quot;AF2 out\&amp;quot; &amp;gt; /proc/gpio/GPIO43&lt;br /&gt;
echo \&amp;quot;AF1 in\&amp;quot;  &amp;gt; /proc/gpio/GPIO44&lt;br /&gt;
echo \&amp;quot;AF2 out\&amp;quot; &amp;gt; /proc/gpio/GPIO45&lt;br /&gt;
/usr/sbin/hciattach -s 115200 ttyS1 gumstix 115200&lt;br /&gt;
/etc/init.d/S30bluetooth stop&lt;br /&gt;
echo \&amp;quot;AF1 out\&amp;quot; &amp;gt; /proc/gpio/GPIO12&lt;br /&gt;
echo \&amp;quot;GPIO out clear\&amp;quot; &amp;gt;/proc/gpio/GPIO7&lt;br /&gt;
sleep 1&lt;br /&gt;
echo \&amp;quot;GPIO out set\&amp;quot; &amp;gt;/proc/gpio/GPIO7&lt;br /&gt;
sleep 1&lt;br /&gt;
echo \&amp;quot;AF1 in\&amp;quot;  &amp;gt; /proc/gpio/GPIO42&lt;br /&gt;
echo \&amp;quot;AF2 out\&amp;quot; &amp;gt; /proc/gpio/GPIO43&lt;br /&gt;
echo \&amp;quot;AF1 in\&amp;quot;  &amp;gt; /proc/gpio/GPIO44&lt;br /&gt;
echo \&amp;quot;AF2 out\&amp;quot; &amp;gt; /proc/gpio/GPIO45&lt;br /&gt;
/usr/sbin/hciattach -s 115200 ttyS1 gumstix 921600  &amp;lt;-- (Infineon Manufacturer Mode is invoked here, within hciattach)&lt;br /&gt;
/etc/init.d/S30bluetooth stop&lt;br /&gt;
echo \&amp;quot;AF1 out\&amp;quot; &amp;gt; /proc/gpio/GPIO12&lt;br /&gt;
echo \&amp;quot;GPIO out clear\&amp;quot; &amp;gt;/proc/gpio/GPIO7&lt;br /&gt;
sleep 1&lt;br /&gt;
echo \&amp;quot;GPIO out set\&amp;quot; &amp;gt;/proc/gpio/GPIO7&lt;br /&gt;
sleep 1&lt;br /&gt;
echo \&amp;quot;AF1 in\&amp;quot;  &amp;gt; /proc/gpio/GPIO42&lt;br /&gt;
echo \&amp;quot;AF2 out\&amp;quot; &amp;gt; /proc/gpio/GPIO43&lt;br /&gt;
echo \&amp;quot;AF1 in\&amp;quot;  &amp;gt; /proc/gpio/GPIO44&lt;br /&gt;
echo \&amp;quot;AF2 out\&amp;quot; &amp;gt; /proc/gpio/GPIO45&lt;br /&gt;
/usr/sbin/hciattach -s 921600 ttyS1 gumstix 921600 &amp;lt;-- (Will now connect at 921600 using this command only)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
--------------------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
===BlueZ utilities===&lt;br /&gt;
The BlueZ utilities version we were using was too old- V2.24, and it did not contain the appropriate 'infineon manufacturer mode' functions required to change the speed of the module. It gave the following output when trying to bring up the module-&lt;br /&gt;
&lt;br /&gt;
----Read wrong response size: 4&lt;br /&gt;
----0x04 0xff 0x01 0x00&lt;br /&gt;
&lt;br /&gt;
We upgraded to BlueZ V3.24 and this solved the above problem, however&lt;br /&gt;
we had to comment out the following lines in the 'gumstix_reset'&lt;br /&gt;
function of 'hciattach.c'-&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//system(&amp;quot;echo clear &amp;gt; /proc/gpio/GPIO12&amp;quot;);&lt;br /&gt;
//system(&amp;quot;echo set &amp;gt; /proc/gpio/GPIO12&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We felt these were more appropriate in S30Bluetooth.&lt;br /&gt;
--------------------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
===HCIATTACH commands===&lt;br /&gt;
The Bluetooth appears to be on ttyS1, where previously it was present on ttyS3.&lt;br /&gt;
Thus the following changes needed to be made to /etc/default/bluetooth-&lt;br /&gt;
&lt;br /&gt;
HCIATTACH_TTY=ttyS1&lt;br /&gt;
&lt;br /&gt;
...and we also had to put in new speed parameters to bring the module up properly after a kick-start-&lt;br /&gt;
&lt;br /&gt;
HCIATTACH_START_SPEED=921600&lt;br /&gt;
HCIATTACH_SPEED=921600&lt;br /&gt;
--------------------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
===Configure extra GPIOs===&lt;br /&gt;
Lastly, some extra GPIOs needed to be configured as appropriate. We only discovered this when we looked at the Open Embedded version of /etc/init.d/bluetooth and discovered that it had some mysterious extra GPIOs being set, that were not present in the buildroot script or any documentation. These are the following-&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
echo AF1 out &amp;gt; /proc/gpio/GPIO12&lt;br /&gt;
sleep 1&lt;br /&gt;
echo GPIO out clear &amp;gt;/proc/gpio/GPIO7&lt;br /&gt;
sleep 1&lt;br /&gt;
echo GPIO out set &amp;gt;/proc/gpio/GPIO7&lt;br /&gt;
sleep 1&lt;br /&gt;
echo &amp;quot;AF1 in&amp;quot;  &amp;gt; /proc/gpio/GPIO42      #(Not present in buildroot)&lt;br /&gt;
echo &amp;quot;AF2 out&amp;quot; &amp;gt; /proc/gpio/GPIO43      #(Not present in buildroot)&lt;br /&gt;
echo &amp;quot;AF1 in&amp;quot;  &amp;gt; /proc/gpio/GPIO44      #(Not present in buildroot, not documented)&lt;br /&gt;
echo &amp;quot;AF2 out&amp;quot; &amp;gt; /proc/gpio/GPIO45      #(Not present in buildroot, not documented)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The last two GPIOs (44/45) do not seem to be documented anywhere?- http://docwiki.gumstix.org/Gumstix_UARTs&lt;br /&gt;
--------------------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
All of these changes were required to make the modules work properly.&lt;br /&gt;
&lt;br /&gt;
We have also identified that the new v1.01 infineon module has improved pairing ability over its predecessor. Its predecessor required that a passkey be entered every time the unit connects to a paired device. The new module only requires a passkey once, and subsequent connection attempts are automatically connected, as they should be.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Tomas Targownik&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:How_to_-_general]]&lt;/div&gt;</summary>
		<author><name>Jsarao</name></author>	</entry>

	<entry>
		<id>https://wiki.gumstix.com/index.php?title=Build_Environment_Ubuntu_9.04&amp;diff=3929</id>
		<title>Build Environment Ubuntu 9.04</title>
		<link rel="alternate" type="text/html" href="https://wiki.gumstix.com/index.php?title=Build_Environment_Ubuntu_9.04&amp;diff=3929"/>
				<updated>2009-10-08T17:33:10Z</updated>
		
		<summary type="html">&lt;p&gt;Jsarao: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is based on the set-up for Ubuntu 8.10 with file modifications as described [http://www.nabble.com/Ubuntu-8.10-and-Open-Embeded-td21136352.html on this thread]. gumstix-oe version is 318.&lt;br /&gt;
&lt;br /&gt;
== Setup Build Environment ==&lt;br /&gt;
1) Get Ubuntu linux 9.04, and install it on your computer; you can install a vmware version of Ubuntu too, but it will be slow during the building process.&lt;br /&gt;
&lt;br /&gt;
Reconfigure sh to point to bash, not dash:&lt;br /&gt;
&lt;br /&gt;
  sudo dpkg-reconfigure dash&lt;br /&gt;
&lt;br /&gt;
Answer no when asked whether you want to install dash as /bin/sh. &lt;br /&gt;
&lt;br /&gt;
2) Install (build-essential, help2man, diffstat, texi2html, texinfo, libncurses5-dev, cvs, gawk, python-dev, python-pysqlite2, python-psyco, ckermit, lrzsz, subversion) by using apt-get. i.e:&lt;br /&gt;
 sudo apt-get update&lt;br /&gt;
 sudo apt-get install build-essential help2man diffstat texi2html texinfo libncurses5-dev cvs gawk &lt;br /&gt;
 sudo apt-get install python-dev python-pysqlite2 python-psyco ckermit lrzsz subversion&lt;br /&gt;
&lt;br /&gt;
See [[Bitbake_on_Ubuntu|Bitbake On Ubuntu]] for directions on how to setup Bitbake.&lt;br /&gt;
&lt;br /&gt;
3) Download the source from svn, caching the source code&lt;br /&gt;
 mkdir ~/gumstix &lt;br /&gt;
 cd ~/gumstix &lt;br /&gt;
 &amp;lt;nowiki&amp;gt;svn co https://gumstix.svn.sourceforge.net/svnroot/gumstix/trunk gumstix-oe&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 cat gumstix-oe/extras/profile &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
 sudo groupadd oe&lt;br /&gt;
 sudo usermod -a -G oe YOUR_CURRENT_USERNAME&lt;br /&gt;
 sudo mkdir /usr/share/sources&lt;br /&gt;
 sudo chgrp oe /usr/share/sources&lt;br /&gt;
 sudo chmod 0775 /usr/share/sources&lt;br /&gt;
 sudo chmod ug+s /usr/share/sources&lt;br /&gt;
&lt;br /&gt;
4) Downgrade to gcc-4.1 and g++-4.1 and change the links:&lt;br /&gt;
&lt;br /&gt;
 sudo aptitude install gcc-4.1 g++-4.1&lt;br /&gt;
 sudo ln -sf /usr/bin/gcc-4.1 /usr/bin/gcc&lt;br /&gt;
 sudo ln -sf /usr/bin/g++-4.1 /usr/bin/g++&lt;br /&gt;
&lt;br /&gt;
Check the links are correct using:&lt;br /&gt;
&lt;br /&gt;
 ls -l /usr/bin/gcc&lt;br /&gt;
 ls -l /usr/bin/g++&lt;br /&gt;
&lt;br /&gt;
5) Log out and log in again.&lt;br /&gt;
&lt;br /&gt;
6) Build the basic image, it will fail with an error in dbus:&lt;br /&gt;
&lt;br /&gt;
 bitbake gumstix-basic-image&lt;br /&gt;
&lt;br /&gt;
Edit &amp;lt;code&amp;gt;gumstix/gumstix-oe/tmp/work/i686-linux/dbus-native-1.0.1-r0/dbus-1.0.1/dbus/dbus-sysdeps-unix.c&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add this struct,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
struct ucred { &lt;br /&gt;
   unsigned int pid; &lt;br /&gt;
   unsigned int uid; &lt;br /&gt;
   unsigned int gid; &lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
after the macros.&lt;br /&gt;
&lt;br /&gt;
7) Build the basic image, it will fail with an error in sumversion:&lt;br /&gt;
&lt;br /&gt;
 bitbake gumstix-basic-image&lt;br /&gt;
&lt;br /&gt;
Edit &amp;lt;code&amp;gt;gumstix/gumstix-oe/tmp/work/gumstix-custom-verdex-angstrom-linux-gnueabi/gumstix-kernel-2.6.21-r1/linux-2.6.21/scripts/mod/sumversion.c&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add this line, &lt;br /&gt;
&lt;br /&gt;
  #include &amp;lt;limits.h&amp;gt; &lt;br /&gt;
&lt;br /&gt;
after all of the other includes.&lt;br /&gt;
&lt;br /&gt;
8) Build the basic image again. If it fails with an error in gconf-dbus, do the following:&lt;br /&gt;
&lt;br /&gt;
a. download file http://download.gnome.org/sources/GConf-dbus/2.16/GConf-dbus-2.16.0.tar.gz&lt;br /&gt;
&lt;br /&gt;
b. move and rename this file to:&lt;br /&gt;
 /usr/share/sources/trunk_developer.imendio.com_.svn.gconf-dbus_606_.tar.gz&lt;br /&gt;
&lt;br /&gt;
9) Build the basic image again, this time it should work:&lt;br /&gt;
&lt;br /&gt;
 bitbake gumstix-basic-image&lt;br /&gt;
&lt;br /&gt;
10) If everything builds ok, it could be a good idea to modify the dbus-sysdeps-unix.c and sumversion.c files in their respective packages in /usr/share/sources as otherwise everytime you do a rebuild they will be wiped. Note that dbus-sysdeps-unix.c is found in package dbus-1.0.1.tar.gz, and sumversion.c is found in package linux-2.6.21.tar.bz2. &lt;br /&gt;
&lt;br /&gt;
[[Category:How_to_-_general]]&lt;br /&gt;
[[Category:How_to_-_Ubuntu]]&lt;/div&gt;</summary>
		<author><name>Jsarao</name></author>	</entry>

	<entry>
		<id>https://wiki.gumstix.com/index.php?title=Talk:Build_Environment_Ubuntu_9.04&amp;diff=3928</id>
		<title>Talk:Build Environment Ubuntu 9.04</title>
		<link rel="alternate" type="text/html" href="https://wiki.gumstix.com/index.php?title=Talk:Build_Environment_Ubuntu_9.04&amp;diff=3928"/>
				<updated>2009-10-08T17:31:40Z</updated>
		
		<summary type="html">&lt;p&gt;Jsarao: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Since this is the page for building things in Ubuntu 9.04, shouldn't step 1) be &amp;quot;Get Ubuntu linux 9.04&amp;quot; instead of &amp;quot;Get Ubuntu linux 8.10&amp;quot;?&lt;br /&gt;
:why my page for 8.10 was deleted? is it the same for 9.04?&lt;br /&gt;
&lt;br /&gt;
'''Modify Step 3?'''&lt;br /&gt;
&lt;br /&gt;
from: sudo usermod -a -G oe ''YOUR_CURRENT_USERNAME''&lt;br /&gt;
&lt;br /&gt;
to: sudo usermod -a -G oe ''$USER''&lt;br /&gt;
&lt;br /&gt;
'''Bitbake Step'''&lt;br /&gt;
&lt;br /&gt;
How about a step for getting bitbake?  &lt;br /&gt;
Option 1) sudo apt-get bitbake  &lt;br /&gt;
Option 2) pull bitbake from repository&lt;br /&gt;
Option 3) See [[Bitbake_on_Ubuntu|Bitbake On Ubuntu]] for directions on how to setup Bitbake.&lt;/div&gt;</summary>
		<author><name>Jsarao</name></author>	</entry>

	<entry>
		<id>https://wiki.gumstix.com/index.php?title=Talk:Build_Environment_Ubuntu_9.04&amp;diff=3925</id>
		<title>Talk:Build Environment Ubuntu 9.04</title>
		<link rel="alternate" type="text/html" href="https://wiki.gumstix.com/index.php?title=Talk:Build_Environment_Ubuntu_9.04&amp;diff=3925"/>
				<updated>2009-10-08T17:24:47Z</updated>
		
		<summary type="html">&lt;p&gt;Jsarao: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Since this is the page for building things in Ubuntu 9.04, shouldn't step 1) be &amp;quot;Get Ubuntu linux 9.04&amp;quot; instead of &amp;quot;Get Ubuntu linux 8.10&amp;quot;?&lt;br /&gt;
:why my page for 8.10 was deleted? is it the same for 9.04?&lt;br /&gt;
&lt;br /&gt;
'''Modify Step 3?'''&lt;br /&gt;
&lt;br /&gt;
from: sudo usermod -a -G oe ''YOUR_CURRENT_USERNAME''&lt;br /&gt;
&lt;br /&gt;
to: sudo usermod -a -G oe ''$USER''&lt;br /&gt;
&lt;br /&gt;
'''Bitbake Step'''&lt;br /&gt;
&lt;br /&gt;
How about a step for getting bitbake?  &lt;br /&gt;
Option 1) sudo apt-get bitbake  &lt;br /&gt;
Option 2) pull bitbake from repository&lt;/div&gt;</summary>
		<author><name>Jsarao</name></author>	</entry>

	<entry>
		<id>https://wiki.gumstix.com/index.php?title=Talk:Build_Environment_Ubuntu_9.04&amp;diff=3924</id>
		<title>Talk:Build Environment Ubuntu 9.04</title>
		<link rel="alternate" type="text/html" href="https://wiki.gumstix.com/index.php?title=Talk:Build_Environment_Ubuntu_9.04&amp;diff=3924"/>
				<updated>2009-10-08T17:22:58Z</updated>
		
		<summary type="html">&lt;p&gt;Jsarao: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Since this is the page for building things in Ubuntu 9.04, shouldn't step 1) be &amp;quot;Get Ubuntu linux 9.04&amp;quot; instead of &amp;quot;Get Ubuntu linux 8.10&amp;quot;?&lt;br /&gt;
:why my page for 8.10 was deleted? is it the same for 9.04?&lt;br /&gt;
&lt;br /&gt;
'''Modify Step 3?'''&lt;br /&gt;
&lt;br /&gt;
from: sudo usermod -a -G oe ''YOUR_CURRENT_USERNAME''&lt;br /&gt;
&lt;br /&gt;
to: sudo usermod -a -G oe ''$USER''&lt;/div&gt;</summary>
		<author><name>Jsarao</name></author>	</entry>

	<entry>
		<id>https://wiki.gumstix.com/index.php?title=Talk:USB&amp;diff=3218</id>
		<title>Talk:USB</title>
		<link rel="alternate" type="text/html" href="https://wiki.gumstix.com/index.php?title=Talk:USB&amp;diff=3218"/>
				<updated>2009-05-14T23:57:37Z</updated>
		
		<summary type="html">&lt;p&gt;Jsarao: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This looks like it should just be combined with the article &amp;quot;USB on the 24-Pin Flex Connector&amp;quot; (http://www.gumstix.net/wiki/index.php?title=USB_24_Pin). -jsarao&lt;/div&gt;</summary>
		<author><name>Jsarao</name></author>	</entry>

	<entry>
		<id>https://wiki.gumstix.com/index.php?title=Talk:USB&amp;diff=3217</id>
		<title>Talk:USB</title>
		<link rel="alternate" type="text/html" href="https://wiki.gumstix.com/index.php?title=Talk:USB&amp;diff=3217"/>
				<updated>2009-05-14T23:56:38Z</updated>
		
		<summary type="html">&lt;p&gt;Jsarao: New page: This looks like it should just be combined with [USB_24_Pin|USB on the 24-Pin Flex Connector]. -jsarao&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This looks like it should just be combined with [USB_24_Pin|USB on the 24-Pin Flex Connector]. -jsarao&lt;/div&gt;</summary>
		<author><name>Jsarao</name></author>	</entry>

	<entry>
		<id>https://wiki.gumstix.com/index.php?title=Talk:USB_hub&amp;diff=3216</id>
		<title>Talk:USB hub</title>
		<link rel="alternate" type="text/html" href="https://wiki.gumstix.com/index.php?title=Talk:USB_hub&amp;diff=3216"/>
				<updated>2009-05-14T23:49:41Z</updated>
		
		<summary type="html">&lt;p&gt;Jsarao: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;How is this a &amp;quot;How To&amp;quot;? -jsarao&lt;/div&gt;</summary>
		<author><name>Jsarao</name></author>	</entry>

	<entry>
		<id>https://wiki.gumstix.com/index.php?title=Talk:USB_hub&amp;diff=3215</id>
		<title>Talk:USB hub</title>
		<link rel="alternate" type="text/html" href="https://wiki.gumstix.com/index.php?title=Talk:USB_hub&amp;diff=3215"/>
				<updated>2009-05-14T23:49:26Z</updated>
		
		<summary type="html">&lt;p&gt;Jsarao: New page: How is this a &amp;quot;How To&amp;quot;?&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;How is this a &amp;quot;How To&amp;quot;?&lt;/div&gt;</summary>
		<author><name>Jsarao</name></author>	</entry>

	</feed>