buttplugio / docs.buttplug.io

11 stars 7 forks source link

Document Mizzzee protocol #25

Open SuhEugene opened 8 months ago

SuhEugene commented 8 months ago

BT Name: XHTKJ Service UUID: 0xFF10 Characteristic UUID: 0xFF12

Message: 0312f300fc00fe4001XXXX00fc00fe4001YYYY00

Scale handling ```js function handleScale(v) { if (!v) return 0; if (is019DDevice()) return (v * 0.8) + 0.2; if (is030Device()) return (v * 0.7) + 0.3; if (is035Device()) return (v * 0.6) + 0.4; if (is018Device()) return (v * 0.6) + 0.4; return (v * 0.7) + 0.3; } ```
Device types Device info is in the `0x2A50` characteristic, no service stated. You need to get little-endian UInt16 with byte offset 3. My device has no binary information in any of `0x2A50` characteristics, so i can't provide any example ```js const is018Device = () => deviceType == 1; const is030Device = () => deviceType == 2; const is035Device = () => deviceType == 3; const is019DDevice = () => deviceType == 4; const is029Device = () => deviceType == 29; ```

Examples:

OFF 0312f300fc00fe40013c0000fc00fe40013c0000
VAL 0312f300fc00fe4001bc6e00fc00fe4001bc6e00
MAX 0312f300fc00fe4001fcff00fc00fe4001fcff00

WeChat app sends message every 0.2 seconds If no message sent within a cetain amount of time, toy stops


Also app has some setModel and setClear messages

setClear is sent once when user touches drag bar It is constant message: 0312f00700000000000000000000000000000000

setModel(0) is called when app pages are unloaded and in some other cases i don't understand. Message: 0312f60000000000000000000000000000000000

blackspherefollower commented 7 months ago

The handleScale() method is there to avoid the device's motor deadzone (where it can't spin the weight). The 0x2a50 chacteristic is under the 0x180a service and reads 0x01a70600000100, which is the PnP ID of Manufacturer 06a7=Chipsea, ProductId 0000=0 and Product Version 0100=1