DeveloperDeveloper
  • Standard Solutions
  • Cam Solutions
  • Native SDKs
  • App Gallery
  • Game Engine Plugins
Forum
Projects Library
Dev Discord
  • Standard Solutions
  • Cam Solutions
  • Native SDKs
  • App Gallery
  • Game Engine Plugins
Forum
Projects Library
Dev Discord
  • Native SDKs

    • Introduction
    • Lovense iOS SDK for iPhone app development
    • Lovense Android SDK for Android app development
    • Lovense Windows SDK for Windows app development
Got Stuck?
Forum for Lovense Developers
Click to explore the release pose for Windows SDK
Support
Document Feedback

Windows SDK

The Windows Dongle SDK is a library provided for Windows that allows you to directly access Lovense toys with Lovense Dongle Adapter. You usually choose this option if you are making your own Windows application.

Download Dongle SDK Demo

The Window Bluetooth SDK allows for native Bluetooth control on Windows, offering the same functionality as the Dongle SDK, making it suitable for Windows applications.

Download Bluetooth SDK Demo

Step 1: Get your developer token

Go to the developer dashboard and get your developer token.

Note: You need to fill in your developer token when using the SDK.

Step 2: Download SDK

Download Dongle SDK

Download Bluetooth SDK

Step 3: Configure the SDK in your application

For example, the method below is to configure SDK in Visual Studio 2019

  1. Set the path of the SDK header file

    configure head

  2. Set the path of SDK lib file

    configure libs

Step 4: Connect Lovense toys and send commands

#include <Lovense.h>
...
class CEventCallBack: public ILovenseSDKNotify
{
 public:
  /*Call when toy search start*/
  virtual void LovenseDidSearchStart();

  /*Call when toy searching toy*/
  virtual  void LovenseSearchingToys(lovense_toy_info_t *info) = 0;

  /*Call when something went wrong*/
  virtual  void LovenseErrorOutPut(int errorCode,const char *errorMsg) = 0;


  /*Call when toy search end*/
  virtual  void LovenseDidSearchEnd();

  /*Call when send cmd start*/
  virtual void LovenseDidSendCmdStart();

  /*Call when send cmd return*/
  virtual  void LovenseSendCmdResult(const char * szToyID, CLovenseToy::CmdType cmd,const char *result,CLovenseToy::Error errorCode);

  /*Call when send cmd end*/
  virtual void LovenseDidSendCmdEnd();

  /*Call when toy connected, or disconnected*/
  virtual void LovenseToyConnectedStatus(const char *szToyID, bool isConnected) ;
};

...
 //TODO:This is a simple process
 CEventCallBack *callBack = new CEventCallBack();
 CLovenseToyManager *manager = GetLovenseToyManager();
 manager->SetDeveloperToken(...);
 manager->RegisterEventCallBack(callBack);
 manager->StartSearchToy();//Search for the toys via USB Dongle

Send a command

 CLovenseToyManager *manager = GetLovenseToyManager();
 //Send a vibration command
 manager->SendCommand(toyID,CLovenseToy::CmdType::COMMAND_VIBRATE,10);

For a list of supported commands, check LovenseDef.h

namespace CLovenseToy
{
 typedef enum {

  /**
  -Power off!
  - param Key = no parameter
  */
  COMMAND_POWER_OFF = 100,

  /**
  - Vibrate the toy. The parameter must be between 0 and 20!
  - Supported toys = all
  */
  COMMAND_VIBRATE = 101,

  /**
  - Rotate the toy. The parameter must be between 0 and 20!
  - Supported toys = Nora
  */
  COMMAND_ROTATE = 102,
  .
  .
  .
 }
}

Setup

  1. For Dongle SDK, do not send other commands to toys when searching for toys.
  2. Turn on the toy. The light will begin flashing.
  3. Open your application and search for the toy to establish a connection.

Tips

  1. Insert the Lovense USB Bluetooth Adapter into the PC for dongle sdk. Or enable the Windows Bluetooth for native sdk.
  2. If you need to get the toy's battery level frequently, start a thread loop.
  3. For best results, don't sent toy commands more than once per second.
  4. First time users, refer to our SDK Demo linked above.

View log output

To view log output, use the editbin command.

Note: If there is an "editbin not found" error when compiling, here is a solution.

view log

Last Updated:
Explore our Forum or Support to get more inspiration or solve your problems.
Discord Channel
It is an online real-time channel where you can communicate directly with our official administrators or many excellent developers.
Forum
It is a place for Lovense developers to communicate, where you can find solutions to problems or get inspired for your projects.
Support
Find documents and tutorials that may be helpful to you.