<?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>Questions regarding BLE service and characteristics in ncs 2.2.0</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/99663/questions-regarding-ble-service-and-characteristics-in-ncs-2-2-0</link><description>Hi 
 I have created a service and a few characteristics under it in one file using 
 
 BT_GATT_SERVICE_DEFINE(my_service, 
 BT_GATT_PRIMARY_SERVICE(&amp;amp;my_service_uuid), 
 BT_GATT_CHARACTERISTIC(&amp;amp;my_char_uuid, BT_GATT_CHRC_READ | BT_GATT_CHRC_NOTIFY), BT_GATT_CCC</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 12 May 2023 14:32:38 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/99663/questions-regarding-ble-service-and-characteristics-in-ncs-2-2-0" /><item><title>RE: Questions regarding BLE service and characteristics in ncs 2.2.0</title><link>https://devzone.nordicsemi.com/thread/425390?ContentTypeID=1</link><pubDate>Fri, 12 May 2023 14:32:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:41794f98-5a78-4aea-89cd-6a4cb6517ba2</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user=""]Is there any possible ways to do so,[/quote]
&lt;p&gt;No, you cannot split a macro invocation over multiple files. Everything within the parentheses must be in the same file.&lt;/p&gt;
[quote user=""]&lt;span&gt;&lt;span&gt;what is this&amp;nbsp; &amp;quot;&lt;/span&gt;&lt;/span&gt;BT_GATT_SERVICE_INSTANCE_DEFINE&amp;quot; used for and how?[/quote]
&lt;p&gt;It can be used if you need multiple instances of the same service.&lt;/p&gt;
&lt;p&gt;I highly recommend having a look at the &lt;a href="https://academy.nordicsemi.com/courses/bluetooth-low-energy-fundamentals/"&gt;Bluetooth Low Energy Fundamentals&lt;/a&gt; course on DevAcademy, and in particular &lt;a href="https://academy.nordicsemi.com/lessons/lesson-4-bluetooth-le-data-exchange/"&gt;Lesson 4 - Data exchange in Bluetooth LE&lt;/a&gt; which covers what is needed for setting up a service with two characteristics.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>