question

olafd avatar image
olafd asked

Spikes in data collected from Ruuvitags

Hi,


first, thanks to all for supporting Venus OS.


For the Ruuvitags I got often spikes in the collected data.

2022-02-spikes-in-data-collected-from-ruuvitags.png


Solution:

To reduce the Bluetooth-Speed to 460800 - from 921600 via

/etc/udev/rules.d/machine.rules


- ACTION=="add",SUBSYSTEM=="tty",KERNEL=="ttyS0",RUN+="/usr/bin/hciattach -t 10 /dev/ttyS0 bcm43xx 921600 noflow -"
+ ACTION=="add",SUBSYSTEM=="tty",KERNEL=="ttyS0",RUN+="/usr/bin/hciattach -t 10 /dev/ttyS0 bcm43xx 460800 noflow -"

~# ps -l|grep hciattach
S     0   359     1  1892    84 0:0   16:26 00:00:00 /usr/bin/hciattach -t 10 /dev/ttyS0 bcm43xx 460800 noflow -


Could this file please be changed in VenusOS?




Sources:

https://f.ruuvi.com/t/spikes-in-data-collected-with-rpi3/3669 //#5 August 10, 2019

https://ruuvi.com/setting-up-raspberry-pi-as-a-ruuvi-gateway/


Hardware: Raspberry 3B+

Software: VenusOS-Large-25

Venus OSNode-RED
3 comments
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

johnny-brusevold avatar image johnny-brusevold commented ·

@OlafD


Currently testing out ruuvi tags on pi4v1.4

Can not find anything on the net about reducing the speed for this.


ENV{BASE_COMPATIBLE}!="raspberrypi,4-model-b", GOTO="end-rpi4-model-b"
ACTION=="add",SUBSYSTEM=="tty",KERNEL=="ttyAMA0",RUN+="/usr/bin/hciattach /dev/ttyAMA0 bcm43xx 3000000 flow -"
LABEL="end-rpi4-model-b"
0 Likes 0 ·
olafd avatar image olafd johnny-brusevold commented ·

Hi @johnny-brusevold


For the Ruuvitags I reduced the Bluetooth-Speed to 460800 for all Rasperries.


ACTION=="add",SUBSYSTEM=="tty",KERNEL=="ttyAMA0",RUN+="/usr/bin/hciattach /dev/ttyAMA0 bcm43xx 460800 flow -"
### ACTION=="add",SUBSYSTEM=="tty",KERNEL=="ttyAMA0",RUN+="/usr/bin/hciattach /dev/ttyAMA0 bcm43xx 3000000 flow -"


But haven't tested it with a Pi 4 - I have no.


Hope that helps.

0 Likes 0 ·
johnny-brusevold avatar image johnny-brusevold olafd commented ·

Thanks for reply @OlafD

In my case none of this helped, but found the bug in the kernel bluteooth net driver, patched and tested that the errors are gone

0 Likes 0 ·
0 Answers