Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Beurer BF 950 #502

Closed
PiQuer opened this issue Oct 5, 2019 · 59 comments
Closed

Support for Beurer BF 950 #502

PiQuer opened this issue Oct 5, 2019 · 59 comments

Comments

@PiQuer
Copy link

PiQuer commented Oct 5, 2019

Hi!
Thanks for developing this great app! I recently bought a BF 950 and would like to help getting it supported by OpenScale.

btsnoop_hci_2019-10-05_01.log
date: 2019-10-05
time: 09:21
sex: male
weight: 72.5 kg
body fat: 13.2%
water: 61.7%
muscles: 44.6%
bones: 3.2 kg

btsnoop_hci_2019-10-05_02.log
date: 2019-10-05
time: 11:58
sex: male
weight: 74.7 kg
body fat: 13.0%
water: 60.8%
muscles: 44.1%
bones: 3.3 kg

btsnoop_hci_2019-10-03.log
date: 2019-10-05
time: 12:10
sex: male
weight: 75.8 kg
body fat: 14.9%
water: 60.3%
muscles: 43.8%
bones: 3.3 kg

btsnoop_hci_2019-10-05_04.log
date: 2019-10-05
time: 12:15
sex: male
weight: 77.0 kg
body fat: 14.9%
water: 59.7%
muscles: 43.5%
bones: 3.3 kg

Debug log:
See comment below.

For the first three logs I could not find the corresponding weight values in the data stream, neither in big endian nor little endian format. The last value 77.0 kg is a bit unfortunate: it is 03 02 or 02 03 in hex, there are plenty occurrences, but I think those have to do with the bluetooth protocol rather then the weight value.

Please let me know if I can help by doing more measurements.

@oliexdev
Copy link
Owner

If I have time I will have a look. Maybe it is the same like BF600, see issue #219

@PiQuer
Copy link
Author

PiQuer commented Oct 13, 2019

Thanks, I will read through that other issue.

PiQuer added a commit to PiQuer/openScale that referenced this issue Oct 13, 2019
@PiQuer
Copy link
Author

PiQuer commented Oct 13, 2019

I installed the development environment and successfully built the master branch, ready for testing. Will test the BluetoothStandardWeightProfile with the BF950 and report back.

@PiQuer
Copy link
Author

PiQuer commented Oct 14, 2019

Debug log with BluetoothStandardWeightProfile:

openScale_2019-10-14_02-12.txt

@PiQuer
Copy link
Author

PiQuer commented Nov 3, 2019

@oliexdev to me the log looks like with this modification there is already a lot of communication going on between the scale and the app, and now some kind of authentication is needed. Anything I can do to bring this issue forward? Thanks!

@dror3go
Copy link

dror3go commented Nov 11, 2019

I also own a Beurer BF 950 scale and am available to help with solving the issue.

@felixandersen
Copy link

Looking at buying this scale. Any progress on this issue? Would be willing to get one to provide info for adding it to the app.

@oliexdev
Copy link
Owner

@felixandersen not really but the scale use the Bluetooth standard protocol which is good. Unfortunately, somebody has to make some effort to implement the authorization pairing process. I don't own this scale so it is to troublesome to do it on my own.

@felixandersen
Copy link

@oliexdev Thanks for getting back on the question! I would be willing to put in some hours to get this working. I have limited experience with Java and Android, but somewhat broad development experience in general. What would I need apart from the scale? An android phone or tablet I guess?

@oliexdev
Copy link
Owner

Yes an Android phone or tablet is needed and I would recommend that you have some some basic reverse engineering skills, see https://github.com/oliexdev/openScale/wiki/How-to-reverse-engineer-a-Bluetooth-4.x-scale
The basic protocol is implemented in BluetoothStandardWeightProfile.java but you have to do at least two things:

  1. You need to send the consent code for a user (it supports up to 8 users). Currently it is hardcoded. You can find this code by pressing the buttons on the scale itself. So we need to ask for that 4 digit code when the user tries to pair the scale with openScale. Then we need to send that code instead of the hardcoded PIN.

  2. If we haven't bonded the scale yet, we need to call createBond directly after the service discovery is complete.

It is possible to support this scale. Mainly because it uses the standard Bluetooth protocol, but without the scale it is a bit difficult.

@felixandersen
Copy link

Great, thanks! I will order the scale and get on it soon.

@oliexdev
Copy link
Owner

But I can't guarantee it if that works, so if you buying this scale it is on your own risk 😉

