sandeepmistry / node-bleacon

A Node.js library for creating, discovering, and configuring iBeacons
MIT License
497 stars 88 forks source link

Big gaps between estimote stickers package reception on Macbook #49

Closed guillaumedenece closed 8 years ago

guillaumedenece commented 8 years ago

Hi everyone!

When I run a simple code on my macbook air to detect the sticker package, there are big gap of 2 or 3 minutes during which I don’t receive anything, and I then receive packages each 2 or 3 seconds, and then there is an other gap… I precise that there is only one sticker in range when I run my code. How can we explain it? And how is it possible to delete those gaps? Other question: Why does the package are not received regularly (1, 2 or 3 seconds) when there is no gap instead of the amount of time specified in the package interval setting of nearable package (when it is not in motion) ?

Thank you !

Guillaume


Here are the emission settings of my stickers: Nearable: Advertising interval (still): 1487ms Advertising interval (motion): 743ms

Estimote: Advertising interval (still): 5948ms Advertising interval (motion): 2974ms


Here is the code I’m running: (Node.js)

var i=0;

var EstimoteSticker = require('./estimote-sticker');

EstimoteSticker.on('discover', function(estimoteSticker) { if(estimoteSticker.id == "dd1abfef45fe6614") { i++; console.log(""); console.log(Date()); console.log(i); } });

var uuid = "D0D3FA86-CA76-45EC-9BD9-6AF4659A0A3D"; EstimoteSticker.startScanning(uuid);


And here is the log I obtain after running my code for a couple of minutes:

Mon Jun 13 2016 14:43:33 GMT-0500 (PET)

1

Mon Jun 13 2016 14:43:35 GMT-0500 (PET)

2

Mon Jun 13 2016 14:43:36 GMT-0500 (PET)

3

Mon Jun 13 2016 14:43:40 GMT-0500 (PET)

4

Mon Jun 13 2016 14:43:41 GMT-0500 (PET)

5

Mon Jun 13 2016 14:43:43 GMT-0500 (PET)

6

Mon Jun 13 2016 14:43:45 GMT-0500 (PET)

7

Mon Jun 13 2016 14:43:47 GMT-0500 (PET)

8

Mon Jun 13 2016 14:43:49 GMT-0500 (PET)

9

Mon Jun 13 2016 14:43:52 GMT-0500 (PET)

10

Mon Jun 13 2016 14:43:53 GMT-0500 (PET)

11

Mon Jun 13 2016 14:44:00 GMT-0500 (PET)

12

Mon Jun 13 2016 14:47:03 GMT-0500 (PET)

13

Mon Jun 13 2016 14:47:05 GMT-0500 (PET)

14

Mon Jun 13 2016 14:47:06 GMT-0500 (PET)

15

Mon Jun 13 2016 14:47:09 GMT-0500 (PET)

16

Mon Jun 13 2016 14:47:11 GMT-0500 (PET)

17

Mon Jun 13 2016 14:47:12 GMT-0500 (PET)

18

Mon Jun 13 2016 14:47:15 GMT-0500 (PET)

19

Mon Jun 13 2016 14:47:17 GMT-0500 (PET)

20

Mon Jun 13 2016 14:47:18 GMT-0500 (PET)

21

Mon Jun 13 2016 14:50:12 GMT-0500 (PET)

22

Mon Jun 13 2016 14:50:15 GMT-0500 (PET)

23

Mon Jun 13 2016 14:50:16 GMT-0500 (PET)

24

Mon Jun 13 2016 14:50:18 GMT-0500 (PET)

25

Mon Jun 13 2016 14:50:21 GMT-0500 (PET)

26

Mon Jun 13 2016 14:50:22 GMT-0500 (PET)

27

Mon Jun 13 2016 14:50:24 GMT-0500 (PET)

28

Mon Jun 13 2016 14:50:27 GMT-0500 (PET)

29

Mon Jun 13 2016 14:50:28 GMT-0500 (PET)

