Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using a small ble usb transmitter #3

Closed
PianSom opened this issue Aug 9, 2018 · 4 comments
Closed

Using a small ble usb transmitter #3

PianSom opened this issue Aug 9, 2018 · 4 comments
Assignees
Labels
question Further information is requested

Comments

@PianSom
Copy link

PianSom commented Aug 9, 2018

Hello Andrew

Following a suggestion on the HA forum, I purchased a few small ble transmitters, with a view to trying the in a car as an arrival sensor. This is the hardware

I am having some issues with the script recognising them. In particular, it doesn't! Though, looking at the logs, my suspicion is that the powering on of a device does trigger a scan.

If I run (on a Pi, not a Pi Zero running monitor) the command
sudo hcitool lescan & \; sudo hcidump
then I get the output

LE Scan ...
98:7B:F3:49:BA:71 (unknown)
98:7B:F3:49:BA:71 ebeoo-49BA71
<other devices redacted>

(Note that the first MAC address returned does not have a name, whereas the second returns the name of the device.)

If, on the same Pi, I run
hcitool name 98:7B:F3:49:BA:71
then nothing is returned.

This makes me wonder whether the device reliably returns its name to the monitor script. Do you have any thoughts on this behaviour? What information can I supply to assist with any diagnosis?

(FWIW my suspicion is that the transmit power on these things is going to be too low to usefully use in my car anyway.)

@andrewjfreyer
Copy link
Owner

You won't see iBeacons in the standard lescan output. We have to process raw packets coming out of hcidump --raw

If you run monitor from the command line with the beacon flag -b, do you see any of the beacons?

@andrewjfreyer andrewjfreyer self-assigned this Aug 9, 2018
@andrewjfreyer andrewjfreyer added the question Further information is requested label Aug 9, 2018
@PianSom
Copy link
Author

PianSom commented Aug 9, 2018

Hi

Yes, it finds it:

Starting monitor.sh (v. 0.1.481)...
> beacon scan mode enabled
> preference: delay between scans = 3
> preference: periodic arrive/depart check interval = 90
> preference: periodic arrive interval = 90
> preference: periodic depart interval = 120 
> preference: database refresh interval = 120
> preference: max arrival scan attempts = 2
> preference: max depart scan attempts = 4
> preference: random advertisement expiration = 35
> stopping other instances of 'monitor.sh'
0.1.481 04:40:51 pm [CMD-BEAC]	98:7B:F3:4A:99:7C 00000000-0000-0000-C000-000000000028 1 1 ebeoo-4A997C  Unknown
0.1.481 04:40:54 pm presence/owner/pi0kit/00000000-0000-0000-C000-000000000028-1-1 { version : 0.1.481, confidence : 100, name : ebeoo-4A997C , timestamp : Thu Aug 09 2018 16:40:51 GMT+0100 (BST), manufacturer : Unknown , type : iBeacon ,"type":"iBeacon", "rssi":"-53", "power":"-59" } 

(This, I think, is a different beacon from my first post.)

@PianSom
Copy link
Author

PianSom commented Aug 9, 2018

So, is it possible to scan for both normal bluetooth devices and simultaneously for beacons? Or is it either/or?

EDIT - oh yes, it is. So all I need to do is add the -b flag. Thanks!

@andrewjfreyer
Copy link
Owner

unless I've misunderstood, it seems that the ibeacons are working. yay! I'll close the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants