oliexdev / openScale

Open-source weight and body metrics tracker, with support for Bluetooth scales
GNU General Public License v3.0
1.68k stars 292 forks source link

Another OKOK scale #950

Open arnelap opened 1 year ago

arnelap commented 1 year ago

Scale name Nameless chinese stuff - okok international https://play.google.com/store/apps/details?id=com.chipsea.btcontrol.en&hl=en&gl=US

I tried the latest version (v2.5.1 (63)) and clicked the "detect blueooth" button before and after stepping on the scale, but it never seems to recognize it.

Step 2: Acquiring some Bluetooth traffic (https://github.com/oliexdev/openScale/wiki/How-to-reverse-engineer-a-Bluetooth-4.x-scale#1-acquiring-some-bluetooth-traffic) for further information._

reports weight only (i think) Weight values (oldest to newest): 81.50 kg ( 1FD6 ) 0000 04 3e 1d 02 01 03 00 e8 3d a6 49 02 5d 11 10 ff 0010 c0 b1 1f d6 17 70 0a 01 25 5d 02 49 a6 3d e8 ae

50.75 kg ( 13D3 )
0000 04 3e 1d 02 01 03 00 e8 3d a6 49 02 5d 11 10 ff 0010 c0 08 13 d3 17 70 0a 01 24 5d 02 49 a6 3d e8 b2

84.15 kg ( 20DF ) 0000 04 3e 1d 02 01 03 00 e8 3d a6 49 02 5d 11 10 ff 0010 c0 b3 20 df 17 70 0a 01 25 5d 02 49 a6 3d e8 bb

  1. Bluetooth HCI Snoop log file user settings in the vendors app: sex (male/female), body height, age, activity level male, 180cm, 37, active (but I don't think any of this is relevant with this device)

--> Attach the 1. HCI Snoop log file here <-- hci_snoop20230329140200.cfa.zip

--> Attach the openScale debug log file here <-- openscale did not see the scale at all, I used the BLE Scannner, it showed 10FFC05B000017700A01245D0249A63DE8 as "raw data" for the MAC address of the scale

here is openscale log showing nothing: 2023-03-29 21:40:33.603 Debug [2] BluetoothSettingsFragment: Bluetooth settings Bluetooth permission check 2023-03-29 21:40:33.608 Debug [2] BluetoothSettingsFragment: SDK >= 31 request for Bluetooth Scan and Bluetooth connect permissions 2023-03-29 21:40:33.610 Debug [2] BluetoothSettingsFragment: Permission already granted: android.permission.BLUETOOTH_SCAN 2023-03-29 21:40:33.611 Debug [2] BluetoothSettingsFragment: Permission already granted: android.permission.BLUETOOTH_CONNECT 2023-03-29 21:40:33.629 Info [2] BluetoothCentralManager: scan started 2023-03-29 21:40:35.601 Info [2] BluetoothCentralManager: scan stopped

Mac address to search for in Bluetooth snoop: 5d:02:49:a6:3d:e8 (and that is also sent as part of the bluetooth packet)

I don't think any data is sent from the phone to the scale, the scale just advertises the weight while it's working.

arnelap commented 1 year ago

here is my guesstimation of what the hex codes mean (note that I have no experience analyzing bluetooth data and i only have 1 scale to test with)

For example [81.50 kg ( 1FD6 )] > c0 b1 1f d6 17 70 0a 01 25 5d 02 49 a6 3d e8 ae

c0 = always the same, device id or "magic identifier"? b1 = counts up while measuring, stops counting when measurement locked 1f d6 = weight 17 70 = i don't know, it's 0000 when scale comes on, and 1770 after measurement has locked. 0a 01 = i don't know, doesnt seem to change 25 = final measurement locked (24 = is measuring) 5d 02 49 a6 3d e8 = mac of the scale ae = signal strength? or maybe a checksum but i couldn't reproduce the checksum if it is one.

Switching between Jin and KG or changing "user" in the app has no affect on the Bluetooth data coming in, it always sends weight in KG.

The device is never "paired", just have Bluetooth turned on and the "okok international" app grabs the weight from the advertisement packages.

Thanks!

Florin9doi commented 1 year ago
arnelap commented 1 year ago

Great work @Florin9doi ! Is there is anything I can do to help test or debug etc don't hesitate to let me know.