<?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>Sending I2C commands via BLE</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/14830/sending-i2c-commands-via-ble</link><description>Hello, 
 I will explain my setup: 
 I have 2 nRF51-DK each one of them connected via I2C and SPI to two different custom boards. One being the central(nrfA) and the other being the peripheral(nrfB), regarding BLE. 
 I want to send from 1st board--</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 01 Jul 2016 12:13:58 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/14830/sending-i2c-commands-via-ble" /><item><title>RE: Sending I2C commands via BLE</title><link>https://devzone.nordicsemi.com/thread/56609?ContentTypeID=1</link><pubDate>Fri, 01 Jul 2016 12:13:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:83c2424f-5f83-4059-92a9-419628418426</guid><dc:creator>Jorge</dc:creator><description>&lt;p&gt;ok, thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sending I2C commands via BLE</title><link>https://devzone.nordicsemi.com/thread/56608?ContentTypeID=1</link><pubDate>Fri, 01 Jul 2016 12:07:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4982a6b6-529f-4568-bcf5-d43ff6c10e09</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;Either works - having a different NUS SERVICE id is easiest as you don&amp;#39;t need to register a new base.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sending I2C commands via BLE</title><link>https://devzone.nordicsemi.com/thread/56607?ContentTypeID=1</link><pubDate>Fri, 01 Jul 2016 12:06:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:752a4de7-1fa6-4d7b-af80-6bac39c9f2dc</guid><dc:creator>Jorge</dc:creator><description>&lt;p&gt;I already created the 2 instances of the NUS service, one for SPI and one for I2C, do I need to create two different &lt;code&gt;NUS_BASE_UUID&lt;/code&gt; or just two different &lt;code&gt;BLE_UUID_NUS_SERVICE&lt;/code&gt;?&lt;/p&gt;
&lt;p&gt;Or I&amp;#39;m totally off on making the two instances?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sending I2C commands via BLE</title><link>https://devzone.nordicsemi.com/thread/56606?ContentTypeID=1</link><pubDate>Wed, 29 Jun 2016 11:02:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5f5af558-3de4-4e1f-8540-7728be1aa985</guid><dc:creator>Jorge</dc:creator><description>&lt;p&gt;Ok, thanks for the answer, I&amp;#39;ll try to make the two instances of the NUS service then, it seems easier to me.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sending I2C commands via BLE</title><link>https://devzone.nordicsemi.com/thread/56605?ContentTypeID=1</link><pubDate>Wed, 29 Jun 2016 10:43:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e0278ecc-43b9-4860-bd80-8e550fdc58fa</guid><dc:creator>Anders Strand</dc:creator><description>&lt;p&gt;I agree with RK on all the above. You can learn to create your own custom service by following tutorials found on the &lt;a href="https://devzone.nordicsemi.com/tutorials/"&gt;tutorials page&lt;/a&gt;. Start with the advertising and service tutorial. The quickest way is of course to just use NUS for both.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sending I2C commands via BLE</title><link>https://devzone.nordicsemi.com/thread/56604?ContentTypeID=1</link><pubDate>Wed, 29 Jun 2016 10:35:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:70057d0d-9fdf-49ca-ab75-458ffe34a3ca</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;Just use the NUS service for that too. Prepend each message you&amp;#39;re sending with one byte saying whether it&amp;#39;s I2C or SPI and then do the right thing at the other end, sending to one service or the other.&lt;/p&gt;
&lt;p&gt;Using the Immediate Alert Service is really wrong, it&amp;#39;s not a data transfer service, it&amp;#39;s a service for immediate alerts.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m generally appalled how the NUS service appears to be taken as-is, whether it&amp;#39;s really appropriate for the data being sent or not, and used by just about everyone for just about everything. You can just write your own service with a couple of characteristics to do what you want.&lt;/p&gt;
&lt;p&gt;Here&amp;#39;s another idea, just have two instances of the NUS service but with different UUIDs, that works too. Or have two primary services which have no characteristics but just identify which is I2C and which is SPI by their UUID, each of which has a secondary service which is the NUS service, and in that case you don&amp;#39;t even need to change UUIDs, you have two NUS services, one for each data channel.&lt;/p&gt;
&lt;p&gt;Either way, please don&amp;#39;t shoehorn defined services like IAS into doing other things, when peripherals connect to such services, they expect them to mean what they are defined to mean, not be a transport for random data.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>