@felixandersen
Copy link

For sure! I expect no support or promises. Just happy if I can contribute.

@PiQuer
Copy link
Author

PiQuer commented May 1, 2020

I'm also still around to test or provide data. Currently I'm importing the values manually into openScale, which is a bit cumbersome...

@oliexdev
Copy link
Owner

@felixandersen any progress?

@dror3go
Copy link

dror3go commented Sep 27, 2020

@felixandersen Have you looked into it? What did you find?

@bcdiaconu
Copy link

Are there any news for this scale?

@dror3go
Copy link

dror3go commented Dec 8, 2020

@bcdiaconu See also issue 295, as this scale follows the Bluetooth standard protocol.

@oliexdev oliexdev mentioned this issue Jan 8, 2021
1 task
@oliexdev oliexdev mentioned this issue Apr 18, 2021
1 task
@krisjans
Copy link
Contributor

I made support for BF600 and BF850. And I think that BF950 could also work with the same code.

If anyone interested to test if BF960 works like BF600 - this is updated build of #753: openScale-2.3.5-debug_bf600_bf850_bf950.zip

@dror3go
Copy link

dror3go commented Jul 27, 2021

I tested it with my BF 950.
I was able to connect to the scale, and noticed that the time on the scale got updated - which is great.
However, there was no popup with existing scale users once I created a new app user.

Is there anything else you'd like me to try out? Should I try to factory reset the scale?

@krisjans
Copy link
Contributor

@dror3go Thanks for testing my version!
Could you try again and provide openScale debug log and btsnoop_hci.log ?

Another thing that may help would be btsnoop_hci.log that shows how manufacturer's app creates new users on scale.

@krisjans
Copy link
Contributor

However, there was no popup with existing scale users once I created a new app user.

@dror3go
If there is no users on scale then openScale will atempt to create new user automatically. If scale user was created successfully then then there should short status message that suggests that you step on scale barefoot.
Another idea to try - remove BF950 from paired devices in your phones Bluetooth settings before connecting to scale with openScale. Especially after factory reset.

This was referenced Jul 27, 2021
@krisjans
Copy link
Contributor

If someone is interested in testing my latest changes related to BF600, BF850, BF950 and SBF77, then latest automatic debug build is availabe here: openScale-2.3.5-debug.apk, change log in #753.

If something does not work or you encounter a crash - I would highly appreciate if you leave me a comment with attached openScale debug log (if possible also btsnoop_hci.log. Instructions how to get logs.)

@krisjans
Copy link
Contributor

Hello, @PiQuer, @felixandersen, @bcdiaconu !
Any Do you still have BF950? I would be extremely happy if you could test my latest debug apk with enabled openScale debug log.
According to @dror3go something is working, but no scale user selection dialog or pin entry dialog pops up.
Could you test and provide debug logs? I would be happy to fix support for BF950.

@bcdiaconu
Copy link

@krisjans I have installed your patch. It worked flawlessly to connect to scale. I am using it for a few days now and did not receive any error.

I will search for log(s) and upload it here

@krisjans
Copy link
Contributor

krisjans commented Aug 3, 2021

@bcdiaconu Thanks for the feedback!

