<?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>nRFGO services.c files with nRF8001 Arduino SDK</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/2535/nrfgo-services-c-files-with-nrf8001-arduino-sdk</link><description>Hi, I have been using the nRF8001 Arduino SDK with nRF8001 chip. I wanted to set the data for the different services I&amp;#39;m using and thought I would go ahead and use the services.c file generated by nRFGO Studio. But the file that nRFGO Studio generates</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 11 Jun 2014 08:23:10 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/2535/nrfgo-services-c-files-with-nrf8001-arduino-sdk" /><item><title>RE: nRFGO services.c files with nRF8001 Arduino SDK</title><link>https://devzone.nordicsemi.com/thread/10122?ContentTypeID=1</link><pubDate>Wed, 11 Jun 2014 08:23:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0480c6f5-e4e5-460d-a2d1-ce8adbc2302f</guid><dc:creator>David Edwin</dc:creator><description>&lt;p&gt;We will add a queue example which is similar to the generated code in services.c to the heart rate example for Arduino. This makes it easy to move the code and not depend on the tool. You can always use the generated code and edit it for your use with the Arduino SDK.
Can you post the CSC question as a separate question so we can track the thread better.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRFGO services.c files with nRF8001 Arduino SDK</title><link>https://devzone.nordicsemi.com/thread/10121?ContentTypeID=1</link><pubDate>Mon, 26 May 2014 14:38:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:53231b15-47d3-4c54-9a58-8ff11c97d38e</guid><dc:creator>C. Bertolini</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Thank you for sharing these information about Arduino SDK and nRF product.
I am currently developping a CSC bluetooth profile. Would it be possible to obtain an Arduino compatible code that implements the CSC profile?
(I could not find it within nRF SDK)&lt;/p&gt;
&lt;p&gt;As Fred put it, it would be great to have more information on the nRF code generator. That would motivate people to enrich Arduino exemples with different BT profiles and help Nordic enhance nRFgoStudio...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRFGO services.c files with nRF8001 Arduino SDK</title><link>https://devzone.nordicsemi.com/thread/10120?ContentTypeID=1</link><pubDate>Mon, 19 May 2014 14:40:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ba36e3ae-25fb-42be-b926-e33680e3d8b7</guid><dc:creator>Fred Roeber</dc:creator><description>&lt;p&gt;Runar &amp;amp; Star Destroyer, Thank you for your answers. I understand that the Arduino version of the ACI library uses a circular queue to allow multiple nRF8001 commands to be saved on the local processor and sent out only as the radio is ready to handle more commands. That is good but does not replace the old services_update_pipes interface in applications like mine that support multiple services between my device and the remote device. Even with simple devices and few services the queue approach will often have problems. The reason is that you can only make the queue so big in the hal_aci_tl.cpp file in the BLE library directory. Each queue entry takes 30-40 bytes so large queues can take a lot of bytes. And the default queue size as delivered is only 2 buffers. And once the queue is full with commands waiting to be sent all later commands fail until the radio accepts more data and the queue empties some.&lt;/p&gt;
&lt;p&gt;I notice your examples seem to assume commands will always be accepted and queued up. But I have found that in real use things can &amp;quot;get dropped on the floor&amp;quot; because of full queue conditions. I need reliable operation in my application so can&amp;#39;t allow commands to silently disappear. What I liked about the services.c implementation of sending data is that it allowed things to be saved until they could be sent successfully and made it explicit with the &amp;quot;is_freshest&amp;quot; flags how you wanted overrun conditions handled. I edited the services.c file that nRFGO Studio generates to work with the Arduino version of lib_aci and think I will use it for my application. Maybe others can make the hal_aci_tl command queue big enough to never have data get dropped. Or maybe their applications can handle dropped data. But for me I think the mix of the queue&amp;#39;s and services.c approach is best.&lt;/p&gt;
&lt;p&gt;I would think it would be nice to add another format option to nRFGO Studio so it could generate a services.c (well, actually, services.cpp) file that could work with the Arduino SDK. It wouldn&amp;#39;t take many changes to the code generator. And then people could have a choice of how they wanted to handle their communication with the nRF8001. But that is just my suggestion. I will stick with my hand edited file for now so this issue could be closed I guess.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRFGO services.c files with nRF8001 Arduino SDK</title><link>https://devzone.nordicsemi.com/thread/10119?ContentTypeID=1</link><pubDate>Mon, 19 May 2014 13:41:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:61833cb4-e6c5-4920-9763-5088fd11a339</guid><dc:creator>David Edwin</dc:creator><description>&lt;p&gt;We recommend that only the services.h generated with the nRFgo studio be used with the nRF8001 for new designs.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRFGO services.c files with nRF8001 Arduino SDK</title><link>https://devzone.nordicsemi.com/thread/10118?ContentTypeID=1</link><pubDate>Mon, 19 May 2014 09:12:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:384da9c1-9850-418f-a913-7ab00460f9d7</guid><dc:creator>run_ar</dc:creator><description>&lt;p&gt;I’m sorry; nRFgo studio do not have an option to generate a services.cpp file for Arduino. We moved away from the services_update_pipes interface when working with the Arduino SDK as we didn’t really need it after we added a proper command queue.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRFGO services.c files with nRF8001 Arduino SDK</title><link>https://devzone.nordicsemi.com/thread/10117?ContentTypeID=1</link><pubDate>Fri, 16 May 2014 12:46:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fa146150-9260-46c9-bd4f-ab7a2f313d37</guid><dc:creator>Fred Roeber</dc:creator><description>&lt;p&gt;Hello Runar, I tried running nrfgostudio using the bat file as you suggest. If I use codeGenVersion 1 as you show I only get a services.h file. And I have been using that services.h with my Arduino SDK code for a few months now. But I am adding code to set up other things like Device Information. And rather than writing my own functions to send data to the nRF8001 I thought I would use the functions that nrfstudio can generate and store in a services.c file when you use the codeGenVersion 2 option. But the problem is, the code in the services.c file does not work with the Arduino SDK. And there is no nrfgostudio option I could find to fix it. An example of the problems is that calls to lib_aci_set_local_data() need an aci_state pointer in the Arduino SDK version but not the non Arduino SDK version.&lt;/p&gt;
&lt;p&gt;For now I have renamed services.c to services.cpp (so that things like the bool variables work), added a function that can be called to pass in a pointer to the aci_state structure, and changed the function calls that require an aci_state pointer to have them. I can get the services code to compile and work that way.&lt;/p&gt;
&lt;p&gt;Is there some undocumented option to nrfgostudio to really generate a services.cpp file that would work with the Arduino SDK?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRFGO services.c files with nRF8001 Arduino SDK</title><link>https://devzone.nordicsemi.com/thread/10116?ContentTypeID=1</link><pubDate>Fri, 16 May 2014 07:23:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ea89b2eb-b513-41a3-b684-d5c09f6a402b</guid><dc:creator>run_ar</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;For the Arduino SDK there is a .bat file in the example project folders, you should use one of these to generate the Service.c file. By default the service files are generated with some functions that we do not want/need for the Aduino SDK, so we added several generating options for the studio to support both the new and the old SDK.&lt;/p&gt;
&lt;p&gt;To generate the service file:
&amp;quot;%NRFGOSTUDIOPATH%\nrfgostudio.exe&amp;quot; -nrf8001 -g UART_over_BLE.xml -codeGenVersion 1 -o&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>