Comments (8)
Alright so technically the collector works, but throws annoying warnings as it erroneously detects non-ruuvi packets as such, I will improve the detection logic based on this to get rid of the warnings, hopefully I find time for this already this weekend, latest next weekend (as that's when my vacation starts).
You can see the source MAC address from the bytes at offset 7-12 backwards, for example:
> 04 3E 2A 02 01 03 01 BC 7C 37 C4 4A F7 1E 02 01 06 1A FF 4C
is a packet originating from a device with MAC address of F7:4A:C4:37:7C:BC (the bytes are in reverse order). The 7 bytes before the MAC address is what the current logic uses to "detect" the data from ruuvi, which are in order:
- Packet type (04 = event)
- Event code (3E = LE Meta)
- Packet length
- Sub event (02 = LE Advertising Report)
- Number of Reports
- Event Type (03 = Non-Connectable undirected advertising)
- Peer Address Type (01 = Random Device Address)
from ruuvicollector.
Is this related to data format?
from ruuvicollector.
Thanks for reporting this, I haven't seen this before. It is possible that this is related to the data format, or that some other nearby Bluetooth LE device is broadcasting data that is really similar to the ruuvi data and then it's erroneously getting parsed as such.
The error happens when it attempts to read the sixth byte of the measurement, which is the other half of the pressure reading on all current data formats (2, 3 and 4) so likely the data is getting truncated for some reason if it's originating from a ruuvitag.
Can you send a sample of the BLE traffic you are getting so that I can investigate what causes this? You can do this by running the ruuvicollector (and see the errors coming), and at the same time in another terminal on the same machine, run hcidump --raw >> ble_dump.txt
let it run for a little time (5-10 seconds should be plenty enough with the default ruuvi broadcast interval) and stop it with ctrl + C and send the ble_dump.txt
from ruuvicollector.
Thanks for the quick reply!
Here is the ble_dump.txt:
HCI sniffer - Bluetooth packet analyzer ver 5.41
device: hci0 snap_len: 1500 filter: 0xffffffff
BLE dump:(deleted for not messing around)
from ruuvicollector.
There is another noticeable thing: LED of RuuviTag doesn't blink as once a second as RAW mode. So I'm not sure if it's the problem of switching between modes.
from ruuvicollector.
Thanks for the BLE dump. It seems that there are multiple devices that are broadcasting with the exact same packet type, event code, packet length, number of reports and event type, which is what the current logic uses to "detect" packets from Ruuvitags, this explains the error you are getting.
However I am not able to detect any other recognizable packets from ruuvitags.. which firmware are you using? and have you found out the MAC address of your ruuvitag(s)? for example with nRF Connect mobile application.
from ruuvicollector.
I'm using the original firmware (protocolVersion = 2) and I find their MAC address of ruuvitags. Actually, I got the formatted data in my influxDB. I just do not know where is the source of those exact same packet type, which makes Java throw those uncaught exceptions.
from ruuvicollector.
The immediate warnings (based on the provided BLE dump) should be gone now. Additionally I added support for blacklisting or whitelisting tags based on their MAC address in case something still causes issues, check the ruuvi-collector.properties.example for more information in case you need it
from ruuvicollector.
Related Issues (20)
- Feature: INVALID values should be stored as null HOT 2
- RuuviCollector gives up after BT HW error HOT 5
- Feature request/idea: Offset values to collected measurements HOT 1
- How to enable changes in ruuvi-names.properties correctly? HOT 1
- raw packet storing HOT 4
- BUG: No data received anymore from Ruuvitags after apt-get update/upgrade HOT 1
- Calibration of Temp and Humidity in Ruuvi Collector? HOT 4
- BUG:named-filter does not recognise ruuvi-names.properties HOT 1
- Feature request/idea: TagSocket support HOT 1
- BUG: java.net.UnknownHostException: <domain> HOT 7
- Feature request/idea: Insert to two influxUrl's HOT 3
- Feature request/idea: put receiver MAC or other unique identifier as tag
- Feature request/idea: temperatureOffset.MAC=nn HOT 5
- Feature request/idea: InfluxDB2 support HOT 3
- I am beginner programmer, but wanting to contribute HOT 3
- Exit uncleanly when database connection is lost HOT 6
- BLE scanning service HOT 1
- Humidity Conversion Formula -broken link -fix provided
- Feature request/idea: replace deprecated hcitool/hcidump
- BUG: Capabilties are not enough after raspberry pi os 12/2022 updates HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ruuvicollector.