buttplugio / buttplug-js

Buttplug Typescript/Javascript Client Implementation
https://buttplug.io
BSD 3-Clause "New" or "Revised" License
128 stars 18 forks source link

WeVibe StopDeviceCmd not working #151

Closed sargun closed 5 years ago

sargun commented 5 years ago

Unfortunately, it seems that StopDeviceCmd doesn't work on the wevibe sync.

It appears under the hood, it just sets the device power to 0: https://github.com/buttplugio/buttplug-js/blob/master/src/server/bluetooth/devices/WeVibe.ts#L46

This doesn't work.

I'm getting a bluetooth sniffer next week, to see if there is some other command required to turn it off.

qdot commented 5 years ago

First off, thanks for the report! :smiley:

Hmm. So we have the same command over in C#:

https://github.com/buttplugio/buttplug-csharp/blob/master/Buttplug/Server/Bluetooth/Devices/WeVibe.cs#L103

We've had people using the C# with the Sync and haven't had any reports of issues there. I'm wondering if this may be related to some of our problems with message timing and WebBluetooth.

Are you running this through WebBluetooth? If so, can you pop open the web console and see if it's showing a "GATT transfer already in progress" error? If that shows up, this may be a combination of #136 and #27.

If you're running this via the node websocket server, then it could be something else.

sargun commented 5 years ago

I'm running this through WebBluetooth. I confirmed that the command didn't work by manually sending the bluetooth command directly to the gatt profile (implemented it as a quick hack, based on reading that code).

It looks like setting it to 0 does not work. Perhaps, this is a software / firmware issue, where they've changed something?

qdot commented 5 years ago

Ok, cool, thanks for doing the extra check! That could definitely be either something on our end with the reversing or a protocol change, yeah.

Unfortunately we never got the WeVibe documentation provided by the community into our protocol docs (see buttplugio/stpihkal#20), but what docs we did have available are at https://gist.github.com/bnm12/fcdcef291a500bf51cef734aa1830e4d. If you want to take a look at it once you get your bluetooth sniffer, that'd be great. If you've got an older android device that can still do hci snooping (or a newer one that's rooted), that's usually what I use.

sargun commented 5 years ago

The unit I purchased was this one: https://www.amazon.com/We-vibe-Anniversary-Collection-Cosmic-Purple/dp/B07BN5HPJP

I'm not sure if there is a difference in the firmware on this device versus another one.

Let me see if I can get ahold of an Android device. What do you recommend that's easy to root?

qdot commented 5 years ago

Thanks for the device info. I'll see if anyone on our Discord server has a newer Sync handy to test with too just to get more repros going. All I've got for that brand is a WeVibe 4 that worked last I checked, though it's been a while so I may give that another shot tomorrow.

As for Android device, I'll have to ask around about that too. I'm using a 2013 Nexus 7 running Android 6.01, heh. Handy for reversing, but just about only that.

sargun commented 5 years ago

(1) If you're in San Francisco I can lend you one. (2) Where's your discord?

qdot commented 5 years ago

Yup I’m over in East Bay! And our discord is at https://discord.buttplug.io.

qdot commented 5 years ago

@sargun Ok, we've got a patch that will hopefully fix this landed to our development branch. How were you testing the WeVibe at the moment? If you're developing your own stuff, I can roll a point release if need be, or at least just make a buttplug@next module target on npm. Otherwise if it was through one of our apps, I can look at updating them.

sargun commented 5 years ago

Ok, let me test.

sargun commented 5 years ago

SUCCESS!

qdot commented 5 years ago

Fantastic, thanks for testing this! I'll go ahead and close this out. Please let us know if you have any more issues. :smile: