Code Monkey home page Code Monkey logo

Comments (7)

Steppschuh avatar Steppschuh commented on May 27, 2024 1

This should be fixed in PR #88. I've added your advertising data to the IBeaconTest.

from ble-indoor-positioning.

Steppschuh avatar Steppschuh commented on May 27, 2024

That sounds quite strange.

The BeaconView will only use the minor if the specified beacon is an instance of IBeacon. The major and minor must be values between 0 and 65535 and thus can never be negative. If they are, please let me know how to reproduce the issue.

Besides that, even if the value of colorIndex is negative, that shouldn't be an issue (as we are using the modulo operator).

colorIndex %= MATERIAL_DESIGN_COLOR_RESOURCE_IDS.length;
return getInstance().materialDesignDarkColors[colorIndex];

from ble-indoor-positioning.

hadiidbouk avatar hadiidbouk commented on May 27, 2024

You can see below that the minor is a negative value when create a beacon from
BeaconManager.getBeacon(macAddress, advertisingPacket.getBeaconClass());

screen shot 2018-06-11 at 11 58 57 am

And you can follow this scenario to check how the app crash :

1 -
screen shot 2018-06-11 at 11 55 31 am

2 -
screen shot 2018-06-11 at 11 56 11 am

3 -
screen shot 2018-06-11 at 11 56 36 am

4 -
screen shot 2018-06-11 at 12 04 41 pm

It seems that there is something not finished yet in background, because when waiting a while everything works fine.

from ble-indoor-positioning.

Steppschuh avatar Steppschuh commented on May 27, 2024

Could you let me know the raw byte array of advertising data from your beacon? I'll add it as a test case to figure out what could be causing the negative minor.

I also just realised that in Java, the % operator is not modulo, as I expected, but instead returns the remainder (according to StackOverflow). I'll add a fix for that.

from ble-indoor-positioning.

hadiidbouk avatar hadiidbouk commented on May 27, 2024

Sure here you go, it's a kontakt beacon but not the pro version.

0 = 2
1 = 1
2 = 6
3 = 26
4 = -1
5 = 76
6 = 0
7 = 2
8 = 21
9 = -111
10 = 20
11 = -42
12 = 26
13 = 103
14 = -47
15 = 17
16 = -24
17 = -83
18 = -64
19 = -6
20 = 122
21 = -32
22 = 27
23 = -66
24 = -68
25 = 100
26 = -16
27 = -113
28 = 90
29 = -59
30 = 8
31 = 9
32 = 75
33 = 111
34 = 110
35 = 116
36 = 97
37 = 107
38 = 116
39 = 2
40 = 10
41 = 4
42 = 10
43 = 22
44 = 13
45 = -48
46 = 119
47 = 99
48 = 74
49 = 111
50 = 52
51 = 50
52 = 100
53 = 0
54 = 0
55 = 0
56 = 0
57 = 0
58 = 0
59 = 0
60 = 0
61 = 0

Java sucks.

from ble-indoor-positioning.

Steppschuh avatar Steppschuh commented on May 27, 2024

Based on your data and the current implementation, I get the following when parsing as an iBeacon advertising packet:

IBeacon Advertising Packet (Proximity UUID: 9114d61a-67d1-11e8-adc0-fa7ae01bbebc Major: 25840 Minor: -28838 RSSI at 1m: -59)

Could you let me know which values you actually configured for that beacon?

from ble-indoor-positioning.

hadiidbouk avatar hadiidbouk commented on May 27, 2024

Sure here you go

Proximity UUID: 9114d61a-67d1-11e8-adc0-fa7ae01bbebc
Major: 25840
Minor: 36698
Advertising Interval: 625
RSSI @ 1m: -59
TX Power: 4dBm

from ble-indoor-positioning.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.