question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

The collector incorrectly tries to parse certain BLE packets that are similar to those sent by ruuvi

See original GitHub issue

Hi! I got this warning around every 3 second and no data was stored in the Influxdb: WARN [Main] Uncaught exception while handling measurements java.lang.ArrayIndexOutOfBoundsException: 5 at fi.tkgwf.ruuvi.handler.impl.AbstractEddystoneURL.handleMeasurement(AbstractEddystoneURL.java:74) at fi.tkgwf.ruuvi.handler.impl.AbstractEddystoneURL.read(AbstractEddystoneURL.java:36) at fi.tkgwf.ruuvi.Main.lambda$run$5(Main.java:122) at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) at java.util.LinkedList$LLSpliterator.forEachRemaining(LinkedList.java:1235) at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151) at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174) at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418) at fi.tkgwf.ruuvi.Main.run(Main.java:124) at fi.tkgwf.ruuvi.Main.main(Main.java:88)

Do you have any clues? Thanks!

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
Scrincommented, Jul 7, 2017

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)
0reactions
Scrincommented, Jul 16, 2017

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

OnResult with incorrect Data · Issue #3 · domints/ESP-Ruuvi ...
Hello. I am trying to read a RuuviTag with your program but I get the folllowing info from BLE, where I mostly read...
Read more >
Collecting RuuviTag measurements and ... - Ruuvi Forum
Ruuvi beacons are detected from the traffic and the sensor data is parsed from them and finally pushed to InfluxDB after adding some...
Read more >
Ruuvi sensors -> Ruuvi Gateway -> Home Assistant (Easy!)
Hey everyone! Let's discuss about easy to use Ruuvi integration on Home Assistant (and Home Assistant Core). If you're not yet familiar with ......
Read more >
RuuviCollector, Pi 4 problems - Ruuvi Forum
This means that the collector is properly receiving BLE data (anything, from any device). This confirms the hcitool and hcidump subcommands get ...
Read more >
Inconsistent data collection with RuuviCollector and Pi 4
I've been setting up my ruuvicollector using Raspberry Pi 4, ... dots on the graph looks like that data is missing for a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found