<?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>Can&amp;#39;t discover custom service</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/9439/can-t-discover-custom-service</link><description>Hi! 
 I&amp;#39;m working with nRF51DK with s110 soft device on it. I&amp;#39;m trying to write simple custom service which reads some data from sensors and send it over BLE to Android app. I wrote my service on the base of ble_app_template_s110_pca10028 and ble_lbs</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 30 Sep 2015 10:37:45 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/9439/can-t-discover-custom-service" /><item><title>RE: Can't discover custom service</title><link>https://devzone.nordicsemi.com/thread/34838?ContentTypeID=1</link><pubDate>Wed, 30 Sep 2015 10:37:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:81197d5b-fa31-416c-9f26-1aaa80a83fda</guid><dc:creator>Ina</dc:creator><description>&lt;p&gt;Thank You very much! Now I know that my services are implemented correctly, i was afraid they are not.&lt;/p&gt;
&lt;p&gt;Regards, Ina&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can't discover custom service</title><link>https://devzone.nordicsemi.com/thread/34837?ContentTypeID=1</link><pubDate>Tue, 29 Sep 2015 10:52:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9d474cd9-9382-4a66-ad9a-97a61a3f094e</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;I don&amp;#39;t think there is anything wrong with your service setup, but I see the same behaviour as you testing your code.&lt;/p&gt;
&lt;p&gt;This is because nrf_drv_twi_tx() returns an error and APP_ERROR_CHECK() resets the chip.&lt;/p&gt;
&lt;p&gt;If I comment out the below section it works perfectly.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;//err_code = nrf_drv_twi_tx(&amp;amp;twi, ACCADDRESS, &amp;amp;tx_data, sizeof(tx_data), true);
//APP_ERROR_CHECK(err_code);

//err_code = nrf_drv_twi_rx(&amp;amp;twi, ACCADDRESS, rx_data, sizeof(rx_data), false);
//APP_ERROR_CHECK(err_code);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I guess you have your twi connected to something, while I don&amp;#39;t. Anyways, you could use the debugger and see if the functions above return any errors. Remember to turn off optimizations. Maybe you could handle the error instead of calling APP_ERROR_CHECK(), depends on what the error is of course.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can't discover custom service</title><link>https://devzone.nordicsemi.com/thread/34835?ContentTypeID=1</link><pubDate>Mon, 28 Sep 2015 11:21:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cf2461a7-1bc1-4442-b215-10757e9547f5</guid><dc:creator>Ina</dc:creator><description>&lt;p&gt;Hi! Sorry for delay. I uploaded my project and gave information about Soft Device and SDK.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can't discover custom service</title><link>https://devzone.nordicsemi.com/thread/34834?ContentTypeID=1</link><pubDate>Fri, 25 Sep 2015 15:26:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4746c927-f8c6-43db-9b9e-415826f3020c</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;Could you let us know what SDK and SoftDevice version you are using and upload your complete project so we could have a look at it? Please edit your question to include the information.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can't discover custom service</title><link>https://devzone.nordicsemi.com/thread/34836?ContentTypeID=1</link><pubDate>Fri, 25 Sep 2015 11:36:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:70df6056-b283-4581-a845-a189669efd0e</guid><dc:creator>Nguyen Hoan Hoang</dc:creator><description>&lt;p&gt;There are a few example code with custom service and long write from &lt;a href="http://embeddedsoftdev.blogspot.ca/p/ehal-nrf51.html"&gt;this blog site&lt;/a&gt;.  The blog also shows how to setup a free development environment using Eclipse + GCC for general ARM based embedded development.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>