<?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"
	>

<channel>
	<title>phy5ics</title>
	<atom:link href="http://blog.phy5ics.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.phy5ics.com</link>
	<description></description>
	<pubDate>Fri, 25 Dec 2009 20:19:32 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
	<language>en</language>
			<item>
		<title>Holiday Infographics</title>
		<link>http://blog.phy5ics.com/2009/12/25/holiday-infographics/</link>
		<comments>http://blog.phy5ics.com/2009/12/25/holiday-infographics/#comments</comments>
		<pubDate>Fri, 25 Dec 2009 20:19:32 +0000</pubDate>
		<dc:creator>Barton</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.phy5ics.com/?p=68</guid>
		<description><![CDATA[
Happy Holidays from phy5ics!
]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.phy5ics.com/wp-content/uploads/2009/12/happy_holidays.jpg"><img class="alignnone size-full wp-image-69" title="happy_holidays" src="http://blog.phy5ics.com/wp-content/uploads/2009/12/happy_holidays.jpg" alt="" width="499" height="454" /></a></p>
<p>Happy Holidays from phy5ics!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.phy5ics.com/2009/12/25/holiday-infographics/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Bluetooth + GPS + Python + ActionScript - Part 2 - Hooking Up</title>
		<link>http://blog.phy5ics.com/2008/11/06/bluetooth-gps-python-actionscript-part-2-hooking-up/</link>
		<comments>http://blog.phy5ics.com/2008/11/06/bluetooth-gps-python-actionscript-part-2-hooking-up/#comments</comments>
		<pubDate>Fri, 07 Nov 2008 05:10:42 +0000</pubDate>
		<dc:creator>Barton</dc:creator>
		
		<category><![CDATA[AS3]]></category>

		<category><![CDATA[Bluetooth]]></category>

		<category><![CDATA[GPS]]></category>

		<category><![CDATA[Physical Computing]]></category>

		<category><![CDATA[Python]]></category>

		<category><![CDATA[Twisted]]></category>

		<guid isPermaLink="false">http://phy5ics.com/blog/?p=58</guid>
		<description><![CDATA[Overview
After having built the hardware in Part 1, it is fairly useless without a way to get the GPS data from the device somewhere else in order to do something useful with it.  For this project, the end result will be a visualization of the GPS data in Flash Player on a Mac.  There are [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Overview</strong></p>
<p>After having built the hardware in Part 1, it is fairly useless without a way to get the GPS data from the device somewhere else in order to do something useful with it.  For this project, the end result will be a visualization of the GPS data in Flash Player on a Mac.  There are myriad ways to accomplish this, however very few approaches can easily encapsulate all of these steps in a single language.  This is because both low-level system access (to read the serial data) and some sort of server (to serve the data to Flash Player) are required.  While it is definitely possible to use any number of other languages such as Java, Processing, C++, etc., performing all of these tasks with those languages would require significant amounts of code.</p>
<p>With that said, I opted for Python not only because I love it, but also because it is quite straightforward to use it to read from a serial port using the <a href="http://pyserial.wiki.sourceforge.net/pySerial" target="_blank">pyserial module</a> and also to establish any number of different types of servers including standard HTTP and socket servers.  While there are built-in libraries for creating and managing servers, I ultimately decided on creating a socket server using <a href="http://twistedmatrix.com/trac/" target="_blank">Twisted</a>.  Twisted is an enormously powerful networking framework that simplifies the creation of all sorts of servers.</p>
<p>Why add another framework when a standard HTTP server would suffice for serving up data to the Flash Player?  The implementation of a standard HTTP server would require Flash Player polling the service to determine if data had been updated.  So, rather than rely on that sub-par solution, Twisted makes the creation of socket servers very easy, which then allows the Flash Player to receive data in real-time via an XMLSocket connection.  Not only that, but one of the coolest aspects of Twisted is that it makes it fairly easy to write multi-user socket servers, which will be a nice addition for future enhancements</p>
<p>Here is what the overall system architecture ends up looking like when all of that is considered:</p>
<p><a href="http://phy5ics.com/blog/wp-content/uploads/2008/11/gps_bt_sys_arch.jpg"><img class="alignnone size-full wp-image-62" title="gps_bt_sys_arch" src="http://phy5ics.com/blog/wp-content/uploads/2008/11/gps_bt_sys_arch.jpg" alt="" width="500" height="357" /></a></p>
<p>However, before diving into these details, the first step is to hook up the device to the Mac via a serial Bluetooth connection and verifying that everything is working so far.</p>
<p><span id="more-58"></span></p>
<p><strong>Bluetooth Pairing</strong><br />
Obviously, the first step is to power up the board.  After that, pairing the BlueSMiRF with the Mac.  This is a very straightforward process.  From the Bluetooth preference pane in System Preferences, click the &#8220;+&#8221; icon to add a new Bluetooth device.  Advance through the dialog boxes, configuring the device that shows up as <strong><em>SparkFun-BT</em></strong>.  The passkey for BlueSMiRF module is <strong><em>default</em></strong>, so type that in when prompted.</p>
<p><a href="http://phy5ics.com/blog/wp-content/uploads/2008/11/bt_pairing.jpg"><img class="alignnone size-full wp-image-59" title="bt_pairing" src="http://phy5ics.com/blog/wp-content/uploads/2008/11/bt_pairing.jpg" alt="" width="500" height="364" /></a><br />
Once that&#8217;s been done, by checking the serial interfaces in <strong><em>/dev</em></strong>, it can be verified that it is now active as a serial device.  That is done by opening a terminal window and typing <strong><em>ls /dev/tty.*</em></strong>.  That will list out all available serial interfaces.  The BlueSMiRF should show up as something like <strong><em>tty.SparkFun-BT-COM0-1</em></strong>.</p>
<p><a href="http://phy5ics.com/blog/wp-content/uploads/2008/11/ls_tty.jpg"><img class="alignnone size-full wp-image-60" title="ls_tty" src="http://phy5ics.com/blog/wp-content/uploads/2008/11/ls_tty.jpg" alt="" width="500" height="67" /></a></p>
<p><strong></strong></p>
<p><strong>Screen</strong><br />
Screen is a Unix application that allows one to attach a terminal session to a particular process.  To view the serial communication that is happening on the serial port that the BlueSMiRF is attached to, this is a good option.  This can be done by typing the following command into the terminal to view the serial communication on that port in realtime:</p>
<p><strong><em>screen /dev/tty.SparkFun-BT-COM0-1 9600</em></strong></p>
<p>Note that the <strong><em>9600</em></strong> at the end of that command is the baud rate.  That command should yield some cryptic messages being printed in Terminal like the following if everything else is wired up properly:</p>
<p><a href="http://phy5ics.com/blog/wp-content/uploads/2008/11/nmea.jpg"><img class="alignnone size-full wp-image-61" title="nmea" src="http://phy5ics.com/blog/wp-content/uploads/2008/11/nmea.jpg" alt="" width="500" height="333" /></a></p>
<p>To exit screen, hit <strong><em>control-a</em></strong>, then <strong><em>control-\</em></strong>.</p>
<p>The strings that are seen here are NMEA strings, which are derived from a specification that standardizes the way that marine electronics communicate with each other.  For additional information on this, check out <a href="http://www.gpsinformation.org/dale/nmea.htm">http://www.gpsinformation.org/dale/nmea.htm</a>.  If the GPS has a location fix, then numerous lines beginning with $GPGGA will be displayed, which precedes messages that contain the location fix data.  Otherwise, there will be mostly $GPGSV, which represents data regarding the GPS satellites themselves.</p>
<p><strong>OK, Now What?</strong></p>
<p>Now that there is data coming in over a virtual serial port, the next step is writing the software.  The next article in this series will examine the Twisted socket server and Flash XMLSocket connection along with providing the source code for those systems.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.phy5ics.com/2008/11/06/bluetooth-gps-python-actionscript-part-2-hooking-up/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Thanks for all the Fish</title>
		<link>http://blog.phy5ics.com/2008/07/24/thanks-for-all-the-fish/</link>
		<comments>http://blog.phy5ics.com/2008/07/24/thanks-for-all-the-fish/#comments</comments>
		<pubDate>Fri, 25 Jul 2008 02:16:37 +0000</pubDate>
		<dc:creator>Barton</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://phy5ics.com/blog/2008/07/24/thanks-for-all-the-fish/</guid>
		<description><![CDATA[I greatly appreciate everyone&#8217;s comments and input on my article on Bluetooth and GPS 
.  It is quite nice to have the exposure from Make and also to have one&#8217;s efforts peer reviewed as it leads to productive introspection around one&#8217;s work.
Allow me to respond to those who took the time to comment on my [...]]]></description>
			<content:encoded><![CDATA[<p>I greatly appreciate everyone&#8217;s comments and input on my article on <a href="http://phy5ics.com/blog/2008/03/16/bluetooth-gps-actionscript-part-1-hardware/">Bluetooth and GPS </a><br />
.  It is quite nice to have the exposure from Make and also to have one&#8217;s efforts peer reviewed as it leads to productive introspection around one&#8217;s work.</p>
<p>Allow me to respond to those who took the time to comment on my little project:</p>
<p><strong>To Tam, David and Snoopy:</strong><br />
No, I didn&#8217;t actually short out the entire board by connecting VCC+ and GND.  That is a mistake in my first attempt to draw out a schematic in Illustrator.  So to those that are copying this project word-for-word - please don&#8217;t follow the diagram exactly.  I&#8217;ll update it in the next couple of days when I have a chance.  As an aside, I&#8217;d be curious to hear from others about what they use for drawing circuit diagrams.  I just use Illustrator because that&#8217;s what I know from my days long past as a designer.</p>
<p><strong>To Siftah and Arto:</strong><br />
What I&#8217;ve done is most definitely available as a commercial product and most likely for less than I invested in the various components.  However, I just happen to be a nerd and am quite interested in learning from products and devices that may exist for an equal or greater price.</p>
<p>Because I cobbled my project together from off-the-shelf components, I can continually break down and re-combine any of the components I utilized into more-and-more interesting and complicated projects.  With a consumer product, I would be beholden to whatever the particular manufacturer of that consumer product dictated the functionality of a given device to be.</p>
<p>Additionally, while I&#8217;m not entirely familiar with what is on the market with regards to Bluetooth GPS devices, it&#8217;s much cooler, in my opinion, to be able to do whatever I want with the IMEA codes that I ingest and store from a piece of hardware via my own drivers and software as compared with what a GPS hardware/software vendor happens to expose via a crippled API in response to what their marketing team thinks that I might be interested in doing with said data that I collected via blood, sweat and tears on the trail.  Isn&#8217;t that why we all read and love Make?</p>
<p>Birds have dominated the sky since the day that they evolved to become flying creatures.  However, since man has gazed upon them, we have looked to them for  inspiration and in envy, often (unsuccessfully) invoking their form in an attempt to share the currents and soar above.  So, while I could theoretically transmute into a bird (or purchase one) to create an exact replica of something that already exists, by creating a reasonable facsimile I can learn how exactly it works, improve upon it and have fun doing it.</p>
<p><!-- ~ --><!-- ~ --></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.phy5ics.com/2008/07/24/thanks-for-all-the-fish/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Bluetooth + GPS + ActionScript - Part 1 - Hardware</title>
		<link>http://blog.phy5ics.com/2008/03/16/bluetooth-gps-actionscript-part-1-hardware/</link>
		<comments>http://blog.phy5ics.com/2008/03/16/bluetooth-gps-actionscript-part-1-hardware/#comments</comments>
		<pubDate>Sun, 16 Mar 2008 17:37:19 +0000</pubDate>
		<dc:creator>Barton</dc:creator>
		
		<category><![CDATA[AS3]]></category>

		<category><![CDATA[Bluetooth]]></category>

		<category><![CDATA[GPS]]></category>

		<category><![CDATA[Physical Computing]]></category>
<category>as3</category><category>bluetooth</category><category>gps</category><category>physical computing</category>
		<guid isPermaLink="false">http://phy5ics.com/blog/2008/03/16/bluetooth-gps-actionscript-part-1-hardware/</guid>
		<description><![CDATA[Overview
For this project, my goal was to get GPS data into my Mac for some visualization experiments with ActionScript.  After some initial prototypes that worked well using an RS232-to-USB converter, I decided that wasn&#8217;t slick enough and had it too many wires.  I like things nice and clean around my desk, so I [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Overview</strong><br />
For this project, my goal was to get GPS data into my Mac for some visualization experiments with ActionScript.  After some initial prototypes that worked well using an RS232-to-USB converter, I decided that wasn&#8217;t slick enough and had it too many wires.  I like things nice and clean around my desk, so I opted for adding Bluetooth in place of a USB converter.</p>
<p>After experimenting with some different methods, some using microprocessors and some not, I opted for the simpler route, eliminating the microprocessor.  A microprocessor doesn&#8217;t add anything other than cost for the basic purpose of this project.  Although stay tuned for another posting about integrating a similar configuration with the Make Controller and Arduino microprocessors.</p>
<p><img src="http://phy5ics.com/gfx/blog/gps_bt_1.jpg" alt="" width="560" height="372" /><br />
<span id="more-43"></span><br />
<strong>Parts List</strong></p>
<ul>
<li> <a href="http://www.sparkfun.com/commerce/product_info.php?products_id=114" target="_blank">5V regulated power supply</a></li>
<li> <a href="http://www.sparkfun.com/commerce/product_info.php?products_id=158" target="_blank">BlueSMiRF Bluetooth Module</a></li>
<li> <a href="http://www.sparkfun.com/commerce/product_info.php?products_id=465" target="_blank">EM406A GPS Module</a></li>
<li> Extra 6-pin interface cable</li>
<li> 9V battery holder</li>
<li> Headers</li>
<li> Breadboard</li>
<li> Solid 22-gauge wire</li>
<li> Soldering iron</li>
</ul>
<p><strong>5v Power Supply</strong><br />
Select a 5V power supply to use.  In this case, I&#8217;m using a switchable 3.3V/5V power supply kit that I picked up from SparkFun.  I made a slight modification to it and soldered a 9V battery adaptor to it to make it a bit more flexible and truly wireless rather than using the standard 9V DC wall adaptor.  This is just my preference for prototyping.  When I get down to a final design, I generally switch it up in favor of a simple voltage regulator to save space and weight.</p>
<p><strong>BlueSMiRF Embedded Bluetooth Serial RF Link</strong><br />
The BlueSMiRF module is sweet little device, providing an easy way to link any project using a serial interface to a computer (or another BlueSMiRF module).  Simply connect the TX, RX to another serial device along with vcc (4.5V-5.5V) and ground and it is ready to pair.</p>
<p><strong>EM406A GPS Board</strong><br />
This small board uses the SiRF Star III chipset, which is a nice chipset that is relatively stingy on power supply and can fix its position - known as TTFF (Time To First Fix), even in indoor environments, in a matter of 30 seconds or so.  Just keep in mind that the odd peach-colored ceramic part is the antenna and should point towards the sky.   Many other chipsets offer significantly less in terms of performance and most are unable to fix a position unless outside.  I was sold on it since happens to be the same chipset that I have in my Garmin CS60x, a considerably more expensive device.</p>
<p>Besides all that, the EM406A is a perfect candidate for integration with physical computing projects because it&#8217;s output is serial.  It starts outputting NMEA strings at 4800 baud once its position is fixed.  NMEA 0183 is a standard with which GPS data is transmitted from a device using comma-delimited strings.  For more information on NMEA, consult <a href="http://www.gpsinformation.org/dale/nmea.htm" target="_blank">this resource</a>.</p>
<p>The documentation for the board itself is well done.  In addition to the NMEA strings that are broadcast from the board itself, the EM406A can have commands sent to it via its serial interface to get specific NMEA data back.  The only catch is be sure to get an 6-pin extra interface cable along with the board itself.  I cut the interface cable in half and then soldered the wires some headers to make prototyping easier.  Otherwise it&#8217;s going to be impossible to do anything useful with it.</p>
<p><strong>Schematic</strong><br />
Now that we have all that down, here&#8217;s a little schematic of how everything is hooked up together:</p>
<p><a href="http://phy5ics.com/blog/wp-content/uploads/2008/11/gps_bt_schematic_rev1.jpg"><img class="alignnone size-full wp-image-54" title="gps_bt_schematic_rev1" src="http://phy5ics.com/blog/wp-content/uploads/2008/11/gps_bt_schematic_rev1.jpg" alt="" width="500" height="357" /></a></p>
<p><strong>Photograph</strong></p>
<p><a href="http://phy5ics.com/blog/wp-content/uploads/2008/11/gps_bt_2.jpg"><img class="alignnone size-full wp-image-56" title="gps_bt_2" src="http://phy5ics.com/blog/wp-content/uploads/2008/11/gps_bt_2.jpg" alt="" width="500" height="332" /></a><br />
<strong>Next Article</strong><br />
In the next post, I&#8217;ll be working through the software aspects of this project.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.phy5ics.com/2008/03/16/bluetooth-gps-actionscript-part-1-hardware/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Remount an External Hard Drive in Leopard</title>
		<link>http://blog.phy5ics.com/2008/03/14/remount-an-external-hard-drive-in-leopard/</link>
		<comments>http://blog.phy5ics.com/2008/03/14/remount-an-external-hard-drive-in-leopard/#comments</comments>
		<pubDate>Sat, 15 Mar 2008 01:27:14 +0000</pubDate>
		<dc:creator>Barton</dc:creator>
		
		<category><![CDATA[General Technology]]></category>

		<category><![CDATA[leopard]]></category>

		<guid isPermaLink="false">http://phy5ics.com/blog/2008/03/14/remount-an-external-hard-drive-in-leopard/</guid>
		<description><![CDATA[This may seem like a fairly outlandish edge case for external hard drives, but it&#8217;s one that I&#8217;ve run recently.  Suppose you have an external Firewire drive connected to your MacBook Pro and then daisy-chained via Firewire to that, you have several more Firewire drives.  Then suppose you&#8217;ve accidentally ejected that first drive [...]]]></description>
			<content:encoded><![CDATA[<p>This may seem like a fairly outlandish edge case for external hard drives, but it&#8217;s one that I&#8217;ve run recently.  Suppose you have an external Firewire drive connected to your MacBook Pro and then daisy-chained via Firewire to that, you have several more Firewire drives.  Then suppose you&#8217;ve accidentally ejected that first drive that everything else is daisy-chained to.  Then suppose that you&#8217;re currently in the middle of a render to one of the other down-stream drives and really need some files off of the drive that was unmounted.  That removes the possibility of physically disconnecting the first drive to then reconnecting it to remount it, since the act of disconnecting would fubar the render.</p>
<p><span id="more-42"></span> I know that you&#8217;re now agreeing that this is a tedious edge case and probably clicking the close button on your browser, but for those that haven&#8217;t yet, there&#8217;s an easy answer.  Open up Disk Utility from /Applications/Utilities and select the drive that you unmounted and click &#8220;Mount&#8221; from the menu.  Problem solved, render complete (hours later).</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.phy5ics.com/2008/03/14/remount-an-external-hard-drive-in-leopard/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Arithmetik Garden</title>
		<link>http://blog.phy5ics.com/2007/10/29/arithmetik-garden/</link>
		<comments>http://blog.phy5ics.com/2007/10/29/arithmetik-garden/#comments</comments>
		<pubDate>Mon, 29 Oct 2007 21:57:07 +0000</pubDate>
		<dc:creator>Barton</dc:creator>
		
		<category><![CDATA[RFID]]></category>
<category>physical computing</category><category>rfid</category>
		<guid isPermaLink="false">http://phy5ics.com/blog/2007/10/29/arithmetik-garden/</guid>
		<description><![CDATA[I just returned from a trip to Japan and while in Tokyo I attended an exhibition at the Mori Art Museum that was simply amazing.  The show was called Roppongi Crossing 2007: Future Beats in Japanese Contemporary Art and overall the artists that participated were fantastic, with most of them creating pieces specifically for [...]]]></description>
			<content:encoded><![CDATA[<p>I just returned from a trip to Japan and while in Tokyo I attended an exhibition at the <a href="http://www.mori.art.museum/eng/index.html" target="_blank">Mori Art Museum</a> that was simply amazing.  The show was called Roppongi Crossing 2007: Future Beats in Japanese Contemporary Art and overall the artists that participated were fantastic, with most of them creating pieces specifically for the show.   However, the exhibition included one piece in particular that stands out as the best artistic use of RFID that I have seen.</p>
<p><span id="more-37"></span> Created by Sato Masahiko and Kiriyama Takashi the piece was called Arithmetik Garden.  The premise of which is a space that one enters after picking up a card with a number on it.  This card also contains an embedded RFID chip.  One then wanders through a series of gates that contain RFID readers and are marked with mathematic operators combined with numbers (e.g. + 3, -8, / 2, * 7, etc.).  The end goal is attaining a value of 73 by walking through the various gates to perform those operations on the current number before exiting the piece.</p>
<p>What is especially nice about this piece is that the technology is completely transparent, as the card is on a string which is placed around one&#8217;s neck.  This leaves a participant to focus on the math operations required and the freedom to enjoy the experience of walking through an interface rather than passively interacting with it.  There is, however, a computer in the corner of the exhibit that will display the original number as well as all of the mathematical operations performed throughout the experience.  It also displays the current number for those that are less mathematically-inclined.</p>
<p>Photos were not allowed in the exhibition, so here are a few that I found:</p>
<p><a href="http://phy5ics.com/blog/wp-content/uploads/2007/10/arithmetikgarden-zentai05_s.jpg" title="Arithmetik Garden 2"><img src="http://phy5ics.com/blog/wp-content/uploads/2007/10/arithmetikgarden-zentai05_s.jpg" alt="Arithmetik Garden 2" /></a></p>
<p><a href="http://phy5ics.com/blog/wp-content/uploads/2007/10/arithmetikgarden-zentai04_s2.jpg" title="Arithmetik Garden 1"><img src="http://phy5ics.com/blog/wp-content/uploads/2007/10/arithmetikgarden-zentai04_s2.jpg" alt="Arithmetik Garden 1" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.phy5ics.com/2007/10/29/arithmetik-garden/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Flex 3 + AIR + RFID + AMFPHP + SMS</title>
		<link>http://blog.phy5ics.com/2007/10/13/flex-3-air-rfid-amfphp-sms/</link>
		<comments>http://blog.phy5ics.com/2007/10/13/flex-3-air-rfid-amfphp-sms/#comments</comments>
		<pubDate>Sun, 14 Oct 2007 04:30:38 +0000</pubDate>
		<dc:creator>Barton</dc:creator>
		
		<category><![CDATA[AIR]]></category>

		<category><![CDATA[AS3]]></category>

		<category><![CDATA[Flex]]></category>

		<category><![CDATA[RFID]]></category>

		<category><![CDATA[Web Services]]></category>
<category>air</category><category>as3</category><category>flex</category><category>rfid</category>
		<guid isPermaLink="false">http://phy5ics.com/blog/2007/10/13/flex-3-air-rfid-amfphp-sms/</guid>
		<description><![CDATA[I had originally wanted to build this project with my Parallax RFID reader, but since I can&#8217;t interface it with the Make Controller until Liam at MakingThings fixes the serial BLOB implementation fixed in mchelper 2.0, I decided to complete a proof-of-concept with a Phidgets RFID reader.  The application is pretty straightforward - it [...]]]></description>
			<content:encoded><![CDATA[<p>I had originally wanted to build this project with my Parallax RFID reader, but since I can&#8217;t interface it with the Make Controller until Liam at MakingThings fixes the serial BLOB implementation fixed in mchelper 2.0, I decided to complete a proof-of-concept with a Phidgets RFID reader.  The application is pretty straightforward - it consists of an RFID tag embedded in a cell phone that is read for its unique ID, prompts a user to enter some data and then remembers their personal data when they return.  While the premise is simple, there are a few moving parts required to stitch it together.</p>
<p><span id="more-34"></span><br />
But first, before an explanation, here&#8217;s a demo of the application:</p>
<p><script type="text/javascript" src="http://phy5ics.com/blog/wp-content/plugins/pb-embedflash/js/swfobject.js"></script></p><div class="embedflash" id="swfid4cb41eac23a31ec716862d975fa09080"><small>(Please open the article to see the flash file or player.)</small></div><p style="padding:0px;margin:0px;"><script type="text/javascript">
				var flashvars = {}; var params = {}; var attributes = {};params.allowfullscreen = "true"; params.allowscriptaccess = "always";
				swfobject.embedSWF("http://vimeo.com/moogaloop.swf?clip_id=2164104&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=ffffff&amp;fullscreen=1","swfid4cb41eac23a31ec716862d975fa09080","601","453","9.0.0","http://blog.phy5ics.com/wp-content/plugins/pb-embedflash/swf/expressInstall.swf",flashvars,params,attributes);
		</script></p>
<p><strong>The Phidgets RFID Reader</strong><br />
<a title="PhidgetRFID" href="http://www.phidgets.com/products.php?product_id=1023" target="_blank">PhidgetRFID</a> is a EM4102 125Khz protocol reader.  This means that it does not have the capability to write to RFID tags, only read from them. While this is just fine, I point it out so that you are aware of this fact if you are new to RFID.  It should also be noted that RFID readers like these usually fit into a larger architecture that consists of a database of some sort.  This allows RFID tag IDs to be stored along with additional metadata.</p>
<p>This particular reader is nice in that you can connect it directly to a computer (Mac, Windows and Linux support) via USB and simply run a web service that provide connectivity to the board.  In this example, that process is abstracted away in the AS3 classes that Phidgets provides (they also have a .SWC if you prefer that), so connecting to it and reading tags from it is really quite easy.</p>
<p>After installing the software from Phidgets, I set up an alias in my bash profile set up to make it easy to fire up the web service: alias phidget=&#8217;/usr/bin/phidgetwebservice21&#8242;.  That way, I just type phidget into a terminal window and it starts.  After plugging the RFID reader into an open USB port, it&#8217;s ready to communicate.  That&#8217;s really all there is to setting it up since there is no microcontroller involved.</p>
<p><strong>Flex Builder 3 and AIR</strong><br />
I opted to build this as an AIR application because an application like this is most applicable in a kiosk scenario, rather than as a web application.  Anyway, connecting to the RFID reader using Flex is quite easy and a majority of the code is devoted to setting up event handlers:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript actionscript" style="font-family:monospace;">creationcomplete=<span style="color: #ff0000;">&quot;onCreationComplete()&quot;</span><span style="color: #66cc66;">&amp;</span>gt;
&nbsp;
<span style="color: #66cc66;">&lt;!</span>--<span style="color: #66cc66;">&#91;</span>CDATA<span style="color: #66cc66;">&#91;</span>
&nbsp;
<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">phidgets</span>.<span style="color: #66cc66;">*</span>;
&nbsp;
<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">phidgets</span>.<span style="color: #006600;">events</span>.<span style="color: #66cc66;">*</span>;
&nbsp;
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> devRFID:PhidgetRFID;
&nbsp;
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> onCreationComplete<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
&nbsp;
devRFID = <span style="color: #000000; font-weight: bold;">new</span> PhidgetRFID<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
devRFID.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>PhidgetEvent.<span style="color: #006600;">DETACH</span>, onDetach<span style="color: #66cc66;">&#41;</span>;
&nbsp;
devRFID.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>PhidgetEvent.<span style="color: #006600;">ATTACH</span>, onAttach<span style="color: #66cc66;">&#41;</span>;
&nbsp;
devRFID.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>PhidgetErrorEvent.<span style="color: #0066CC;">ERROR</span>, onError<span style="color: #66cc66;">&#41;</span>;
&nbsp;
devRFID.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>PhidgetDataEvent.<span style="color: #006600;">TAG</span>, onTag<span style="color: #66cc66;">&#41;</span>;
&nbsp;
devRFID.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>PhidgetDataEvent.<span style="color: #006600;">TAG_LOST</span>, onTagLoss<span style="color: #66cc66;">&#41;</span>;
&nbsp;
devRFID.<span style="color: #006600;">open</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;localhost&quot;</span>, <span style="color: #cc66cc;">5001</span>, <span style="color: #ff0000;">&quot;1234&quot;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> onAttach<span style="color: #66cc66;">&#40;</span>pdeEvent:PhidgetEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><span style="color: #66cc66;">&#123;</span>
&nbsp;
<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span>pdeEvent<span style="color: #66cc66;">&#41;</span>;
&nbsp;
devRFID.<span style="color: #006600;">Antenna</span> = <span style="color: #000000; font-weight: bold;">true</span>;
&nbsp;
devRFID.<span style="color: #006600;">LED</span> = <span style="color: #000000; font-weight: bold;">true</span>;
&nbsp;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> onDetach<span style="color: #66cc66;">&#40;</span>pdeEvent:PhidgetEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><span style="color: #66cc66;">&#123;</span>
&nbsp;
<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span>pdeEvent<span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> onTag<span style="color: #66cc66;">&#40;</span>pdeEvent:PhidgetDataEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
&nbsp;
<span style="color: #66cc66;">&amp;</span>nbsp;	<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span>pdeEvent<span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #808080; font-style: italic;">//This is where all of the good stuff goes...</span>
&nbsp;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> onTagLoss<span style="color: #66cc66;">&#40;</span>pdeEvent:PhidgetDataEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
&nbsp;
<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span>pdeEvent<span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> onError<span style="color: #66cc66;">&#40;</span>pdeEvent:PhidgetErrorEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
&nbsp;
<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span>pdeEvent<span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#93;</span>--<span style="color: #66cc66;">&gt;</span></pre></div></div>

<p>If you&#8217;re interested in the rest of the code, <a title="AIR-RFID Source Files" href="http://phy5ics.com/blog/wp-content/uploads/2007/10/rfid_air.zip">download the source</a>.  Also, a  quick disclaimer that this was just a quick proof-of-concept and is all in a single MXML file for simplicity rather than encapsulating objects and creating components.</p>
<p><strong>AMFPHP Remoting</strong><br />
For server/Flash Player communication, I generally opt for remoting due to its ease of implementation and speed, especially if dynamic, database-driven calls are required for the application.  In this case, PHP and MySQL will handle user data and authentication as well as consuming SMS services.  I could write an entire article about AMFPHP and Flex 3, and probably will, but for now, I&#8217;ll just mention it and note that it in the source code.</p>
<p><strong>SMS</strong><br />
In the demo version (I&#8217;m not releasing this portion publicly), I&#8217;ve also rigged up some PHP classes to send SMS messages.  I found a service called <a title="Clickatell" href="http://clickatell.com" target="_blank">Clickatell</a> that provides SMS gateway services to a bunch of giant corporations like BBC, Vodafone and Oracle.  However, they do actually offer services to substantially smaller entities such as myself, which is pretty cool.  Not only that, but they offer a free trial of their services.</p>
<p>I&#8217;d recommend them if you only need to send outgoing SMS messages.  If you are interested in two-way messaging, be prepared to pony up a large amount of cash for short codes (somewhere in the neighborhood of $1200/month) and message routing.  The other alternative is to set up your own <a title="SMS gateway" href="http://www.x11.net/wiki/index.php/Setting_up_an_SMS_Gateway" target="_blank">SMS gateway</a>.  However, keep in mind that while setting up your own gateway is easy, it is not cost effective for sending large numbers of text messages using a normal consumer account.  It will end up being cheaper using a bulk service like Clickatell.</p>
<p><strong>Source</strong><br />
<a title="AIR-RFID Source Files" href="http://phy5ics.com/blog/wp-content/uploads/2007/10/rfid_air.zip">Click here</a> to download the source for the AIR source and installer, PHP code and MySQL schema.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.phy5ics.com/2007/10/13/flex-3-air-rfid-amfphp-sms/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Make Controller, mchelper 2.0 and /serial/ Issues</title>
		<link>http://blog.phy5ics.com/2007/10/02/make-controller-mchelper-20-and-serial-subsytem-issues/</link>
		<comments>http://blog.phy5ics.com/2007/10/02/make-controller-mchelper-20-and-serial-subsytem-issues/#comments</comments>
		<pubDate>Wed, 03 Oct 2007 04:06:34 +0000</pubDate>
		<dc:creator>Barton</dc:creator>
		
		<category><![CDATA[GPS]]></category>

		<category><![CDATA[Make Controller]]></category>
<category>make controller</category><category>osc</category>
		<guid isPermaLink="false">http://phy5ics.com/blog/2007/10/02/make-controller-mchelper-20-and-serial-subsytem-issues/</guid>
		<description><![CDATA[I&#8217;ve been attempting to hook up a serial GPS device to my Make Controller and read in data using OSC commands from mchelper prior to interfacing it with AS3 (as an aside, it&#8217;s really nice to be able to do this with the new version of mchelper). While I&#8217;ve been able to write to the [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been attempting to hook up a serial GPS device to my Make Controller and read in data using OSC commands from mchelper prior to interfacing it with AS3 (as an aside, it&#8217;s really nice to be able to do this with the new version of mchelper). While I&#8217;ve been able to write to the serial port successfully using both /serial/char and /serial/block, reading from it always yields some sort of disaster.<br />
<span id="more-32"></span>Initially I thought that perhaps the level shifter was not functioning properly. However, checking it out with a multimeter I found it to be otherwise. Then, I verified that the level shifter was indeed reversing TX/RX as it does, and it was indeed. I then connected the GPS device directly to my computer using a RS232/USB converter and was successfully able to read the serial data, so that eliminated the actual GPS receiver as the problem. Checking on those things seemed to eliminate what I figured were circuit or hardware problems, which left only the Make Controller and mchelper as the issue.</p>
<p>So here are a couple use cases where I run into issues:</p>
<p>Attempting to set the baud rate using /serial/baud 4800 is apparently successful, until I type in /serial/baud to return the value and it is inexplicably set to 4828!? Any other number that I pick at random results in it being set correctly. I have no idea what to make of this behavior.</p>
<p>As an additional problem, when I type in /serial/readable I receive a value of 1048760. If I then enter /serial/block to attempt to read that data, mchelper crashes [Exception: EXC_BAD_ACCESS (0x0001) Codes: KERN_PROTECTION_FAILURE (0x0002) at 0x00000000)]. If I then try /serial/block 128 (or any other int), then I get a /serial/error Bad Data response.</p>
<p><strong>Note: </strong>I posted the above to the <a href="http://www.makingthings.com/forum/discussion/view_topic?topic_id=1169">MakingThings forum</a> last night, and Liam promptly responded that this is indeed a problem with mchelper 2.0 and its implementation of OSC blobs that are returned by /serial/block.  As for the incorrect baud rate issue, he&#8217;s not quite sure, but hopefully that will be resolved soon as well.  I&#8217;ll be posting some how-to articles on bidirectional serial communication and using GPS devices with the Make Controller, OSC and AS3 once those bugs get straightened out.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.phy5ics.com/2007/10/02/make-controller-mchelper-20-and-serial-subsytem-issues/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Starting Over with the Make Controller + AS3 - Part 1</title>
		<link>http://blog.phy5ics.com/2007/09/08/starting-over-with-the-make-controller-as3-part-1/</link>
		<comments>http://blog.phy5ics.com/2007/09/08/starting-over-with-the-make-controller-as3-part-1/#comments</comments>
		<pubDate>Sat, 08 Sep 2007 19:22:49 +0000</pubDate>
		<dc:creator>Barton</dc:creator>
		
		<category><![CDATA[AS3]]></category>

		<category><![CDATA[Make Controller]]></category>
<category>as3</category><category>make controller</category><category>osc</category>
		<guid isPermaLink="false">http://phy5ics.com/blog/2007/09/08/starting-over-with-the-make-controller-as3-part-1/</guid>
		<description><![CDATA[MakingThings just released a bunch of software updates involved with Flash and the Make Controller that nullifies a lot of my previous work with AS3 and flosc.  While some of the components still seem a bit buggy, they represent some major improvements.  The best news to come out of this round of releases [...]]]></description>
			<content:encoded><![CDATA[<p>MakingThings just released a bunch of software updates involved with Flash and the Make Controller that nullifies a lot of my previous work with AS3 and flosc.  While some of the components still seem a bit buggy, they represent some major improvements.  The best news to come out of this round of releases is that the <em>flosc</em> socket server can now be ditched (sorry, Ben Chun) in favor of connecting to the Make Controller using a new version of <em>mchelper</em>.  Additionally it is now possible, from Flash,  to connect to a board using either USB or Ethernet.  As a result, I&#8217;m starting my series over to take these latest developments into account.<br />
<span id="more-30"></span><br />
To get stared, grab the latest versions of the following files from <a href="http://makingthings.com/resources/downloads" target="_blank">MakingThings</a>:</p>
<p>- mchelper 2.0<br />
- heavy 1.2 rc4<br />
- New AS3 classes</p>
<p><strong>Step 1: Erase the Current Firmware</strong><br />
To do this, connect power to the board and use a jumper on the 2 pins marked &#8220;ERASE&#8221; near the JTAG connector on the board.  This will erase everything on the board including the firmware.  Turn off the power, remove the jumper, then reconnect the power to restart the board.  This will put the board into receive mode.</p>
<p><a href="http://phy5ics.com/blog/wp-content/uploads/2007/09/erase_board.gif" title="Erase Pins"><img src="http://phy5ics.com/blog/wp-content/uploads/2007/09/erase_board.gif" alt="Erase Pins" /></a><br />
<strong><br />
Step 2: Upload heavy 1.2 rc4</strong><br />
There seems to be a bug in <em>mchelper 2.0</em> in that the option to upload firmware to the Make Controller is always grayed-out.  So you&#8217;ll need to use a previous version in order to install the new <em>heavy 1.2 rc4</em> firmware.  To do this, fire up <em>mchelper 1.2</em> then simply select the .bin file and click upload.  Restart the board after the firmware has updated.</p>
<p><strong>Step 3: Connecting to Flash</strong><br />
Close <em>mchelper 1.2</em> and open up <em>mchelper 2.0</em>.  Send a test message to the board to make sure that everything is setup properly.</p>
<p><em>mchelper 2.0</em> now has an XML socket server built into it (unfortunately not a binary socket server), so rather than connecting to flosc as we did in the past, we connect to mchelper.  This is straightforward enough:</p>
<p><code>var mcfConnection:McFlashConnect = new McFlashConnect();</code></p>
<p>From there, it&#8217;s just a matter of setting up a bunch of event listeners, which isn&#8217;t all that different from my previous examples:</p>
<p><code>mcfConnection.addEventListener(McEvent.ON_CONNECT, onConnect);</code><br />
<code>mcfConnection.addEventListener(McEvent.ON_CONNECT_ERROR, onConnectError);</code><br />
<code>mcfConnection.addEventListener(McEvent.ON_CLOSE, onClose);</code><br />
<code>mcfConnection.addEventListener(McEvent.ON_MESSAGE_IN, onMessageIn);</code><br />
<code>mcfConnection.addEventListener(McEvent.ON_BOARD_ARRIVED, onBoardArrived);</code><br />
<code>mcfConnection.addEventListener(McEvent.ON_BOARD_REMOVED, onBoardRemoved);</code><br />
<code>mcfConnection.connect();</code></p>
<p>One of the primary differences between the new MakingThings AS3 classes and the others that I&#8217;ve written about is the addition of some methods to not only connect to <em>mchelper</em> (previously <em>flosc</em>), but also to determine when a controller board is actually connected.  This is a significant improvement, as then you can be sure that you&#8217;re actually connected to the board.  Additionally, the way the new classes are written opens up the possibility of connecting multiple boards, as they can be addressed individually by IP address, USB address, name (i.e. <code>/system/name</code>) or serial number, which is a super cool feature.</p>
<p>Once the connection to <em>mchelper</em> is established and a board is detected, sending and receiving OSC packets is rather straightforward.  Here&#8217;s an example of how to send an OSC packet:</p>
<p><code>mcfConnection.send("/system/name", []);</code></p>
<p>A really cool feature of <em>mchelper 2.0</em> is that OSC packets that are being sent and received from Flash are traced out to the dialog window in <em>mchelper</em>, which helps tremendously with debugging.  After compiling a SWF that sends an OSC packet containing <code>/system/name</code> you should see the following in mchelper:</p>
<p><code>XML server --- New XML Connection</code><br />
<code>XML server --- /system/name</code><br />
<code>USB --- /system/name Make Controller Kit</code></p>
<p>That&#8217;s really all there is to it.  Thankfully, the new MakingThings code is much less unwieldy and ditches flosc, so kudos to them for making much-needed improvements.</p>
<p><strong>Step 4: Conclusion - Let the Hacking Begin</strong><br />
I haven&#8217;t had a chance to look at the new AS3 classes in great detail, but there are some nice new features.  However, one thing that I noticed that was a bit disappointing was that all of the XML parsing is being done using <code>XMLDocument</code> objects, which have been deprecated in AS3.  There&#8217;s no reason why this shouldn&#8217;t be using Flash Player 9&#8217;s native E4X capabilities, so that&#8217;ll be one of the first things that I rewrite, being as how I already did that in the MakingThings AS2 classes that I ported to AS3 a while back.</p>
<p><a href="http://phy5ics.com/blog/wp-content/uploads/2007/09/ConnectionTest.as">Download the full sample class here</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.phy5ics.com/2007/09/08/starting-over-with-the-make-controller-as3-part-1/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Flex 2 and WSDL Overloading</title>
		<link>http://blog.phy5ics.com/2007/08/21/flex-2-and-wsdl-overloading/</link>
		<comments>http://blog.phy5ics.com/2007/08/21/flex-2-and-wsdl-overloading/#comments</comments>
		<pubDate>Tue, 21 Aug 2007 21:55:11 +0000</pubDate>
		<dc:creator>Barton</dc:creator>
		
		<category><![CDATA[Flex]]></category>

		<category><![CDATA[Web Services]]></category>
<category>flex 2</category><category>soa</category><category>soap</category><category>web services</category><category>wsdl</category>
		<guid isPermaLink="false">http://phy5ics.com/blog/2007/08/21/flex-2-and-wsdl-overloading/</guid>
		<description><![CDATA[On a project that I am currently working on, the team was having some issues consuming JBoss SOAP services.  The root of the problem took a while to figure out, as apparently there are very few people that try to consume SOAP services experience the same issue we were encountering and The Google revealed [...]]]></description>
			<content:encoded><![CDATA[<p>On a project that I am currently working on, the team was having some issues consuming JBoss SOAP services.  The root of the problem took a while to figure out, as apparently there are very few people that try to consume SOAP services experience the same issue we were encountering and The Google revealed few clues.  At first we thought that perhaps the difference was between WSDL 1.1 and WSDL 2.0 and Flex&#8217;s lack of support for WSDL 2.0, as that is what the SOAP services were generating.  After some initial investigation, we thought we eliminated that as a possibility.  Then we discovered that the WSDL that we were consuming contained overloaded methods.  Some reinvestigation at the W3C was done to see if  perhaps a difference between the WSDL 1.1 or 2.0 specifications was support for WSDL overloading.  It turns out the the specs are silent on this issue, so again we eliminated the difference in WSDL versions.  Some additional searching after that determined that Flex definitely lacks support for WSDL overloading.<br />
<span id="more-29"></span><br />
In our case, we couldn&#8217;t change the WSDL or the services themselves to remove the overloaded methods because we had no control over the SOAP services as they were part of a software package produced by an external vendor.  The vendor had upgraded their core APIs from a previous version of their software.  To accommodate backwards compatibility these changes were made without having to modify any of the actual method names by overloading several methods in their API.  The WSDL was then auto-generated from the Java classes that comprise the web services.  While Java conveniently supports methods overloading, despite clamoring for it for the last several releases of ActionScript, we still don&#8217;t have it natively in either Flex nor ActionScript.  As a result, we needed a workaround.</p>
<p><strong>The Easy Way</strong><br />
While not exactly the most ideal, for a short-term hack, we copied the XML in the WSDL that was generated, copied it into a empty file, and removed the offending methods manually.  This was then placed on our servers and called in place of the overloaded WSDL.  While it is not terribly clean nor reliable, as any time the web services change the WSDL is not updated, it happens to work without any server-side modifications.</p>
<p><strong>The Hard Way</strong><br />
For the longer-term solution we will be implementing a service proxy in .NET and Windows Communication Foundation (WCF) because it is necessary for future iterations of the project.  A service proxy is an extra layer in an SOA architecture that essentially acts as a broker between web services.  The service proxy in our case accomplishes several things:</p>
<ul>
<li>Consolidation of multiple web services from multiple vendors into a single public-facing SOAP endpoint that the Flex client can then consume instead of attempting to integrate with them directly</li>
</ul>
<ul>
<li>Allows for mapping between a single SOAP call into the service proxy by the Flex client to be mapped to multiple web services to be</li>
</ul>
<ul>
<li>Allows for web service transactions whereby SOAP calls can be rolled back depending upon results from various calls to various external services</li>
</ul>
<ul>
<li>Gives the ability to implement MSMQ for scalability and reliability, as SOAP messages can then be stored in a queue for later in the case of external services being down or overloaded</li>
</ul>
<ul>
<li>Best of all, it allows us to author the SOAP API and the WSDL that the Flex client will connect to and removes the issue of attempting to consume an overloaded WSDL from Flex</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.phy5ics.com/2007/08/21/flex-2-and-wsdl-overloading/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
 

