<?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>Connecting to multiple BLE peripherals</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/65858/connecting-to-multiple-ble-peripherals</link><description>Hi All, 
 I am trying to understand how should I define the BLE UUIDs in my peripherals and connect to each peripherals. 
 Basically I have several BLE sensors. My goal is to connect to each sensor peripherals and obtain the sensor data using an IOS app</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 14 Sep 2020 10:38:12 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/65858/connecting-to-multiple-ble-peripherals" /><item><title>RE: Connecting to multiple BLE peripherals</title><link>https://devzone.nordicsemi.com/thread/269341?ContentTypeID=1</link><pubDate>Mon, 14 Sep 2020 10:38:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0f6560ab-df0a-4755-9ab9-b9b0d3362054</guid><dc:creator>Radio</dc:creator><description>&lt;p&gt;Great! Thanks for the support.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connecting to multiple BLE peripherals</title><link>https://devzone.nordicsemi.com/thread/269340?ContentTypeID=1</link><pubDate>Mon, 14 Sep 2020 10:36:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c08db6d7-5cf7-4598-b045-a9584e860ed5</guid><dc:creator>David Meiklejohn</dc:creator><description>&lt;p&gt;Yes to both.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You need to join the Bluetooth sig as an associate member (its free, they make their money from the qualification fee on your product}, then you can apply for a company ID - also free.&lt;/p&gt;
&lt;p&gt;But beyond that, you&amp;#39;re on your own. You can use whatever scheme you want to identify your products. Ours is just a suggestion, but it works for us.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connecting to multiple BLE peripherals</title><link>https://devzone.nordicsemi.com/thread/269336?ContentTypeID=1</link><pubDate>Mon, 14 Sep 2020 10:13:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e9e77e91-f12a-422b-8d1a-0a6fa41a3511</guid><dc:creator>Radio</dc:creator><description>&lt;p&gt;Hi David,&lt;/p&gt;
&lt;p&gt;Many thanks for the reply.&amp;nbsp;&lt;/p&gt;
[quote userid="86944" url="~/f/nordic-q-a/65858/connecting-to-multiple-ble-peripherals/269274"]Do you mean that each tag has the same same set of sensors, i.e. each sensor reports temperature and humidity or something like that?[/quote]
&lt;p&gt;Yes. This is the type of development I am doing. I think your reply answers my requirement.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;So in general and in practice, Bluetooth Sig only provides one ID for a company?&lt;/p&gt;
&lt;p&gt;When the company manufactures multiple devices, we have to handle these devices in our FW?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connecting to multiple BLE peripherals</title><link>https://devzone.nordicsemi.com/thread/269274?ContentTypeID=1</link><pubDate>Mon, 14 Sep 2020 06:06:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:009d2acb-5b3e-403d-b205-0af7fd951142</guid><dc:creator>David Meiklejohn</dc:creator><description>&lt;p&gt;Do you mean that each tag has the same same set of sensors, i.e. each sensor reports temperature and humidity or something like that?&amp;nbsp; And the iOS app needs to connect to a bunch of sensors, that each report the same type of data, and know which tag is which?&lt;/p&gt;
&lt;p&gt;We&amp;#39;re developing something similar, so here&amp;#39;s what we&amp;#39;ve done:&lt;/p&gt;
&lt;p&gt;Each type of data has its own set of characteristics, arranged into services.&amp;nbsp; E.g. we have a battery level service that includes a battery voltage characteristic, and a temperature service that includes a couple of different temperature characteristics.&amp;nbsp; Each characteristic has a fixed UUID across all the sensor devices, e.g battery level service is always&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;// Battery level service:               F38A0001-B4CF-4F2B-99DD-72CF82F60521
//   Battery voltage characteristics:   F38A0002-B4CF-4F2B-99DD-72CF82F60521
//                                      F38A0003-B4CF-4F2B-99DD-72CF82F60521&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Each device (&amp;quot;tag&amp;quot;) has unique serial and batch numbers, programmed into the UICR as part of PCBA test (the test jig scans a sequential barcode label on the PCB).&amp;nbsp; There is also a model number, which is fixed for these devices:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;// device data read from UICR flash
#define MODEL_NUM (NRF_UICR-&amp;gt;CUSTOMER[2])           // 0x100010088
#define SERIAL_NUM (NRF_UICR-&amp;gt;CUSTOMER[3])          // 0x10001008C
#define BATCH_NUM (NRF_UICR-&amp;gt;CUSTOMER[4])           // 0x100010090&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;We then include this in the manufacture data section of our advertising packet, in advertising_init():&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;    // add manufacturing data
    static struct
    {
        uint16_t model;
        uint16_t batch;
        uint32_t serial_num;
    } device_data;
    
    device_data.model = MODEL_NUM;
    device_data.batch = BATCH_NUM;
    device_data.serial_num = SERIAL_NUM;

    static ble_advdata_manuf_data_t manuf_data = {
        .company_identifier = MANUFACTURER_ID,
        .data.size = sizeof(device_data),
        .data.p_data = (uint8_t *)&amp;amp;device_data};
    adv_init.srdata.p_manuf_specific_data = &amp;amp;manuf_data;
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;where&amp;nbsp;MANUFACTURER_ID is the ID assigned to our company by the Bluetooth SIG.&lt;/p&gt;
&lt;p&gt;So, to uniquely identify that specific product, our IOS app looks for our manufacturer id and the specific model number.&lt;/p&gt;
&lt;p&gt;Then to know which tag is which, it looks at the batch and serial numbers (of course you only need a single unique serial number, we just add batch to make it easier to keep track).&lt;/p&gt;
&lt;p&gt;Hope that helps!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>