<?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>How to increase data transfer rate for BLE nrf51822 to raspberry pi?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/28740/how-to-increase-data-transfer-rate-for-ble-nrf51822-to-raspberry-pi</link><description>I am working on a project where i need to send sensor values from nrf51822 module to a raspberry pi. The sensor values are received by the nrf using I2C protocol.
I am using mbed compiler with the BLE.h and Gap.h libraries. I want to increase the data</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 05 Jan 2018 15:14:25 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/28740/how-to-increase-data-transfer-rate-for-ble-nrf51822-to-raspberry-pi" /><item><title>RE: How to increase data transfer rate for BLE nrf51822 to raspberry pi?</title><link>https://devzone.nordicsemi.com/thread/113881?ContentTypeID=1</link><pubDate>Fri, 05 Jan 2018 15:14:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4ae59e9f-59ff-496f-8e2b-fd7478ad9835</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;The connection handle is a unique index assigned to the connection when it is first established. BLE allows you to have multiple connections running at the same time, and you use the connection handles to keep them apart, and send commands to one connection or the other.
When you only have a single connection the connection handle is typically 0.&lt;/p&gt;
&lt;p&gt;I am not very familiar with the BlueZ api used on the RPi side, but according to the response in &lt;a href="https://stackoverflow.com/questions/45737594/changing-the-connection-interval-in-a-bluez-based-gatt-oriented-application"&gt;this stack overflow exchange&lt;/a&gt; the recommended way to change the connection parameters is to have the peripheral request it. In other words you shouldn&amp;#39;t have to do anything on the RPi side.&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to increase data transfer rate for BLE nrf51822 to raspberry pi?</title><link>https://devzone.nordicsemi.com/thread/113883?ContentTypeID=1</link><pubDate>Thu, 04 Jan 2018 12:57:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:de2f2d9b-4a42-418a-9cb5-2bbb23acdd2e</guid><dc:creator>Husain</dc:creator><description>&lt;p&gt;I tried this as well but still no improvement in results. I am a bit confused about the argument connHandle. Could you please explain it or suggest suitable articles to read upon it.
Will I have to tweak these connection parameters on the Rpi as well?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to increase data transfer rate for BLE nrf51822 to raspberry pi?</title><link>https://devzone.nordicsemi.com/thread/113880?ContentTypeID=1</link><pubDate>Wed, 03 Jan 2018 10:32:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:25ac3b57-ea2d-4d11-9802-565cc71d15a7</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;The mBed API&amp;#39;s should have a function called ble.updateConnectionParams(connHandle, connParams), which you can use to request a different set of connection parameters after the connection has been established.&lt;/p&gt;
&lt;p&gt;Could you try to call this function 5-10 seconds after connection establishment, and see if it is successful?&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to increase data transfer rate for BLE nrf51822 to raspberry pi?</title><link>https://devzone.nordicsemi.com/thread/113878?ContentTypeID=1</link><pubDate>Tue, 02 Jan 2018 13:32:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d76f8f90-cb73-4c11-bea3-b611060eae46</guid><dc:creator>Husain</dc:creator><description>&lt;p&gt;I have to transmit accelerometer (acc), magnetometer (mag), gyroscope (gyro) and temperature data.
I have 3 valeus for acc, mag and gyro along their 3 axes namely x, y and z. Along with these I am also sending the time value in ms by reading the timer. (Sending time value so as to compare it with the timer on Rpi). Thus a total of 3+3+3+1+1=11 values. Every value is an int thus 2 bytes. Stacking them in an array of 11 elements gives me an array of 22 bytes.
I have also added a loop where i can collect these sensor values multiple times say 10, hence that would make an array of 22*10.&lt;/p&gt;
&lt;p&gt;As suggested by you, I also included minConnectionInterval = 8 (10ms), maxConnectionInterval = 16 (20ms) and set these connection params using the ble.setPreferredConnectionParams() function before the connection being established. Yet the time does not change (still a difference of 140-150ms between consecutive values)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to increase data transfer rate for BLE nrf51822 to raspberry pi?</title><link>https://devzone.nordicsemi.com/thread/113882?ContentTypeID=1</link><pubDate>Tue, 02 Jan 2018 12:55:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d536643a-8d29-4eef-b26d-ab3fb0304f2d</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I think most of the mBed BLE libraries are connection based, including &lt;a href="https://os.mbed.com/teams/Bluetooth-Low-Energy/code/BLE_LED/?platform=Nordic-nRF51-DK"&gt;this one&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;How many bytes long is each sensor value?&lt;br /&gt;
It seems odd that adding multiple values together wouldn&amp;#39;t increase overall data rate, unless you are still breaking them up before sending them across the BLE link.&lt;/p&gt;
&lt;p&gt;As a general note, you might get better support for mBed specific questions by using the mBed forums. Since mBed is not a Nordic delivery we have limited experience with it.&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to increase data transfer rate for BLE nrf51822 to raspberry pi?</title><link>https://devzone.nordicsemi.com/thread/113879?ContentTypeID=1</link><pubDate>Thu, 28 Dec 2017 13:14:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:23685c93-2e8f-4e11-86a7-87c980c8bc27</guid><dc:creator>Husain</dc:creator><description>&lt;p&gt;Further doubts to your reply&lt;/p&gt;
&lt;p&gt;---&amp;quot;I assume you are connected when you want to transfer the data, and in this case it is the connection interval that is critical, not the advertising interval.&amp;quot;
Currently my advertising type is [GapAdvertisingParams::ADV_CONNECTABLE_UNDIRECTED]. I had read that the &amp;#39;undirected&amp;#39; mode takes a minimum of 100ms interval time. So i changed it to the &amp;#39;directed&amp;#39; mode. But, after doing so the raspberry pi(peripheral) couldn&amp;#39;t connect to the nrf51822(cental). How do I change this to connection mode from advertising mode? It will be really helpful if you could attach a code snippet that does so.&lt;/p&gt;
&lt;p&gt;---&amp;quot;You might want to consider packing multiple sensor updates into a single packet, to make the data transmission more efficient.&amp;quot;
I implemented this but the time interval for each sensor value still remains the same. Calculated this by sending a packet of 10 values which takes approx 1400ms and dividing by 10 yields 140ms&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to increase data transfer rate for BLE nrf51822 to raspberry pi?</title><link>https://devzone.nordicsemi.com/thread/113877?ContentTypeID=1</link><pubDate>Fri, 22 Dec 2017 10:13:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:01e33749-b2d7-457e-9825-551804edec87</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I assume you are connected when you want to transfer the data, and in this case it is the connection interval that is critical, not the advertising interval.&lt;/p&gt;
&lt;p&gt;The connection interval is typically set by defining a range of acceptable connection intervals, as described in this article:&lt;br /&gt;
&lt;a href="https://docs.mbed.com/docs/ble-intros/en/latest/Introduction/ConnectionParameters/"&gt;https://docs.mbed.com/docs/ble-intros/en/latest/Introduction/ConnectionParameters/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The minimum connection interval is 7.5ms, but not all BLE central devices will allow you to use the shortest connection intervals. You might want to consider packing multiple sensor updates into a single packet, to make the data transmission more efficient.&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;
Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>