<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Bluetooth Smart</title>
	<atom:link href="http://blog.bluetooth-smart.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.bluetooth-smart.com</link>
	<description>A beginners guide to bluetooth smart/low energy</description>
	<lastBuildDate>Thu, 23 May 2013 00:42:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='blog.bluetooth-smart.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Bluetooth Smart</title>
		<link>http://blog.bluetooth-smart.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://blog.bluetooth-smart.com/osd.xml" title="Bluetooth Smart" />
	<atom:link rel='hub' href='http://blog.bluetooth-smart.com/?pushpress=hub'/>
		<item>
		<title>Bluetooth Low Energy: The Developer&#8217;s Handbook</title>
		<link>http://blog.bluetooth-smart.com/2012/12/09/bluetooth-low-energy-the-developers-handbook/</link>
		<comments>http://blog.bluetooth-smart.com/2012/12/09/bluetooth-low-energy-the-developers-handbook/#comments</comments>
		<pubDate>Sun, 09 Dec 2012 11:05:40 +0000</pubDate>
		<dc:creator>Adam</dc:creator>
				<category><![CDATA[books]]></category>
		<category><![CDATA[documentation]]></category>

		<guid isPermaLink="false">http://blog.bluetooth-smart.com/?p=337</guid>
		<description><![CDATA[Just a short post to let everybody know about a new BLE book that&#8217;s recently become available, Bluetooth Low Energy: The Developer&#8217;s Handbook, by Robin Heydon.  I ordered it months ago when I first heard about it, and it finally arrived &#8230; <a href="http://blog.bluetooth-smart.com/2012/12/09/bluetooth-low-energy-the-developers-handbook/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.bluetooth-smart.com&#038;blog=9001194&#038;post=337&#038;subd=ocdev&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><a href="http://ocdev.files.wordpress.com/2012/12/img_5296.jpg"><img class="alignleft size-medium wp-image-338" style="border-style:initial;border-color:initial;border-width:0;" alt="IMG_5296" src="http://ocdev.files.wordpress.com/2012/12/img_5296.jpg?w=225&#038;h=300" height="300" width="225" /></a></p>
<p>Just a short post to let everybody know about a new BLE book that&#8217;s recently become available, <a title="Bluetooth Low Energy: The Developer's Handbook" href="http://www.amazon.com/Bluetooth-Low-Energy-Developers-Handbook/dp/013288836X" target="_blank">Bluetooth Low Energy: The Developer&#8217;s Handbook, by Robin Heydon</a>.  I ordered it months ago when I first heard about it, and it finally arrived a few days ago.  As far as I know, it&#8217;s the first (and only) book written on the subject, although please let me know via comments if you know of any other BLE books.</p>
<p>Since it only arrived a few days ago, I haven&#8217;t had much of a chance to look through it, but I&#8217;ll be sure to write a review after I&#8217;ve spent some time reading it.<span id="more-337"></span></p>
<p><a href="http://ocdev.files.wordpress.com/2012/12/img_5299.jpg"><img class="alignnone  wp-image-339" style="border-style:initial;border-color:initial;border-width:0;" alt="IMG_5299" src="http://ocdev.files.wordpress.com/2012/12/img_5299.jpg?w=768&#038;h=1024" height="1024" width="768" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ocdev.wordpress.com/337/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ocdev.wordpress.com/337/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.bluetooth-smart.com&#038;blog=9001194&#038;post=337&#038;subd=ocdev&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.bluetooth-smart.com/2012/12/09/bluetooth-low-energy-the-developers-handbook/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/cbf3a11b96bf337f0a20f6c22dddd085?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ocdev</media:title>
		</media:content>

		<media:content url="http://ocdev.files.wordpress.com/2012/12/img_5296.jpg?w=225" medium="image">
			<media:title type="html">IMG_5296</media:title>
		</media:content>

		<media:content url="http://ocdev.files.wordpress.com/2012/12/img_5299.jpg?w=768" medium="image">
			<media:title type="html">IMG_5299</media:title>
		</media:content>
	</item>
		<item>
		<title>connectBlue cB-OLP425i-26</title>
		<link>http://blog.bluetooth-smart.com/2012/11/20/connectblue-cb-olp425i-26/</link>
		<comments>http://blog.bluetooth-smart.com/2012/11/20/connectblue-cb-olp425i-26/#comments</comments>
		<pubDate>Tue, 20 Nov 2012 10:06:57 +0000</pubDate>
		<dc:creator>Adam</dc:creator>
				<category><![CDATA[connectBlue]]></category>
		<category><![CDATA[OLP425]]></category>
		<category><![CDATA[cc254x]]></category>

		<guid isPermaLink="false">http://blog.bluetooth-smart.com/?p=304</guid>
		<description><![CDATA[I recently discovered the OLP425 BLE module from Swedish company connectBlue, based on the CC2540 chip from Texas Instruments.  While there&#8217;s a wide variety of BLE modules available today based on the CC2540, such as the BLE112 from Bluegiga, most of &#8230; <a href="http://blog.bluetooth-smart.com/2012/11/20/connectblue-cb-olp425i-26/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.bluetooth-smart.com&#038;blog=9001194&#038;post=304&#038;subd=ocdev&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<div id="attachment_307" class="wp-caption alignright" style="width: 330px"><a href="http://ocdev.files.wordpress.com/2012/11/cb-olp425i-16.jpg"><img class="wp-image-307 " title="cB-OLP425i-16" alt="" src="http://ocdev.files.wordpress.com/2012/11/cb-olp425i-16.jpg?w=320&#038;h=208" height="208" width="320" /></a><p class="wp-caption-text">connectBlue BLE Platform Module cB-OLP425i-16</p></div>
<p>I recently discovered the <a title="OEM Bluetooth Low Energy Platform Module OLP425" href="http://www.connectblue.com/products/bluetooth-low-energy-products/bluetooth-low-energy-modules/bluetooth-low-energy-platform-module-olp425/" target="_blank">OLP425 BLE </a>module from Swedish company <a title="connectBlue" href="http://www.connectblue.com" target="_blank">connectBlue</a>, based on the CC2540 chip from Texas Instruments.  While there&#8217;s a wide variety of BLE modules available today based on the CC2540, such as the <a title="BLE112" href="http://www.bluegiga.com/BLE112_Bluetooth_low_energy_module" target="_blank">BLE112 </a>from Bluegiga, most of them are quite similar &#8211; they simply provide a more accessible hardware interface to the CC2540, as well as the necessary radio and telecommunications certifications. Unlike other basic BLE modules, the <a title="OEM Bluetooth Low Energy Platform Module OLP425" href="http://www.connectblue.com/products/bluetooth-low-energy-products/bluetooth-low-energy-modules/bluetooth-low-energy-platform-module-olp425/" target="_blank">connectBlue BLE Platform Module OLP425 </a>is available in a configuration with the following additional options:<span id="more-304"></span></p>
<ul>
<li>Temperature sensor</li>
<li>Accelerometers</li>
<li>2 LEDs</li>
<li>JST connector</li>
<li>Battery holder for CR1632</li>
</ul>
<p>This is a very appealing package, since you can now purchase one of these pre-configured OLP425 modules with many of the basic sensors already attached and ready for development. No longer do you have to worry about designing your own PCB and soldering a tiny 2mm by 2mm Ball Grid Array accelerometer onto it.</p>
<div id="attachment_306" class="wp-caption alignnone" style="width: 594px"><a href="http://ocdev.files.wordpress.com/2012/11/cma3000d.jpg"><img class=" wp-image-306" style="border-style:initial;border-color:initial;border-width:0;" title="cma3000d" alt="" src="http://ocdev.files.wordpress.com/2012/11/cma3000d.jpg?w=584&#038;h=276" height="276" width="584" /></a><p class="wp-caption-text">If you thought the QFN package of the CC2540 was difficult to solder, it&#8217;s nothing compared to the BGA package of the Murata CMA3000D Accelerometer that&#8217;s included with the CC2540 Keyfob</p></div>
<p>The OLP425 can be configured to include a JST connector, which allows you to use a JST 6-poles to IDC 10-poles adapter cable (part number cB-ACC-71) to connect the OLP425 to the TI CC debugger for programming and debugging, as shown in the following image:</p>
<div id="attachment_309" class="wp-caption alignnone" style="width: 419px"><a href="http://ocdev.files.wordpress.com/2012/11/img_52821.jpg"><img class=" wp-image-309" style="border-style:initial;border-color:initial;border-width:0;" title="IMG_5282" alt="" src="http://ocdev.files.wordpress.com/2012/11/img_52821.jpg?w=409&#038;h=545" height="545" width="409" /></a><p class="wp-caption-text">cB−OLP425i−26 with cB-ACC-71 adapter cable, connected to TI CC Debugger</p></div>
<p>The OLP425 comes in 4 different variants, as described in the very informative <a title="cB-OLP425 Datasheet" href="cB-OLP425 cB-OLS425 cB-OLS426 Electrical Mechanical Data Sheet" target="_blank">data sheet</a>:</p>
<table>
<thead>
<tr>
<th></th>
<th>cB−OLP425i−26</th>
<th>cB−OLP425x−26</th>
<th>cB−OLP425i−04</th>
<th>cB−OLP425x−04</th>
</tr>
</thead>
<tbody>
<tr>
<th>Antenna</th>
<td>Internal</td>
<td>U.fl connector</td>
<td>Internal</td>
<td>U.fl connector</td>
</tr>
<tr>
<th>Temp. sensor</th>
<td>✓</td>
<td>✓</td>
<td>x</td>
<td>x</td>
</tr>
<tr>
<th>Accelerometer</th>
<td>✓</td>
<td>✓</td>
<td>x</td>
<td>x</td>
</tr>
<tr>
<th>LEDs</th>
<td>2 LEDs</td>
<td>2 LEDs</td>
<td>No LEDs</td>
<td>No LEDs</td>
</tr>
<tr>
<th>JST Connector</th>
<td>✓</td>
<td>✓</td>
<td>x</td>
<td>x</td>
</tr>
<tr>
<th>Battery Holder</th>
<td>✓</td>
<td>✓</td>
<td>x</td>
<td>x</td>
</tr>
</tbody>
</table>
<p>I ended up purchasing the <b>cB−OLP425i−26 module (</b>Max equipped, internal antenna), from <a title="M2M Connectivity" href="http://www.m2mconnectivity.com.au/brands/connectblue/module/cb-olp425i-26-or-x-26" target="_blank">M2M connectivity</a> in Victoria, Australia, for $48, plus $17 for the <b>cB-ACC-71 CC Debugger adapter cable and $20 for shipping.</b></p>
<p>At $48 for the module, it&#8217;s quite a bit more expensive than the $19.19 AUD charged by <a title="BLE112 from Glynstore" href="http://www.glynstore.com/bluegiga-ble112-bluetooth-low-energy-module/" target="_blank">Glynstore for the BLE112</a>. However, if you&#8217;re looking to produce large quantities of these devices, it&#8217;s possible to get them custom made with different accessories, thereby reducing the cost.</p>
<p>I should mention at this point that Blueradios has been selling a similar sensor device for quite a while now, named the <a title="BR-BUTTON-S2A" href="http://www.blueradios.com/BR-BUTTON-S2A.pdf" target="_blank">BR-BUTTON-S2A SensorBug</a>, which includes an accelerometer, water detector, light sensor and temperature sensor.  However, at the current list price of $149 USD, it&#8217;s over $100 more expensive than the OLP425.</p>
<p>The physical size of the OLP425 is quite small at only 15&#215;22 mm, however, the battery holder for the CR1632 takes up the majority of the space.  To be honest, I was quite surprised at the large size of the battery holder, since I assumed it would use a low profile metal retention style, like the CC2540 Keyfob uses.  They may have opted for the larger plastic battery holder due to fact that there isn&#8217;t much space between the battery and the CC2540 chip, and RF interference may have been an issue.</p>
<div id="attachment_312" class="wp-caption alignnone" style="width: 360px"><a href="http://ocdev.files.wordpress.com/2012/11/img_5281.jpg"><img class="wp-image-312 " title="IMG_5281" alt="" src="http://ocdev.files.wordpress.com/2012/11/img_5281.jpg?w=350&#038;h=314" height="314" width="350" /></a><p class="wp-caption-text">cB−OLP425i−26 with battery holder for CR1632</p></div>
<p>Having said that, I&#8217;m glad they decided to use a CR1632 instead of CR2032, since it would&#8217;ve been even bigger if it used a CR2032, as you can see in the following image:</p>
<div id="attachment_314" class="wp-caption alignnone" style="width: 594px"><a href="http://ocdev.files.wordpress.com/2012/11/img_5292.jpg"><img class="size-full wp-image-314" title="IMG_5292" alt="" src="http://ocdev.files.wordpress.com/2012/11/img_5292.jpg?w=584&#038;h=319" height="319" width="584" /></a><p class="wp-caption-text">CR2032 (left) versus CR1632 (right)</p></div>
<h2>Compiling the Demo Software</h2>
<p>The OLP425 comes pre-programmed with a demo application based on the Keyfob code from the CC2540 dev kit.  connectBlue provides a great getting started document which explains all the functionality of the demo software, available <a title="cB-OLP425 Development Kit Getting started" href="http://support.connectblue.com/display/PRODBTPLA/cB-OLP425+Development+Kit+Getting+started" target="_blank">here</a>.</p>
<p>Unfortunately for myself, I didn&#8217;t bother reading the documentation, and I tried flashing the demo application to the OLP425 device, without realising that the module already came programmed with it.  This wouldn&#8217;t have been a problem, except for the fact that I encountered numerous errors from IAR when attempting to compile the demo software.</p>
<p>The reason I had difficulty compiling the demo code was because I didn&#8217;t read the <a title="cB-OLP425 Development Kit Getting started" href="http://support.connectblue.com/display/PRODBTPLA/cB-OLP425+Development+Kit+Getting+started" target="_blank">cB-OLP425 Development Kit Getting started </a>document, or more specifically, the section entitled <strong>Installation of cB-OLP425 SDK zip-archive</strong>. If I had, I would&#8217;ve noticed that you&#8217;re supposed to &#8220;extract the cB-OLP425 SDK zip-archive into the installation folder for the Texas Instruments CC2540 BLE Software Development Kit&#8221;.  Once I did this, all my problems were solved.</p>
<p>So assuming you&#8217;ve extracted the OLP425 SDK as described in the getting started document,  you should now be able to open the IAR project file <strong>C:\Texas Instruments\BLE-CC254x-1.2.1\Projects\ble\cB-OLP425Demo\CC2540DB\Demo.eww</strong>, connect your OLP425 to the CC Debugger using the cB-ACC-71 adapter cable, and hit the &#8220;Download and Debug&#8221; button to compile the demo code.</p>
<p><strong>A word of Caution:</strong> make sure you don&#8217;t insert a battery into the OLP425 if it&#8217;s hooked up to the CC Debugger.  You can either use a battery, or connect the OLP425 to the CC Debugger &#8211; <strong>never</strong> both at the same time.</p>
<h2>Using the demo software</h2>
<p>Whereas the CC2540 KeyfobDemo required you to press one of the buttons to enable advertising, the cB-OLP425 demo software is much smarter and uses an accelerometer interrupt generated when the device is moved, to wake up the CC2540 and enter advertising mode.  If you open up the <strong>cb_demo.c</strong> file in IAR and uncomment the following code on line 666, it&#8217;ll cause the green LED on the OLP425 to flash whenever it enters advertising mode, which can be helpful when debugging:</p>
<pre class="brush: cpp; title: ; notranslate">
cbLED_flash(cbLED_GREEN, 1, 100, 0);
</pre>
<p>So now that we&#8217;ve flashed the OLP425 with the demo software, it&#8217;s time to test it using the Texas Instruments BTool application (<strong>C:\Texas Instruments\BLE-CC254x-1.2.1\Projects\BTool\BTool.exe</strong>), along with the USB BLE adapter from the CC2540 Mini Dev Kit.</p>
<p>The <a title="Getting started with the Demo Application" href="http://support.connectblue.com/display/PRODBTPLA/cB-OLP425+Development+Kit+Getting+started" target="_blank">Getting Started guide </a>provides very good instructions on using BTool to establish a connection with the OLP425 and describes how to use the Characteristic Write operation to modify the state of the LEDs, so I won&#8217;t duplicate that information here.  Instead, I&#8217;ll briefly describe how to enable the notifications for the Temperature sensor.</p>
<h2>Enabling Notifications for the Temperature Service</h2>
<p>If we consult the Texas Instruments Bluetooth Low Energy <a title="Texas Instruments Bluetooth® Low Energy CC2540 Mini Development Kit User’s Guide" href="www.ti.com/lit/ug/swru270b/swru270b.pdf" target="_blank">CC2540 Mini Development Kit User’s Guide</a> (swru270b.pdf) under section 4.3.6, <em>Enabling Notifications</em>, we&#8217;ll see that it&#8217;s possible for a GATT server device to &#8220;push&#8221; characteristic value data to a client device, without being prompted for a read request.  We can configure the demo software on the OLP425 to push a new temperature value if it detects a change, or accelerometer data if the device is moved.</p>
<p>According to the <a title="Texas Instruments Bluetooth® Low Energy CC2540 Mini Development Kit User’s Guide" href="www.ti.com/lit/ug/swru270b/swru270b.pdf" target="_blank">CC2540 Mini Development Kit User’s Guide</a>, in order to enable the notification for the changes in temperature, we need to first find the handle of the characteristic for the temperature service. If we consult the Temperature Service section of the <a href="http://support.connectblue.com/display/PRODBTPLA/cB-OLP425+Development+Kit+Getting+started">cB-OLP425 Development Kit Getting started</a> guide, we see that the characteristic UUID is 0xFFE1. We could also have found this value by looking at the <strong>C:\Texas Instruments\BLE-CC254x-1.2.1\Projects\ble\Profiles\Temperature\cb_temperature_service.h </strong>file, since this is where the Profile for the Temperature service and UUIDs are defined.  Note that this UUID (as well as the UUIDs for the LED Service and Accelerometer Service) do not conform to any specifications in the Bluetooth SIG.</p>
<p>Now that we know the characteristic UUID, we can obtain the <em>handle</em> of the UUID as well the properties of the characteristic.  We do this by using the <em>Discover Characteristic by UUID </em>process outlined in section 4.3.4 of the CC2540 Mini Dev Kit User&#8217;s Guide.  In short, we welect the &#8220;Read/Write&#8221; tab in BTool, then set the &#8220;Sub-Procedure&#8221; to &#8220;Discover Characteristic by UUID&#8221; and enter <strong>E1:FF</strong> for the Characteristic UUID in BTool (note that the Least Significant Byte is entered first, and the Most Significant Byte is entered last), then click the &#8220;Read&#8221; button.  On my machine, I get the hexadecimal values &#8220;12 37 00 E1 FF&#8221;, as shown the following image:</p>
<div id="attachment_324" class="wp-caption alignnone" style="width: 594px"><a href="http://ocdev.files.wordpress.com/2012/11/discover_characteristic_by_uuid.png"><img class=" wp-image-324" style="border:0 none;" title="discover_characteristic_by_uuid" alt="" src="http://ocdev.files.wordpress.com/2012/11/discover_characteristic_by_uuid.png?w=584&#038;h=430" height="430" width="584" /></a><p class="wp-caption-text">Obtaining Characteristic Value declaration</p></div>
<p>If we consult Section 3.3.1 of the <a title="Core Version 4.0" href="http://bluetooth.org/docman/handlers/downloaddoc.ashx?doc_id=229737" target="_blank">Core v4.0 Specification </a>from the <a title="Bluetooth SIG" href="http://bluetooth.org" target="_blank">Bluetooth SIG website</a>, we see that the first byte of this value is the Characteristic Properties, and the value 0&#215;12 represents a Read property (0&#215;02) as well as the Notify property (0&#215;10), since 0&#215;02 + 0&#215;10 = 0&#215;12.  The second and third bytes &#8220;37 00&#8243; tell us that the handle of the characteristic value is 0&#215;0037.  The fourth and fifth bytes tell the UUID of the characteristic, 0xFFE1.</p>
<p>Going back to the <a title="Texas Instruments Bluetooth® Low Energy CC2540 Mini Development Kit User’s Guide" href="www.ti.com/lit/ug/swru270b/swru270b.pdf" target="_blank">CC2540 Mini Development Kit User’s Guide</a>, we see that we can enable notifications of the Temperature Service by writing a value of 0&#215;0001 to the client characteristic configuration descriptor for the particular characteristic. The handle for the client characteristic configuration descriptor immediately follows the characteristic value’s handle. Therefore, a value of 0&#215;0001 must be written to handle 0&#215;0038 (since this value immediately follows the handle of the characteristic value 0&#215;0037 as found above). Enter “0&#215;0037” into the “Characteristic Value Handle” box in the “Characteristic Write” section, and enter “01:00” in the “Value” section (note that the LSB is entered first, and the MSB is entered last). Click the “Write Value” button. The status box will display “Success”, indicating that the write was successful.</p>
<p>After enabling notifications on the Temperature Service, I then moved the OLP425 module near my desktop halogen lamp and within a second, I received a notification in the BTool log window showing that the temperature had increased from 25° C to 26° C, as shown in the following image:</p>
<div id="attachment_326" class="wp-caption alignnone" style="width: 594px"><a href="http://ocdev.files.wordpress.com/2012/11/temperature_changes.png"><img class=" wp-image-326" style="border:0 none;" title="temperature_changes" alt="" src="http://ocdev.files.wordpress.com/2012/11/temperature_changes.png?w=584&#038;h=457" height="457" width="584" /></a><p class="wp-caption-text">Receiving Temperature Notifications</p></div>
<p>We can remove the notification by writing the value &#8220;00:00&#8243; to the Characteristic Value handle 0&#215;0038 as in the procedure outlined above.</p>
<h2>Conclusions</h2>
<p>I&#8217;m very impressed with the small size of the cB-OLP425i-26, as well as the ease of programming the unit with the adapter cable, making it much easier to download software to the module without requiring a breakout board.  I also really liked the documentation provided by the <a href="http://support.connectblue.com/display/PRODBTPLA/cB-OLP425+Development+Kit+Getting+started">cB-OLP425 Development Kit Getting started </a>guide, which was well written and straightforward.  The <a href="http://support.connectblue.com/display/PRODBTSPA/cB-OLP425+cB-OLS425+cB-OLS426+Electrical+Mechanical+Data+Sheet">cB-OLP425 cB-OLS425 cB-OLS426 Electrical Mechanical Data Sheet</a> also provides a wealth of very useful information.  I liked the fact that the code example used an accelerometer driven interrupt to wake up the module and enable advertising, which provides a useful starting point for people wanting to create a BLE device without a button.</p>
<p>The only downside to the OLP425 is the higher cost compared to other basic sensor-free BLE modules, but that&#8217;s the price you pay for the convenience of having the sensors, battery retainer and debugging connector provided for you.</p>
<p>In closing, I&#8217;m glad to see a new module on the market that provides something different than all the other standard BLE modules, and I&#8217;ve already got several projects in mind that the OLP425 will be perfect for.</p>
<h2>UPDATE (December 9, 2012)</h2>
<p><img class="alignleft size-full wp-image-334" style="border-style:initial;border-color:initial;border-width:0;" alt="cB-OLP425-Demo" src="http://ocdev.files.wordpress.com/2012/11/cb-olp425-demo.png?w=584"   />After writing the above post, it was <a title="cB-OLP425 iPhone application" href="http://blog.bluetooth-smart.com/2012/11/20/connectblue-cb-olp425i-26/#comment-338" target="_blank">explained by Kalle</a> in the comments section that connectBlue have an iOS demo application, as well as source code available.  At the time of writing this blog post, this wasn&#8217;t very apparent, however, connectBlue have now updated the <a title="connectBlue cB-OLP425 landing page" href="http://www.connectblue.com/products/bluetooth-low-energy-products/bluetooth-low-energy-modules/bluetooth-low-energy-platform-module-olp425/" target="_blank">landing page</a> for the OLP425 to provide a link to the iOS demo application, which can be found <a title="connectBlue cB-OLP425i-26 iOS demo application" href="https://itunes.apple.com/app/cb-olp425/id575523395?mt=8" target="_blank">here</a>.</p>
<p>If you&#8217;d like to obtain the source code, you&#8217;ll need to send an email to <a href="mailto:support@connectblue.com">support@connectblue.com</a> and ask them for it.  They were pretty quick to respond to my request, and I received access to the source code within a few days of sending them an email.</p>
<p>I&#8217;ve been playing around with the demo app for the past few days, and it&#8217;s pretty slick.  It scans and pairs with the OLP425 much faster than the Texas Instruments demo iPhone application does with the keyfob, and from the screenshots, it looks like it supports connecting to multiple OLP425 devices as well.  Hopefully connectBlue will decide to post the source code for the demo application directly on their website in the future, in order to make it easier to obtain. I&#8217;ve got a feeling that they may just end up doing this after they start to receive thousands of requests from anxious developers!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ocdev.wordpress.com/304/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ocdev.wordpress.com/304/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.bluetooth-smart.com&#038;blog=9001194&#038;post=304&#038;subd=ocdev&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.bluetooth-smart.com/2012/11/20/connectblue-cb-olp425i-26/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/cbf3a11b96bf337f0a20f6c22dddd085?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ocdev</media:title>
		</media:content>

		<media:content url="http://ocdev.files.wordpress.com/2012/11/cb-olp425i-16.jpg" medium="image">
			<media:title type="html">cB-OLP425i-16</media:title>
		</media:content>

		<media:content url="http://ocdev.files.wordpress.com/2012/11/cma3000d.jpg" medium="image">
			<media:title type="html">cma3000d</media:title>
		</media:content>

		<media:content url="http://ocdev.files.wordpress.com/2012/11/img_52821.jpg" medium="image">
			<media:title type="html">IMG_5282</media:title>
		</media:content>

		<media:content url="http://ocdev.files.wordpress.com/2012/11/img_5281.jpg" medium="image">
			<media:title type="html">IMG_5281</media:title>
		</media:content>

		<media:content url="http://ocdev.files.wordpress.com/2012/11/img_5292.jpg" medium="image">
			<media:title type="html">IMG_5292</media:title>
		</media:content>

		<media:content url="http://ocdev.files.wordpress.com/2012/11/discover_characteristic_by_uuid.png" medium="image">
			<media:title type="html">discover_characteristic_by_uuid</media:title>
		</media:content>

		<media:content url="http://ocdev.files.wordpress.com/2012/11/temperature_changes.png" medium="image">
			<media:title type="html">temperature_changes</media:title>
		</media:content>

		<media:content url="http://ocdev.files.wordpress.com/2012/11/cb-olp425-demo.png" medium="image">
			<media:title type="html">cB-OLP425-Demo</media:title>
		</media:content>
	</item>
		<item>
		<title>Programming the BLE112 using BGScript</title>
		<link>http://blog.bluetooth-smart.com/2012/09/16/programming-the-ble112-using-bgscript/</link>
		<comments>http://blog.bluetooth-smart.com/2012/09/16/programming-the-ble112-using-bgscript/#comments</comments>
		<pubDate>Sun, 16 Sep 2012 10:22:44 +0000</pubDate>
		<dc:creator>Adam</dc:creator>
				<category><![CDATA[ble112]]></category>
		<category><![CDATA[bgscript]]></category>

		<guid isPermaLink="false">http://blog.bluetooth-smart.com/?p=266</guid>
		<description><![CDATA[Following on from the previous post describing how to use IAR to write custom C code for the BLE112, in this post I&#8217;m going to walk through creating a very basic program to toggle an LED on/off using BGScript on &#8230; <a href="http://blog.bluetooth-smart.com/2012/09/16/programming-the-ble112-using-bgscript/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.bluetooth-smart.com&#038;blog=9001194&#038;post=266&#038;subd=ocdev&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Following on from the <a title="Programming the BLE112 with C code using IAR" href="http://blog.bluetooth-smart.com/2012/09/11/programming-the-ble112-with-c-code-using-iar/" target="_blank">previous post </a>describing how to use IAR to write custom C code for the BLE112, in this post I&#8217;m going to walk through creating a very basic program to toggle an LED on/off using BGScript on a Windows machine (sorry, no Linux instructions yet).</p>
<p>The bare minimum equipment needed is the following:</p>
<ul>
<li>CC Debugger ($49 from <a title="CC Debugger" href="http://www.ti.com/tool/cc-debugger" target="_blank">Texas Instruments</a>)</li>
<li>Bluegiga BLE112 module ($18 from the <a title="BLE112 semiconductor store" href="http://www.semiconductorstore.com/cart/pc/viewPrd.asp?idproduct=46652" target="_blank">semiconductor store</a>)</li>
</ul>
<p>And that&#8217;s it. You&#8217;ll have to figure out some way to connect the CC Debugger to the BLE112, or you could buy a breakout board from <a title="BLE112 Breakout Board" href="http://www.inmojo.com/store/jeff-rowberg/item/ble112-bluetooth-low-energy-breakout/" target="_blank">Jeff Rowberg </a>and connect it to a breadboard.</p>
<p><span id="more-266"></span></p>
<p>So what exactly is BGScript and why is it important? BGScript is a freely available proprietary language developed by Bluegiga for use with their BLE112 modules.  It allows us to write programs for the BLE112 without using the very expensive IAR compiler.  This, of course is very appealing, because IAR costs about $4,000 AUD, which is far beyond the typical hobbyist budget.  BGScript is a nice alternative for applications that don&#8217;t need the full complexity of a C based program.</p>
<p>To get started, go to the <a title="Create Bluegiga Tech Forum Account" href="http://www.bluegiga.com/create_account" target="_blank">Create Bluegiga Tech Forum Account page </a>and create an account if you haven&#8217;t already done so, then go to the <a title="Bluegiga Support Page" href="http://www.bluegiga.com/support" target="_blank">support page</a> and login.  Once you&#8217;ve logged in, head to the <a title="BLE112 Techforum" href="http://techforum.bluegiga.com/ble112" target="_blank">BLE112 section</a> then head to the &#8220;Software Releases&#8221; section and download the <strong>Bluetooth Smart 1.1 (Beta) Software Development Kit</strong> software package.  This contains the windows drivers for the BLED112 USB dongle, sample BGScript projects as well as the necessary tools required for compiling the BGScript projects into hex files to be flashed onto the BLE112.</p>
<p>Then, from the &#8220;PC Utilities&#8221; section, download the <strong>Flash Programmer 1.12.1 (Rev. N) </strong>which is just the Texas Instruments Smart RF Flash Programmer. If you&#8217;ve already got this as part of the CC2540 dev kit, then you don&#8217;t need to download it again</p>
<p>Next, download the following documentation:</p>
<ul>
<li><strong>Profile Toolkit developer guide</strong></li>
<li><strong>BGScript developer guide</strong></li>
<li><strong>Bluetooth Smart &#8211; 1.1 Beta API Spec</strong></li>
<li><strong>BLEGUI User Guide</strong></li>
</ul>
<p>The Profile Toolkit developer guide provides details regarding the structure of a typical BGScript project, including instructions on how to use the binary utilities from the Bluetooth Smart 1.1 (Beta) Software Development Kit to compile the BGScript into a hex file.  Make sure you read this guide before anything else</p>
<p>The BGScript developer guide contains an explanation of the BGScript syntax as well as useful BGScript examples.  Read this guide after checking out the Profile Toolkit guide.</p>
<p>The Bluetooth Smart &#8211; 1.1 Beta API Spec contains the API reference for all the available BGScript and BGLib functions.</p>
<p>The BLEGUI User Guide contains information to use the the BLEGUI tool included with the Bluetooth Smart 1.1 (Beta) Software Development Kit.  This is an extremely useful tool which allows you to attach to the BLED112 USB Dongle and use it to quickly test other BLE112 modules.</p>
<p>So now that we&#8217;ve got all the required software and documentation, let&#8217;s set up the BLE112 module on a breadboard as described in <a title="Programming the BLE112 with C code using IAR" href="http://blog.bluetooth-smart.com/2012/09/11/programming-the-ble112-with-c-code-using-iar/" target="_blank">this post</a>, but instead of connecting the LED to P1.2, we&#8217;ll connect it to P0.7 to better illustrate the usage of bitmasks in BGScript.</p>
<div id="attachment_278" class="wp-caption alignnone" style="width: 440px"><a href="http://ocdev.files.wordpress.com/2012/09/img_5254.jpg" target="_blank"><img class="wp-image-278 " style="border-style:initial;border-color:initial;border-width:0;" title="IMG_5254" alt="" src="http://ocdev.files.wordpress.com/2012/09/img_5254.jpg?w=430&#038;h=573" height="573" width="430" /></a><p class="wp-caption-text">BLE112 with LED hooked up to P0.7</p></div>
<p>Next, extract the previously downloaded Bluetooth Smart 1.1 (Beta) Software Development Kit and navigate to the &#8220;example&#8221; directory.  Pretty much all of these examples are meant to be used with the <a title="Development Kit DKBLE112" href="http://www.bluegiga.com/evaluation_BLE112" target="_blank">DKBLE112 Development Kit</a>, which I don&#8217;t own, since I didn&#8217;t feel like spending $350 for the kit and opted for standalone BLE112 modules instead.  Go ahead and duplicate the &#8220;find_me&#8221; project and name it &#8220;toggle_led&#8221; (or alternatively, download the <a title="toggle led" href="https://dl.dropbox.com/u/119539/toggle_led.rar" target="_blank">toggle led project </a>that I created).  Now open up the bgdemo.bgs file in your text editor and change the contents to the following:</p>
<pre class="brush: ruby; title: ; notranslate">
# This example script will flash an LED connected to P0.7 every second

# Boot event listener
event system_boot(major,minor,patch,build,ll_version,protocol_version,hw)

  #Set timer to generate event every 1s
  call hardware_set_soft_timer(32768, 1, 0)

  # configure P0.7 as output
  call hardware_io_port_config_direction(0, $80)

  # Disable P0.7 pin. Parameters: I/O port to write to 0/1/2,
  #                               bitmask of pins to modify,
  #                               bitmask of pin values to set
  call hardware_io_port_write(0, $80, 0)
end

dim result
dim port
dim data

#Timer event listener
event hardware_soft_timer(handle)
  # read the current state of P0.7
  call hardware_io_port_read(0, $80)(result, port, data)

  if data &amp; $80 then
    # pin was set to high, set it to low to disable LED
    call hardware_io_port_write(0, $80, 0)
  else
    # pin was set to low, set it to high to enable LED
    call hardware_io_port_write(0, $80, $80)
  end if
end

</pre>
<p>I&#8217;ll walk through each of the important parts of the source code in turn.  First we have:</p>
<pre class="brush: ruby; title: ; notranslate">
event system_boot(major,minor,patch,build,ll_version,protocol_version,hw)
  ...
end
</pre>
<p>From the Bluegiga Bluetooth Smart Software V.1.1 (beta) API Documentation file, it tell us &#8220;This event is produced when the device boots up and is ready to receive commands&#8221;.  So this is the primary entry point where we can configure the BLE module, sort of like a &#8220;main&#8221; function in C code.</p>
<p>In the next line, we set up a repeating timer, to fire every 1 second:</p>
<pre class="brush: ruby; title: ; notranslate">
call hardware_set_soft_timer(32768, 1, 0)
</pre>
<p>The first parameter defines how often the timer is fired, in units of local crystal frequency. In other words, time = 1/32768 seconds. Since we&#8217;re passing 32768, we&#8217;ll get a timer period of 1 second.  If we wanted a 2 second period, we&#8217;d use 2*32768, or 65536.  The parameter for this time period is a 32 bit unsigned integer, so the largest period we can have for a timer interrupt is (2^32-1)/32768 seconds, or 36.41 hours. If you need a timer interval longer than this, you&#8217;ll need to write your own custom handler to take care of it.  The last parameter of the function defines whether this is a one time event or a continuously firing timer.  Since we want this timer to fire continuously, we&#8217;ll pass a value of 0. If we wanted a single shot timer, we&#8217;d pass a 1 here.</p>
<p>Next, we need to configure the direction of the port that the LED is connected to as an output.  A pin can either be defined as an input, which means we&#8217;ll be receiving a signal on it, or an output, for sending a value to an external device. We&#8217;ll configure P0.7 as an output since we&#8217;ll be setting a high value to turn the LED on, or a low value to turn it off.</p>
<pre class="brush: ruby; title: ; notranslate">
# configure P0.7 as output
call hardware_io_port_config_direction(0, $80)
</pre>
<p>The first parameter for the function is the port number, which is 0 in our case, and the second parameter is the bitmask for the pin number to configure.  Notice that we&#8217;re using $80. The dollarsign in front of the parameter denotes that it&#8217;s to be treated as a hexadecimal value.  This parameter is a bitmask where the corresponding bit is set to 1 if the pin is configured for output direction, or 0 if the pin is for input (the default).  Since I&#8217;m passing $80, this is equivalent to 0b10000000 in binary, which means we&#8217;ll be configuring pin 7 to be used as an output.  We could also pass 128 instead of $80 if we wanted to use the decimal representation.  If, for example, we wanted to configure two pins, say pin 7 and pin 4 as outputs, we&#8217;d pass $90 which is 0b1001000 in binary.</p>
<p>Now that we&#8217;ve configured P0.7 as output, we&#8217;ll set it to 0, to turn the LED off:</p>
<pre class="brush: ruby; title: ; notranslate">
call hardware_io_port_write(0, $80, 0)
</pre>
<p>The first parameter is the port number, the second parameter is the bitmask of the pins you want to configure, and the last parameter is the value you want to set the pins to.</p>
<p>Next, we need to set up a callback to handle the firing of the timer that we configured earlier. Before we can define the timer callback, we&#8217;ll need to create some variables which we&#8217;ll be referencing later on.  These need to be defined outside of the event block:</p>
<pre class="brush: ruby; title: ; notranslate">
dim result
dim port
dim data
event hardware_soft_timer(handle)
  ...
end
</pre>
<p>For this example project, I want to toggle an LED every second.  So in our timer callback event, we&#8217;ll need to get the current value of the pin and if it&#8217;s high, we set it to low, and vice versa. So the first thing we need is the current state of the pin:</p>
<pre class="brush: ruby; title: ; notranslate">
call hardware_io_port_read(0, $80)(result, port, data)
</pre>
<p>This is where we use the variables that we defined earlier, to store the return values of this function call.  The first parameter of the function is the port number we want to read, either 0,1 or 2, and the second parameter is the bitmask of the pins we want to read. We&#8217;re only concerned with pin 7, so we pass $80 as before.  The syntax of this function is C-like, but the return values are a little different.  It looks as if you pass them as additional parameters.  The first return value<strong> result </strong>is the error code from the call, where 0 represents success.  The second return value <strong>port </strong>indicates the port that was read, and the last parameter <strong>data</strong> is the pin state, which is an 8 bit value representing which pins are high and which ones are low.</p>
<p>Now that we&#8217;ve gotten the current status of the pin, we can use a simple if/else conditional to toggle it:</p>
<pre class="brush: ruby; title: ; notranslate">
if data &amp; $80 then
  # pin was set to high, set it to low to disable LED
  call hardware_io_port_write(0, $80, 0)
else
  # pin was set to low, set it to high to enable LED
  call hardware_io_port_write(0, $80, $80)
end if
</pre>
<p>The syntax is pretty similar to C, other than the fact that there&#8217;s no facility for using an &#8220;else if(condition)&#8221; statement, nor can you use more than a single else clause.  For more information on the syntax, be sure to consult the <strong>BGScript Developer Guide</strong>.</p>
<p>So now that we&#8217;ve got a simple BGScript, we need to compile it to a hex file and then flash it onto the onboard CC2540 on the BLE112.  Open up a command prompt in Windows and navigate to the project directory, in my case, I stuck it in &#8220;<strong>C:\Bluetooth Smart 1.1 (Beta) Software Development Kit\example\toggle_led</strong>&#8220;</p>
<p>Once there, execute the following command:</p>
<pre class="brush: ruby; title: ; notranslate">
..\..\bin\bgbuild.exe project.xml
</pre>
<p>And you should get the following output, provided there were no errors:</p>
<div id="attachment_287" class="wp-caption alignnone" style="width: 594px"><a href="http://ocdev.files.wordpress.com/2012/09/bgbuild-output.png" target="_blank"><img class=" wp-image-287 " style="border:0 none;" title="bgbuild output" alt="" src="http://ocdev.files.wordpress.com/2012/09/bgbuild-output.png?w=584&#038;h=241" height="241" width="584" /></a><p class="wp-caption-text">BGBuild output</p></div>
<p>Now, if you open the directory that the <strong>project.xml</strong> file was in, you&#8217;ll notice there&#8217;s a file named <strong>out.hex</strong>. This is our bgscript that&#8217;s been compiled into a hex file that we can flash to the BLE112.</p>
<p>The next step is to open up the <a title="SmartRF Flash Programmer" href="http://www.ti.com/tool/flash-programmer" target="_blank">Texas Instruments SmartRF Flash Programmer</a>, set the flash image path to the <strong>out.hex</strong> file, then click on &#8220;Actions: Erase and Program&#8221;, then hit the &#8220;Perform Actions&#8221; button, and you should see the following output:</p>
<div id="attachment_290" class="wp-caption alignnone" style="width: 536px"><a href="http://ocdev.files.wordpress.com/2012/09/smartrfoutput.png" target="_blank"><img class=" wp-image-290 " style="border:0 none;" title="SmartRFOutput" alt="" src="http://ocdev.files.wordpress.com/2012/09/smartrfoutput.png?w=526&#038;h=583" height="583" width="526" /></a><p class="wp-caption-text">Flashing the BLE112 with BGScript using SmartRF Programmer</p></div>
<p>Once this has been done, you should hopefully see the LED connected to P0.7 on your BLE112 module flashing every second, verifying that our code has been successfully downloaded to the BLE112.</p>
<p>So that&#8217;s all there is to it.  I&#8217;ve gotta say, I&#8217;m quite impressed by the amount of work that the guys at Bluegiga have put into creating BGScript, and all the documentation available.  It was pretty easy to get everything working, and will be a great alternative to using IAR.  My next task is to create a more complicated project with IAR involving external devices with SPI, and then see if I can duplicate the functionality using BGScript.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ocdev.wordpress.com/266/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ocdev.wordpress.com/266/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.bluetooth-smart.com&#038;blog=9001194&#038;post=266&#038;subd=ocdev&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.bluetooth-smart.com/2012/09/16/programming-the-ble112-using-bgscript/feed/</wfw:commentRss>
		<slash:comments>32</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/cbf3a11b96bf337f0a20f6c22dddd085?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ocdev</media:title>
		</media:content>

		<media:content url="http://ocdev.files.wordpress.com/2012/09/img_5254.jpg?w=768" medium="image">
			<media:title type="html">IMG_5254</media:title>
		</media:content>

		<media:content url="http://ocdev.files.wordpress.com/2012/09/bgbuild-output.png" medium="image">
			<media:title type="html">bgbuild output</media:title>
		</media:content>

		<media:content url="http://ocdev.files.wordpress.com/2012/09/smartrfoutput.png" medium="image">
			<media:title type="html">SmartRFOutput</media:title>
		</media:content>
	</item>
		<item>
		<title>Programming the BLE112 with C code using IAR</title>
		<link>http://blog.bluetooth-smart.com/2012/09/11/programming-the-ble112-with-c-code-using-iar/</link>
		<comments>http://blog.bluetooth-smart.com/2012/09/11/programming-the-ble112-with-c-code-using-iar/#comments</comments>
		<pubDate>Tue, 11 Sep 2012 13:57:33 +0000</pubDate>
		<dc:creator>Adam</dc:creator>
				<category><![CDATA[ble dev kits]]></category>
		<category><![CDATA[ble112]]></category>
		<category><![CDATA[iar]]></category>

		<guid isPermaLink="false">http://blog.bluetooth-smart.com/?p=213</guid>
		<description><![CDATA[I&#8217;ve heard it mentioned a few times that it&#8217;s not possible to program the Bluegiga BLE112 with IAR, but there&#8217;s absolutely no reason I can see why this would be the case, considering that it&#8217;s just a TI CC2540 with &#8230; <a href="http://blog.bluetooth-smart.com/2012/09/11/programming-the-ble112-with-c-code-using-iar/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.bluetooth-smart.com&#038;blog=9001194&#038;post=213&#038;subd=ocdev&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<div id="attachment_252" class="wp-caption alignleft" style="width: 310px"><a href="http://ocdev.files.wordpress.com/2012/09/img_5202.jpg" target="_blank"><img class="size-medium wp-image-252" style="border-style:initial;border-color:initial;border-width:0;" title="IMG_5202" src="http://ocdev.files.wordpress.com/2012/09/img_5202.jpg?w=300&#038;h=225" alt="" width="300" height="225" /></a><p class="wp-caption-text">Despite the terrible soldering job, it actually works!</p></div>
<p>I&#8217;ve heard it mentioned a few times that it&#8217;s not possible to program the Bluegiga BLE112 with IAR, but there&#8217;s absolutely no reason I can see why this would be the case, considering that it&#8217;s just a TI CC2540 with all the necessary components connected to turn it into a module. Since we can program the TI CC2540 on the keyfob using IAR, we should also be able to program the CC2540 on the BLE112 using IAR.</p>
<p><span id="more-213"></span></p>
<p>I finally managed to get some free time during the weekend to play around with some Bluegiga BLE112 modules that I&#8217;ve had sitting around collecting dust for the past few months, so I thought this would be a good chance to try and program them using IAR.</p>
<p>I purchased them in January 2012 from <a title="BLE112-A-V1" href="http://www.glynstore.com/bluegiga-ble112-bluetooth-low-energy-module/" target="_blank">Glynstore in Australia</a> for $24 AUD/each, but I notice that the price has now been reduced to $19.19 AUD.   If you&#8217;re in the states, you can find them even cheaper at $17.45 USD from the <a title="BLE112 from Semiconductor Store" href="http://www.semiconductorstore.com/cart/pc/viewPrd.asp?idproduct=46652" target="_blank">Semiconductor Store</a> (unfortunately for those of us in Australia, the $53 shipping fee ends up nullifying any potential savings).  For this price, you get a fully assembled, tested, and FCC/KCC/MIC/CE certified BLE device.  For a hobbyist, this is definitely the way to go, since building your own custom BLE module would cost much more than $20, and you wouldn&#8217;t have any certification.  Having said that, I&#8217;d still like to try creating my own BLE module, but this is only to satisfy my own curiosity.</p>
<p>When the BLE112 modules arrived, I realised that I&#8217;d need some kind of breakout board to allow me to interface them with a breadboard.  This is not strictly necessary, since you can just solder your wires directly to the BLE112 module itself, but a breakout board is a much nicer solution.</p>
<p>For those of you unfamiliar with a &#8220;breakout board&#8221;, it&#8217;s a printed circuit board with a row of header pins for interfacing a small component with a breadboard for prototyping.  These are extremely useful when you&#8217;ve got a really tiny component, such as 2mm x 2mm accelerometer which has pins placed 0.5mm from each other, and would be very difficult to solder wires onto.</p>
<p>After a bit of googling, I came across a <a title="BLE112 breakout board" href="http://www.inmojo.com/store/jeff-rowberg/item/ble112-bluetooth-low-energy-breakout/" target="_blank">custom bluetooth low energy breakout board for the BLE112</a> created by Jeff Rowberg, designer of the very cool <a title="keyglove" href="http://www.keyglove.net/" target="_blank">key glove</a> wearable input device.  I ended up ordering two breakout boards at $12 USD each and they arrived pretty quickly.  Jeff was also very helpful in letting me know when they had been shipped, so I can definitely recommend his services.</p>
<p>Here&#8217;s a picture of the backside of the Bluegiga BLE112 module next to the BLE112 breakout board. The BLE112 module is actually pretty small, so the breakout board makes it much easier to work with.</p>
<div id="attachment_228" class="wp-caption alignnone" style="width: 1034px"><a href="http://ocdev.files.wordpress.com/2012/09/img_5192.jpg" target="_blank"><img class=" wp-image-228 " style="border-style:initial;border-color:initial;border-width:0;" title="BLE112 and breakout board" src="http://ocdev.files.wordpress.com/2012/09/img_5192.jpg?w=1024&#038;h=768" alt="" width="1024" height="768" /></a><p class="wp-caption-text">BLE112 module on left with breakout board on right</p></div>
<h2>Tools for the job</h2>
<p>So now that I had the BLE112 and the breakout board, I needed to do a little bit of soldering to attach the two together.  The pin pitch (distance between pins) on the BLE112 is 1.25mm (0.04&#8243;), which is small, but I found it reasonably straightforward to solder, and I&#8217;m a complete beginner at this, with very little experience soldering.  I used a <a title="Hakko FX-888" href="http://www.hakko.com/english/products/hakko_fx888.html" target="_blank">Hakko FX-888</a> soldering iron with a T18-D16 Shape 1.6D Chisel Tip, which is available from <a title="Hakko T18-D16 Solder Tip Shape 1.6D" href="http://www.oritech.com.au/productDetail.aspx?productID=27475" target="_blank">Oritech</a> or <a title="HT18-D16" href="http://www.mektronics.com.au/index.php?page=shop.product_details&amp;flypage=flypage.tpl&amp;product_id=2195&amp;category_id=152&amp;option=com_virtuemart&amp;Itemid=57" target="_blank">Mektronics Australia</a> for about $8.</p>
<div id="attachment_231" class="wp-caption alignnone" style="width: 573px"><a href="http://ocdev.files.wordpress.com/2012/09/img_5201.jpg" target="_blank"><img class=" wp-image-231 " title="Hakko T18-D16 Shape 1.6D Chisel Tip for FX-888" src="http://ocdev.files.wordpress.com/2012/09/img_5201.jpg?w=563&#038;h=422" alt="" width="563" height="422" /></a><p class="wp-caption-text">Hakko T18-D16 Shape 1.6D Chisel Tip for FX-888</p></div>
<p>I also used some Multicore 60/40 Tin/Lead 0.46mm 250g Type 362 Flux 5 Core solder, Available from <a title="Multicore 60/40 362 0.46mm 0.25kg" href="http://www.mektronics.com.au/index.php?page=shop.product_details&amp;flypage=flypage.tpl&amp;product_id=666&amp;category_id=164&amp;option=com_virtuemart&amp;Itemid=57" target="_blank">Mektronics</a> for $22.  This made it easier to solder since it&#8217;s quite thin at only 0.46mm.</p>
<div id="attachment_239" class="wp-caption alignnone" style="width: 1034px"><a href="http://ocdev.files.wordpress.com/2012/09/img_5253.jpg" target="_blank"><img class=" wp-image-239 " title="Multicore Solder 60/40 Tin/Lead 0.46mm 250g Type 362 Flux 5 Core" src="http://ocdev.files.wordpress.com/2012/09/img_5253.jpg?w=1024&#038;h=768" alt="" width="1024" height="768" /></a><p class="wp-caption-text">Multicore Solder 60/40 Tin/Lead 0.46mm 250g Type 362 Flux 5 Core</p></div>
<h2>Soldering the BLE112 to the breakout board</h2>
<p>I used a <a title="Panavise Jr." href="http://www.amazon.com/PanaVise-Model-201-Junior-Miniature/dp/B000B61D22" target="_blank">Panavise Junior</a> to hold the breakout board and carefully placed the BLE112 on it, after applying some liquid flux to the pins.</p>
<div id="attachment_230" class="wp-caption alignnone" style="width: 1034px"><a href="http://ocdev.files.wordpress.com/2012/09/img_5195.jpg" target="_blank"><img class=" wp-image-230 " title="Preparing BLE112 for Soldering" src="http://ocdev.files.wordpress.com/2012/09/img_5195.jpg?w=1024&#038;h=768" alt="" width="1024" height="768" /></a><p class="wp-caption-text">Preparing BLE112 for Soldering</p></div>
<p>The technique I used was to put a blob of solder on the soldering iron tip, then move it over to the pin and leave it for about a second, to give the solder enough time to wick around the pin on the breakout board and make a solid connection to the BLE112.  Since I was carrying solder from the soldering iron to the pad on the board, instead of melting it directly onto the pad, most of the flux in the solder evaporated, so the extra flux I added to the pins helped the solder stick. Since the pads on the breakout board are so big, the solder tends to flow on them pretty easily and stays there as a result of surface tension, so I only encountered one set of pins that were bridged. It was easily fixed by placing the soldering iron tip between the pins to wick up the extra solder.</p>
<p>So after about a half an hour, I&#8217;d managed to solder both BLE112 modules onto the breakout boards, so all that was left was to solder a set of header pins onto the breakout boards, like so:</p>
<div id="attachment_232" class="wp-caption alignnone" style="width: 577px"><a href="http://ocdev.files.wordpress.com/2012/09/img_5210.jpg" target="_blank"><img class=" wp-image-232 " title="BLE112 on breakout board with header pins" src="http://ocdev.files.wordpress.com/2012/09/img_5210.jpg?w=567&#038;h=425" alt="" width="567" height="425" /></a><p class="wp-caption-text">BLE112 on breakout board with header pins</p></div>
<p>Once the header pins were soldered on, I was able to attach both BLE112 modules to my breadboard, which now makes it very easy to connect wires to them.</p>
<div id="attachment_233" class="wp-caption alignnone" style="width: 1034px"><a href="http://ocdev.files.wordpress.com/2012/09/img_5211.jpg" target="_blank"><img class=" wp-image-233 " title="BLE112 Soldered and placed on Breadboard" src="http://ocdev.files.wordpress.com/2012/09/img_5211.jpg?w=1024&#038;h=768" alt="" width="1024" height="768" /></a><p class="wp-caption-text">BLE112 Soldered and placed on Breadboard</p></div>
<h2>Programming the BLE112</h2>
<p>Now it&#8217;s time to test them out and make sure my soldering was successful!  In order to program the BLE112 modules, we need to hook them up to the correct pins on the CC Debugger (which you should have if you own the <a title="CC2540DK-MINI" href="http://www.ti.com/tool/cc2540dk-mini" target="_blank">CC2540 Mini Development Kit</a>) .  Thankfully, Jeff Rowberg provided a very helpful diagram on his <a title="BLE112 breakout board" href="http://www.inmojo.com/store/jeff-rowberg/item/ble112-bluetooth-low-energy-breakout/" target="_blank">site </a>describing how to connect the pins.  We need only connect the following 6 pins, labeled in yellow, to enable us to program the BLE112.</p>
<div id="attachment_214" class="wp-caption alignnone" style="width: 585px"><a href="http://ocdev.files.wordpress.com/2012/09/ble112-bluetooth-low-energy.jpg" target="_blank"><img class=" wp-image-214 " style="border-color:initial;border-image:initial;border-width:0;border-style:none;" title="BLE112 Bluetooth Low Energy" src="http://ocdev.files.wordpress.com/2012/09/ble112-bluetooth-low-energy.jpg?w=575&#038;h=383" alt="" width="575" height="383" /></a><p class="wp-caption-text">BLE112 Breakout board to CC Debugger pin connections</p></div>
<p>The <a title="CC Debugger User's Guide" href="http://www.ti.com/lit/ug/swru197e/swru197e.pdf" target="_blank">CC Debugger user&#8217;s guide </a>also provides some useful diagrams showing the pin orientation of the debugger device.</p>
<p><a href="http://ocdev.files.wordpress.com/2012/09/placement-of-target-connector-pins.png" target="_blank"><img class="alignnone size-full wp-image-223" style="border-color:initial;border-image:initial;border-width:0;border-style:none;" title="placement of target connector pins" src="http://ocdev.files.wordpress.com/2012/09/placement-of-target-connector-pins.png?w=584" alt=""   /></a></p>
<p><a href="http://ocdev.files.wordpress.com/2012/09/target-connector-pinout.png" target="_blank"><img class="alignnone  wp-image-225" style="border-color:initial;border-image:initial;border-width:0;border-style:none;" title="target connector pinout" src="http://ocdev.files.wordpress.com/2012/09/target-connector-pinout.png?w=517&#038;h=266" alt="" width="517" height="266" /></a></p>
<p>So with the help of the above diagrams, I proceeded to connect the BLE112 board to the CC Debugger using <a title="Female to female jumper wire" href="http://www.seeedstudio.com/depot/1-pin-dualfemale-jumper-wire-100mm-50pcs-pack-p-260.html?cPath=175_187" target="_blank">1 pin dual female-female jumper wire</a> that I purchased from seeedstudio.  You can see in the following picture I connected on the top row starting from the left, a red wire to CC9 (3.3V), a white wire to CC7 (RESET), yellow wire to CC3 (DC Debug Clock), black wire to CC1 (GND) and on the second (bottom) row, I connected a green wire to CC4 (DD Debug Data) and a red wire to CC2 (Target Voltage Sense)</p>
<div id="attachment_234" class="wp-caption alignnone" style="width: 1034px"><a href="http://ocdev.files.wordpress.com/2012/09/img_5246.jpg" target="_blank"><img class=" wp-image-234 " title="CC Debugger Setup" src="http://ocdev.files.wordpress.com/2012/09/img_5246.jpg?w=1024&#038;h=768" alt="" width="1024" height="768" /></a><p class="wp-caption-text">CC Debugger Setup</p></div>
<p>Here&#8217;s the CC Debugger connected to one of the BLE112 breakout boards. After I connected them, I pressed the &#8220;Reset&#8221; button on the CC Debugger, and the LED changed from red to green, which was a good sign, since it means that the CC Debugger senses a device on the other end.</p>
<div id="attachment_235" class="wp-caption alignnone" style="width: 898px"><a href="http://ocdev.files.wordpress.com/2012/09/img_5248.jpg"><img class="size-large wp-image-235" style="cursor:crosshair;" title=" " src="http://ocdev.files.wordpress.com/2012/09/img_5248.jpg?w=888&#038;h=666" alt="" width="888" height="666" /></a><p class="wp-caption-text">CC Debugger Connected to BLE112</p></div>
<p>I then hooked up an LED to the BLE112 in order to test and make sure that I was able to flash it with a simple program from IAR.  I hooked up a 470 ohm resistor between P1.2 (port 1, pin 2) on the BLE112 and the anode (positive, long pin) on the LED, and the cathode (negative, short pin) was connected to ground.</p>
<p>The next step was to open up SimpleBLEPeripheral in IAR (C:\Texas Instruments\BLE-CC254x-1.2\Projects\ble\SimpleBLEPeripheral\CC2540DB\SimpleBLEPeripheral.eww) and modify line 388 in simpleBLEPeripheral.c to the following (the line with the little blue flag on it):</p>
<p><a href="http://ocdev.files.wordpress.com/2012/09/simple-ble-peripheral.png" target="_blank"><img class="alignnone  wp-image-248" title="simple ble peripheral" src="http://ocdev.files.wordpress.com/2012/09/simple-ble-peripheral.png?w=618&#038;h=239" alt="" width="618" height="239" /></a></p>
<p>Since I connected P1.2 on the BLE112 to the LED, if we set P1 to 0&#215;04 (which is 0b0100 in binary), it should set pin 2 of port 1 to high. After hitting the Download and Debug button in IAR, I got dropped into the debugger on the line that sets P1 = 0. The LED was actually turned on at this point, since I&#8217;m guessing that the system is not yet stable, which is why the code needs to reset all pins to their default settings. After stepping over that instruction, the LED was turned off as expected, then I stopped at the line that sets P1 = 0&#215;04.  After stepping over this instruction, the LED turned back on, which means the BLE112 was successfully programmed!</p>
<div id="attachment_236" class="wp-caption alignnone" style="width: 1034px"><a href="http://ocdev.files.wordpress.com/2012/09/img_5250.jpg" target="_blank"><img class=" wp-image-236 " title="BLE112 running SimpleBLEPeripheral" src="http://ocdev.files.wordpress.com/2012/09/img_5250.jpg?w=1024&#038;h=768" alt="" width="1024" height="768" /></a><p class="wp-caption-text">BLE112 running SimpleBLEPeripheral</p></div>
<p>While this was by no means a rigorous test, it showed that I had correctly soldered the connections necessary to program the BLE112, and it was functioning as expected.</p>
<h2>What&#8217;s next</h2>
<p>Now that I&#8217;ve got the BLE112 modules connected to the breadboard, the next step is to try to get BGScript code flashed onto them to see if I can get them to communicate to each other, and to see how easy it is to write BGScript.</p>
<p><strong>Update:</strong> make sure to check out the <a title="Programming the BLE112 using BGScript" href="http://blog.bluetooth-smart.com/2012/09/16/programming-the-ble112-using-bgscript/" target="_blank">follow up post </a>where I describe how to create a simple program for the BLE112 using BGScript.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ocdev.wordpress.com/213/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ocdev.wordpress.com/213/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.bluetooth-smart.com&#038;blog=9001194&#038;post=213&#038;subd=ocdev&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.bluetooth-smart.com/2012/09/11/programming-the-ble112-with-c-code-using-iar/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
	
		<media:thumbnail url="http://ocdev.files.wordpress.com/2012/09/img_5250.jpg?w=150" />
		<media:content url="http://ocdev.files.wordpress.com/2012/09/img_5250.jpg?w=150" medium="image">
			<media:title type="html">BLE112 running SimpleBLEPeripheral</media:title>
		</media:content>

		<media:content url="http://0.gravatar.com/avatar/cbf3a11b96bf337f0a20f6c22dddd085?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ocdev</media:title>
		</media:content>

		<media:content url="http://ocdev.files.wordpress.com/2012/09/img_5202.jpg?w=300" medium="image">
			<media:title type="html">IMG_5202</media:title>
		</media:content>

		<media:content url="http://ocdev.files.wordpress.com/2012/09/img_5192.jpg?w=1024" medium="image">
			<media:title type="html">BLE112 and breakout board</media:title>
		</media:content>

		<media:content url="http://ocdev.files.wordpress.com/2012/09/img_5201.jpg?w=1024" medium="image">
			<media:title type="html">Hakko T18-D16 Shape 1.6D Chisel Tip for FX-888</media:title>
		</media:content>

		<media:content url="http://ocdev.files.wordpress.com/2012/09/img_5253.jpg?w=1024" medium="image">
			<media:title type="html">Multicore Solder 60/40 Tin/Lead 0.46mm 250g Type 362 Flux 5 Core</media:title>
		</media:content>

		<media:content url="http://ocdev.files.wordpress.com/2012/09/img_5195.jpg?w=1024" medium="image">
			<media:title type="html">Preparing BLE112 for Soldering</media:title>
		</media:content>

		<media:content url="http://ocdev.files.wordpress.com/2012/09/img_5210.jpg?w=1024" medium="image">
			<media:title type="html">BLE112 on breakout board with header pins</media:title>
		</media:content>

		<media:content url="http://ocdev.files.wordpress.com/2012/09/img_5211.jpg?w=1024" medium="image">
			<media:title type="html">BLE112 Soldered and placed on Breadboard</media:title>
		</media:content>

		<media:content url="http://ocdev.files.wordpress.com/2012/09/ble112-bluetooth-low-energy.jpg" medium="image">
			<media:title type="html">BLE112 Bluetooth Low Energy</media:title>
		</media:content>

		<media:content url="http://ocdev.files.wordpress.com/2012/09/placement-of-target-connector-pins.png" medium="image">
			<media:title type="html">placement of target connector pins</media:title>
		</media:content>

		<media:content url="http://ocdev.files.wordpress.com/2012/09/target-connector-pinout.png" medium="image">
			<media:title type="html">target connector pinout</media:title>
		</media:content>

		<media:content url="http://ocdev.files.wordpress.com/2012/09/img_5246.jpg?w=1024" medium="image">
			<media:title type="html">CC Debugger Setup</media:title>
		</media:content>

		<media:content url="http://ocdev.files.wordpress.com/2012/09/img_5248.jpg?w=1024" medium="image">
			<media:title type="html"> </media:title>
		</media:content>

		<media:content url="http://ocdev.files.wordpress.com/2012/09/simple-ble-peripheral.png" medium="image">
			<media:title type="html">simple ble peripheral</media:title>
		</media:content>

		<media:content url="http://ocdev.files.wordpress.com/2012/09/img_5250.jpg?w=1024" medium="image">
			<media:title type="html">BLE112 running SimpleBLEPeripheral</media:title>
		</media:content>
	</item>
		<item>
		<title>Bluetooth Low Energy discussion forum</title>
		<link>http://blog.bluetooth-smart.com/2012/09/05/bluetooth-low-energy-discussion-forum/</link>
		<comments>http://blog.bluetooth-smart.com/2012/09/05/bluetooth-low-energy-discussion-forum/#comments</comments>
		<pubDate>Wed, 05 Sep 2012 05:32:51 +0000</pubDate>
		<dc:creator>Adam</dc:creator>
				<category><![CDATA[forum]]></category>

		<guid isPermaLink="false">http://blog.bluetooth-smart.com/?p=205</guid>
		<description><![CDATA[I&#8217;ve been getting quite a few messages asking me questions related to Bluetooth Low Energy that I have no idea how to answer, and seeing as there doesn&#8217;t exist a general BLE discussion forum, I figured it was time to &#8230; <a href="http://blog.bluetooth-smart.com/2012/09/05/bluetooth-low-energy-discussion-forum/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.bluetooth-smart.com&#038;blog=9001194&#038;post=205&#038;subd=ocdev&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>I&#8217;ve been getting quite a few messages asking me questions related to Bluetooth Low Energy that I have no idea how to answer, and seeing as there doesn&#8217;t exist a general BLE discussion forum, I figured it was time to start one.</p>
<p>So for any questions related to Bluetooth Low Energy development, whether it be software or hardware related, please visit <a title="BLEForum.com" href="http://bleforum.com/" target="_blank">BLEForum.com</a> and post your questions there.</p>
<p>Adam</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ocdev.wordpress.com/205/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ocdev.wordpress.com/205/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.bluetooth-smart.com&#038;blog=9001194&#038;post=205&#038;subd=ocdev&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.bluetooth-smart.com/2012/09/05/bluetooth-low-energy-discussion-forum/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/cbf3a11b96bf337f0a20f6c22dddd085?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ocdev</media:title>
		</media:content>
	</item>
		<item>
		<title>Electronics for beginners &#8211; Thoughts on edX 6002x</title>
		<link>http://blog.bluetooth-smart.com/2012/09/05/electronics-for-beginners-thoughts-on-edx-6002x/</link>
		<comments>http://blog.bluetooth-smart.com/2012/09/05/electronics-for-beginners-thoughts-on-edx-6002x/#comments</comments>
		<pubDate>Wed, 05 Sep 2012 05:21:57 +0000</pubDate>
		<dc:creator>Adam</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.bluetooth-smart.com/?p=183</guid>
		<description><![CDATA[A few months ago, I discovered that MIT was going to be beta testing a free online version of their undergraduate Circuits and Electronics course, 6002x.  I figured it would be worthwhile to sign up, since I&#8217;m a complete beginner when &#8230; <a href="http://blog.bluetooth-smart.com/2012/09/05/electronics-for-beginners-thoughts-on-edx-6002x/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.bluetooth-smart.com&#038;blog=9001194&#038;post=183&#038;subd=ocdev&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><a href="http://ocdev.files.wordpress.com/2012/09/edx.jpg"><img class="wp-image-190 alignright" style="border:0 none;" title="edx" src="http://ocdev.files.wordpress.com/2012/09/edx.jpg?w=240&#038;h=180" alt="" width="240" height="180" /></a></p>
<p>A few months ago, I discovered that MIT was going to be beta testing a free online version of their undergraduate <a title="MITX 6002x" href="https://www.edx.org/courses/MITx/6.002x/2012_Fall/about" target="_blank">Circuits and Electronics course, 6002x</a>.  I figured it would be worthwhile to sign up, since I&#8217;m a complete beginner when it comes to electronics, and I thought it would be useful to help me better understand circuit diagrams and electronics in general.  So I decided, along with 154,763 other online applicants, to enrol in the course.</p>
<p><span id="more-183"></span></p>
<p>While not related to bluetooth low energy in any way, I thought it might be worthwhile to write a little bit about my experiences, given that the purpose of this blog is to help other beginners, not just to Bluetooth Low Energy technology, but to electronics in general.</p>
<h2>10 hours per week, are you kidding me?</h2>
<p>When I first signed up for the course, the MITx website mentioned that the amount of time I can expect to invest is about 10 hours per week.  I&#8217;ve got a day job, so I don&#8217;t have a lot of free time, but I figured I could manage to find 10 hours a week to devote to the course. Boy was I wrong.  I quickly discovered within the first week that this number was extremely conservative.  I must&#8217;ve spent about 60 hours over the first two weeks watching the online lectures and tutorials, reading the first chapter of the book, re-reading the first chapter of the book, working on the example problems and finally doing the homework.</p>
<p>I thought about dropping out pretty shortly after the first homework assignment, since I wasn&#8217;t prepared to invest such a large amount of time.  Also, since the course was free, there didn&#8217;t exist the same financial motivation that I&#8217;ve experienced with other university courses where the fear of losing the tuition fee keeps you from dropping the course.  I think a lot of other people felt the same way, since only 26,349 people earned at least one point on the first homework assignment, which is only 17% of the people who had initially signed up for the course! I reasoned with myself that after having spent so much time on the first homework assignment, it would&#8217;ve been wasted effort if I didn&#8217;t continue, so I pushed on.</p>
<p>As the second week of the course started, I realized that I&#8217;d have to get into a routine if I wanted to have a chance at completing the course. The biggest change I had to make was to cut out nearly all of my leisure time and any extracurricular activities.  It definitely wasn&#8217;t easy, since when you work a full time job, it&#8217;s nice to get home from work and be able to switch off and just relax.  Once I started the course, I spent every evening after work, from about 7pm until midnight working away, and on the weekend I&#8217;d spend all day on both Saturday and Sunday doing the homework assignment, so easily about 40 hours per week.</p>
<p>I also modified my study habits after the first week.  I  found reading all the assigned sections in the textbook to be too time consuming, so I started relying on the content provided in the lectures and only using the textbook when I was confused about a topic.  I also started taking written notes during the video lectures.  The lecture notes are actually provided as part of the course materials, but I found that writing them out myself helped me retain the information and made it easier to recall when I was working on the homework assignments.</p>
<p>This was my first time taking an online course, and I really appreciated the flexibility of watching pre-recorded video lectures.  Having the ability to speed up, slow down, or replay the lectures at my leisure made it much easier for me to absorb the material.  I can recall many a moment from my time at university where I was furiously scribbling down notes during a lecture, without really digesting what the professor was saying.  With the video lecture format, if I didn&#8217;t understand a concept the first time it was presented, I&#8217;d just replay the video until it made sense.  Some students have since complained that the professor went into too much detail on some ideas, repeating them 3 or 4 times, but I think I&#8217;d rather have the repetition to really drill an idea into your head, and the videos can just be fast forwarded if you already understand the material.</p>
<p>One of the major drawbacks of an online course compared to the traditional university setting is that the physical distance between fellow students and professors makes it really difficult to create a study group or to get extra help. Thankfully, the online discussion area helped make up for this shortcoming.  As the course progressed, the homework assignments became increasingly more difficult, so I started using the online discussion area quite frequently for help.  I was amazed by just how quickly fellow students or staff members would respond to questions on the forum with useful answers.  This really helped me understand some of the more confusing material, which I would&#8217;ve been completely lost with, had I not had access to the forums.</p>
<p>I somehow managed to make it through all 7 assignments that lead up to the midterm, albeit with a lot of help from the discussion groups.  I spent an entire weekend writing the midterm, since we had 24 hours in which to complete the exam.  It was extremely satisfying to enter your answers, click on the submit button and see a row of little green checkmarks pop up next to your solutions, it actually felt like I had understood the material!  My experience of university exams in the past consisted of rushing through each question as quickly as possible, then  furiously scribbling down an answer before heading to the next question, many times without fully answering the question because time was so limited.  This exam was quite a different experience.  I felt as though the actual learning experience was better than a typical university course, since for once I was able to invest the time necessary to focus on each question and really understand it before moving on.  However, I should point out that while we were given the exact same test as the students attending MIT in person, they were only given 3 hours in which to write the midterm, which of course makes it much more difficult.  At this point, 9,318 other students managed to pass the midterm, which is 6% of the original number of applicants.</p>
<h2>Brace yourself, math is coming</h2>
<p>The assignments after the midterm became much more math intensive, as we analyzed circuits with capacitors and inductors using first and second order differential equations, as well as complex numbers.  Initially I was a little worried about the math involved, since these days, calculating the tip on a restaurant bill is about the most difficult computation that I encounter. I did have a pretty good background in math from my Software Engineering undergrad, but I opted out of taking a Differential Equations class since I&#8217;d only ever heard horror stories from other students at the mere mention of the class.  As it happens, the differential equations we encounter in 6.002x weren&#8217;t very difficult, since they all follow a similar pattern and most can be derived by using simple differentiation.  To make my life easier, I also made heavy use of computational software such as <a title="Maxima" href="http://maxima.sourceforge.net/" target="_blank">Maxima </a>as well as developed a new appreciation for the fantastic resource that is <a title="Wolfram Alpha" href="http://www.wolframalpha.com/" target="_blank">Wolfram Alpha</a>. Another indispensable resource for relearning years of forgotten math was <a title="Khan Academy" href="http://www.khanacademy.org/" target="_blank">Khan Academy</a>.</p>
<p>As we progressed further, we learned some very powerful and quick methods for determining the necessary equations by intuition alone, without the need for tedious calculations.  This was a recurring theme in the course, building up your intuition so you could do away with complex mathematical techniques. As it turns out, electronics engineers are just as lazy, if not lazier, than software engineers!</p>
<p>So after 3 months of working 9 to 5, then coming home and studying until at least midnight, I started to feel quite burnt out. I was very glad when the final exam was posted, since it would free me from this self imposed moratorium and allow me to get back to my regular life.  I found the final exam to be much more difficult than the midterm &#8211; if I had only 3 hours to complete it like the MIT students, I&#8217;m sure I would barely have passed. As it was, I ended up pleased with my results, but I used the full 24 hours allotted, and was extremely relieved once it was all finished. Of the 154,763 initial applicants to the course,  7,157, or 4.6% ended up earning a passing grade for 6.002x.</p>
<h2>Conclusions</h2>
<p>6002x is a prerequisite for many other classes in the undergraduate Electronics Engineering stream, so it&#8217;s meant to provide a foundation with a wide breadth, but not much depth, since future courses are for delving deeper into specific material.  Since it&#8217;s meant to be taken as part of a larger curriculum, many of the concepts and ideas may be more academic or theoretical than a hobbyist like myself might find immediately useful.</p>
<p>Occasionally while trudging through differential equations or scribbling through pages of algebraic expressions, I&#8217;d forget why I signed up for the course in the first place.  So while I don&#8217;t regret taking the course one bit, from a hobbyist perspective, or someone who won&#8217;t be pursuing a career in electronics engineering, I probably learned a lot of information that I may never end up using.  However, while I might not end up using differential equations on a daily basis, it&#8217;s been good to understand the underlying mathematical principles to better appreciate the intuitive analysis of circuits.</p>
<p>Overall, I found the course to be extremely beneficial for my understanding of electronics.  When I enrolled, I didn&#8217;t really know anything about capacitors, inductors or MOSFETs, nor how to read simple circuit schematics.  This course has taught me many of the fundamentals that I was missing, and having an authoritative source explain these concepts has given me a much deeper understanding of the way circuits and components operate than I would ever have learned on my own.</p>
<p>So having completed the course, would I do it again if I knew what was involved?  As much as I&#8217;d like to say yes, if I&#8217;m going to be honest, the answer would have to be no. The reason isn&#8217;t due to the content of the course, but more for the amount of time you need to invest.  If the 10 hour per week estimate was even remotely close to the actual amount of work involved, then I wouldn&#8217;t hesitate to sign up.  I should note that as of September 2012, the web page for the 6.002x course has now increased this number to 12, but this is still a far cry from the 40 hours or more that I invested.  Now, I&#8217;m not saying that everyone is going to have to spend this amount of time with the course material, but expect to spend a lot more than 12 hours per week, especially if you&#8217;re a complete beginner and don&#8217;t know the difference between current and voltage.</p>
<div>If you&#8217;re a beginner in electronics and are looking for a great introduction to electronics engineering, then I highly recommend 6.002x. If you can&#8217;t commit to the high workload, then maybe just take the first 2 weeks so you can get a basic understanding of analyzing circuits and learn some of the &#8220;workhorse&#8221; techniques used in the electronics engineering industry.  Just be aware that this course is more focused on getting students ready for a degree in electronics engineering, and very little time is spent on practical hands on experience with electronics, other than the tutorials.If anyone is interested in signing up for the fall 2012 edition of the course, it&#8217;s actually starting today, September 5th, so you&#8217;d better hurry up!  You can find the registration page <a title="6.002x Sign up page" href="https://www.edx.org/courses/MITx/6.002x/2012_Fall/about" target="_blank">here</a>.</p>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ocdev.wordpress.com/183/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ocdev.wordpress.com/183/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.bluetooth-smart.com&#038;blog=9001194&#038;post=183&#038;subd=ocdev&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.bluetooth-smart.com/2012/09/05/electronics-for-beginners-thoughts-on-edx-6002x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/cbf3a11b96bf337f0a20f6c22dddd085?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ocdev</media:title>
		</media:content>

		<media:content url="http://ocdev.files.wordpress.com/2012/09/edx.jpg" medium="image">
			<media:title type="html">edx</media:title>
		</media:content>
	</item>
		<item>
		<title>Texas Instruments releases Motorola RAZR CC2540 demo</title>
		<link>http://blog.bluetooth-smart.com/2012/02/04/texas-instruments-releases-motorola-razr-cc2540-demo/</link>
		<comments>http://blog.bluetooth-smart.com/2012/02/04/texas-instruments-releases-motorola-razr-cc2540-demo/#comments</comments>
		<pubDate>Sat, 04 Feb 2012 11:26:44 +0000</pubDate>
		<dc:creator>Adam</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[RAZR]]></category>

		<guid isPermaLink="false">http://blog.bluetooth-smart.com/?p=170</guid>
		<description><![CDATA[Exciting news for Android developers who wish to interface with the TI CC2540 Bluetooth Low Energy chip.  Texas Instruments has just released a video demonstrating a Motorola RAZR communicating with a CC2540 in a BLE heartrate monitor. &#160; Unfortunately, unlike &#8230; <a href="http://blog.bluetooth-smart.com/2012/02/04/texas-instruments-releases-motorola-razr-cc2540-demo/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.bluetooth-smart.com&#038;blog=9001194&#038;post=170&#038;subd=ocdev&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><a href="http://ocdev.files.wordpress.com/2012/02/motorola-razr.jpg"><img class="alignleft size-medium wp-image-171" title="motorola razr" src="http://ocdev.files.wordpress.com/2012/02/motorola-razr.jpg?w=187&#038;h=300" alt="" width="187" height="300" /></a></p>
<p>Exciting news for Android developers who wish to interface with the TI CC2540 Bluetooth Low Energy chip.  Texas Instruments has just released a video demonstrating a Motorola RAZR communicating with a CC2540 in a BLE heartrate monitor.</p>
<p><span id="more-170"></span></p>
<span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='584' height='359' src='http://www.youtube.com/embed/Qf7H9Ax8lp8?version=3&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' frameborder='0'></iframe></span>
<p>&nbsp;</p>
<p>Unfortunately, unlike the iOS app, which was made by TI in Oslo, the Android app wasn&#8217;t made by TI, so they&#8217;re not able to make the source code available to the public.</p>
<p>However, they&#8217;re working on an Android demo for the upcoming CC2541DK-SENSOR kit which will be released sometime in Q2.  They&#8217;ve provided preliminary source code for the Motorola RAZR on their wiki, available <a title="Motorola RAZR Android BLE Demo" href="http://processors.wiki.ti.com/index.php/Category:MotoRAZRAndroidBLEDemo" target="_blank">here</a>.</p>
<p>You can find documentation for the Bluetooth Low Energy API from the Motorola developer website, <a title="Motorola BLE API" href="http://developer.motorola.com/docstools/library/bluetooth-low-energy-api/" target="_blank">here</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ocdev.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ocdev.wordpress.com/170/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.bluetooth-smart.com&#038;blog=9001194&#038;post=170&#038;subd=ocdev&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.bluetooth-smart.com/2012/02/04/texas-instruments-releases-motorola-razr-cc2540-demo/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/cbf3a11b96bf337f0a20f6c22dddd085?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ocdev</media:title>
		</media:content>

		<media:content url="http://ocdev.files.wordpress.com/2012/02/motorola-razr.jpg?w=187" medium="image">
			<media:title type="html">motorola razr</media:title>
		</media:content>
	</item>
		<item>
		<title>CC2540DK-MINI received</title>
		<link>http://blog.bluetooth-smart.com/2012/01/16/cc2540dk-mini-received/</link>
		<comments>http://blog.bluetooth-smart.com/2012/01/16/cc2540dk-mini-received/#comments</comments>
		<pubDate>Mon, 16 Jan 2012 10:35:41 +0000</pubDate>
		<dc:creator>Adam</dc:creator>
				<category><![CDATA[CC2540DK-MINI]]></category>
		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://ocdev.wordpress.com/?p=108</guid>
		<description><![CDATA[I recently picked up the CC2540DK-MINI, since it was one of the cheapest dev kits at $99 (including FedEx 2-day express shipping to Australia!) and I was really impressed by their recent video displaying the CC2540 keyfob interacting with the iPhone 4S. &#8230; <a href="http://blog.bluetooth-smart.com/2012/01/16/cc2540dk-mini-received/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.bluetooth-smart.com&#038;blog=9001194&#038;post=108&#038;subd=ocdev&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<div id="attachment_121" class="wp-caption alignleft" style="width: 235px"><a href="http://ocdev.files.wordpress.com/2012/01/img_3999.jpg"><img class="size-medium wp-image-121" title="IMG_3999" src="http://ocdev.files.wordpress.com/2012/01/img_3999.jpg?w=225&#038;h=300" alt="" width="225" height="300" /></a><p class="wp-caption-text">CC2540DK-MINI Keyfob</p></div>
<p>I recently picked up the <a title="CC2540 Mini Development Kit" href="http://www.ti.com/tool/cc2540dk-mini" target="_blank">CC2540DK-MINI</a>, since it was one of the cheapest dev kits at $99 (including FedEx 2-day express shipping to Australia!) and I was really impressed by their <a title="World's first demo of Bluetooth low energy application on iPhone 4S" href="http://www.youtube.com/watch?feature=player_embedded&amp;v=srKwKU1Pblc" target="_blank">recent video</a> displaying the CC2540 keyfob interacting with the iPhone 4S.</p>
<p>The kit comes with a keyfob, USB dongle, CC Debugger, USB cable and an interface cable to attach the CC Debugger to the keyfob or USB dongle.</p>
<p>The keyfob has a <a title="CMA3000 Accelerometers" href="http://www.vti.fi/products/accelerometers/cma3000-accelerometers" target="_blank">VTI CMA3000-D01</a> accelerometer functioning in SPI mode, two buttons, an LED which flashes both red and green, a buzzer, and a retainer for a CR2032 battery.  The USB dongle contains just a CC2540 chip, and this can be used to act as the master peripheral (similar to the role that a Bluetooth Smart Ready mobile phone such as the iPhone 4S would play).</p>
<p><span id="more-108"></span></p>
<div id="attachment_127" class="wp-caption alignnone" style="width: 1034px"><a href="http://ocdev.files.wordpress.com/2012/01/img_39901.jpg"><img class="size-large wp-image-127" title="IMG_3990" src="http://ocdev.files.wordpress.com/2012/01/img_39901.jpg?w=1024&#038;h=768" alt="" width="1024" height="768" /></a><p class="wp-caption-text">The complete package provided with the CC2540DK-MINI kit. Clockwise from top left: CR2032 battery, Keyfob, USB Dongle, plastic keyfob case, CC Debugger, 2 different debugger flash cables and a USB to USB mini connector</p></div>
<p>I found the Mini Dev kit pretty easy to set up, although I initially had some issues with VMWare intercepting the driver for the CC Debugger and not releasing it to the host operating system even when I shut down VMWare.  I ended up uninstalling VMWare and everything worked fine afterwards.</p>
<p>I also had some difficulty with the Keyfob not being detected by the CC Debugger (the light would remain red on the debugger device, even though I had connected the Keyfob and inserted a battery into it).  The issue was caused by corrosion on the negative battery terminal in the CR2032 coin cell retainer, a problem that <a title="keyfob oxidization" href="http://e2e.ti.com/support/low_power_rf/f/538/t/150663.aspx" target="_blank">others have experienced as well</a>.  The solution for me was to use tweezers to clean the surface of the terminal that was oxidized.</p>
<div id="attachment_132" class="wp-caption alignnone" style="width: 1034px"><a href="http://ocdev.files.wordpress.com/2012/01/img_4067.jpg"><img class="size-large wp-image-132" title="IMG_4067" src="http://ocdev.files.wordpress.com/2012/01/img_4067.jpg?w=1024&#038;h=768" alt="" width="1024" height="768" /></a><p class="wp-caption-text">Corroded negative battery terminal on the keyfob</p></div>
<p>Having said that,  I soon discovered that I was going through CR2032 batteries too quickly during debugging.  I followed the instructions described on page 27 section 5.1 figure 38 of the <a title="Bluetooth® Low Energy CC2540 Mini Development Kit User’s Guide" href="http://www.ti.com/lit/ug/swru270b/swru270b.pdf" target="_blank">Bluetooth® Low Energy CC2540 Mini Development Kit User’s Guide</a>, and shorted out the pads for resistor R1 which are located immediately next to the debug header on the keyfob.  The keyfob will now operate without a battery, and will instead draw power from the CC Debugger.</p>
<div id="attachment_131" class="wp-caption alignnone" style="width: 1034px"><a href="http://ocdev.files.wordpress.com/2012/01/img_4065.jpg"><img class="size-large wp-image-131" title="IMG_4065" src="http://ocdev.files.wordpress.com/2012/01/img_4065.jpg?w=1024&#038;h=768" alt="" width="1024" height="768" /></a><p class="wp-caption-text">Behold my awesome solder work. It ain&#039;t pretty, but it works</p></div>
<p>If you still run into problems with the CC Debugger not recognizing your Keyfob, make sure you have the ribbon cable properly oriented (the red wire must be attached to pin 1 on the Keyfob) and try using a new battery if you have one &#8211; some users have reported that the battery included with the Mini Dev kit had no energy when it arrived.</p>
<p>Another gotcha I ran into was the Keyfob not sending accelerometer data when I tried interfacing it with the Texas Instruments iPhone app.  I had mistakenly programmed the keyfob with the cc2540_ble1.1_keyfob_SimpleBLEPeripheral.hex found in the Texas Instruments\BLE-CC2540-1.1a\Accessories\Hex_Files directory, which lacks accelerometer functionality.  If you run into the same issue, make sure you&#8217;re using the KeyFobDemo project (C:\Texas Instruments\BLE-CC2540-1.1a\Projects\ble\KeyFob\CC2540DB\KeyFobDemo.eww) which requires you to use IAR to flash it onto the Keyfob.</p>
<p>Once all of that was sorted out, I was able to connect the Keyfob to the CC Debugger, load up the KeyFobDemo project in IAR and run the &#8220;Download and Debug&#8221; command to flash the Keyfob with the software.  I also signed up to become an Apple iOS developer, which costs $99/year, and this allowed me to install the Texas Instruments iPhone app onto my iPhone 4S.  After running the TI iPhone demo app through Xcode, I pressed the button on the right side of the Keyfob, which toggles advertising on and off, then pressed the &#8220;Scan and connect to keyfob&#8221; button on the iPhone which established a connection to the Keyfob, and in a matter of seconds, I was receiving live accelerometer data!</p>
<p>I&#8217;m now in the process of trying to split my time between learning how to write apps for the iPhone, trying to understand as much as I can about the CC2540 and the TI BLE stack and libraries (HAL, OSAL, etc) and learning about printed circuit board (PCB) design, since I&#8217;d like to eventually create my own PCB with a CC2540 and the minimal components necessary to communicate with another BLE peripheral.</p>
<p>Speaking of which, <a title="CC2540 minimum BoM" href="http://e2e.ti.com/support/low_power_rf/f/538/t/156242.aspx#569260" target="_blank">here&#8217;s</a> a really interesting post on the TI forums about the minimum bill of materials necessary for designing your own PCB with the CC2540.  This will most certainly be a topic for another blog post when I become more familiar with hardware and using PCB design software such as <a title="CadSoft EAGLE PCB Design Software" href="http://www.cadsoftusa.com/eagle-pcb-design-software/?language=en" target="_blank">Eagle</a>.</p>
<p>Also, for those of you developing apps for iOS, I&#8217;ve recently discovered the excellent iPad and iPhone Application Development course from Stanford University available for free from iTunes U.  You can find the content for the Fall 2011 course <a title="iPad and iPhone Application Development" href="http://itunes.apple.com/us/itunes-u/ipad-iphone-application-development/id473757255" target="_blank">here</a>, and the Stanford University course page is available here: <a title="CS 193P iPhone Application Development" href="http://www.stanford.edu/class/cs193p/cgi-bin/drupal/">CS 193P iPhone Application Development</a>. There&#8217;s also an <a title="Advanced iPhone Development - Fall 2010" href="http://itunes.apple.com/us/itunes-u/advanced-iphone-development/id407243028" target="_blank">Advanced iPhone Development</a> course provided by Madison Area Technical College which has some great content as well.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ocdev.wordpress.com/108/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ocdev.wordpress.com/108/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.bluetooth-smart.com&#038;blog=9001194&#038;post=108&#038;subd=ocdev&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.bluetooth-smart.com/2012/01/16/cc2540dk-mini-received/feed/</wfw:commentRss>
		<slash:comments>32</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/cbf3a11b96bf337f0a20f6c22dddd085?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ocdev</media:title>
		</media:content>

		<media:content url="http://ocdev.files.wordpress.com/2012/01/img_3999.jpg?w=225" medium="image">
			<media:title type="html">IMG_3999</media:title>
		</media:content>

		<media:content url="http://ocdev.files.wordpress.com/2012/01/img_39901.jpg?w=1024" medium="image">
			<media:title type="html">IMG_3990</media:title>
		</media:content>

		<media:content url="http://ocdev.files.wordpress.com/2012/01/img_4067.jpg?w=1024" medium="image">
			<media:title type="html">IMG_4067</media:title>
		</media:content>

		<media:content url="http://ocdev.files.wordpress.com/2012/01/img_4065.jpg?w=1024" medium="image">
			<media:title type="html">IMG_4065</media:title>
		</media:content>
	</item>
		<item>
		<title>iPhone 4S says goodbye to MFi for Bluetooth Smart Devices</title>
		<link>http://blog.bluetooth-smart.com/2011/11/03/iphone-4s-says-goodbye-to-mfi-for-bluetooth-smart-devices/</link>
		<comments>http://blog.bluetooth-smart.com/2011/11/03/iphone-4s-says-goodbye-to-mfi-for-bluetooth-smart-devices/#comments</comments>
		<pubDate>Thu, 03 Nov 2011 03:51:34 +0000</pubDate>
		<dc:creator>Adam</dc:creator>
				<category><![CDATA[iPhone]]></category>
		<category><![CDATA[ble]]></category>
		<category><![CDATA[bluetooth smart]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[mfi]]></category>

		<guid isPermaLink="false">http://blog.bluetooth-smart.com/?p=85</guid>
		<description><![CDATA[Big news from Texas Instruments, they&#8217;ve just released a video demonstrating the keyfob included in the CC2540DK-MINI dev kit communicating with the Iphone 4S using the GATT interface through the new Core Bluetooth API. This is a particularly big deal because it &#8230; <a href="http://blog.bluetooth-smart.com/2011/11/03/iphone-4s-says-goodbye-to-mfi-for-bluetooth-smart-devices/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.bluetooth-smart.com&#038;blog=9001194&#038;post=85&#038;subd=ocdev&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<div id="attachment_87" class="wp-caption alignleft" style="width: 210px"><a href="http://ocdev.files.wordpress.com/2011/11/8666-screenshot-2011-11-01-19-33-18-550x0.png"><img class="size-medium wp-image-87" title="8666.Screenshot 2011.11.01 19.33.18.png-550x0" src="http://ocdev.files.wordpress.com/2011/11/8666-screenshot-2011-11-01-19-33-18-550x0.png?w=200&#038;h=300" alt="" width="200" height="300" /></a><p class="wp-caption-text">TI BLE CC2540 iOS app</p></div>
<p style="text-align:left;">Big news from Texas Instruments, they&#8217;ve just released a video demonstrating the keyfob included in the CC2540DK-MINI dev kit communicating with the Iphone 4S using the GATT interface through the new <a title="Core Bluetooth API" href="https://developer.apple.com/library/ios/#documentation/CoreBluetooth/Reference/CoreBluetooth_Framework/_index.html" target="_blank">Core Bluetooth API</a>.</p>
<p style="text-align:left;">This is a particularly big deal because it shows the CC2540 interacting with the iPhone 4S using the stock 2540 mini dev kit <em>without </em>an authentication chip.<span id="more-85"></span></p>
<p style="text-align:left;">Up until this point, if you wanted to get your bluetooth device talking to your iPhone, you had to apply for acceptance into the <a title="Made for iOS" href="http://developer.apple.com/programs/mfi/" target="_blank">Made for iOS</a> (MFi) licensing program.  Once accepted, you could then use a special authentication chip with your bluetooth peripheral to interface with the iPhone.  For small developers and hobbyists, this was a major hurdle, since it costs <a title="MFi registration process" href="http://stackoverflow.com/questions/5734071/looking-for-experiences-on-the-apple-mfi-program-registration-process" target="_blank">upwards of $20,000</a> to get your device certified for acceptance into the MFi program.</p>
<p style="text-align:left;">Unfortunately, if you don&#8217;t become MFi certified, you can&#8217;t sell your program on the App Store.  The alternative has been to jailbreak your iPhone and use BTStack, <a id="project_summary_link" href="http://code.google.com/p/btstack/">A Portable User-Space Bluetooth Stack</a>.  The downside to this approach is that it requires all your users to jailbreak their phones to install your software.</p>
<p style="text-align:left;">So this demo by Texas Instruments is significant because it shows that we can now develop Bluetooth Smart devices for the iPhone without the use of an authentication chip.</p>
<p>According to <a title="Bluetooth Smart doesn't require MFi for iOS" href="http://lists.apple.com/archives/Bluetooth-dev/2011/Nov/msg00001.html" target="_blank">this message</a> from Brian Tucker, Senior Software Engineering Manager iOS Bluetooth Technologies Apple and Bluetooth SIG Board of directors member:</p>
<blockquote><p>Bluetooth Low Energy is not part of our MFi accessory program. A third party application can interact with a BTLE accessory via a new framework found in iOS 5 and OX X 10.7.2, called <a title="iOS Core Bluetooth API" href="https://developer.apple.com/library/ios/#documentation/CoreBluetooth/Reference/CoreBluetooth_Framework/_index.html" target="_blank">Core Bluetooth</a></p></blockquote>
<p style="text-align:left;">I believe classic Bluetooth devices will still require an authentication chip and MFi certification though.</p>
<p style="text-align:left;">This is all very exciting from a developers point of view, since I&#8217;m sure a lot of innovative ideas were stifled by the requirement of an authentication chip and MFi certification in the past.  Developing Bluetooth devices and software for the iPhone 4S just became a whole lot more accessible.</p>
<span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='584' height='359' src='http://www.youtube.com/embed/srKwKU1Pblc?version=3&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' frameborder='0'></iframe></span>
<p>Source code for the iOS application is available from the <a title="TI-iPhone4SBLE-Demo.zip" href="http://processors.wiki.ti.com/index.php/Category:IPhone4SBLEDemo" target="_blank">TI wiki</a>.</p>
<p>The software does the following:</p>
<ul>
<li>Connects to keyfob</li>
<li>Shows live accelerometer data</li>
<li>Shows live battery level data</li>
<li>Shows live button data</li>
<li>Can sound buzzer when button is pressed</li>
</ul>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ocdev.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ocdev.wordpress.com/85/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.bluetooth-smart.com&#038;blog=9001194&#038;post=85&#038;subd=ocdev&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.bluetooth-smart.com/2011/11/03/iphone-4s-says-goodbye-to-mfi-for-bluetooth-smart-devices/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
	
		<media:thumbnail url="http://ocdev.files.wordpress.com/2011/11/8666-screenshot-2011-11-01-19-33-18-550x0.png?w=100" />
		<media:content url="http://ocdev.files.wordpress.com/2011/11/8666-screenshot-2011-11-01-19-33-18-550x0.png?w=100" medium="image">
			<media:title type="html">8666.Screenshot 2011.11.01 19.33.18.png-550x0</media:title>
		</media:content>

		<media:content url="http://0.gravatar.com/avatar/cbf3a11b96bf337f0a20f6c22dddd085?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ocdev</media:title>
		</media:content>

		<media:content url="http://ocdev.files.wordpress.com/2011/11/8666-screenshot-2011-11-01-19-33-18-550x0.png?w=200" medium="image">
			<media:title type="html">8666.Screenshot 2011.11.01 19.33.18.png-550x0</media:title>
		</media:content>
	</item>
		<item>
		<title>iPhone 4S released with Bluetooth 4.0 support</title>
		<link>http://blog.bluetooth-smart.com/2011/10/05/iphone-4s-released-with-bluetooth-4-0-support/</link>
		<comments>http://blog.bluetooth-smart.com/2011/10/05/iphone-4s-released-with-bluetooth-4-0-support/#comments</comments>
		<pubDate>Wed, 05 Oct 2011 11:25:04 +0000</pubDate>
		<dc:creator>Adam</dc:creator>
				<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://ocdev.wordpress.com/?p=53</guid>
		<description><![CDATA[I was one of the few that wasn&#8217;t disappointed by the new iPhone 4S being released today.  While it may not be the iPhone 5 that everyone was expecting, there&#8217;s some important new technology under the hood, namely Bluetooth v4.0 &#8230; <a href="http://blog.bluetooth-smart.com/2011/10/05/iphone-4s-released-with-bluetooth-4-0-support/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.bluetooth-smart.com&#038;blog=9001194&#038;post=53&#038;subd=ocdev&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<div id="attachment_82" class="wp-caption alignright" style="width: 260px"><a href="http://ocdev.files.wordpress.com/2011/10/iphone-4s-smart-ready-250x184.png"><img class="size-full wp-image-82 " title="iPhone 4S is Smart Ready" src="http://ocdev.files.wordpress.com/2011/10/iphone-4s-smart-ready-250x184.png?w=584" alt=""   /></a><p class="wp-caption-text">iPhone 4S Smart Ready</p></div>
<p>I was one of the few that wasn&#8217;t disappointed by the new iPhone 4S being released today.  While it may not be the iPhone 5 that everyone was expecting, there&#8217;s some important new technology under the hood, namely <a href="http://reviews.cnet.com/8301-19512_7-20116316-233/bluetooth-4.0-what-is-it-and-does-it-matter/?tag=mncol;rvwBody" target="_blank">Bluetooth v4.0 support</a>.  It seems as though most people were so enraged by the lack of an iPhone 5 announcement, that they disregarded this new addition.  However, the inclusion of Bluetooth v4 support in what&#8217;s arguably the world&#8217;s most popular smart phone, marks a major milestone for Bluetooth Low Energy adoption.  I&#8217;m sure we&#8217;ll start to see all sorts of innovative low energy wireless devices become available in the coming months.</p>
<p><span id="more-53"></span></p>
<p>Apple have now released documentation for the Core Bluetooth Framework, which &#8220;provides access to Bluetooth 4.0 low energy devices&#8221;, available from <a title="Core Bluetooth Framework Documentation" href="https://developer.apple.com/library/ios/#documentation/CoreBluetooth/Reference/CoreBluetooth_Framework/_index.html" target="_blank">here</a>.  No word yet as to whether you&#8217;ll need to be a <a title="Made for iPhone" href="https://developer.apple.com/programs/mfi/" target="_blank">Made for iPhone</a> (MFi) licensee, and hence use an authentication chip in order to communicate with BLE devices, although I&#8217;m guessing you will.</p>
<p>In other news, the new Google Nexus Prime smartphone manufactured by Samsung will make it&#8217;s debut on October 11th. It&#8217;ll be interesting to see if they include Bluetooth v4 support, or if they use a Near Field Communication chip instead.  Hopefully they&#8217;ll include support for both technologies.</p>
<p><strong>Update</strong>: (Thursday, October 20, 2011) Samsung has released the Nexus Prime, now called &#8220;<a title="Samsung Galaxy Nexus cnet review" href="http://reviews.cnet.com/smartphones/samsung-galaxy-nexus/4505-6452_7-35042961.html">Samsung Galaxy Nexus</a>&#8220;, although unfortunately they haven&#8217;t incorporated Bluetooth 4.0 like Apple has with their 4S.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ocdev.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ocdev.wordpress.com/53/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.bluetooth-smart.com&#038;blog=9001194&#038;post=53&#038;subd=ocdev&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.bluetooth-smart.com/2011/10/05/iphone-4s-released-with-bluetooth-4-0-support/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:thumbnail url="http://ocdev.files.wordpress.com/2011/10/iphone-4s-smart-ready-250x184.png?w=150" />
		<media:content url="http://ocdev.files.wordpress.com/2011/10/iphone-4s-smart-ready-250x184.png?w=150" medium="image">
			<media:title type="html">iPhone 4S is Smart Ready</media:title>
		</media:content>

		<media:content url="http://0.gravatar.com/avatar/cbf3a11b96bf337f0a20f6c22dddd085?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ocdev</media:title>
		</media:content>

		<media:content url="http://ocdev.files.wordpress.com/2011/10/iphone-4s-smart-ready-250x184.png" medium="image">
			<media:title type="html">iPhone 4S is Smart Ready</media:title>
		</media:content>
	</item>
	</channel>
</rss>
