HPlus unable to connect with device #642

Closed
by jafal99 opened 4 years ago · 18 comments
jafal99 commented 4 years ago (Migrated from github.com)
Owner

Before opening an issue please confirm the following:

  • I have read the wiki, and I didn't find a solution to my problem / an answer to my question.
  • I have searched the issues, and I didn't find a solution to my problem / an answer to my question.

Your issue is:

Gadgetbridge is detecting device recognize it as Makibes (I use the same stock app as for F68) but I'm unable to connect the device - configuration dialog is not opening. Occasionally I'm receiving info about invalid pin code

gadgetbridge.log.txt

Your wearable device is:

Please specify model and firmware version if possible
SPORT S928 v1.30

Your android version is:

5.1

Your Gadgetbridge version is:

#0.18.4

New issues about already solved/documented topics could be closed without further comments. Same for too generic or incomplete reports.

#### Before opening an issue please confirm the following: - [X] I have read the [wiki](https://github.com/Freeyourgadget/Gadgetbridge/wiki), and I didn't find a solution to my problem / an answer to my question. - [X] I have searched the [issues](https://github.com/Freeyourgadget/Gadgetbridge/issues), and I didn't find a solution to my problem / an answer to my question. #### Your issue is: Gadgetbridge is detecting device recognize it as Makibes (I use the same stock app as for F68) but I'm unable to connect the device - configuration dialog is not opening. Occasionally I'm receiving info about invalid pin code [gadgetbridge.log.txt](https://github.com/Freeyourgadget/Gadgetbridge/files/895858/gadgetbridge.log.txt) #### Your wearable device is: *Please specify model and firmware version if possible* SPORT S928 v1.30 #### Your android version is: 5.1 #### Your Gadgetbridge version is: #0.18.4 *New issues about already solved/documented topics could be closed without further comments. Same for too generic or incomplete reports.*
jpbarraca commented 4 years ago (Migrated from github.com)
Owner

According to the log GB never tries to connect to the device. Can you enable and disable BT, and then try again?

According to the log GB never tries to connect to the device. Can you enable and disable BT, and then try again?
jafal99 commented 4 years ago (Migrated from github.com)
Poster
Owner

After discovering (it takes quite long) H+ icon with device name is displayed but when tapping on it nothing happens - configure dialog is not open and device is not added to the list.
hplus-log.zip
After lot of taps i received invalid pin message. Log is bellow
new-log.zip

