Author Topic: BLE Sending Rate  (Read 892 times)

Johnny1010

  • RFduino Newbie
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
BLE Sending Rate
« on: June 24, 2016, 05:06:42 AM »
Hi Guys,

I am running a simple code on my rfduino
Code: [Select]
[code]
void loop() {
RFduinoBLE.sendInt(i++);
}
[/code]

I am sending an increment on my android phone to see if there is any drop in samples sent. I am missing a lot of samples after every four samples. Is it the limitation of the ble or what else could be the reason.

Thanks in advance.


tolson

  • Global Moderator
  • *****
  • Posts: 806
  • Karma: +18/-0
    • View Profile
    • Thomas Olson Consulting
Re: BLE Sending Rate
« Reply #1 on: June 29, 2016, 04:14:15 PM »
So simple we can only guess what else is going on. How about providing a sketch that is complete to the point it shows how to replicate your findings.

Johnny1010

  • RFduino Newbie
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: BLE Sending Rate
« Reply #2 on: June 30, 2016, 04:13:18 AM »
Thanks for the reply tolson. Here is the rfduino sketch:

Code: [Select]

#include<RFduinoBLE.h>

int i=0;



void setup() {
   
    RFduinoBLE.advertisementData = "rfd";
    RFduinoBLE.deviceName="abc";
    RFduinoBLE.txPowerLevel = +4;
    RFduinoBLE.begin();
   
}




// ================================================================
// ===                    MAIN PROGRAM LOOP                     ===
// ================================================================

void loop() {
 RFduinoBLE.sendInt(i++);

}



When I add a delay of 15 ms in my code then no readings are missed.

wookie1

  • RFduino Jr. Member
  • **
  • Posts: 23
  • Karma: +0/-0
    • View Profile
Re: BLE Sending Rate
« Reply #3 on: June 30, 2016, 12:36:40 PM »
What are you using to read the values on your phone? Is it the Nordic tools, or an app you created?

Johnny1010

  • RFduino Newbie
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: BLE Sending Rate
« Reply #4 on: July 01, 2016, 09:31:27 AM »
I am using the rfduino test app you can find it here

http://forum.rfduino.com/index.php?topic=44.0


tolson

  • Global Moderator
  • *****
  • Posts: 806
  • Karma: +18/-0
    • View Profile
    • Thomas Olson Consulting
Re: BLE Sending Rate
« Reply #5 on: July 01, 2016, 03:47:33 PM »
When you think about it, the radio is only on for 5ms at a time with something  like 25ms between activity for other things to do. So without a whole bunch of FIFO handshaking going on you are most likely oversaturating the air waves. So the radios
only pick up what is in the air at the time the radio kicks in. You can either throttle your application down or implement some kind of reliable packet exchange technique much like TCP instead of UDP.