Pinetime constantly displays passcode #8
Labels
No Label
Bug
Cantfix
Duplicate
Enhancement
External
Help Wanted
In Progress
Invalid
Question
Waiting
Waiting For Info
Waiting for Upstream
Wontfix
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: Elara6331/itd#8
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Built itd on PinePhone from git (
e88dea40fb
). PinePhone OS is Mobian.PineTime is running Infinitime 1.8.0.
Start itd with systemctl --user start itd
itd starts successfully, and connects to the watch. But then the watch quickly starts displaying passcodes, repeatedly in succession, obstructing any other use.
Log below:
Jan 20 09:55:34 mobian systemd[597]: Started InfiniTime Daemon (itd).
Jan 20 09:55:44 mobian itd[72664]: 9:55AM ERR Error getting firmware version error="Operation failed with ATT error: 0x0e"
Jan 20 09:55:44 mobian itd[72664]: 9:55AM INF Connected to InfiniTime version=
Jan 20 09:55:44 mobian itd[72664]: 9:55AM ERR Error sending notification to InfiniTime error="not connected"
Jan 20 09:55:44 mobian itd[72664]: 9:55AM ERR Error setting current time on connected InfiniTime error="not connected"
Jan 20 09:55:44 mobian itd[72664]: 9:55AM INF Initialized InfiniTime music controls
Jan 20 09:55:44 mobian itd[72664]: 9:55AM INF Relaying calls to InfiniTime
Jan 20 09:55:44 mobian dbus-daemon[710]: [session uid=1000 pid=710] Connection :1.2942 (uid=1000 pid=72664 comm="itd ") became a monitor.
Jan 20 09:55:44 mobian itd[72664]: 9:55AM INF Relaying notifications to InfiniTime
Jan 20 09:55:44 mobian itd[72664]: 9:55AM WRN Error getting BLE filesystem error="not connected"
Jan 20 09:55:44 mobian itd[72664]: 9:55AM INF Started control socket path=/tmp/itd/socket
Not a real solution, but probably a workaround:
Did you try adding your PT to the whitelist in the config file?
This likely has to do with the 1.8.0 infitime feature supporting secure bluetooth pairing.
The general idea is that itd should stop reconnecting when it detects that, so the user can input the pin into itd. Said pin then authenticates itd and should be stored in the config for further use
EDIT: A workaround would be to use something like "bluetoothctl" or another bluetooth manager to pair and connect it, handling the passcode and everything, then run itd (this should only really be needed the first pair)
(I'm the OP) Can confirm that pairing and connecting with bluetoothctl works around the issue. Thanks!
Yeah, I had to work around the fact that some DEs don't display the pin prompt properly by making my own bluez agent. The pairing code is currently not working very well. I am planning to work on that as soon as I have time.
There is no way to detect the pin having been displayed. The way it works is that when you try to pair, and InfiniTime asks for a pin, it runs a callback that shows the prompt for the pin.
Currently the main issue I have is that my code was designed before the pairing feature, so it doesn't handle that very well. I've been trying to redesign the pairing and reconnect code, but haven't had enough time to debug it.
I should hopefully have some time to do it soon.
The whitelist is meant to be used if you have multiple PineTimes and need to make sure it will only try to connect to specific ones. It won't help with this particular issue.
I think what I will do for now, since InfiniTime has made pairing optional, is add a config option to disable pairing, and set the default to false until I can fix the code.
I've rewritten the connect and reconnect code in
4c36144b0b
. That should theoretically fix it. Please notify me if it doesn't.Sorry that it took so long, I've had some mental health issues and I've only just been able to work on this today.
Closing as it appears to be fixed. If it is not, reopen or create a new issue and link to this one.
Built itd-git from AUR (
2f14e70721
) on Pinephone Pro w/ Manjaro/KDE.I first started
itd
with my watch already paired, and the daemon was working just fine. However, upon walking some distance away from my phone, this exact issue (unending successive BLE pair-codes appearing on watch) occurs.Restarting the daemon only causes it to crash with a single error:
FTL Error connecting to InfiniTime error="Authentication Failed"
. Performing a full re-pair inbluetoothctl
fixes this problem (until again walking too far away from the phone, and the process must be repeated).So long as a close distance to the phone is maintained, this doesn't seem to be an issue.