<?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>many n00b questions about NAN-36 example project</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/1169/many-n00b-questions-about-nan-36-example-project</link><description>Hi Developers, 
 I&amp;#39;m using an nRF51822 and finally beginning to understand BLE. I want to learn by example so I downloaded NAN-36. 
 Im at a point where the Application Note is a bit vague and I need some help: 
 
 
 4.3.1 step 1: Do I need to replace</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 04 Nov 2014 13:12:14 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/1169/many-n00b-questions-about-nan-36-example-project" /><item><title>RE: many n00b questions about NAN-36 example project</title><link>https://devzone.nordicsemi.com/thread/5464?ContentTypeID=1</link><pubDate>Tue, 04 Nov 2014 13:12:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:062bdfd6-bcf1-408c-a177-765ebdb1bee0</guid><dc:creator>Eliath</dc:creator><description>&lt;p&gt;I got issues with your Q8.&lt;/p&gt;
&lt;p&gt;So when you get this: C11Cxxxx-C1AD-13CD-06FC-C9BEF61C942E&lt;/p&gt;
&lt;p&gt;How should your defines look like ?&lt;/p&gt;
&lt;p&gt;define LBS_UUID_BASE&lt;/p&gt;
&lt;p&gt;define LBS_UUID_SERVICE&lt;/p&gt;
&lt;p&gt;define LBS_UUID_LED_CHAR&lt;/p&gt;
&lt;p&gt;define LBS_UUID_BUTTON_CHAR&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: many n00b questions about NAN-36 example project</title><link>https://devzone.nordicsemi.com/thread/5460?ContentTypeID=1</link><pubDate>Wed, 16 Apr 2014 07:49:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a3169332-53d8-4032-8ada-c36cd2a2b7c0</guid><dc:creator>Joseph Corteo</dc:creator><description>&lt;p&gt;Agreed, nAN-36 tutorial/walk through is unclear at some points.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: many n00b questions about NAN-36 example project</title><link>https://devzone.nordicsemi.com/thread/5463?ContentTypeID=1</link><pubDate>Tue, 07 Jan 2014 10:08:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8d42fb1d-cc59-4479-bd58-e89e440b1899</guid><dc:creator>wlgrd</dc:creator><description>&lt;p&gt;Great, so everything&amp;#39;s okay? Regarding the UUID, I don&amp;#39;t understand why you need it to look like the one you propose. It&amp;#39;s definately not the same. If you need a custom UUID you can have a look at this thread &lt;a target="_blank" href="https://devzone.nordicsemi.com/index.php/how-to-set-uuid-for-custom-profile" rel="nofollow"&gt;https://devzone.nordicsemi.com/index.php/how-to-set-uuid-for-custom-profile&lt;/a&gt; . Also remember the endianess of the UUID&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: many n00b questions about NAN-36 example project</title><link>https://devzone.nordicsemi.com/thread/5462?ContentTypeID=1</link><pubDate>Mon, 06 Jan 2014 13:57:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6d595527-8291-417a-99db-1a425a819ace</guid><dc:creator>Roy</dc:creator><description>&lt;p&gt;Thanks to you I got it compiling (and some help of another intern).&lt;/p&gt;
&lt;p&gt;I am currently at 4.3.4 and I think the hard part is over.&lt;/p&gt;
&lt;p&gt;about Question 8:
The conversion to an array of bytes of the UUID confused me. nRFgo-Studio generates a random UUID that looks like this:
006Fxxxx-68C4-CAD2-2181-DDAC760BE6A3&lt;/p&gt;
&lt;p&gt;it needs to be converted to look like this:
{0x24, 0x8F, 0x00, 0x00, 0xBF, 0xA2, 0x69, 0x8B, 0x15, 0x58, 0x73, 0xA6, 0x82, 0x8A, 0x4A, 0x1D}
The xxxx in the UUID I assumed where 0000 so the 3rd and 4th hex is 0x00.&lt;/p&gt;
&lt;p&gt;about question 12:
What confused me there was the use of the verb &amp;quot;Memset&amp;quot;, I Memset, He Memsets, We are Memsetting&lt;/p&gt;
&lt;p&gt;Thank you again very much for your endless dedication of answering my questions.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: many n00b questions about NAN-36 example project</title><link>https://devzone.nordicsemi.com/thread/5461?ContentTypeID=1</link><pubDate>Mon, 30 Dec 2013 14:23:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1fd61935-b9a1-4855-b2e2-176c218c75ee</guid><dc:creator>wlgrd</dc:creator><description>&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;As the document says, you should only need to replace the lower letters. These are only names, so please see what the defines are used for and decide for your self.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Yes, do that. lbs (LED BLE service I presume) and bas (battery service) are just names, but for better structure and readability change them.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The prototypes in an .h file, presumably ble_bas.h (formarly ble_lbs.h). This is quite standard for whatever project you are working on. Function prototypes in the header files so that other files can reach them, the function implementation in a .c-file. Do whatever suits you the best.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Yes. Look at the resulting code.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Read up on function pointers. It is used to pass a function as a parameter in another function call. I know this is hard to get your first grasp on, but you need to follow the code and see where and how it is used.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Look at the implementation of the function in the .c file. By the name: what to do on an event on the LED  Battery Service&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Its the write handler. The event is a write.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Where do you read it in that format?&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;As it says, in the service initialization.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&amp;quot;Remove the if-sentence checking the is_notification_supportedparameter, but leave
the code inside. &amp;quot;, this is really self-explanatory.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;We are still in the init, read some examples and you will see where they are used.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;memset(&amp;amp;_your_struct, 0, sizeof(_your_struct)); // That is shown in the NAN.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;pre&gt;&lt;code&gt;char_md.char_props.read   = 1;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;char_md.char_props.write  = 1;
char_md.p_char_user_desc  = NULL;
char_md.p_char_pf         = NULL;
char_md.p_user_desc_md    = NULL;
char_md.p_cccd_md         = NULL;
char_md.p_sccd_md         = NULL;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;// &amp;lt;&amp;lt;&amp;lt;---- HERE ---&amp;gt;&amp;gt;&amp;gt;
ble_uuid.type = p_lbs-&amp;gt;uuid_type;
ble_uuid.uuid = LBS_UUID_LED_CHAR&lt;/p&gt;
&lt;ol start="14"&gt;
&lt;li&gt;
&lt;p&gt;hmm, dunno :\ Don&amp;#39;t worry about it.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Yepp.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;I myself is a beginner of BLE, and know this can be quite hard to grasp if you don&amp;#39;t have much experience with programming C. A lot of your questions could be answered if you look at similiar projects and trying to understand the flow of it. You should also get a good understanding on where to place different set of codes (.h/.c) and the use of structures.&lt;/p&gt;
&lt;p&gt;Also, the compiling errors you are getting; please do some more changes to your code and paste the errors you don&amp;#39;t understand in your question.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: many n00b questions about NAN-36 example project</title><link>https://devzone.nordicsemi.com/thread/5459?ContentTypeID=1</link><pubDate>Thu, 19 Dec 2013 09:36:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:81bb6a66-2999-4d28-ae23-db939cce69aa</guid><dc:creator>Roy</dc:creator><description>&lt;p&gt;I found there is an (almost) fully working  version of the project in the nAN-36 folder.
I&amp;#39;m going to check that out and try and get it working.&lt;/p&gt;
&lt;p&gt;For the Nordic Semiconductor employers who will make v1.1 or v2.0 of the nAN-36: The walkthrough/tutorial is a disaster for the beginning programmer with BLE (in my opinion). Please make some more use of the following:&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>