Skip to main content

openble-lovense

The Lovense toy BLE protocol, read from the Lovense Remote Android app (8.10.1).

  • openble.lovense.identify: decodes the advertised identity UUID (model and PIN flag) and matches advertisements to a toy.
  • openble.lovense.commands: the ASCII text commands (Vibrate:10;, Mply:…;, LVS:…), with the ranges the app enforces and the reply tags.
  • openble.lovense.replies: parsers for DeviceType;, Battery; and GetCap;, and the answer to the $01 QCode challenge.
  • openble.lovense.frames: the 0xAA binary frames and their CRC-8.
  • openble.lovense.link: picks the TX and RX characteristics the way the app does, and ToyLink paces writes, routes notifications and answers QCode.
  • openble.lovense.models: the model codes and function letters the app's code confirms.

Pure Python 3.11+ with no dependencies and no Bluetooth stack. ToyLink takes a write coroutine and is fed notifications, so it runs over bleak, a test double, or anything else.

Everything here comes from static reading of the app, checked against one live toy: a Lovense Max on firmware 223 over bleak on macOS. Discovery, channel selection, DeviceType;, Battery;, GetCap;, reply tags, Vibrate: and LVS: work on it. It answers Mply: and 0xAA frames with unkown,; replies.unknown_command reads that reply. The manual records what that run showed and the questions still open.

pip install openble-lovense

Build commands and check frames

from openble.lovense import commands, frames
from openble.lovense.identify import parse_identity

parse_identity("42450001-0023-4bd4-bbd5-a6920e4c5653")
# Identity(model='be', uuid_version=35, pin_set=False)

commands.vibrate(10), commands.mply([20, -1, 5]), commands.motion("p", 3)
# (b'Vibrate:10;', b'Mply:20:-1:5;', b'Air:Level:3;')

frames.play_pattern_action(frames.PATTERN_STOP).hex(" ")
# 'aa 8a 01 00 a1'

Drive a toy with bleak

import asyncio

from bleak import BleakClient
from openble.lovense import commands
from openble.lovense.link import ToyLink, pick_channels


async def buzz(address: str) -> None:
    async with BleakClient(address) as client:
        channels = pick_channels(
            (service.uuid, char.uuid, char.properties)
            for service in client.services
            for char in service.characteristics
        )

        async def write(payload: bytes) -> None:
            await client.write_gatt_char(channels.tx, payload, response=False)

        link = ToyLink(write)
        for uuid in channels.rx:
            await client.start_notify(uuid, lambda _, data: link.feed(data))

        print(
            await link.device_type()
        )  # DeviceType(model='b', firmware=223, mac='D6111451517F')
        print(await link.battery())
        await link.move(commands.vibrate(10))
        await asyncio.sleep(2)
        await link.stop(["v"])  # levels persist, so stop before disconnecting
        await link.close()

A toy whose owner set a PIN needs ordinary OS-level bonding first; let the operating system show its passkey dialog. A be toy (model from identify.identity_of) uses fixed channels: pass model="be" to pick_channels.

Protocol notes

docs/lovense-ble-protocol.md: discovery, the GATT layout, the connection lifecycle, both wire formats, the command reference and the open questions.

Not affiliated with Lovense. The name identifies the devices this interoperates with.

License

MIT License, copyright 2026 Kadima Tech.

Metadata

Release files for openble-lovense 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for openble-lovense 0.1.0
File Size Uploaded Provenance
openble_lovense-0.1.0.tar.gz 32.9 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for openble-lovense 0.1.0
File Interpreter ABI Platform
openble_lovense-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 51.1 kB

Release files / openble_lovense-0.1.0.tar.gz

Download URL openble_lovense-0.1.0.tar.gz
Size 32.9 kB
Tags Source
SHA-256 checksum
How to use checksums
b3542ec3d6fc6ad3331f50691e6f962e8c65b4ae1f345ca8d25a50c71cddd12b
BLAKE2b-256 checksum
How to use checksums
6f1baaef8814998f42e5e492384fb6db5aa5a04ab93e4f1e9938b4d0109cd8a7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 24, 2026.

Transparency log

Release files / openble_lovense-0.1.0-py3-none-any.whl

Download URL openble_lovense-0.1.0-py3-none-any.whl
Size 18.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2478295c58f5517a812ab9f9219e3bd835701393d4beaa37f3200e73a0234772
BLAKE2b-256 checksum
How to use checksums
e5e6557eaa3520fe45be08e10d5ebccea518dda39c3328ea7fed54ab18c122cd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 24, 2026.

Transparency log

Security for openble-lovense 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for openble_lovense-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 24, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page