After discovering (it takes quite long) H+ icon with device name is displayed but when tapping on it nothing happens - configure dialog is not open and device is not added to the list. [hplus-log.zip](https://github.com/Freeyourgadget/Gadgetbridge/files/900415/hplus-log.zip) After lot of taps i received invalid pin message. Log is bellow [new-log.zip](https://github.com/Freeyourgadget/Gadgetbridge/files/900500/new-log.zip)
Owner

Can you try pairing your device in the Android pairing dialog and then click it again in the discovery dialog? I think we should make the pairing optional because some devices don't need it or actually have problems with it.

If you can't pair it, we really need to make it optional.

Can you try pairing your device in the Android pairing dialog and then click it again in the discovery dialog? I think we should make the pairing optional because some devices don't need it or actually have problems with it. If you can't pair it, we really need to make it optional.
jafal99 commented 4 years ago (Migrated from github.com)
Poster
Owner

Hi,
This device is not visible in pairing dialog. I try with "nRF Connect" tool and it is possible to" Connect" and see services, attributes but "Bond" is not possible - message about invalid PIN or key is displayed

Hi, This device is not visible in pairing dialog. I try with "nRF Connect" tool and it is possible to" Connect" and see services, attributes but "Bond" is not possible - message about invalid PIN or key is displayed
jpbarraca commented 4 years ago (Migrated from github.com)
Owner

I also encountered this issue in the past and I could not find the reason. A reboot of the phone or enabling and disabling the BT interface would fix it. Therefore I always attributed the error to the phone.

In my case the device is visible in the BT device menu and I can pair with it.

I also encountered this issue in the past and I could not find the reason. A reboot of the phone or enabling and disabling the BT interface would fix it. Therefore I always attributed the error to the phone. In my case the device is visible in the BT device menu and I can pair with it.
jafal99 commented 4 years ago (Migrated from github.com)
Poster
Owner

Reboot or disable BT doesn't help. When using "HPlus Watch" app I don't have nay problem with connection.
Here are device properties from nRF Connect tool - mayby this will help
screenshot_2017-04-06-22-17-59

Reboot or disable BT doesn't help. When using "HPlus Watch" app I don't have nay problem with connection. Here are device properties from nRF Connect tool - mayby this will help ![screenshot_2017-04-06-22-17-59](https://cloud.githubusercontent.com/assets/26922965/24774004/9129bbdc-1b17-11e7-8221-a3ae7a802086.png)
Owner

With the next version you get a dialog asking whether you want to pair or not (in the discovery activity). Simply answer "Don't Pair" then. This might fix your connection problems.

What's your mobile device btw? Samsung phones appear to have problems with pairing, at least with Mi Bands.

With the next version you get a dialog asking whether you want to pair or not (in the discovery activity). Simply answer "Don't Pair" then. This might fix your connection problems. What's your mobile device btw? Samsung phones appear to have problems with pairing, at least with Mi Bands.
jpbarraca commented 4 years ago (Migrated from github.com)
Owner

Current version doesn't work.

When connecting without pairing, the activity exits but the device is never added to the list.
The output is:

I/nodomain.freeyourgadget.gadgetbridge.activities.DiscoveryActivity: Recognized supported device: HPLUS XXXX: XX:XX:XX:XX:XX:XX (HPLUS)

I/nodomain.freeyourgadget.gadgetbridge.util.GB: Trying to connect to: HPLUS XXXX

I/HwPointEventFilter: support AFT

It seems like the scan is never stopped as the debug keeps providing information regarding the devices found.

When connecting with paring, the device will always reset it self to factory defaults. No connection is possible.

I/nodomain.freeyourgadget.gadgetbridge.activities.DiscoveryActivity:` Recognized supported device: HPLUS XXXX: XX:XX:XX:XX:XX:XX (HPLUS)

I/nodomain.freeyourgadget.gadgetbridge.activities.DiscoveryActivity: Starting discovery: SCANNING_NEW_BTLE

I/nodomain.freeyourgadget.gadgetbridge.activities.DiscoveryActivity: Start New BTLE Discovery

I/BluetoothAdapter: getBluetoothLeScanner

I/nodomain.freeyourgadget.gadgetbridge.activities.DiscoveryActivity: Stopping discovery

I/nodomain.freeyourgadget.gadgetbridge.activities.DiscoveryActivity: Using device candidate HPLUS XXXX: XX:XX:XX:XX:XX:XX (HPLUS) with coordinator: class nodomain.freeyourgadget.gadgetbridge.devices.hplus.HPlusCoordinator

I/HwPointEventFilter: support AFT

I/nodomain.freeyourgadget.gadgetbridge.util.GB: Attempting to pair with HPLUS XXXX

I/BluetoothDevice: createBond() for device XX:XX:XX:XX:XX:XX called by pid: 30581 tid: 30581

I/nodomain.freeyourgadget.gadgetbridge.activities.DiscoveryActivity: Bonding in progress...

I/HwPointEventFilter: support AFT

I/nodomain.freeyourgadget.gadgetbridge.externalevents.BluetoothConnectReceiver: got connection attempt

I/nodomain.freeyourgadget.gadgetbridge.externalevents.BluetoothConnectReceiver: won't connect to XX:XX:XX:XX:XX:XX(HPLUS XXXX)

Scan is also not terminated.

Current version doesn't work. When connecting without pairing, the activity exits but the device is never added to the list. The output is: ``` I/nodomain.freeyourgadget.gadgetbridge.activities.DiscoveryActivity: Recognized supported device: HPLUS XXXX: XX:XX:XX:XX:XX:XX (HPLUS) I/nodomain.freeyourgadget.gadgetbridge.util.GB: Trying to connect to: HPLUS XXXX I/HwPointEventFilter: support AFT ``` It seems like the scan is never stopped as the debug keeps providing information regarding the devices found. When connecting with paring, the device will always reset it self to factory defaults. No connection is possible. ``` I/nodomain.freeyourgadget.gadgetbridge.activities.DiscoveryActivity:` Recognized supported device: HPLUS XXXX: XX:XX:XX:XX:XX:XX (HPLUS) I/nodomain.freeyourgadget.gadgetbridge.activities.DiscoveryActivity: Starting discovery: SCANNING_NEW_BTLE I/nodomain.freeyourgadget.gadgetbridge.activities.DiscoveryActivity: Start New BTLE Discovery I/BluetoothAdapter: getBluetoothLeScanner I/nodomain.freeyourgadget.gadgetbridge.activities.DiscoveryActivity: Stopping discovery I/nodomain.freeyourgadget.gadgetbridge.activities.DiscoveryActivity: Using device candidate HPLUS XXXX: XX:XX:XX:XX:XX:XX (HPLUS) with coordinator: class nodomain.freeyourgadget.gadgetbridge.devices.hplus.HPlusCoordinator I/HwPointEventFilter: support AFT I/nodomain.freeyourgadget.gadgetbridge.util.GB: Attempting to pair with HPLUS XXXX I/BluetoothDevice: createBond() for device XX:XX:XX:XX:XX:XX called by pid: 30581 tid: 30581 I/nodomain.freeyourgadget.gadgetbridge.activities.DiscoveryActivity: Bonding in progress... I/HwPointEventFilter: support AFT I/nodomain.freeyourgadget.gadgetbridge.externalevents.BluetoothConnectReceiver: got connection attempt I/nodomain.freeyourgadget.gadgetbridge.externalevents.BluetoothConnectReceiver: won't connect to XX:XX:XX:XX:XX:XX(HPLUS XXXX) ``` Scan is also not terminated.
jpbarraca commented 4 years ago (Migrated from github.com)
Owner

After some time the device will try to pair with the smartphone. It fails, resets again, but then it appears in GadgetBridge and can be used...

After some time the device will try to pair with the smartphone. It fails, resets again, but then it appears in GadgetBridge and can be used...
Owner

The device not showing should've been fixed with 202ae53d71
I'll check your log later.

The device not showing should've been fixed with 202ae53d714b2122c62ced2890f25cd2981df0ff I'll check your log later.
Owner

No wonder it doesn't work. This is some kind of bad API on our side, which is still there from the very beginning where we didn't fully understand how to get the Mi Bands to talk to us.

I'll fix this.

No wonder it doesn't work. This is some kind of bad API on our side, which is still there from the very beginning where we didn't fully understand how to get the Mi Bands to talk to us. I'll fix this.
Owner

Can you test current master again?

Can you test current master again?
jpbarraca commented 4 years ago (Migrated from github.com)
Owner

Works when connecting without pairing.

However, immediately after the connection the smartphone will always receive a pairing request from the smartband. If the pairing request is accepted, the smartband will be reset to factory defaults (data will be lost).

If the pairing is not accepted, a new request will appear at a later time.

Any idea why this happens?

Works when connecting without pairing. However, immediately after the connection the smartphone will always receive a pairing request from the smartband. If the pairing request is accepted, the smartband will be reset to factory defaults (data will be lost). If the pairing is not accepted, a new request will appear at a later time. Any idea why this happens?
Owner

This is some kind of protection. Some taking over your device (e.g. when you sell or lose it) will not get your data.

This is some kind of protection. Some taking over your device (e.g. when you sell or lose it) will not get your data.
jpbarraca commented 4 years ago (Migrated from github.com)
Owner

Currently, it never pairs correctly with my phone. The request will keep appearing and every time it tries to pair and part of the data is lost... very strange behaviour.

When it is not paired with the phone, any other device can look for the band and get the remaining data. Will try to improve connection and debug this issue.

As a first step I will try to keep the periodic Hello messages that were added in the first development stages (and are used by the official app).

Currently, it never pairs correctly with my phone. The request will keep appearing and every time it tries to pair and part of the data is lost... very strange behaviour. When it is not paired with the phone, any other device can look for the band and get the remaining data. Will try to improve connection and debug this issue. As a first step I will try to keep the periodic Hello messages that were added in the first development stages (and are used by the official app).
jpbarraca commented 4 years ago (Migrated from github.com)
Owner

@cpfeiffer can you please review the PR as it changes some other parts in GB?

After these changes the connection process seems stable and no error is presented.

@cpfeiffer can you please review the PR as it changes some other parts in GB? After these changes the connection process seems stable and no error is presented.
jafal99 commented 4 years ago (Migrated from github.com)
Poster
Owner

Hi,
Sorry for not responding so long. I can confirm that wit current version I'm able to connect with my watch.
Thank you all for the support,

Hi, Sorry for not responding so long. I can confirm that wit current version I'm able to connect with my watch. Thank you all for the support,
Owner

Thanks for the confirmation!

Thanks for the confirmation!
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.