30

Mon Jun 13 2016 14:50:30 GMT-0500 (PET)

31

Mon Jun 13 2016 14:50:33 GMT-0500 (PET)

32

Mon Jun 13 2016 14:50:34 GMT-0500 (PET)

33

Mon Jun 13 2016 14:50:36 GMT-0500 (PET)

34

Mon Jun 13 2016 14:50:42 GMT-0500 (PET)

35

—> We can observe big lacks between:

————————————————————————————————————————————

I tried to run my code on a macbook pro at the same time and obtained that log:

Mon Jun 13 2016 14:43:24 GMT-0500 (PET)

3

Mon Jun 13 2016 14:43:29 GMT-0500 (PET)

4

Mon Jun 13 2016 14:43:33 GMT-0500 (PET)

5

Mon Jun 13 2016 14:43:35 GMT-0500 (PET)

6

Mon Jun 13 2016 14:43:36 GMT-0500 (PET)

7

Mon Jun 13 2016 14:43:39 GMT-0500 (PET)

8

Mon Jun 13 2016 14:43:41 GMT-0500 (PET)

9

Mon Jun 13 2016 14:43:45 GMT-0500 (PET)

10

Mon Jun 13 2016 14:43:47 GMT-0500 (PET)

11

Mon Jun 13 2016 14:43:48 GMT-0500 (PET)

12

Mon Jun 13 2016 14:43:51 GMT-0500 (PET)

13

Mon Jun 13 2016 14:43:57 GMT-0500 (PET)

14

Mon Jun 13 2016 14:44:09 GMT-0500 (PET)

15

Mon Jun 13 2016 14:45:58 GMT-0500 (PET)

16

Mon Jun 13 2016 14:46:03 GMT-0500 (PET)

17

Mon Jun 13 2016 14:46:12 GMT-0500 (PET)

18

Mon Jun 13 2016 14:46:21 GMT-0500 (PET)

19

Mon Jun 13 2016 14:46:45 GMT-0500 (PET)

20

Mon Jun 13 2016 14:46:48 GMT-0500 (PET)

21

Mon Jun 13 2016 14:46:54 GMT-0500 (PET)

22

Mon Jun 13 2016 14:46:57 GMT-0500 (PET)

23

Mon Jun 13 2016 14:47:03 GMT-0500 (PET)

24

Mon Jun 13 2016 14:47:04 GMT-0500 (PET)

25

Mon Jun 13 2016 14:47:09 GMT-0500 (PET)

26

Mon Jun 13 2016 14:47:12 GMT-0500 (PET)

27

Mon Jun 13 2016 14:49:34 GMT-0500 (PET)

28

Mon Jun 13 2016 14:49:41 GMT-0500 (PET)

29

Mon Jun 13 2016 14:49:44 GMT-0500 (PET)

30

Mon Jun 13 2016 14:49:46 GMT-0500 (PET)

31

Mon Jun 13 2016 14:49:47 GMT-0500 (PET)

32

Mon Jun 13 2016 14:49:52 GMT-0500 (PET)

33

Mon Jun 13 2016 14:49:53 GMT-0500 (PET)

34

Mon Jun 13 2016 14:49:56 GMT-0500 (PET)

35

Mon Jun 13 2016 14:49:59 GMT-0500 (PET)

36

Mon Jun 13 2016 14:50:02 GMT-0500 (PET)

37

Mon Jun 13 2016 14:50:10 GMT-0500 (PET)

38

Mon Jun 13 2016 14:50:34 GMT-0500 (PET)

39

—> We can observe big lacks between:

sandeepmistry commented 8 years ago

@guillaumedenece I suggest you look at the PacketLogger app which is part of Xcode hardware IO tools. It'll allow you to trace what the HCI adapter is reporting.

sandeepmistry commented 8 years ago

@guillaumedenece ping ...

sandeepmistry commented 8 years ago

Closing this due to lack of activity.