<?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>Send packets of data from my beacon</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/13976/send-packets-of-data-from-my-beacon</link><description>Hi! I want to send the temperature data that I get from the beacon sensor not one by one but in packets for example of 100 samples. I have followed this tutorial devzone.nordicsemi.com/.../ to create the service and everything else that is needed to send</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 20 May 2016 18:22:06 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/13976/send-packets-of-data-from-my-beacon" /><item><title>RE: Send packets of data from my beacon</title><link>https://devzone.nordicsemi.com/thread/53373?ContentTypeID=1</link><pubDate>Fri, 20 May 2016 18:22:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ddf19274-c123-4063-a69f-36f605537166</guid><dc:creator>Francesca</dc:creator><description>&lt;p&gt;Thank you very much!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Send packets of data from my beacon</title><link>https://devzone.nordicsemi.com/thread/53372?ContentTypeID=1</link><pubDate>Fri, 20 May 2016 13:48:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:08514a9e-7b99-49ea-b62e-a1b831a374a3</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;To send 2 packets of 20 bytes, you simply call sd_ble_gatts_hvx() two times.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Send packets of data from my beacon</title><link>https://devzone.nordicsemi.com/thread/53371?ContentTypeID=1</link><pubDate>Fri, 20 May 2016 13:28:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7ddf208d-8c73-42de-9235-dd32f8d906e3</guid><dc:creator>Francesca</dc:creator><description>&lt;p&gt;I would like to know how to add more than one packet (I have already tried and managed to send 1 packet of 20Bytes).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Send packets of data from my beacon</title><link>https://devzone.nordicsemi.com/thread/53370?ContentTypeID=1</link><pubDate>Fri, 20 May 2016 13:18:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:35530eea-0f5f-4a2a-8cb9-1a16301586c5</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;What kind of details do you want? If you have followed the tutorial you already have implemented the timer and the function to send the notification.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Send packets of data from my beacon</title><link>https://devzone.nordicsemi.com/thread/53369?ContentTypeID=1</link><pubDate>Fri, 20 May 2016 11:13:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d3098701-d9c0-465b-9b75-97e684b0e206</guid><dc:creator>Francesca</dc:creator><description>&lt;p&gt;Can you please detail a little more about this? let&amp;#39;s suppose that in the example of the temperature characteristic i want to read the temp every 100 ms, then fill two packet of 20 bytes and send them via notification once they are filled. How can i do this? Can you provide an example/extraction of code? Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Send packets of data from my beacon</title><link>https://devzone.nordicsemi.com/thread/53368?ContentTypeID=1</link><pubDate>Fri, 20 May 2016 10:37:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e175982f-c757-4e81-ac8f-762c3e3774cf</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;You are correct. You may also be able to send multiple packets (of 20 bytes) in each connection interval (7.5 ms) to achieve a higher data rate. How many packets you can send in a connection interval depends on the central device you are connecting to.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Send packets of data from my beacon</title><link>https://devzone.nordicsemi.com/thread/53367?ContentTypeID=1</link><pubDate>Fri, 20 May 2016 10:31:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eee3d174-da17-44ac-b213-d5c7275d9e32</guid><dc:creator>Francesca</dc:creator><description>&lt;p&gt;So if my data are 1 byte long, I cannot send more than 20 samples in a single packet? Because my problem is this: if i sample with the ADC (like in the temperature characteristic as said before) at a higher frequency than in the example (that is 1 Hz), let&amp;#39;s say 1 kHz, with the minumum connection interval (that is 7.5 ms) i can&amp;#39;t manage to get a sample every 1 ms and send it, because the maximum transmission frequency is 1/(7.5*10^-3); so i have to fill packets and transmit them with lower frequency than the sample frequency!  So if i can fill a packet of let&amp;#39;s say 100 samples, i can reach higher sampling frequencies and send by notification the packets. Is this correct? If so, this operation is limited by a maximum of 20 bytes packet? Thanks in advance!&lt;/p&gt;
&lt;p&gt;And also, when you say &amp;quot;collect samples&amp;quot; you mean to fill an array of values and then send it in the notification structure?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Send packets of data from my beacon</title><link>https://devzone.nordicsemi.com/thread/53366?ContentTypeID=1</link><pubDate>Fri, 20 May 2016 10:20:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:63dfc4e4-bfb3-4bd1-b187-c7ba4d8229a0</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;If you want to send more than 4 bytes, you need to modify the maximum length of the characteristic value, Step 2.H, Set characteristic length. If you want yo to send the data in notifications, this can be set up to 20 bytes.&lt;/p&gt;
&lt;p&gt;Then you just collect samples and call our_termperature_characteristic_update()/sd_ble_gatts_hvx() when you have the number of samples you want, max 20 bytes.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>