May I ask you your help? Could you please create two new users with different activity levels in manufacturers app and collect btsnoop_hci.log? Bluetooth standard does not describe how to set or store "activity level" - and each scale seems to be doing it in it's own way.
If you could get me btsnoop_hci.log from BF950 (after manufacturer's app creates new users on scale), then I might be able to figure out UUID that is used to set "activity level" for scale user and finalize BF950 support.
Thanks in advance!

@bcdiaconu
Copy link

@krisjans I am at work now but I will do that and I will get back to you soon

@bcdiaconu
Copy link

bcdiaconu commented Aug 3, 2021

@krisjans So, it is really hard to work with original app (at least on my phone) but I managed for the same user to change the activity level. I attached all the logs for that. In scale_data_transfer.log, you can find line 2313 where I started cycling through activity levels. You should be able to corelate the timestamp from data_transfer.log to the ones in btsnoop_hci.log

scale_data_transfer.log
data_transfer.log
btsnoop_hci.log

To change the time stamps in my Wireshark capture files to match the time stamps in the log files:
Wireshark -> View <menu> -> Select Time Display Format -> Date and Time of Day
or use shortcut ctrl + alt + 1

If necessary still, I will try creating new users with just different activity. Please let me know.

@krisjans
Copy link
Contributor

krisjans commented Aug 3, 2021

@bcdiaconu I'm looking at your btsnoop_hci.log and there is no packets sent from phone to scale. If I set filter bluetooth.dst == 5c:ca:d3:00:92:4b then there is nothing.
In scale_data_transfer.log I see the data that is being sent, but I don's see target UUID (or handle).
Maybe in your phone debug settings you set Enable Bluetooth HCI snoop log to Enable filered? If so, then set it to Enabled (don't forget to disable and re-enable Bluetooth after that) and try capturing again.

@bcdiaconu
Copy link

@krisjans I had a few full days. I have added two users with same name (X1) and all defaults w/ only changed activity level.
and than second time I created the user, I also cycled through the activity levels. Hopefully the frames are now captured and can be found in log:

btsnoop_hci.log
data_transfer.log
scale_data_transfer.log
errors.log

@krisjans
Copy link
Contributor

krisjans commented Aug 7, 2021

@bcdiaconu Thanks for the logs!
Unfortunately, also this time btsnoop_hci.log does not contain packets sent by phone to BF950. For some reason your phone does not log packets transmitted by phone into btsnoop_hci.log.
Maybe you have some older android phone or tablet (with older Android version)? Older Android version had less restrictions regarding Bluetooth traffic logging. I you have such older device, could you try again? Make it even simpler - just create one user from manufacturers app. That should be enough for me - all I need is to pinpoint UUID used to set "activity level".
Thanks again for your effort and help!

@bcdiaconu
Copy link

bcdiaconu commented Aug 7, 2021

@krisjans I have done another try from another newer phone. Took a look at the contents and it seems there are frames both directions between the phone and scale. Hopefully this time you find what you're looking for.

image

btsnoop_hci.log
scale_data_transfer.log
data_transfer.log

@krisjans
Copy link
Contributor

krisjans commented Aug 7, 2021

@bcdiaconu YES! Thank you very much! This time btsnoop_hci.log contains packets in both directions.
So far I figured out following extra UUIDS:

  • User activity level: handle 0x0054, service UUID 0xffff, UUID 0x0004; One byte, values from 1-5;
  • User initials: handle 0x004e, service UUID 0xffff, UUID 0x0002; Three bytes, ASCII;
  • Request scale measurement: 0x005d, service UUID 0xffff, UUID 0x0006; One byte, value 0 == start new measurement;

@bcdiaconu
Copy link

@krisjans great. I am glad it worked in the end

@krisjans
Copy link
Contributor

krisjans commented Aug 7, 2021

@bcdiaconu I think I fixed "activity level" and "request measurement" for BF950.
Could you grab latest build and test if you can create new user on BF950 from openScale app?

Detailed testing script:

  1. Create new user in openScale app;
  2. Select the new user as active user;
  3. Connect to BF950;
  4. When Select scale user dialog pops up then pick Create new user on scale option (at the bottom of the list));
  5. Notification message with text "Please step barefoot on the scale for reference measurements" should be displayed for short period of time;
  6. Scale display should light up. Step barefoot on scale to complete reference measurement;
  7. One measurement should appear in openScale;
  8. Disconnect Bluetooth;
  9. Using BF950 LCD and buttons check that newly created user has correct data (birth date, activity level, gender and height);

If possible, collect openScale debug log. Any comments welcome!
Thanks in advance!

@bcdiaconu
Copy link

bcdiaconu commented Aug 9, 2021

@krisjans
Creation of user with exact steps you posted are working fine but there are some observations:

  • If scale is already lid up, creation of a new user is impossible; the user is created on scale but when stepping on the scale (as app asks), the measurement will be added to existing user rather the new created one (later edit: tried again and it worked now)
  • New user initials (name) are not set to the scale
  • Deletion of a user inside app will not delete the user from scale

Logs:
openScale_2021-08-09_20-54.txt
openScale_2021-08-09_21-10.txt

@krisjans
Copy link
Contributor

@bcdiaconu Thanks for your feedback!

New user initials (name) are not set to the scale

Correct, user initial setting is not yet implemented;

Deletion of a user inside app will not delete the user from scale

This is difficult to decide. Do I really wanted to delete user from scale? Maybe in scale user selection dialog I accidentally selected a scale user that someone else is using?
Another aspect - what about situation when app user is being deleted when scale is not in Bluetooth range?
If you have any ideas about this, please share!

@bcdiaconu
Copy link

bcdiaconu commented Aug 10, 2021

@krisjans the first case is as simple as a pop-up asking if one wants to delete the user also from scale (or only from app)

Second could be similar where the user is promoted that Bluetooth device ID out of range and it can only be deleted from app if continued. Could be better options than that. So, if someone else has a better idea we are 2 to welcome

@krisjans
Copy link
Contributor

krisjans commented Aug 24, 2021

Anyone willing to help out and test latest changes for #753 on BF950?
Latest automatic debug build is availabe here: openScale-2.3.5-debug.apk.
I'm especially interested if user initials is now stored and displayed on BF950 when you create new user from openScale.

p.s. @bcdiaconu maybe you would like to help me once more and test this build and provide your comments and debug log?

@bcdiaconu
Copy link

bcdiaconu commented Aug 25, 2021

@krisjans

Now it throws this exception at convention with scale.

Later edit:
openScale_2021-08-25_07-25.txt

Build version: 2.3.5 
Build date: 1981-01-01 01:01:02 
Current date: 2021-08-25 07:27:10 
Device: HMD Global Nokia 7.2 
OS version: Android 10 (SDK 29) 
 
Stack trace:  
java.lang.IllegalStateException: Fragment BluetoothSettingsFragment{fcbeb23} (db70de8b-2211-4a2c-93d3-a97a5d4e3baf)} not attached to a context.
	at androidx.fragment.app.Fragment.requireContext(Fragment.java:805)
	at com.health.openscale.gui.preferences.BluetoothSettingsFragment.onDeviceFound(BluetoothSettingsFragment.java:205)
	at com.health.openscale.gui.preferences.BluetoothSettingsFragment.access$000(BluetoothSettingsFragment.java:69)
	at com.health.openscale.gui.preferences.BluetoothSettingsFragment$1$1.run(BluetoothSettingsFragment.java:132)
	at android.os.Handler.handleCallback(Handler.java:883)
	at android.os.Handler.dispatchMessage(Handler.java:100)
	at android.os.Looper.loop(Looper.java:214)
	at android.app.ActivityThread.main(ActivityThread.java:7397)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:935)

