MilosKozak / ruffy

49 stars 196 forks source link

Cant Pair with Pump #14

Closed tobs51 closed 3 years ago

tobs51 commented 3 years ago

Hi, after a reset of my smartpone, i have lost the connection to my pump. I've tried everything from the AndroidAPS website without any success.

The problem ist that the pump doesn't display the key. I did it with the the branches:

The combo and pairing version shows the following error: "Failure running setPairingConfirmation:null"

I attached some screenshots and pictures of the pump. signal-2021-03-29-155637_001 signal-2021-03-29-155625_002 signal-2021-03-29-155625_001 signal-2021-03-29-155637_002

jotomo commented 3 years ago

You're removing the Combo from the phone's bluetooth devices after each pairing attempt, right? Was the Android version updated after you initially paired the Combo? Newer Android version seem to make pairing trickier. The dialog you're seeing (Bluethooth-Verbindungsanfrage) should be automatically confirmed by ruffy (the dialog to input the number the combo displays comes afterwards). Try just cancelling the dialog, I faintly remember that working to progress to the next dialog.

tobs51 commented 3 years ago

Thank you for the fast answer 😊 I've canceld the dialog and switched the windows that it disapear, but no success to. Now the pump displays the message that it was not able to connect.

Sorry i forgot my android Version is 9 With emui 9.1. 0.

tobs51 commented 3 years ago

Okay, i solved it. After some trys and a short code-review was the problem that the paring pin "}gZ='GD?gj2r|B}>" needs to be enterd. The first set by code seems not to work, but then i've enterd the pin manual and the pairing was a success. Maybe the pin has to be enterd after the "bond" again, i dont know..

jotomo commented 3 years ago

Thanks for reporting back. And sorry for not responding, I didn't really know how to debug remotely, with these issues stemming from different vendor BT implementations and ruffy using a pretty hacky way to do this. So ruffy failed to enter and confirm the PIN automatically, but taking over manually worked, nice. Did you have to copy and paste and the PIN to get it accepted, or was it fast enough to enter it via keypad manually?

tobs51 commented 3 years ago

Hi, no Problem. I've just wrote the key in a note and copy and past it. It's okay to do this in this for me, maybe you should add this way to connect to the trouble shooting.

Now I've got a New Problem, but i think it's a Problem With AndroidAps and my Android Version.

VinnieKnuckles commented 1 year ago

I need some help, please. Changed my phone, and now I'm trying to move everything. AndroidAPS app works fine, copied the same Ruffy app, but It doesn't connect to the pump. I followed the steps in the documentation, but didn't worked. I switched from Android 10 to Android 12 if it matters. (Xiaomi 12T Pro). Removed from old phone's saved bluetooth, new battery in pump, no AAPS installed on new phone, pump and new phone are close to each other... After some attempts from error 1 advanced to error 2. Thanks! FB_IMG_1679779953184 FB_IMG_1679779962873

jotomo commented 1 year ago

@VinnieKnuckles Pairing with ruffy really is a test of endurance. Sometimes it takes ten attempts. Sometimes it works better when using the pairing branch (when changing branches, just override the existing ruffy installation, DO NOT uninstall, this will remove the pairing). If you're comfortable running the development version of AndroidAPS then that's an option, since that version has a new implementation with better pairing and doesn't require ruffy anymore.

VinnieKnuckles commented 1 year ago

I've seen that version, but I didn't find the Github link to create the APK. Can you help me with the GIT link, please?

On Sun, Mar 26, 2023, 01:15 jotomo @.***> wrote:

@VinnieKnuckles https://github.com/VinnieKnuckles Pairing with ruffy really is a test of endurance. Sometimes it takes ten attempts. Sometimes it works better when using the pairing branch (when changing branches, just override the existing ruffy installation, DO NOT uninstall, this will remove the pairing). If you're comfortable running the development version of AndroidAPS then that's an option, since that version has a new implementation with better pairing and doesn't require ruffy anymore.

— Reply to this email directly, view it on GitHub https://github.com/MilosKozak/ruffy/issues/14#issuecomment-1483944243, or unsubscribe https://github.com/notifications/unsubscribe-auth/AUAXSG76P7FA2GYHV2RTGALW554ABANCNFSM4Z7U6EQA . You are receiving this because you were mentioned.Message ID: @.***>

jotomo commented 1 year ago

In Android Studio, with the ruffy project open, use the Git menu and there the branches entry and select pairing. Then rebuild and install. After a hopefully success pairing, switch back to the combo branch and reinstall that (or use the APK you're currently using).