Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Blueproximity in Perl?

by Tux (Canon)
on May 24, 2018 at 06:46 UTC ( [id://1215133]=perlquestion: print w/replies, xml ) Need Help??

Tux has asked for the wisdom of the Perl Monks concerning the following question:

Does anyone know of a perl implementation of what blueproximity (a python2 project) offers?

Not just because I prefer perl over python, but with openSUSE TumbleWeed moving from python2 to python3, this handy tool stopped working, and it is not easy to convert to python3. Besides that, I don't like digging into python problems, so if I can switch to something written in my beloved scripting language, even if it has nu GUI at all, I'll do so right away.


Enjoy, Have FUN! H.Merijn

Replies are listed 'Best First'.
Re: Blueproximity in Perl?
by bliako (Monsignor) on May 24, 2018 at 10:44 UTC

    have a look at this maybe:

    Bluetooth people presence detector :)

    by Juerd

    sounds like lots of fun and lots of possibilities but haven't test it myself.

    edit:

    bluez-test-discovery

    or modify Net::Bluetooth's get_remote_devices() to also report RSSI

      I have been playin with Juerd's script a bit already, but it suffers the same drawbacks as most other readily available solutions: it does not "see" my device. hcitool is listed as deprecated. It does not show my phone when scanning. bluetoothctl is working very well, but it needs root/sudo to connect to the phone to get the rssi data.

      When I get some time, I want to investigate an XS module that uses libbluetooth (just like Net::Bluetooth).


      Enjoy, Have FUN! H.Merijn

        Maybe one needs root access to enquire bluetooth device directly but this information usually is held/collected by the system in the same way as a wifi manager collects AND displays the signal strength of each neighbouring network. So a possibility would be to ask the window manager or whatever other manager instead of accessing system directly.

        Here is an example for gnome: https://wiki.gnome.org/Projects/Vala/DBusClientSamples If I understood correctly you need to detect mobile's presence from your opensuse desktop, so if you are using gnome then ask gnome for it.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1215133]
Approved by Discipulus
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (6)
As of 2024-04-23 13:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found