Changing the broadcasting interval


#1

Hi,
I need to get the acceleration data with higher rate and the maximum rate I can get now is 1 Hz in Raw mode. Is there any way I could change the broadcasting Interval?

Br,
BB


Getting data at higher sampling rate with RuuviTag and Raspberry Pi
#2

Yes, though for now it means you need to compile the firmware yourself with the changes. The advertising intervals are defined in bluetooth_application_config.h and the minimum allowed interval is 100ms or 10Hz. If you need faster than that, you need to modify the firmware further and send multiple accelerometer samples in one advertisement.


#3

Hi Scrin,
Thanks for the prompt reply.
Where can I get the firmware source code of Ruuvitag?
And do I need to use Jtag debugger to flash the new firmware to the beacon?
We are working at Aalto university for a project related to activity recognition and tracking for construction sites and we try to use some Ruuvitag beacons. I appreciate your help.
BR,
BB


#4

The readme contains info regarding compiling and the options of flashing, but in general you can just create a DFU zip of your version of the firmware and flash that over bluetooth. For advanced development and debugging the devkit makes things a lot more easier, but for “just” changing the interval parameters simply creating a DFU is easy enough.

Do note that the current HEAD of master branch is much ahead of the latest “stable firmware” shipped with the tags at the moment (most notable difference is the use of “raw v2” (data format 5) rather than the original raw (data format 3)). If I recall correctly, the “v1-backports” branch is the one using the “original raw format”


#5

Hi Scrin, is there any manual or instruction on how to setup my development environment with ruuvitag_fw and the devkit?
I need to do similar things like BB: change a few parameters and also change the order of bytes inside the raw_v1 protocol


#6

EasyConnected:
Just curious: what changes/order are you interested in changing?
Rather complete instructions for setting up toolchain are at https://github.com/ruuvi/ruuvitag_fw
You may not need devkit.


#7

The github repo linked by @dgerman contains pretty much all necessary details, and additionally there’s a short blogpost about setting up the development environment here: https://blog.ruuvi.com/ruuvitag-dev-environment-e4b16e2d59e9


#8

Hi Scrin,

I tried to compile the “ruuvitag_fw” by following the instruction but it throws an error during the compile.

In file included from …/…/…/…/…/nRF5_SDK_12.3.0_d7731ad/components/libraries/timer/app_timer_appsh.h:44:0,
from …/…/…/…/…/drivers/lis2dh12/lis2dh12.h:19,
from …/…/…/…/…/drivers/lis2dh12/lis2dh12.c:14:
…/…/…/…/…/drivers/lis2dh12/lis2dh12.c:49:15: error: ‘lis2dh12_timer_id’ defined but not used [-Werror=unused-const-variable=]
APP_TIMER_DEF(lis2dh12_timer_id); /** Creates timer id for our program **/
^
…/…/…/…/…/nRF5_SDK_12.3.0_d7731ad/components/libraries/timer/app_timer.h:141:33: note: in definition of macro 'APP_TIMER_DEF’
static const app_timer_id_t timer_id = &timer_id##_data
^~~~~~~~
cc1: all warnings being treated as errors
…/…/…/…/…/nRF5_SDK_12.3.0_d7731ad/components/toolchain/gcc/Makefile.common:134: recipe for target ‘_build/eddystone_lis2dh12.c.o’ failed
make[1]: *** [_build/eddystone_lis2dh12.c.o] Error 1

Do you know what is the problem? It should compile! And I have “nordic sdk” and “micro-ECC” inside SDK.

Thanks

Br,
BB


#9

Hi,
It seems that I needed to comment out this line:
//APP_TIMER_DEF(lis2dh12_timer_id);

in driver/lis2dh12/lis2dh12.c

Br,
BB