@bcdiaconu
Copy link

bcdiaconu commented Aug 25, 2021

@krisjans

Exceptions 2 and 3 (same stack trace with different logs but different from exception 1):

openScale_2021-08-25_07-43.txt
openScale_2021-08-25_07-44.txt

Build version: 2.3.5 
Build date: 1981-01-01 01:01:02 
Current date: 2021-08-25 07:43:55 
Device: HMD Global Nokia 7.2 
OS version: Android 10 (SDK 29) 
 
Stack trace:  
java.lang.IllegalArgumentException: could not get CCC descriptor for characteristic 00002a19-0000-1000-8000-00805f9b34fb
	at com.welie.blessed.BluetoothPeripheral.setNotify(BluetoothPeripheral.java:1390)
	at com.health.openscale.core.bluetooth.BluetoothCommunication.setNotificationOn(BluetoothCommunication.java:329)
	at com.health.openscale.core.bluetooth.BluetoothStandardWeightProfile.onNextStep(BluetoothStandardWeightProfile.java:151)
	at com.health.openscale.core.bluetooth.BluetoothCommunication.nextMachineStep(BluetoothCommunication.java:576)
	at com.health.openscale.core.bluetooth.BluetoothCommunication.resumeMachineState(BluetoothCommunication.java:204)
	at com.health.openscale.core.bluetooth.BluetoothCommunication$1.onNotificationStateUpdate(BluetoothCommunication.java:439)
	at com.welie.blessed.BluetoothPeripheral$1$2.run(BluetoothPeripheral.java:238)
	at android.os.Handler.handleCallback(Handler.java:883)
	at android.os.Handler.dispatchMessage(Handler.java:100)
	at android.os.Looper.loop(Looper.java:214)
	at android.app.ActivityThread.main(ActivityThread.java:7397)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:935)

@krisjans
Copy link
Contributor

@bcdiaconu Thanks for your help and feedback! Much appreciated!

Now it throws this exception at convention with scale.

Later edit:
openScale_2021-08-25_07-25.txt

Build version: 2.3.5 
Build date: 1981-01-01 01:01:02 
Current date: 2021-08-25 07:27:10 
Device: HMD Global Nokia 7.2 
OS version: Android 10 (SDK 29) 
 
Stack trace:  
java.lang.IllegalStateException: Fragment BluetoothSettingsFragment{fcbeb23} (db70de8b-2211-4a2c-93d3-a97a5d4e3baf)} not attached to a context.
	at androidx.fragment.app.Fragment.requireContext(Fragment.java:805)
	at com.health.openscale.gui.preferences.BluetoothSettingsFragment.onDeviceFound(BluetoothSettingsFragment.java:205)
	at com.health.openscale.gui.preferences.BluetoothSettingsFragment.access$000(BluetoothSettingsFragment.java:69)
	at com.health.openscale.gui.preferences.BluetoothSettingsFragment$1$1.run(BluetoothSettingsFragment.java:132)
	at android.os.Handler.handleCallback(Handler.java:883)
	at android.os.Handler.dispatchMessage(Handler.java:100)
	at android.os.Looper.loop(Looper.java:214)
	at android.app.ActivityThread.main(ActivityThread.java:7397)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:935)

I'm unable to repeat this crash. Could you describe in more detail what you do when it happens? Sequence of actions?

@krisjans
Copy link
Contributor

Exceptions 2 and 3 (same stack trace with different logs but different from exception 1):

openScale_2021-08-25_07-43.txt
openScale_2021-08-25_07-44.txt

Build version: 2.3.5 
Build date: 1981-01-01 01:01:02 
Current date: 2021-08-25 07:43:55 
Device: HMD Global Nokia 7.2 
OS version: Android 10 (SDK 29) 
 
Stack trace:  
java.lang.IllegalArgumentException: could not get CCC descriptor for characteristic 00002a19-0000-1000-8000-00805f9b34fb
	at com.welie.blessed.BluetoothPeripheral.setNotify(BluetoothPeripheral.java:1390)

@bcdiaconu Thanks for your help!
This should be fixed now (1f1813e). Could you grab latest apk and try again?
This was probably caused by changes in Blessed library. Previously checking that getCharacteristic() returns non-null value was enough. Now it returns non-null object even if characteristic does not exist.

@bcdiaconu
Copy link

bcdiaconu commented Aug 25, 2021

@krisjans

Not really sure how to reproduce but I've seen in log (for first exception) that there are a few -1,00 on second line. If this is the source for exception, there were no -1 introduced by myself. I have however added some abnormal height, weight (don't remember the numbers but possibly something like 111 cm and 111kg)

Steps I remember I've done:

  1. Clean install (uninstall old app, installed patch)
  2. Skip tour
  3. Skip creation of a user (press back button)
  4. Tried enabling Bluetooth (but a no user message appeared)
  5. Created user
  6. Added Bluetooth device
  7. Enabled Bluetooth

Hopefully this helps

@krisjans
Copy link
Contributor

openScale_2021-08-25_07-25.txt

Build version: 2.3.5 
Build date: 1981-01-01 01:01:02 
Current date: 2021-08-25 07:27:10 
Device: HMD Global Nokia 7.2 
OS version: Android 10 (SDK 29) 
 
Stack trace:  
java.lang.IllegalStateException: Fragment BluetoothSettingsFragment{fcbeb23} (db70de8b-2211-4a2c-93d3-a97a5d4e3baf)} not attached to a context.
	at androidx.fragment.app.Fragment.requireContext(Fragment.java:805)
	at com.health.openscale.gui.preferences.BluetoothSettingsFragment.onDeviceFound(BluetoothSettingsFragment.java:205)
	at com.health.openscale.gui.preferences.BluetoothSettingsFragment.access$000(BluetoothSettingsFragment.java:69)
	at com.health.openscale.gui.preferences.BluetoothSettingsFragment$1$1.run(BluetoothSettingsFragment.java:132)
	at android.os.Handler.handleCallback(Handler.java:883)
	at android.os.Handler.dispatchMessage(Handler.java:100)
	at android.os.Looper.loop(Looper.java:214)
	at android.app.ActivityThread.main(ActivityThread.java:7397)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:935)

@bcdiaconu This seems to be the same crash described in #761 (comment) and is unrelated to specific scale (BF950 in this case) support.

@bcdiaconu
Copy link

bcdiaconu commented Aug 25, 2021

@krisjans looks like it is the same bug

