<?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>Advertizing 20 custom parameters as perfipheral - NRF52832 BLE</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/101624/advertizing-20-custom-parameters-as-perfipheral---nrf52832-ble</link><description>Dears, 
 
 Is it possible to rework the heart rate example (BLE) for the client and peripheral, so instead of heart rate to advertise and receive by the client 20 custom parameters (all they are uint16_t)? What changes shall I do (general conception)</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 10 Jul 2023 21:24:04 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/101624/advertizing-20-custom-parameters-as-perfipheral---nrf52832-ble" /><item><title>RE: Advertizing 20 custom parameters as perfipheral - NRF52832 BLE</title><link>https://devzone.nordicsemi.com/thread/435572?ContentTypeID=1</link><pubDate>Mon, 10 Jul 2023 21:24:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0c1f13e3-c618-4a04-9176-423f9aae9210</guid><dc:creator>StanislavDimitrov</dc:creator><description>&lt;p&gt;I looked at the ad[] structure and got the idea. Still, when looking at how those values are updated, I saw specific functions prepared and ending up with&amp;nbsp;bt_gatt_notify. So I need to prepare functions per each parameter and link it to bt_gat_notify? My intention is just to set 20 parameters and advertise them, change them in the main loop, and that&amp;#39;s all. The client should receive them. There were many parameters stated in uuid.h. Are there specific functions created for each of them, so I can use them to update the values?&lt;/p&gt;
&lt;p&gt;Exercise 2 from the nordic academy you pointed out looks promising. There, by pressing the button, you can change the advertised data. Can I do something similar but instead of a button, to wait for a character from the Serial interface and advertise the received character? Are there any restrictions (interrupts conflict, timers, etc that forbid using the advertising and the UART at the same time?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Advertizing 20 custom parameters as perfipheral - NRF52832 BLE</title><link>https://devzone.nordicsemi.com/thread/435416?ContentTypeID=1</link><pubDate>Mon, 10 Jul 2023 08:40:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6b74c4f4-5a86-4459-91a7-8eb99c4a362f</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;You must follow the definitions and flow for bt_data ad and bt_data sd to see how data is defined and added to the advertisement and scan response data structs.&amp;nbsp;&lt;a href="https://academy.nordicsemi.com/topic/blefund-lesson-2-exercise-1/"&gt;https://academy.nordicsemi.com/topic/blefund-lesson-2-exercise-1/ &lt;/a&gt;showcases how to do this with a minimal sample. Comparing this to the hr central sample you will see that there is defined multipled elements using BT_DATA_BYTES, where the last of them in the advertise data packet contains the custom Heart Rate Sensor value.&lt;/p&gt;
&lt;p&gt;Line 35 and 44 in main.c in central_and_peripheral_hr&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Advertizing 20 custom parameters as perfipheral - NRF52832 BLE</title><link>https://devzone.nordicsemi.com/thread/435247?ContentTypeID=1</link><pubDate>Fri, 07 Jul 2023 12:47:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2adbc662-2d40-4f26-9cce-f78c47de0b90</guid><dc:creator>StanislavDimitrov</dc:creator><description>&lt;p&gt;Thanks. It is clear about the limitations and will stick to them. Can you point out which files in the client and perirenal example for heart rate transmission in BLE&amp;nbsp; contain definitions of the advertised data sent and expected, so I can update them by adding additional parameters?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Advertizing 20 custom parameters as perfipheral - NRF52832 BLE</title><link>https://devzone.nordicsemi.com/thread/435222?ContentTypeID=1</link><pubDate>Fri, 07 Jul 2023 11:45:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:13b3245e-a77c-4ffa-960b-f8d6f16e1748</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The Advertisement PDU within a BLE packet does only have 37 bytes available for data, where 6 of these bytes are reserved for the Bluetooth address of the advertising data resulting in maximum 31 bytes of user data. 20x16 bits, or 40 bytes, will exceed this.&lt;/p&gt;
&lt;p&gt;Within the limitations I&amp;#39;ve just mentioned it should not be any issues to rework the sample to advertise other custom parameters instead&lt;/p&gt;
&lt;p&gt;See&amp;nbsp;&lt;a href="https://academy.nordicsemi.com/topic/advertisement-packet/"&gt;https://academy.nordicsemi.com/topic/advertisement-packet/ &lt;/a&gt;for more details&lt;/p&gt;
&lt;p&gt;PS: You can also add up to 31 bytes within a scan response pack so if you split your 40 bytes into these two types of packets you should be able to transmit the 40 bytes&lt;/p&gt;
&lt;p&gt;Let me know if this answers your questions&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>