Giter Site home page Giter Site logo

ts1 / bleunlock Goto Github PK

View Code? Open in Web Editor NEW
2.4K 20.0 145.0 677 KB

Lock/unlock your Mac with your iPhone, Apple Watch, or any other Bluetooth LE devices

Swift 90.94% C 1.99% Shell 3.62% Objective-C 1.82% Python 1.63%
swift macos bluetooth-low-energy ble corebluetooth

bleunlock's People

Contributors

alonewolfx2 avatar peiit avatar stephengroat avatar stephengroat-dd avatar tokfrans03 avatar ts1 avatar wenmin-wu avatar wxwern avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bleunlock's Issues

Option to disable Unlock

Would be great If I can disable the unlock option like the lock option.

Thanks for your work!

Keep getting flashbacks

BLEUnlock version: 1.10.2 (735), I also tried the latest pre-released version, its still not work.
System version: macOS 11.4
CPU: Apple Silicon M1

Exclude COVID-19 Exposure Notification

I did a quick test with the Big Sur beta and it seems that the UUIDs of the devices change every time I reboot macOS.
It needs to be changed so that the device can be identified by its MAC address as well.

Disable BLEunlock lock, not system lock

On a few occasions when watching things on my laptop (Macbook 12"), but not interacting with it, BLEunlock locked the laptop stating the BLE signal was lost. I then set Lock RSSI to Disable, however this appears to disable the macOS automatic lock too. It would be helpful if it disabled only the BLEunlock one, or an option to enable that.

mac 电脑安装之后无法彻底卸载?

安装之后开启开机自启动,退出软件,移动到废纸篓,并且清空废纸篓,然后重启,软件开机启动了,然后 app 早清除了,很迷惑,有什么办法彻底卸载吗,清空废纸篓后解压又点了一次,怎么感觉好像安装了两个,求彻底卸载方法

Long passwords seem to get truncated

It seems passwords are remembered up to 20 characters only. When my password was longer than that the app kept failing to log me in; it succeeded only after I had shortened mine.

If it's a design decision, I think you need to at least specify that in the readme.

Support iBeacon

I don’t know if this is a potential solution to #44, but it would be a solution to android phones not advertising a static mac address. There are any number of apps for Android that let you set them to transmit a BLE iBeacon advertisement. If BLEUnlock had a preference to allow it to scan for iBeacons, it would be able to support use with modern Android devices running such an app.

Here is a project that has macOS code for scanning for iBeacons - the release of the demo app from this project reliably identifies my Android iBeacon:

https://github.com/mlwelles/BeaconScanner

Save selected device

This is a feature request.

Problem:
After scanning for devices and selecting one to act as the proximity lock/unlock device, the device is not saved as a default that is always expected. After some time of the proximity unlock device being away and connected to other BLE devices, returning back to the comptuer with BLEUnlock installed on it results in no proximity login because BLEUnlock has 'forgotten' the selected device. The device holder then needs to re-scan and find the device again to set it as the proximity unlock device.

Possible Solution:
Being able to save the selected device (with mac address) as a default device that doesn't get forgotten by BLEUnlock. This is only possible if the bluetooth mac address or name doesn't change.

Stuck on scanning

I am unable to find a device, it just says scanning constantly. I'm on osx 10.13.6. Would there be anyway to fix this or is there anything i can run in the terminal to make this work?

Thanks in advance.

Documenting signal level displayed at the top of the menu

I thought the RSSI displayed at the top of the menu was the RSSI of the connected device, but that's not the case. For instance currently the RSSI displayed at the top of the menu is -50 dBm while the one showing for the connected device in the Device submenu is -56 dBm. So what is the main menu RSSI of?

Can I disable auto lock?

Hi, this project is wonderful. However I’m wondring can i disable auto lock function but only enable auto unlock? Thanks.

Display Bluetooth name instead of device name

My device is Iphone xs. There are multiple people in the company who use Iphone xs. In order to avoid the wrong choice, I modified my Bluetooth name. However, when I search for the device again, I cannot find my device (the modified Bluetooth name, even though
You can check the distance through dBm, but it is usually easy to confuse), so if you modify it to display according to the Bluetooth name, it will be very helpful to people like me, thank you!

Unlocking without change in proximity

Hey, is it possible to unlock without requiring a change in proximity? For example if you lock your device manually by starting screensaver but then change your mind and decide to unlock right away.

[Question] "Lock Screen Now" by script or command

Thank you for your great app!
Is it possible to get BLEULock to lock screen manually but wo mouse?
May be by executing some terminal command or by Apple Script (tell application BLEUnlock ....ets)?

add BLEUnlock to [home]brew?

Hello.
This is not an issue, but a feature request. It would be awesome if BLEUnlock would be available via brew install --cask bleunlock in brew.sh.
Thank you for your attention.

BLEU does not list my iPhone by its BlueTooth address for some reason.

I can't be sure what device I am linking to BLEU. There are two devices that show up but I think one device might be from a neighbor and the other BlueTooth address does not match the address as reported in my iPhone settings. How can I verify that it's my actual phone that I'm connecting to BLEU? I tried to do a walk away test and the screen did not lock at all with regards to my iPhone's proximity. This just seems a bit vague and I wish I had more certainty about linking my phone e.g. the BlueTooth addresses matching up. Can you shed some light on how to better match a device with BLEU?

Create a log

It would be helpful to have a log of the the fleeting notifications that BLEunlock occasionally display in case of issues with the signal. It would also be helpful, to narrow down any issue, to log the lock and unlock events.

Feature request: make unlock or lock optional

Currently BLEUnlock performs both an unlock and lock based on proximity, but it would be nice to have the capability to only do one, if one chooses.

By the way, thanks for making app!

Bluetooth can't see any device

BLEunlock entered the state 'lost -50'.
Device shows just 'Scanning'
Using Bluetooth Explorer, a search for Low Energy Devices is empty.

There are many BLE devices around. A search on the phone used as the connected device displays a long list.

Turning Bluetooth off and back on fixes this issue. BLEunlock becomes active again (though that doesn't generate any log message in the event log, it could be helpful to log transitions to Active state).

This has happened a few times since I've installed BLEunlock. I do not know if this is caused by BLEunlock or whether it happened before and BLEunlock has made this behaviour visible.

[Feature Request] Supply dBm value as script parameter

I have the script write events to a logfile. It would be useful for the script to also log the device dBm level at the time of the lock/unlock being triggered to assist with troubleshooting and determining correct dBm thresholds.

Doesn't seem to work in macOS Monterey

I have Monterey (Beta 5) currently on both my MacBook Air (M1), and iMac Pro (Intel) and on both systems the bluetooth list stays empty ('scanning...').
I have restarted Bluetooth and stuff.

[Feature request]Enable screen saver when automatically locked

Can you add an option to enable the screen saver when the RSSI lock is triggered instead of directly locking it?

It can be set in Security & Privacy-General to request a password immediately after entering the screen saver

When the RSSI unlock is triggered, the password is automatically entered and the screen saver is turned off

Is it possible to achieve? Thank you for your hard work!

Settings are greyed out

I'm on Big Sur 11.5.2
When I launch BLEUnlock everything is greyed out, I can't even quit the app.

Screen Shot 2021-09-02 at 11 59 37

can't find my phone

Thanks for your job!
I can find my watch in the list , but I can't find my Huawei mate30 phone.

I have tried this tool https://github.com/wzqcongcong/MacGuarder , it can detect my phone correctly . However, it may crash when the screen is locked.

By the way, if my watch is connected with my phone, it can't be found either..

Move computer away from bluetooth device

Consider this situation: when I work in room A, it's close to my Bluetooth device (phone), and for some reason, I need to move my computer to room B, but I didn't take my Bluetooth device together. So my computer locked (It should not)

My solution:
So, how about just add an idle delay time (I don't know how to name it), when I move my computer, I still use it in a short time, so set a timeout for idle time.

Doesn't work on macOS 11.4

After upgrading macOS from 11.3.1 to 11.4, BLEUnlock is no longer detecting devices.
Apple's Bluetooth Explorer also can't find LE devices or near-by devices.
I'm investigating the cause of the problem.

[question] BLE UUID broadcast if connected?

i have a garmin fenix 5 smartwatch which i want to use also to unlock my macbook
it works great IF the watch is not connected to my phone. if it's connected to the phone BLEunlock does not "see" the watch any more thus is unable to unlock the computer.
are you aware of any other device-unique ID which is still broadcasted even if the watch is connected to the phone (or a way to see all BLE broadcasted data so maybe i can fine one on my own)?
if this would work then the garmin would be a full replacement of the apple watch.

The device seems to change its MAC address at random

osx version:11.5.2 (20G95)
BLEUnlock version: 1.10.3 RC4

The Bluetooth MAC address of the phone that BLEUnlock scans appears to change randomly. I used another Bluetooth management tool to check the MAC address of the phone, which is correct, but the Bluetooth scanned MAC address appears to change randomly, so that mac address every change, it doesn’t work.

Script doesn't run

Hi,

I created the following empty file:

~/Library/Application Scripts/jp.sone.BLEUnlock/event

This I gave execution rights with chmod +x ~/Library/Application Scripts/jp.sone.BLEUnlock/event.
The following script I made to target Telegram:

#!/bin/bash

set -eo pipefail

notify() {
    CHAT_ID="78875539"
    BOT_TOKEN="93022144:AAEh5XHB1nUNJiyXDGdEEVrDJaIJ0lHwuNE"

    local MESSAGE=$1
    curl "https://api.telegram.org/bot$BOT_TOKEN/sendMessage?chat_id=$CHAT_ID&text=$MESSAGE"
}

case $1 in
    away)
        notify "$(hostname -s) is locked, iPhone is away."
        ;;
    lost)
        notify "$(hostname -s) is locked, iPhone cannot be found."
        ;;
    unlocked)
        notify "$(hostname -s) is unlocked, iPhone is back."
        ;;
    intruded)
        notify "$(hostname -s) is manually unlocked."
        ;;
