<?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>Adding a Custom service to the HID keyboard service [Advertising Issue]</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/57588/adding-a-custom-service-to-the-hid-keyboard-service-advertising-issue</link><description>Hi, 
 We&amp;#39;re trying to add a custom service to the HID keyboard example. the service is initialized we can see the service when connected to the device from the nrfConnect app. but not in the adverting packet. we only see the HID service ! 
 When using</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 12 Feb 2020 07:14:42 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/57588/adding-a-custom-service-to-the-hid-keyboard-service-advertising-issue" /><item><title>RE: Adding a Custom service to the HID keyboard service [Advertising Issue]</title><link>https://devzone.nordicsemi.com/thread/233871?ContentTypeID=1</link><pubDate>Wed, 12 Feb 2020 07:14:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bcadf335-42fd-4f76-8951-a279bd122b96</guid><dc:creator>abdelali</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Ok, thank you! will give it a try.&lt;/p&gt;
&lt;p&gt;Best Regards,&lt;/p&gt;
&lt;p&gt;Abdelali&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Adding a Custom service to the HID keyboard service [Advertising Issue]</title><link>https://devzone.nordicsemi.com/thread/233639?ContentTypeID=1</link><pubDate>Tue, 11 Feb 2020 07:50:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ea9d1194-4acb-42b4-8d1a-0f2df4fcdae8</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi Abdelali&lt;/p&gt;
&lt;p&gt;I see. What is happening here is that you don&amp;#39;t have room for both service UUIDs in your advertising packet. The SM_SERVICE_UUID is 128 bit (16 bytes) long, which means it takes up more than half of the advertising packet, which is 31 byte, where 2 are overhead by default. In order to add this custom service, you should fit it into the scan response data instead of the advertising packet. You can take a look at I.E. the &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.3.0/ble_sdk_app_blinky.html"&gt;BLE app blinky example&lt;/a&gt; to see how a scan response is added to your advertising.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Adding a Custom service to the HID keyboard service [Advertising Issue]</title><link>https://devzone.nordicsemi.com/thread/233594?ContentTypeID=1</link><pubDate>Mon, 10 Feb 2020 15:58:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b0f32b80-a2a2-434f-9b31-bdc56cd3dc25</guid><dc:creator>abdelali</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Indeed, the service is properly declared, and works as intended. the problem is it is not advertised, when i scan the device with the nrfConnect phone app, and i look at the advertised packet, i son&amp;#39;t see that service (i only see the HID service..), but the service is available and functions properly after connecting !&lt;/p&gt;
&lt;p&gt;The service works good as the hid service, but the issue here is we want that custom service to be advertised, so when we scan with our app for this UUID (SM_SERVICE_UUID), the device should appear. not, for when we use a hid UUID to scan for our device, as any other nearby ble hid devices will also appear in the app.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Abdelali&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Adding a Custom service to the HID keyboard service [Advertising Issue]</title><link>https://devzone.nordicsemi.com/thread/233463?ContentTypeID=1</link><pubDate>Mon, 10 Feb 2020 09:27:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7a9cae4d-2d13-459d-80ef-8bb663de3620</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Have you defined the SM_SERVICE_UUID anywhere? It is not included in the UUID_SERVICES definitions in the ble_srv_commons.h header, where all the other UUID services (like BLE_UUID_HUMAN_INTERFACE_DEVICE_SERVICE, etc.)&amp;nbsp; are defined. I&amp;#39;m assuming this is what is the invalid parameter you&amp;#39;re seeing as an error. You can try defining the service as any of the existing ones to see if that gets rid of this error.&lt;/p&gt;
&lt;p&gt;You can also check out &lt;a href="https://github.com/maidenone/custom_ble_service_example"&gt;this custom_ble_service_example&lt;/a&gt;, originally made by one of my colleagues, but having been migrated to SDK v.15.3.0 by a member of the community. This example should explain in detail how you can include your custom service UUID into the advertisement.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>