I found an improvement/bug with latest patch. If the name starts with a space (possibly also the same applies if it's at the end), when creating the user in scale it will throw an exception. So if my intuition is right, a simple solution would be to trim the (name) string for whitespace(s). Actually this should be applied user creation wise and not only for generating the user initials.

Later edit:
I also tried to create a user with only one alphabetical symbol and the process worked flawlessly; it was added only one symbol to the scale for user initials

One thought: at user creation time it should be checked also that the name is not only whitespace(s); or after trim that there is a length of at least 1 char

Build version: 2.3.5 
Build date: 1981-01-01 01:01:02 
Current date: 2021-08-25 18:02:37 
Device: HMD Global Nokia 7.2 
OS version: Android 10 (SDK 29) 
 
Stack trace:  
java.lang.StringIndexOutOfBoundsException: length=0; index=0
	at java.lang.String.charAt(Native Method)
	at com.health.openscale.core.bluetooth.BluetoothStandardWeightProfile.buildInitialsStringFrom(BluetoothStandardWeightProfile.java:844)
	at com.health.openscale.core.bluetooth.BluetoothStandardWeightProfile.getInitials(BluetoothStandardWeightProfile.java:830)
	at com.health.openscale.core.bluetooth.BluetoothSwpSBF77.writeInitials(BluetoothSwpSBF77.java:66)
	at com.health.openscale.core.bluetooth.BluetoothStandardWeightProfile.writeUserDataToScale(BluetoothStandardWeightProfile.java:214)
	at com.health.openscale.core.bluetooth.BluetoothStandardWeightProfile.onNextStep(BluetoothStandardWeightProfile.java:193)
	at com.health.openscale.core.bluetooth.BluetoothCommunication.nextMachineStep(BluetoothCommunication.java:583)
	at com.health.openscale.core.bluetooth.BluetoothCommunication.resumeMachineState(BluetoothCommunication.java:204)
	at com.health.openscale.core.bluetooth.BluetoothStandardWeightProfile.handleUserControlPointNotify(BluetoothStandardWeightProfile.java:277)
	at com.health.openscale.core.bluetooth.BluetoothStandardWeightProfile.onBluetoothNotify(BluetoothStandardWeightProfile.java:248)
	at com.health.openscale.core.bluetooth.BluetoothSwpSBF77.onBluetoothNotify(BluetoothSwpSBF77.java:109)
	at com.health.openscale.core.bluetooth.BluetoothCommunication$1.onCharacteristicUpdate(BluetoothCommunication.java:467)
	at com.welie.blessed.BluetoothPeripheral$1$5.run(BluetoothPeripheral.java:276)
	at android.os.Handler.handleCallback(Handler.java:883)
	at android.os.Handler.dispatchMessage(Handler.java:100)
	at android.os.Looper.loop(Looper.java:214)
	at android.app.ActivityThread.main(ActivityThread.java:7397)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:935)

@krisjans
Copy link
Contributor

@bcdiaconu Nice catch!
This should be fixed now (9a0d3fd). Could you grab latest apk and try again?

The problem was specifically if first character of name was space - in this scenario split() reurned zero lengt string. Oh. but two spaces between name and family name will create the same problem..

@krisjans
Copy link
Contributor

krisjans commented Aug 25, 2021

@bcdiaconu crash with spaces in user name should be fixed for real now (9012419) :D. My latest debug apk.

@bcdiaconu
Copy link

bcdiaconu commented Aug 25, 2021

@krisjans The app ended with same Fragment BluetoothSettingsFragment exception. So at the end of the log you can add one.

Generally speaking, it worked as expected; I have added a user with " Dr ddt ", seen as \sDr\s\sddt\s and added new user to scale and it create a DD initials and all worked fine. But in the end the crash came which I'll post in the suggested ticket.

openScale_2021-08-25_20-08.txt

@krisjans
Copy link
Contributor

krisjans commented Sep 10, 2021

I just made a refactoring that might affect BF950.
I would highly appreciate if anyone could test my latest debug apk and let me know if it still works on BF950.

@bcdiaconu
Copy link

bcdiaconu commented Sep 23, 2021

@krisjans i have installed your new version a few days ago and I did not get the exception any longer. Only some problems with connection from time to time; possibly 20% connection error rate. The behaviour is that the scale LCD does not lid the Bluetooth icon. And the app does display connecting but does not state connected message.

Post comment: this connection behaviour I got also with the original app from beurer. Could not say if it's the same fail rate but seems to be near.

Post 2: do you think your modifications could have solved the exception problem or is this coincidental?

@oliexdev
Copy link
Owner

see #753

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

No branches or pull requests

6 participants