esac

When I run it with ./event away I directly get an Telegram message.
Now I don't understand why it doesn't pick up when the application either locks or unlocks.

RSSI

I've switched to passive mode and the reported RSSI seems not as good as when in active mode. I've adjusted the lock and unlock threshold accordingly. I currently have an Unlock RSSI of -60 dBm.

However I noticed in the event log a few unlock events with a stated worse RSSI, such as 'unlocked -66'.

So there are several RSSI used in BLEunlock:

  • The instantaneous one shown in the Device list
  • The averaged one shown in the menu
  • The one used for comparison for locking events
  • The one used for comparison for unlocking events
  • The one reported for the different types of events in the log

I assumed the last three would be the instantaneous one, but as in some instances the one in the log is not compatible with the one used in comparison for unlocking, either there's another RSSI value or there's a bug in how it's reported in the interface or the log.

I didn't notice such an issue when I had it set to active mode.

(BLEunlock is otherwise working well so far since I switched to passive mode.)

Unlock only after interaction

I lock te machine manually (otherwise it sometimes lock and unlock automatically), but when I lock it manually, it often jumps back on when I walk away.

Is it possible to add some type of interaction? Like pressing any button (which normally shows the password screen), and only then auto unlock when the phone is near?

I think that would make it way more stable for me to avoid accidental unlocks.

[feature request] unlock by multiple devices

i find myself in the position that the enrolled device is in a different room and i need to enter the password.
would be great if one would be able to unlock the device using more than one device , e.g. phone & watch.

Doesn't work on Big Sur clean installation

If you have been using BLEUnlock on Catalina or earlier, then you upgraded to Big Sur on that installation, BLEUnlock works properly.
However, if Big Sur is newly installed cleanly and BLEUnlock is installed on it, BLEUnlock may not be able to detect the permanent UUID (or MAC address) of the device.
At least I've reproduced this with my iPhone.
BLEUnlock only receives temporary MAC addresses, so when the iPhone changes its temporary MAC address every 15 minutes, it loses track of the device.
This change in macOS behavior is critical for BLEUnlock, so I'm thinking of starting a new project based on IOBluetooth.

Can not find Huawei phone

My phone is huawei mate 40 pro, can BLEUnclock can not find my phone.
Even if it can detect, the id of blue tooth is not correct, and the signal will not change after a couple of seconds.

image
image
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.