Skip to content

HID over Bluetooth only types first character of credential #52

Closed

Description

@alberteinstein42

Phone is on Android 10 and password being sent to a Windows 10 machine.

Activity

  1. tejado commented on Feb 18, 2023

    @tejado
    Owner

    Which version do you use? The released one in a store or did you build it yourself?
    Do you have logcat of the Authorizer app during that time? It would be good if you can try this with a debug version and then paste the logcat to pastebin.

  2. alberteinstein42 commented on Feb 18, 2023

    @alberteinstein42
    Author

    I downloaded it from F-Droid. If you can point me to some debug version I can try it as well.

  3. tejado commented on Feb 19, 2023

    @tejado
    Owner

    I recently updated the bluetooth feature in Authorizer but it isn't released yet (it is just published as source in this repo). I will provide you a test release. Maybe today or in few days.

  4. alberteinstein42 commented on Feb 21, 2023

    @alberteinstein42
    Author

    @tejado can u tell me which last version had stable bluetooth feature, I just want to feel how good the bluetooth feature is in practice.

  5. tejado commented on Feb 21, 2023

    @tejado
    Owner

    None :) due to that I refactored the code and it should be much more stable plus I added additional features. Hopefully I can provide you a testing release tomorrow.

  6. tejado commented on Feb 23, 2023

    @tejado
    Owner

    Attached you find a signed debug version of Authorizer. It is still beta, as I changed a lot of things in recent weeks.
    This version not only includes Bluetooth Keyboard but as well FIDO U2F & WebAuthn. I will need to clean up the code in the next days before I create a PR.

    Please pair the devices only over "Preferences" -> "Bluetooth" - otherwise it can't correlate the specific Bluetooth profile (Keyboard or FIDO). If it is already paired, please unpair it and pair it over Authorizer.

    Please test this and I'm happy to read your feedback, e.g. also on the UI changes. If something is not working correctly, I'm happy to help. But my own tests on Pixel with Android 12 and 13 were already pretty good.

    Under Android 10, it could be a little bit problematic - maybe you need to activate "Location" otherwise the Bluetooth Scan inside Authorizer might not work. I was not able to test this well yet. Android 12 would be much better due to improvements in the Bluetooth stack, like permissions.

    Link to the debug version: authorizer-debug.zip

  7. alberteinstein42 commented on Feb 24, 2023

    @alberteinstein42
    Author

    Hi @tejado. Thank you for sharing the debug version.

    So, I installed the debug version.
    Unpaired the existing connection of Phone-PC.
    Tried to pair it through the Prefrences-Bluetooth activity. But after pin verification stage on both devices, the actual connection doesn't happen. i.e I don't see the "Bluetooth Device Connected" icon on my phone's taskbar.
    Clicking "Manual (RE-)CONNECT" doesn't seem to work in this situation. So I go to Phone Settings > Bluetooth > "Click on Paired Device". But then it refuses to connect saying "Couldn't connect".

    I manually unpaired both devices from each other's paired history, and restarted app, bluetooth toggle, flight-mode toggle and finally restated phone as well. But couldn't get the devices to connect through App's Bluetooth Activity. Interestingly, my phone wouldn't connect to the PC until I uninstalled the Authorizer app.

    At one instance I encountered - "Bluetooth HID stack is in unclean state - please stop and start Bluetooth in Android and try again."

    Since I uninstalled the App to check if my regular bluetooth connectivity was the issue, so I don't think I'd have the logs. But if you can guide me how to share debug logs, I'd try all that again and share the logs.

    Is it possible that my Phone doesn't support Bluetooth HID and that's why it doesn't connect to PC through the HID mode? Whereas currently the Phone and PC are connected for Calls-Audio.
    Phone is Samsung S9 on Android 10, PC is ThinkPad T440 on Win 10.

  8. tejado commented on Feb 24, 2023

    @tejado
    Owner

    Thanks a lot for the detailed testing.
    Depending on the Android version and phone, the bluetooth stack is more or less buggy. From my experience, later versions seems to be much more stable. E.g. the error "Bluetooth HID stack is in unclean state - please stop and start Bluetooth in Android and try again." is displayed when there is a certain Bluetooth State on the device that can't be resolved by Authorizer - then just disabling/enabling Bluetooth should help.
    Are you using any other app that might use Bluetooth at the same time as Authorizer?

    Additionally I have to improve the UI further. The "Manual (RE-CONNECT)" might not be necessary so I guess I will remove it.

    When you unpaired the device on your laptop: did you remove all connections? Normally there are two, like shown on the screenshot and both have to be unpaired:

    When you tried to pair the device over the Authorizer Bluetooth settings, what did not work? Why was the pairing not successul? Did it ask several times for the PIN even if you acknowledged it several times on both sides?

    I was successul testing it with Android 12 on a Samsung S8 and with a Android 10 on a Kingkong Mini 2. So there is hope for your S9 :) Are you using stock rom or LineageOS?

    By chance, also try to test this on your own test device - not on your smartphone what you use every day as then it is easier to provide all logs from the device without something sensitive in it.
    One way to get the logs is following app: https://f-droid.org/en/packages/com.dp.logcatapp/
    If your phone is rooted, that it is more easier - if not, you might need adb. An alternative is a terminal like Termux (https://f-droid.org/en/packages/com.termux/) if you feel confident on it, there you can execute logcat as well to get all the logs. Does this help you already for the logs part?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions