<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Arduino encryption nRF51822</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/8684/arduino-encryption-nrf51822</link><description>Hi there! 
 I use RedBearLabs Nano (nRF51822) for at setup where I&amp;#39;ve developed BLE code in Arduino to communicate with apps on both iOS and Android. 
 Now I need to ensure the communication with encryption. 
 I&amp;#39;ve read these to threads for encrypting</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 26 Oct 2015 12:04:26 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/8684/arduino-encryption-nrf51822" /><item><title>RE: Arduino encryption nRF51822</title><link>https://devzone.nordicsemi.com/thread/31841?ContentTypeID=1</link><pubDate>Mon, 26 Oct 2015 12:04:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d3e7d07e-e2b3-4078-82ce-804fb173ecc8</guid><dc:creator>Henrik M.</dc:creator><description>&lt;p&gt;Just for reference: I&amp;#39;ve decided to go with plain Eclipse/GNU ARM GCC and JLink for flashing/debugging.&lt;/p&gt;
&lt;p&gt;It works great, is a bit more tedious than using Arduino of course, but I get the full capability of the SDK as a bonus.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Arduino encryption nRF51822</title><link>https://devzone.nordicsemi.com/thread/31840?ContentTypeID=1</link><pubDate>Mon, 28 Sep 2015 11:51:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:374f1272-5dbd-4eb2-b385-9326387b7f10</guid><dc:creator>Henrik M.</dc:creator><description>&lt;p&gt;Hi @bsiever. I simply don&amp;#39;t want my users to &amp;quot;register&amp;quot; ;) It&amp;#39;s a step I&amp;#39;d prefer not to have ;)
I&amp;#39;ll look into your encryption example from the rfduino forum!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Arduino encryption nRF51822</title><link>https://devzone.nordicsemi.com/thread/31839?ContentTypeID=1</link><pubDate>Thu, 20 Aug 2015 12:22:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6ef60a45-70dc-453f-962e-0eb2fb8c229e</guid><dc:creator>Bill Siever</dc:creator><description>&lt;p&gt;@luposlip: I&amp;#39;m curious why you don&amp;#39;t want to pair. It&amp;#39;s a pretty light-weight process.  Are you planning on using a different form of encryption? If not, where/how are you generating keys?&lt;br /&gt;
None-the-less, if you really want to be able to encrypt from an Arduino-like API, you might look at this: &lt;a href="http://forum.rfduino.com/index.php?topic=1158"&gt;forum.rfduino.com/index.php&lt;/a&gt; . In the second post I attached a sketch that calls the encryption routine. It uses an older version of the SoftDevice, so you&amp;#39;d want to verify that it uses the correct service number for the SoftDevice in the RedBear module.  Note that this only encrypts on the device side. It doesn&amp;#39;t decrypt.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Arduino encryption nRF51822</title><link>https://devzone.nordicsemi.com/thread/31838?ContentTypeID=1</link><pubDate>Thu, 20 Aug 2015 06:15:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5d1cd741-887c-4daa-ba43-c9a100e02a05</guid><dc:creator>Henrik M.</dc:creator><description>&lt;p&gt;@hungbui yes I know of the native encryption. But I don&amp;#39;t want my users to need to pair.
Thanks again for your input.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Arduino encryption nRF51822</title><link>https://devzone.nordicsemi.com/thread/31837?ContentTypeID=1</link><pubDate>Tue, 18 Aug 2015 12:41:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fac270d8-84dd-42a9-8ca9-65a9d0c1076c</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;@luposlip: I assume you already aware of the native encryption support with BLE as mention by Bill with &amp;quot;bonding&amp;quot; and &amp;quot;pairing&amp;quot;. It&amp;#39;s 128 bit AES encryption. The current RedbearLabs BLE Nano should already supported this (because it&amp;#39;s based on our stack)&lt;/p&gt;
&lt;p&gt;Regarding nRF52 third party modules, I have no idea when they would be available. But the production chip for nRF52 will only available from December this year.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Arduino encryption nRF51822</title><link>https://devzone.nordicsemi.com/thread/31836?ContentTypeID=1</link><pubDate>Tue, 18 Aug 2015 07:16:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e03c612d-5a51-40d9-be62-6e91a46b215c</guid><dc:creator>Henrik M.</dc:creator><description>&lt;p&gt;Hi @hungbui,
I need encryption capabilities, so a more powerful processor is definitely a huge plus.
Furthermore NFC and the less power needed to run the nRF52 is also beneficial to my project.
Any idea on when other options than the nRF52 DK will be available with the same chip - such as the RedBearLabs BLE Nano, but with nRF52?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Arduino encryption nRF51822</title><link>https://devzone.nordicsemi.com/thread/31834?ContentTypeID=1</link><pubDate>Mon, 17 Aug 2015 11:45:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d4e1adf0-96bf-4c10-b68e-3421e51cfd6a</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi luposlip,&lt;/p&gt;
&lt;p&gt;S130 only support chip revision 3. So if the RBL module doesn&amp;#39;t have chip revision 3, you should think of another option. I would suggest you to try &lt;a href="http://www.nordicsemi.com/eng/Products/nRF51-DK"&gt;the nRF51 DK.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You don&amp;#39;t need the nRF52 unless you have an application that require more powerful MCU processing power that the nRF51 can&amp;#39;t handle, or some peripheral that the nRF51 doesn&amp;#39;t have such as NFC.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Arduino encryption nRF51822</title><link>https://devzone.nordicsemi.com/thread/31835?ContentTypeID=1</link><pubDate>Sun, 16 Aug 2015 09:36:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d187ada7-aedb-4156-91e5-c912eafd3a11</guid><dc:creator>Henrik M.</dc:creator><description>&lt;p&gt;Hmm.. Perhaps I should stop using the RBL Nano, and use the nRF52 instead - but as far as I can see, only the preview DK is available at the moment?&lt;/p&gt;
&lt;p&gt;I need to be able to support both encryption and S130 (peripheral AND central at the same time). What do you think my would be my best option?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Arduino encryption nRF51822</title><link>https://devzone.nordicsemi.com/thread/31833?ContentTypeID=1</link><pubDate>Fri, 14 Aug 2015 13:50:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9b12bfaf-8620-4f75-ba92-8783150ab6ef</guid><dc:creator>Bill Siever</dc:creator><description>&lt;p&gt;The link you&amp;#39;ve provided to RedBearLabs indicates that their module only works with SDK 6.1 (and earlier).  This probably means that they&amp;#39;re using the 2nd revision of Nordic&amp;#39;s chip.  Newer Nordic SDKs require the 3rd revision. (See &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.pdf.sds/nRF51_Series_Compatibility_Matrix_v2.3.pdf"&gt;infocenter.nordicsemi.com/.../nRF51_Series_Compatibility_Matrix_v2.3.pdf&lt;/a&gt; for more).&lt;/p&gt;
&lt;p&gt;It looks like RedBear&amp;#39;s Arduino API is really just the mbed API.   (See: &lt;a href="https://github.com/RedBearLab/nRF51822-Arduino"&gt;github.com/.../nRF51822-Arduino&lt;/a&gt; which will download the module at &lt;a href="https://redbearlab.github.io/arduino/nRF51822/nRF51822_board.zip)"&gt;redbearlab.github.io/.../nRF51822_board.zip)&lt;/a&gt;. You may be able to combine the mbed examples for security (like the BLE_SecureHeartRate at &lt;a href="https://developer.mbed.org/teams/Bluetooth-Low-Energy/code/BLE_SecureHeartRate/)"&gt;developer.mbed.org/.../)&lt;/a&gt; with the typical Arduino function name conventions, like &lt;code&gt;setup()&lt;/code&gt; (for startup command) and &lt;code&gt;loop()&lt;/code&gt;, for the main loop.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Arduino encryption nRF51822</title><link>https://devzone.nordicsemi.com/thread/31832?ContentTypeID=1</link><pubDate>Fri, 14 Aug 2015 09:16:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:87862c2b-a808-4e37-b69f-92d96342e721</guid><dc:creator>Henrik M.</dc:creator><description>&lt;p&gt;Hi @hungbui - my blinky_gcc_nrf51.ld file looks like this now:&lt;/p&gt;
&lt;p&gt;/* START */
SEARCH_DIR(.)
GROUP(-lgcc -lc -lnosys)&lt;/p&gt;
&lt;p&gt;MEMORY
{
FLASH (rx) : ORIGIN = 0x0, LENGTH = 0x40000
RAM (rwx) :  ORIGIN = 0x20000000, LENGTH = 0x4000
}&lt;/p&gt;
&lt;p&gt;INCLUDE &amp;quot;gcc_nrf51_common.ld&amp;quot;
/* END */&lt;/p&gt;
&lt;p&gt;1: I&amp;#39;ve changed the RAM size to 16KB, but I&amp;#39;m not sure if the Origin(s) are correctly set?&lt;/p&gt;
&lt;p&gt;2: Futhermore I&amp;#39;m not sure where to set the GPIO pin?&lt;/p&gt;
&lt;p&gt;3: Thirdly, the folder content from SDK 9 seem much different from the guide found here: &lt;a href="http://redbearlab.com/nrf51822-sdk"&gt;redbearlab.com/nrf51822-sdk&lt;/a&gt;, perhaps the guide isn&amp;#39;t at all usable with nRF SDK 9.x?&lt;/p&gt;
&lt;p&gt;I managed to build the HRS and merge it with s110_softdevice.hex using srec_cat tool. The resulting hrs.hex file results in a fail.txt containing &amp;quot;SWD ERROR&amp;quot;. Nothing much to follow :-( The compiled hrs.hex is attached to my initial question.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Arduino encryption nRF51822</title><link>https://devzone.nordicsemi.com/thread/31830?ContentTypeID=1</link><pubDate>Thu, 13 Aug 2015 12:13:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f4427cfd-baea-44a8-8876-4eb1d0077498</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;As you can see in your screenshot, the makefile is there. Yes the PCA10028 is a specific board, but it has the same nF51822 chip as on the Redbearlab module. So you need to modify the GPIO pin to match with your board. In addition, the chip on the RedBearLab could be a different variant, which has only 16kB RAM when the one on the PCA10028 has 32kB RAM. You need to modify IRAM1 to match with the smaller size of RAM.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Arduino encryption nRF51822</title><link>https://devzone.nordicsemi.com/thread/31829?ContentTypeID=1</link><pubDate>Thu, 13 Aug 2015 11:57:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9657c4e4-c927-4241-b571-1430d90271b5</guid><dc:creator>Henrik M.</dc:creator><description>&lt;p&gt;@hungbui - got it, updated the question with a screendump.
I thought PCA10028 was a specific board, but that isn&amp;#39;t so?&lt;/p&gt;
&lt;p&gt;I if somehow can build/use the SDK as a library with Arduino (&lt;a href="https://www.arduino.cc/en/guide/libraries)"&gt;www.arduino.cc/.../libraries)&lt;/a&gt; it&amp;#39;d be perfect! :)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Arduino encryption nRF51822</title><link>https://devzone.nordicsemi.com/thread/31828?ContentTypeID=1</link><pubDate>Thu, 13 Aug 2015 11:50:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b7f94104-106a-4a7f-ad00-0fbe743b206b</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;@Henrik: Next time please reply as comment under the answers, don&amp;#39;t create separate answer, because &amp;quot;answer&amp;quot; should be used as the answer for the question you ask, not as the reply to others.&lt;/p&gt;
&lt;p&gt;Could you take a screenshot of an nRF51 SDK v9.0 example folder and update it to your question ? For example screenshot of this folder \examples\peripheral\blinky\pca10028\blank\armgcc ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Arduino encryption nRF51822</title><link>https://devzone.nordicsemi.com/thread/31831?ContentTypeID=1</link><pubDate>Thu, 13 Aug 2015 11:04:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f4448b74-7023-461c-a3d9-8dbad2fbfa2b</guid><dc:creator>Henrik M.</dc:creator><description>&lt;p&gt;Thanks for your replies, I&amp;#39;ll work a bit longer with it and revert.&lt;/p&gt;
&lt;p&gt;Until then:&lt;/p&gt;
&lt;p&gt;@hungbui, It&amp;#39;s been a long while since I did any &amp;quot;real&amp;quot; C programming. I looked for the Makefiles in the example project folders themselves, but didn&amp;#39;t see any. I&amp;#39;ll try it once more, and revert!&lt;/p&gt;
&lt;p&gt;@bsiever, OK I&amp;#39;ll forget Bluetooth Developer Studio for now. I tried once to include the nRF API in Arduino but with no luck. The code simply didn&amp;#39;t compile. It&amp;#39;d be really helpful if someone had a sample project or step-by-step guide on how to use a C-based SDK like nRF51822 together with the Arduino tool - for newbies like me!?&lt;/p&gt;
&lt;p&gt;Best,
Henrik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Arduino encryption nRF51822</title><link>https://devzone.nordicsemi.com/thread/31827?ContentTypeID=1</link><pubDate>Wed, 12 Aug 2015 15:42:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d91f4333-4b70-4cce-9fae-b58ecc38d739</guid><dc:creator>Bill Siever</dc:creator><description>&lt;p&gt;If you want to encrypt all traffic, you may want to use Bluetooth Low Energy&amp;#39;s &amp;quot;Bonding&amp;quot; mechanism.  Typically bonded devices exchange encryption keys on their first connection (creating the &amp;quot;bond&amp;quot; between devices).  Successive connections use these keys to encrypt traffic.  It looks like there is support for Bonding from Red Bear Labs. You may just have to increase the security level on a single characteristic (via the &lt;code&gt;requireSecurity()&lt;/code&gt; method with an argument like &lt;code&gt;SECURITY_MODE_ENCRYPTION_NO_MITM&lt;/code&gt;).  When you try to access that characteristic you will create a bonding request (your mobile device will probably pop up a dialog asking if you want to Pair with the device). Note that the bonding request only happens once unless you go into your mobile devices settings and erase it.&lt;/p&gt;
&lt;p&gt;The Bluetooth Developer Studio Beta may not be what you need (yet). It allows you to build services in a GUI and then export them to Nordic&amp;#39;s C-based API (rather than doing all the details programmatically).  You have to be a Bluetooth SIG member to get access, but it&amp;#39;s available at the free level of membership.  I think the Developer Studio will drastically improve the creation and documentation of new services. It will also improve development time (by avoiding simple programming errors).  The last time I tried it, it just wasn&amp;#39;t quite ready for regular use.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Arduino encryption nRF51822</title><link>https://devzone.nordicsemi.com/thread/31826?ContentTypeID=1</link><pubDate>Wed, 12 Aug 2015 14:50:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:30ddc4a4-5d6c-4c0b-a8b7-f6008ed6c5f5</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Henrik,&lt;/p&gt;
&lt;p&gt;I&amp;#39;m not very familiar with the RedBearLab nRF51822 Library for Arduino and how you can have AES encryption with the library.
However, I don&amp;#39;t see any reason that board should not work with the nRF51 SDK provided by us.&lt;/p&gt;
&lt;p&gt;You can follow &lt;a href="http://redbearlab.com/nrf51822-sdk"&gt;this guide&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;GCC is fully supported with our current SDK (from SDK v8.0) , make sure you have matched the GNU_INSTALL_ROOT in Makefile.windows at \components\toolchain\gcc with your GNU installation.
You mentioned that you missed the makefile from the SDK, could you tell me more about that ? The makefile is at each example project folder in armgcc.&lt;/p&gt;
&lt;p&gt;Make sure you have downloaded the latest SDK from &lt;a href="https://developer.nordicsemi.com/nRF51_SDK/nRF51_SDK_v9.x.x/"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>