-
-
Notifications
You must be signed in to change notification settings - Fork 298
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
When connecting to Renpho ES-CS20M-RD app chrashews. #991
Comments
Adding my logs as well.
|
I can confirm this, too. |
Same scale, same problem: Why is it still listed as compatible in the wiki?? Build version: 2.5.2 Stack trace: |
The SDK for this scale is here (and all scales that show up as QN Scale): https://github.com/YolandaQingniu/qnscalesdkX I wish I had the dev skills to help implement this but I'm not a software person. I'd really like to see this fixed. @oliexdev If there's other ways I can help get this issues fixed, I'm all ears. |
Build version: 2.5.2 Stack trace: |
It looks like the expected service does not support the expected characteristic on the QN-Scale ES-CS20M-RD. Can someone with an ES-CS20M-RD follow the directions cited below and submit the debug log? |
I believe this is where the problem is (from https://yolandaqingniu.github.io/en/flow/ble_scale_custom_connect.html)
The driver for QN-Scale uses FFE0. The other service ID is FFF0. The characteristic UUIDs are different. Here is the mentioned table for characteristics of FFF0:
So the question would be how to query the scale for the service ID it wants. And if there would be a place to store it so that it doesn't need to probe on every connection. Finally, I wonder if it would be better to split into two different drivers because the changes might be extensive and confusing. This is all theory right now. I have not yet recompiled with the new values to see if it fixes the crash on my scale. I'm not even sure how the new values would work because they're missing several parts of the state machine. I suspect they may have simplified the scale to use less round trips, but sniffing the official apps bluetooth connection may be the only way to really know how to deal with it. I haven't jumped through the hoops to try the official app yet, but if I do I'll post the snoop log. |
I recompiled and tried it using the other service ID and characteristic and it no longer crashes. It doesn't log the weight either, but I suspect that is because I'm not doing the right thing with the results. I'll need to run a packet capture to get a better idea of what to do next. |
I bought this scale, because it is listed as supported. Please remove it from Wiki. |
I've put in a PR to support the 2nd set scales (Using a Renpho R-A019). Would appreciate it if any of you can try it out and see if it works for you. Would also appreciate it if anyone with a working 1st set scale can test it out to see if it works without impacting them. |
The Renpho ES-CS20M works with the PR |
Describe the bug
When connecting to Renpho ES-CS20M-RD app chrashews.
To Reproduce
Steps to reproduce the behavior:
Debug log
Build version: 2.5.2
Build date: 1981-01-01 01:01:02
Current date: 2023-09-10 11:51:57
Device: HUAWEI CLT-L29
OS version: Android 10 (SDK 29)
Stack trace:
java.lang.NullPointerException: no valid characteristic provided
at j$.util.Objects.requireNonNull(Unknown Source:5)
at com.welie.blessed.BluetoothPeripheral.writeCharacteristic(BluetoothPeripheral.java:1229)
at com.health.openscale.core.bluetooth.BluetoothCommunication.writeBytes(BluetoothCommunication.java:303)
at com.health.openscale.core.bluetooth.BluetoothCommunication.writeBytes(BluetoothCommunication.java:291)
at com.health.openscale.core.bluetooth.BluetoothQNScale.onNextStep(BluetoothQNScale.java:111)
at com.health.openscale.core.bluetooth.BluetoothCommunication.nextMachineStep(BluetoothCommunication.java:610)
at com.health.openscale.core.bluetooth.BluetoothCommunication.nextMachineStep(BluetoothCommunication.java:612)
at com.health.openscale.core.bluetooth.BluetoothCommunication.nextMachineStep(BluetoothCommunication.java:612)
at com.health.openscale.core.bluetooth.BluetoothCommunication.resumeMachineState(BluetoothCommunication.java:210)
at com.health.openscale.core.bluetooth.BluetoothCommunication$1.onServicesDiscovered(BluetoothCommunication.java:464)
at com.welie.blessed.BluetoothPeripheral$1$1.run(BluetoothPeripheral.java:210)
at android.os.Handler.handleCallback(Handler.java:900)
at android.os.Handler.dispatchMessage(Handler.java:103)
at android.os.Looper.loop(Looper.java:219)
at android.app.ActivityThread.main(ActivityThread.java:8668)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1109)
The text was updated successfully, but these errors were encountered: