<?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>t+1 &#187; bluetooth</title>
	<atom:link href="http://blog.tplus1.com/index.php/category/bluetooth/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.tplus1.com</link>
	<description>Programming, gardening, economics, life in Cleveland Heights</description>
	<lastBuildDate>Sat, 07 Jan 2012 21:12:21 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How to download photos from phone over bluetooth with ubuntu</title>
		<link>http://blog.tplus1.com/index.php/2009/10/03/how-to-download-photos-from-phone-over-bluetooth-with-ubuntu/</link>
		<comments>http://blog.tplus1.com/index.php/2009/10/03/how-to-download-photos-from-phone-over-bluetooth-with-ubuntu/#comments</comments>
		<pubDate>Sat, 03 Oct 2009 14:11:30 +0000</pubDate>
		<dc:creator>matt</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[bluetooth]]></category>

		<guid isPermaLink="false">http://blog.tplus1.com/?p=438</guid>
		<description><![CDATA[I have a samsung sync phone.  It is about two years old now.  It isn&#8217;t fancy, but it has a camera and a bluetooth device.
I wrote a python script to copy photos from my phone to my laptop.  Any time I take a bunch of pictures, I just run
$ getpics.py
and if my [...]]]></description>
			<content:encoded><![CDATA[<p>I have a samsung sync phone.  It is about two years old now.  It isn&#8217;t fancy, but it has a camera and a bluetooth device.</p>
<p>I wrote a python script to copy photos from my phone to my laptop.  Any time I take a bunch of pictures, I just run<br />
<code>$ getpics.py</code><br />
and if my phone is anywhere nearby, my computer will pull all the photos off my phone.</p>
<p>Bluetooth is a great little tool and I&#8217;m surprised it hasn&#8217;t caught on more with people like us.  I&#8217;ve been able to access my phone from my laptop when I&#8217;m on the second floor and the phone is across the house and downstairs, still in my work bag.  And bluetooth USB dongles are cheap (like around $9).  There&#8217;s no need for carrying around USB keys or plugging in iPods.  Everything should use bluetooth.</p>
<p>The getpics.py script requires that the phone and the laptop have already been bonded with each other.  That&#8217;s not much work.  Put your phone in to discoverable mode, then search for devices with your computer.  When you find your phone, punch the same 4-digit PIN into the phone and your computer.</p>
<p>Anyway, here&#8217;s the script.  I hope it helps somebody out.<br />
<pre><code>#! /usr/bin/env python

# W. Matthew Wilson &lt;matt@tplus1.com&gt; wrote this script and he released
# it into the public domain.

# vim: set expandtab ts=4 sw=4 filetype=python:

&quot;&quot;&quot;
Pull all the images off my phone.
&quot;&quot;&quot;

import commands, logging, os

from xml.etree import ElementTree
from xml.parsers.expat import ExpatError

logging.basicConfig(level=logging.DEBUG)

def get_list_of_pictures():
&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&quot;&quot;&quot;
&nbsp;&nbsp;&nbsp;&nbsp;Yield a list of strings, where each string is the file name of a
&nbsp;&nbsp;&nbsp;&nbsp;picture.
&nbsp;&nbsp;&nbsp;&nbsp;&quot;&quot;&quot;
&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;# You&#039;ll need to change the 00:1D... stuff to your phone&#039;s
&nbsp;&nbsp;&nbsp;&nbsp;# MAC address.
&nbsp;&nbsp;&nbsp;&nbsp;# You might need to change /Graphics/ to where your phone
&nbsp;&nbsp;&nbsp;&nbsp;# stores its photos.
&nbsp;&nbsp;&nbsp;&nbsp;status, output = commands.getstatusoutput(
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;obexftp -b 00:1D:F6:55:7E:D9 -l /Graphics/&quot;)
&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;logging.debug(&quot;status of obexftp: %s&quot; % status)
&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;logging.info(&quot;Finished running obexftp...&quot;)
&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;# Unfortunately, the output from obexftp includes some goofy status
&nbsp;&nbsp;&nbsp;&nbsp;# crap and then some XML data.&nbsp;&nbsp;So I parse each line separately,
&nbsp;&nbsp;&nbsp;&nbsp;# and skip the lines where parsing fails.

&nbsp;&nbsp;&nbsp;&nbsp;for line in output.split(&#039;n&#039;):
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;logging.debug(&quot;About to parse line %s.&quot; % line.strip())
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;try:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;x = ElementTree.XML(line)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# Skip lines without a name attribute.
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if &#039;name&#039; not in x.keys(): continue

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# Extract and yield the name
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;photofilename = x.get(&#039;name&#039;)

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;logging.debug(&quot;About to yield %s.&quot; % photofilename)

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;yield photofilename

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;logging.debug(&quot;Finished yielding %s.&quot; % photofilename)

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;except ExpatError:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;logging.debug(&quot;This line is not valid XML: %s.&quot;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;% line.strip())

def grab_pic(photofilename):

&nbsp;&nbsp;&nbsp;&nbsp;&quot;&quot;&quot;
&nbsp;&nbsp;&nbsp;&nbsp;Pull the photo named photofilename and save it locally.
&nbsp;&nbsp;&nbsp;&nbsp;&quot;&quot;&quot;

&nbsp;&nbsp;&nbsp;&nbsp;# You probably want to change this.
&nbsp;&nbsp;&nbsp;&nbsp;os.chdir(&quot;/home/matt/Documents/Photos/phonepics&quot;)

&nbsp;&nbsp;&nbsp;&nbsp;status, output = commands.getstatusoutput(
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;obexftp -b 00:1D:F6:55:7E:D9 -g /Graphics/%s&quot; % photofilename)

&nbsp;&nbsp;&nbsp;&nbsp;logging.info(&quot;Finished storing %s locally.&quot; % photofilename)

if __name__ == &quot;__main__&quot;:

&nbsp;&nbsp;&nbsp;&nbsp;logging.info(&quot;Starting...&quot;)

&nbsp;&nbsp;&nbsp;&nbsp;for photo in get_list_of_pictures():
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;grab_pic(photo)

&nbsp;&nbsp;&nbsp;&nbsp;logging.info(&quot;All done!&quot;)
</code></pre></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.tplus1.com/index.php/2009/10/03/how-to-download-photos-from-phone-over-bluetooth-with-ubuntu/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>Why write me a response back at all?</title>
		<link>http://blog.tplus1.com/index.php/2007/11/07/why-write-me-a-response-back-at-all/</link>
		<comments>http://blog.tplus1.com/index.php/2007/11/07/why-write-me-a-response-back-at-all/#comments</comments>
		<pubDate>Wed, 07 Nov 2007 21:20:50 +0000</pubDate>
		<dc:creator>matt</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[bluetooth]]></category>

		<guid isPermaLink="false">http://blog.tplus1.com/index.php/2007/11/07/why-write-me-a-response-back-at-all/</guid>
		<description><![CDATA[I wrote this email to Samsung technical support a few days ago:
SUBJECT: Need Hayes commands (AT commands) for phone
Hi &#8212; 
I own a Samsung A707 phone with AT&#038;T service.
I can make a serial port connection to my phone via bluetooth.  However, it seems like my phone doesn&#8217;t understand most AT commands.
Is there a list [...]]]></description>
			<content:encoded><![CDATA[<p>I wrote this email to Samsung technical support a few days ago:</p>
<blockquote><p>SUBJECT: Need Hayes commands (AT commands) for phone</p>
<p>Hi &#8212; </p>
<p>I own a Samsung A707 phone with AT&#038;T service.</p>
<p>I can make a serial port connection to my phone via bluetooth.  However, it seems like my phone doesn&#8217;t understand most AT commands.</p>
<p>Is there a list anywhere with all the AT commands that this phone supports?</p>
<p>Thanks for the help.</p>
<p>Matt
</p></blockquote>
<p>And here&#8217;s the reply I got back:</p>
<blockquote><p>Dear Matthew,</p>
<p>Thank you for your inquiry. We suggest searching the internet for Hayes AT commands.</p>
<p>Do you have more questions regarding your Samsung Mobile Phone? For 24 hour information and assistance, we offer a new FAQ/ARS System (Automated Response System) at http://www.samsungtelecom.com/support It&#8217;s like having your very own personal Samsung Technician at your fingertips.</p>
<p>Thank you for your continued interest in Samsung products.</p>
<p>Sincerely,<br />
Technical Support<br />
Renee
</p></blockquote>
<p>WOW.  Is Renee a chatbot or did a real human being actually spend time writing this response?  I especially like that they link to the tech support section of the website.  This is where I sent the email in.</p>
<p>Fortunately for me, the people on the <a href="http://gnokii.org">gnokii</a> mailing list are <a href="http://lists.nongnu.org/archive/html/gnokii-users/2007-11/msg00023.html">helping me out</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.tplus1.com/index.php/2007/11/07/why-write-me-a-response-back-at-all/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

