<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
	>
<channel>
	<title>Comments on: Not in Kansas anymore</title>
	<atom:link href="http://blakeseely.com/blog/archives/2006/02/27/not-in-kansas-anymore/feed/" rel="self" type="application/rss+xml" />
	<link>http://blakeseely.com/blog/archives/2006/02/27/not-in-kansas-anymore/</link>
	<description>If I could put reflection under this header, I would.</description>
	<pubDate>Wed, 07 Jan 2009 21:22:06 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Clark Weber</title>
		<link>http://blakeseely.com/blog/archives/2006/02/27/not-in-kansas-anymore/comment-page-1/#comment-540</link>
		<dc:creator>Clark Weber</dc:creator>
		<pubDate>Wed, 08 Mar 2006 16:49:15 +0000</pubDate>
		<guid isPermaLink="false">http://blakeseely.com/blog/archives/2006/02/27/not-in-kansas-anymore/#comment-540</guid>
		<description>MotionBased just launched basic support for the Mac.

http://wiki.motionbased.com/mb/Mac</description>
		<content:encoded><![CDATA[<p>MotionBased just launched basic support for the Mac.</p>
<p><a href="http://wiki.motionbased.com/mb/Mac" rel="nofollow">http://wiki.motionbased.com/mb/Mac</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Wight</title>
		<link>http://blakeseely.com/blog/archives/2006/02/27/not-in-kansas-anymore/comment-page-1/#comment-458</link>
		<dc:creator>Jonathan Wight</dc:creator>
		<pubDate>Mon, 27 Feb 2006 23:42:21 +0000</pubDate>
		<guid isPermaLink="false">http://blakeseely.com/blog/archives/2006/02/27/not-in-kansas-anymore/#comment-458</guid>
		<description>Here's my code:

struct Packet {
	UInt8 layer;
	UInt8 reserved0[3];
	UInt16 packetId;
	UInt8 reserved1[2];
	UInt32 dataLength;
	UInt8 data[];
	} __attribute__ ((packed));

Have fun. Feel free to bug me on aim (schwatoo).</description>
		<content:encoded><![CDATA[<p>Here&#8217;s my code:</p>
<p>struct Packet {<br />
	UInt8 layer;<br />
	UInt8 reserved0[3];<br />
	UInt16 packetId;<br />
	UInt8 reserved1[2];<br />
	UInt32 dataLength;<br />
	UInt8 data[];<br />
	} __attribute__ ((packed));</p>
<p>Have fun. Feel free to bug me on aim (schwatoo).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: blake</title>
		<link>http://blakeseely.com/blog/archives/2006/02/27/not-in-kansas-anymore/comment-page-1/#comment-456</link>
		<dc:creator>blake</dc:creator>
		<pubDate>Mon, 27 Feb 2006 23:08:49 +0000</pubDate>
		<guid isPermaLink="false">http://blakeseely.com/blog/archives/2006/02/27/not-in-kansas-anymore/#comment-456</guid>
		<description>Daniel,

Hmmm, you might have something there. I was under the impression that USB was little-endian and that IOKit would handle whatever swapping was necessary to do this... but now that I go back through my notes and some of the docs, I don't know what made me think that.

Garmin's sample code for windows (a *very* short program that simply sends a "start session" and reads the "session started" declares the struct basically the same as I do - but maybe I need to do some byte-swapping on my own to make sure it goes across the bus right?

The struct I'm using looks like this:

&lt;pre&gt;typedef struct Garmin_USB_Packet {
	uint8_t packet_type;
	uint8_t reserved1_1;
	uint16_t reserved1_2;
	uint16_t packet_id;
	uint16_t reserved2;
	uint32_t data_size;
} Garmin_USB_Packet_t;
&lt;/pre&gt;
There's technically more that I would pack int the same buffer that contains any actual data payload - although I haven't even gone that far yet.</description>
		<content:encoded><![CDATA[<p>Daniel,</p>
<p>Hmmm, you might have something there. I was under the impression that USB was little-endian and that IOKit would handle whatever swapping was necessary to do this&#8230; but now that I go back through my notes and some of the docs, I don&#8217;t know what made me think that.</p>
<p>Garmin&#8217;s sample code for windows (a *very* short program that simply sends a &#8220;start session&#8221; and reads the &#8220;session started&#8221; declares the struct basically the same as I do - but maybe I need to do some byte-swapping on my own to make sure it goes across the bus right?</p>
<p>The struct I&#8217;m using looks like this:</p>
<pre>typedef struct Garmin_USB_Packet {
	uint8_t packet_type;
	uint8_t reserved1_1;
	uint16_t reserved1_2;
	uint16_t packet_id;
	uint16_t reserved2;
	uint32_t data_size;
} Garmin_USB_Packet_t;
</pre>
<p>There&#8217;s technically more that I would pack int the same buffer that contains any actual data payload - although I haven&#8217;t even gone that far yet.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: blake</title>
		<link>http://blakeseely.com/blog/archives/2006/02/27/not-in-kansas-anymore/comment-page-1/#comment-455</link>
		<dc:creator>blake</dc:creator>
		<pubDate>Mon, 27 Feb 2006 23:05:43 +0000</pubDate>
		<guid isPermaLink="false">http://blakeseely.com/blog/archives/2006/02/27/not-in-kansas-anymore/#comment-455</guid>
		<description>I will definitely give your app a test, Jonathan.

I'm trying to get the historical data from the Forerunner. I think the Forerunner series keeps running data somewhat differently than a standard GPS would keep waypoints, tracks, etc. But I don't know this for sure. I tried GarminUSBTool1.0b5 - based on gpsbabel - that pulled Tracks, Waypoints, etc - but all the GPX files I got from it were empty. This made me think that the Forerunner is keeping data that doesn't show as waypoints or tracks.

But I'd still love to give your app a try just to see if it can get inside the data.

-Blake</description>
		<content:encoded><![CDATA[<p>I will definitely give your app a test, Jonathan.</p>
<p>I&#8217;m trying to get the historical data from the Forerunner. I think the Forerunner series keeps running data somewhat differently than a standard GPS would keep waypoints, tracks, etc. But I don&#8217;t know this for sure. I tried GarminUSBTool1.0b5 - based on gpsbabel - that pulled Tracks, Waypoints, etc - but all the GPX files I got from it were empty. This made me think that the Forerunner is keeping data that doesn&#8217;t show as waypoints or tracks.</p>
<p>But I&#8217;d still love to give your app a try just to see if it can get inside the data.</p>
<p>-Blake</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Wight</title>
		<link>http://blakeseely.com/blog/archives/2006/02/27/not-in-kansas-anymore/comment-page-1/#comment-454</link>
		<dc:creator>Jonathan Wight</dc:creator>
		<pubDate>Mon, 27 Feb 2006 23:01:41 +0000</pubDate>
		<guid isPermaLink="false">http://blakeseely.com/blog/archives/2006/02/27/not-in-kansas-anymore/#comment-454</guid>
		<description>Ooh so my code is the only one that works? I ought to auction it off... Starting big (pinky on lips): one MILLION dollars!</description>
		<content:encoded><![CDATA[<p>Ooh so my code is the only one that works? I ought to auction it off&#8230; Starting big (pinky on lips): one MILLION dollars!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Greg Hulands</title>
		<link>http://blakeseely.com/blog/archives/2006/02/27/not-in-kansas-anymore/comment-page-1/#comment-453</link>
		<dc:creator>Greg Hulands</dc:creator>
		<pubDate>Mon, 27 Feb 2006 22:53:12 +0000</pubDate>
		<guid isPermaLink="false">http://blakeseely.com/blog/archives/2006/02/27/not-in-kansas-anymore/#comment-453</guid>
		<description>I have experienced the exact same problem as you... I still have resolved it either. The async call back just never gets called. And if I do a sync read it just sits waiting deep in IOKit. For me doing async or sync is no problem as it runs in a background thread and doesn't block.</description>
		<content:encoded><![CDATA[<p>I have experienced the exact same problem as you&#8230; I still have resolved it either. The async call back just never gets called. And if I do a sync read it just sits waiting deep in IOKit. For me doing async or sync is no problem as it runs in a background thread and doesn&#8217;t block.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Wight</title>
		<link>http://blakeseely.com/blog/archives/2006/02/27/not-in-kansas-anymore/comment-page-1/#comment-452</link>
		<dc:creator>Jonathan Wight</dc:creator>
		<pubDate>Mon, 27 Feb 2006 22:46:15 +0000</pubDate>
		<guid isPermaLink="false">http://blakeseely.com/blog/archives/2006/02/27/not-in-kansas-anymore/#comment-452</guid>
		<description>Hey Blake, what data are you trying to get from the unit? I have an app I am about to release that will download waypoints and/or tracks from any Garmin device (serial devices included) and output the data as a &lt;a href="http://www.topografix.com/gpx.asp" rel="nofollow"&gt;GPX&lt;/a&gt; file. i'm looking for testers for it now (developer testers are great).</description>
		<content:encoded><![CDATA[<p>Hey Blake, what data are you trying to get from the unit? I have an app I am about to release that will download waypoints and/or tracks from any Garmin device (serial devices included) and output the data as a <a href="http://www.topografix.com/gpx.asp" rel="nofollow">GPX</a> file. i&#8217;m looking for testers for it now (developer testers are great).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel Jalkut</title>
		<link>http://blakeseely.com/blog/archives/2006/02/27/not-in-kansas-anymore/comment-page-1/#comment-451</link>
		<dc:creator>Daniel Jalkut</dc:creator>
		<pubDate>Mon, 27 Feb 2006 22:45:03 +0000</pubDate>
		<guid isPermaLink="false">http://blakeseely.com/blog/archives/2006/02/27/not-in-kansas-anymore/#comment-451</guid>
		<description>How complicated is the packet?  Is it several bytes or just a single byte?  Consider the possibility that maybe the bits should go in the opposite order.  I don't think I mean exactly byte-swapped, but outright opposite. I had some confusing experiences with my device where what I expected to be the most significant end of a value was actually least.</description>
		<content:encoded><![CDATA[<p>How complicated is the packet?  Is it several bytes or just a single byte?  Consider the possibility that maybe the bits should go in the opposite order.  I don&#8217;t think I mean exactly byte-swapped, but outright opposite. I had some confusing experiences with my device where what I expected to be the most significant end of a value was actually least.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: blake</title>
		<link>http://blakeseely.com/blog/archives/2006/02/27/not-in-kansas-anymore/comment-page-1/#comment-449</link>
		<dc:creator>blake</dc:creator>
		<pubDate>Mon, 27 Feb 2006 17:24:21 +0000</pubDate>
		<guid isPermaLink="false">http://blakeseely.com/blog/archives/2006/02/27/not-in-kansas-anymore/#comment-449</guid>
		<description>Being able to see the actual communications would be awesome!

The gps only provides three pipes: Interrupt in, bulk in, and bulk out. I'm writing to the bulk out pipe - which the docs say all host-&gt;device communications should occur on. I even tried switching over to Apple's USBSimpleExample example code - it picks out the pipes - and replacing their transfer data code with code to send the packet.

I've double-checked my data structure, and I *think* I'm sending the right structure. (As far as I can tell, there isn't much error handling on the device, which may be contributing to the problem :)

I've tried reading just one byte and I still get nothing. Frustrating.</description>
		<content:encoded><![CDATA[<p>Being able to see the actual communications would be awesome!</p>
<p>The gps only provides three pipes: Interrupt in, bulk in, and bulk out. I&#8217;m writing to the bulk out pipe - which the docs say all host->device communications should occur on. I even tried switching over to Apple&#8217;s USBSimpleExample example code - it picks out the pipes - and replacing their transfer data code with code to send the packet.</p>
<p>I&#8217;ve double-checked my data structure, and I *think* I&#8217;m sending the right structure. (As far as I can tell, there isn&#8217;t much error handling on the device, which may be contributing to the problem <img src='http://blakeseely.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I&#8217;ve tried reading just one byte and I still get nothing. Frustrating.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel Jalkut</title>
		<link>http://blakeseely.com/blog/archives/2006/02/27/not-in-kansas-anymore/comment-page-1/#comment-448</link>
		<dc:creator>Daniel Jalkut</dc:creator>
		<pubDate>Mon, 27 Feb 2006 16:46:52 +0000</pubDate>
		<guid isPermaLink="false">http://blakeseely.com/blog/archives/2006/02/27/not-in-kansas-anymore/#comment-448</guid>
		<description>I have been dealing with a USB device lately, and it's been a bit persnickety.  The problem is we don't have USB bus analyzers, which is what any pro will tell you to use to get to the bottom of these types of problems quickly.

Is it possible that you're sending the session started packet to the wrong pipe?

Another thing is make sure you're not asking for more bytes from your Async read than the device is prepared to give. I believe it will wait patiently for the requested number of bytes to appear. So you might need to ask for a shorter number of bytes and see if anything at all is coming back.</description>
		<content:encoded><![CDATA[<p>I have been dealing with a USB device lately, and it&#8217;s been a bit persnickety.  The problem is we don&#8217;t have USB bus analyzers, which is what any pro will tell you to use to get to the bottom of these types of problems quickly.</p>
<p>Is it possible that you&#8217;re sending the session started packet to the wrong pipe?</p>
<p>Another thing is make sure you&#8217;re not asking for more bytes from your Async read than the device is prepared to give. I believe it will wait patiently for the requested number of bytes to appear. So you might need to ask for a shorter number of bytes and see if anything at all is coming back.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
