buttplug icon indicating copy to clipboard operation
buttplug copied to clipboard

Kiiroo Pearl 2.1 sensors and battery level

Open VyrCossont opened this issue 2 years ago • 3 comments

Found the pressure sensors and battery level by inspecting and visualizing received BTLE data. (Discord conversation context)

Sketchy graph showing a correlation between analog and digital versions of pressure sensor data

The sensor endpoint reports both analog and digital versions of the same data for 4 touch sensors, but the sensors are so flaky that it's hard to tell which end of the device is the start of the sensor array. This is likely only going to be useful for distinguishing between contact and no contact, not as a depth sensor. (I wonder if the Pearl 3 is any better?)

I've been conservative with the possible sensor ranges. It might be possible to put a tighter bound on them if desired, but that will require reversing the FeelConnect app; sensor ranges are slightly different even for different pressure sensor areas on the device, and could well be very different from device to device.

The app doesn't report battery level on iOS anywhere I can find it and doesn't use the standard BTLE battery endpoint. I do know that byte goes down steadily with use, and that the device starts blinking red around 10 and shuts off shortly after reaching 1. I've never seen my device go past a battery byte value of 82, but I suspect that its battery pack is damaged, so the actual max might be 100 or 255.

Since this is only the second sensor-enabled device in the current codebase, I reused code from the KGoal Boost, and still have some open questions:

  • Are sensor indexes supposed to be unique within a device, or unique within a device and sensor type?
  • Why are sensor ranges u32 but sensor data i32?
  • Should battery sensors always be scaled to [0, 100] so that battery_level always reports a number between 0 and 1?
  • What is the "whitelist" endpoint used for on Kiiroo 2.1 devices? I didn't see any obviously device-whitelist-related code for them.
  • Is it worth trying to factor out common code for the Kiiroo 2.1 and KGoal Boost sensor implementation now, or should we wait for more sensor-enabled devices?

VyrCossont avatar Dec 04 '22 03:12 VyrCossont

Deploy Preview for buttplug-spec canceled.

Name Link
Latest commit a7b4cc96df22b07b84c6116073a5584efaab9c40
Latest deploy log https://app.netlify.com/sites/buttplug-spec/deploys/638c197b619be50008571ded

netlify[bot] avatar Dec 04 '22 03:12 netlify[bot]

Linter's failing for files I'm pretty sure I didn't touch. Will double-check in a bit to make sure I'm on the right branch, etc.

VyrCossont avatar Dec 04 '22 04:12 VyrCossont

Branched off an up-to-date master. Not sure what's up with the lint; maybe the formatter itself got updated recently?

VyrCossont avatar Dec 04 '22 07:12 VyrCossont

Eh we're real bad about linter issues anyways. I need to just have that warn in the CI.

qdot avatar Dec 20 '22 00:12 qdot