schollz / howmanypeoplearearound

Count the number of people around you :family_man_man_boy: by monitoring wifi signals :satellite:
MIT License
6.92k stars 386 forks source link

Does not detect associated smart phones. #3

Open carstenschwede opened 7 years ago

carstenschwede commented 7 years ago

Thanks for the software, much appreciated!

AFAIK smart phones will only issue probe request when they are not currently connected to an access point. This might lead to a severe underestimation of the number of smart phones in areas where most phones are connected to an AP (e.g. bars with open WiFi, universities, ...). Not sure how this applies to Bluetooth.

Maybe this is worth a note in the README?

schollz commented 7 years ago

AFAIK smart phones will only issue probe request when they are not currently connected to an access point.

This might depend on the OS and phone but I can see its not true for any of the phones I've tried (Pixel, LG, iPhone). @carstenschwede does it not detect your smartphone when its associated?

I've seen that phones affiliated with an access point do send out probe requests to see if there is a stronger wifi connection that they can switch to. The rate that this occurs is slower, but usually within 3 minutes in my tests. When idling it happens less frequently (maybe every 10 minutes).

carstenschwede commented 7 years ago

Interesting. I remember this being the case for an iPhone 4. Maybe the intervals get longer once the smart phone is connected - I don't think that I waited more than a couple of minutes and I probably wrongly deduced that they won't send out any requests at all. I will check again with my current phone.

dv336699 commented 7 years ago

It won't detect my Samsung S6 Edge, only Apple devices. One of them is my Macbook.


[
  {
    "rssi": -70.0,
    "company": "Apple, Inc.",
    "mac": "xx:xx:xx:xx:xx:xx"
  },
  {
    "rssi": -51.0,
    "company": "Apple, Inc.",
    "mac": "xx:xx:xx:xx:xx:xx"
  },
  {
    "rssi": -49.0,
    "company": "Apple, Inc.",
    "mac": "xx:xx:xx:xx:xx:xx"
  },
  {
    "rssi": -52.0,
    "company": "Apple, Inc.",
    "mac": "xx:xx:xx:xx:xx:xx"
  }
]
schollz commented 7 years ago

@diego-vieira Can you try adding the -v flag and seeing if anything Samsung related is in the output?

dv336699 commented 7 years ago

@schollz unfortunately no. Don't worry, might be something with the router or the way Samsung deals with packets dunno.

Here's the log tho.

[                                                  ] 0%    1min 0s left['/usr/local/bin/tshark', '-I', '-i', u'en0', '-a', u'duration:60', '-w', '/tmp/tshark-temp']

[                                                  ] 0%        60s left
[==================================================] 100%         0s left
['/usr/local/bin/tshark', '-r', '/tmp/tshark-temp', '-T', 'fields', '-e', 'wlan.sa', '-e', 'wlan.bssid', '-e', 'radiotap.dbm_antsignal']

(u'xx:xx:xx:xx:xx:xx', 'Elitegroup Computer Systems Co.,Ltd.', False)
(u'xx:xx:xx:xx:xx:xx', 'Apple, Inc.', True)
(u'xx:xx:xx:xx:xx:xx', 'Elitegroup Computer Systems Co.,Ltd.', False)
(u'xx:xx:xx:xx:xx:xx', 'Elitegroup Computer Systems Co.,Ltd.', False)
(u'xx:xx:xx:xx:xx:xx', 'Elitegroup Computer Systems Co.,Ltd.', False)
(u'xx:xx:xx:xx:xx:xx', 'Dell Inc.', False)
(u'xx:xx:xx:xx:xx:xx', 'Synology Incorporated', False)
(u'xx:xx:xx:xx:xx:xx', 'NETGEAR', False)
(u'xx:xx:xx:xx:xx:xx', 'Synology Incorporated', False)
(u'xx:xx:xx:xx:xx:xx', 'Dell Inc.', False)
(u'xx:xx:xx:xx:xx:xx', 'WatchGuard Technologies, Inc.', False)
(u'xx:xx:xx:xx:xx:xx', 'TP-LINK TECHNOLOGIES CO.,LTD.', False)
(u'xx:xx:xx:xx:xx:xx', 'TP-LINK TECHNOLOGIES CO.,LTD.', False)
(u'xx:xx:xx:xx:xx:xx', 'Elitegroup Computer Systems Co.,Ltd.', False)
(u'xx:xx:xx:xx:xx:xx', 'Dell Inc.', False)
(u'xx:xx:xx:xx:xx:xx', 'Hewlett Packard', False)
(u'xx:xx:xx:xx:xx:xx', 'ASUSTek COMPUTER INC.', False)
(u'xx:xx:xx:xx:xx:xx', 'Elitegroup Computer Systems Co.,Ltd.', False)
(u'xx:xx:xx:xx:xx:xx', 'Dell Inc.', False)
(u'xx:xx:xx:xx:xx:xx', 'Elitegroup Computer Systems Co.,Ltd.', False)
(u'xx:xx:xx:xx:xx:xx', 'Dell Inc.', False)
(u'xx:xx:xx:xx:xx:xx', 'Elitegroup Computer Systems Co.,Ltd.', False)
(u'xx:xx:xx:xx:xx:xx', 'Dell Inc.', False)
(u'xx:xx:xx:xx:xx:xx', 'Elitegroup Computer Systems Co.,Ltd.', False)
(u'xx:xx:xx:xx:xx:xx', 'Hewlett Packard', False)
(u'xx:xx:xx:xx:xx:xx', 'Elitegroup Computer Systems Co.,Ltd.', False)
(u'xx:xx:xx:xx:xx:xx', 'Apple, Inc.', True)
(u'xx:xx:xx:xx:xx:xx', 'Elitegroup Computer Systems Co.,Ltd.', False)
(u'xx:xx:xx:xx:xx:xx', 'Dell Inc.', False)
[
  {
    "rssi": -85.0, 
    "company": "Apple, Inc.", 
    "mac": "xx:xx:xx:xx:xx:xx"
  }, 
  {
    "rssi": -52.0, 
    "company": "Apple, Inc.", 
    "mac": "xx:xx:xx:xx:xx:xx"
  }
]
There are about 3 people around.