Servus,
gerade wollte ich ein Gigaset G-Tag einrichten. hcitool findet es ohne Probleme:
% sudo hcitool lescan
LE Scan ...
58:9E:C6:20:3C:A9 Gigaset G-tag
Presence-Gerät habe ich angelegt:
defmod bibi.tag PRESENCE local-bluetooth 58:9E:C6:20:3C:A9
attr bibi.tag room Maschinenraum
setstate bibi.tag absent
setstate bibi.tag 2020-08-25 18:15:07 .absenceThresholdCounter 0
setstate bibi.tag 2020-08-25 18:15:07 .presenceThresholdCounter 0
setstate bibi.tag 2020-08-25 18:07:33 model local-bluetooth
setstate bibi.tag 2020-08-25 18:15:07 presence absent
setstate bibi.tag 2020-08-25 18:15:07 state absent
Aber state ist immer "absent". Das hier steht bei verbose=5 im log:
2020.08.25 18:35:28 5: PRESENCE (bibi.tag) - executing: hcitool name 58:9E:C6:20:3C:A9
2020.08.25 18:35:33 4: PRESENCE (bibi.tag) - hcitool returned:
2020.08.25 18:35:33 5: PRESENCE (bibi.tag) - blocking scan result: bibi.tag|0|absent
2020.08.25 18:35:33 4: PRESENCE (bibi.tag) - rescheduling next check in 30 seconds
2020.08.25 18:36:03 5: PRESENCE (bibi.tag) - stopping timer
2020.08.25 18:36:03 5: PRESENCE (bibi.tag) - starting blocking call for mode local-bluetooth
2020.08.25 18:36:03 5: PRESENCE (bibi.tag) - starting bluetooth scan: bibi.tag|58:9E:C6:20:3C:A9|0|
2020.08.25 18:36:03 5: PRESENCE (bibi.tag) - found standard variant of ps command, using "ax" as parameter
2020.08.25 18:36:03 4: PRESENCE (bibi.tag) - executing: which hcitool
2020.08.25 18:36:03 4: PRESENCE (bibi.tag) - 'which hcitool' returns: /usr/bin/hcitool
Was mache ich falsch?
bei mir laufen die G-Tag als LE devices mit dem lepresenced
defmod gtag_red PRESENCE lan-bluetooth 7C:2F:80:xx.xx.xx 192.168.123.241:5333 10 60
dazu muss natürlich auch der lepresenced irgendwo laufen (in meinem Beispiel auf 192.168.123.241)
Gib mal "help presence" ein, da ist das beschrieben.
Danke, local-bluetooth scheint nicht für ble beacons zu funktionieren...
ja, darum ist das ja auch entsprechend dokumentiert :)