/moslime

Bring your Mocopi trackers into SlimeVR!

Primary LanguagePythonMIT LicenseMIT

moslime Bring your Mocopi trackers into SteamVR!

Built on the battle-tested algorithms and runtime of SlimeVR, this project aims to improve and extend the Mocopi on PC experience. No first-party app required.

Official Support Discord - https://discord.gg/vCQ2xP8KZb

Disclaimers

This third-party software is deemed alpha quality, provided as is, and without warranty. Mocopi is a trademark owned by the Sony Corporation. MoSlime is not endorsed by the Sony Corporation nor SlimeVR, nor are they affiliated with the MoSlime developers. This software does not modify the firmware of your Mocopi trackers and should not break them. However, only use this software if you agree to assume the risks therein.

Note about Windows support

Windows 10 and 11 have a feature where Bluetooth LE services are added as individual devices in Device Manager. The problem here is that these service devices aren't unique to every Mocopi and therefore trying to pair / connect more than Mocopi at once will fail. Unless a workaround is found, we are only officially supporting Linux. All this means is that MoSlime itself needs to run on Linux, it'll still be able to send tracker data to SlimeVR no matter what platform it's running on.

windows bt stack. i wish l could take screenshots

Current and Planned Features

  • Auto-connect to trackers (manual pairing still needed)
  • Send IMU rotation data to SlimeVR
  • Prebuilt Raspberry Pi image for easier use
  • Auto discovery and paring of trackers (Partially complete)
  • Send IMU acceleration data to SlimeVR
  • UI of some sort to allow easy configuration
  • SlimeVR Server auto discovery

Premade Raspberry Pi Image

We have an experimental Raspberry Pi image meant to make running MoSlime easier. More info here: https://github.com/lmore377/moslime/blob/main/setup/raspi.md

Requirements

  • Any VM or bare-metal Linux system with Bluetooth and BlueZ as the Bluetooth stack. This system can be seperate from the system that is running SlimeVR.
  • Python 3 with bluepy and scipy installed pip3 install bluepy scipy

Tracker Mounting

With MoSlime, the trackers can be placed and assigned to any body part you want. Assuming you're using moslime alongside a VR headset, here are the recommended tracker positions:

  • Head - Place on your chest. For most people, the head strap should be big enough to strech over your chest.
  • Hip - Should still be used for hip
  • Wrists - Use these for your upper legs/knees. You may need to make some custom straps for these (you can use the original mount, just take the 2 screws off the back)
  • Ankles - Should still be used for ankles

First Time Setup

  1. Turn on all of the trackers and pair them to your computer. You can either do this by using your distros Bluetooth manager or via bluetoothctl.
    1a. There is an experimental autopair script in the scripts/ folder. If you're on a system with systemd (ubuntu, debian, steamdeck os, etc.), you can try that to pair your trackers by running sudo python3 autopair.py in the scripts folder. It will also generate a moslime.json with the MAC addresses prefilled.
  2. Take note of the MAC addresses for all of your trackers. They should start with 3C:38:F4. If you have a tracker that starts with something different, please let us know!
  3. Turn off all of the trackers, then disable and re-enable Bluetooth.
  4. Download moslime.py and moslime.json then open moslime.json in your favorite text editor. In this file, put the MAC addresses of your trackers in addresses and change slime_ip to the IP address of the computer you're running SlimeVR on.

Usage - Please read the steps in their entirety as the process is currently time sensitive!

  1. Start the SlimeVR server and wait a few seconds for it to fully load. If you want to use other trackers with SlimeVR, don't turn them on until after you have MoSlime connected. Note: Any Mocopi tracker can be used on any body part. The plastic cover is purely cosmetic!
  2. Run python3 moslime.py, then immediately turn all the trackers back on. You can either do this manually or by plugging in the case, waiting for the trackers to light up then quickly unplugging it.
  3. You should see the lights on the trackers illuminate green one by one as they connect in the terminal. While they are connecting, leave the trackers in the case on a flat and stable surface. DO NOT touch them!
  4. Once you see Safe to start tracking in the terminal, make sure all trackers appear in SlimeVR. They should show up as IMU Tracker 1, IMU Tracker 2, etc.
    4a. [Optional]: At this point you can also turn on any additional SlimeVR trackers and use them alongside the Mocopis. Make sure you always start MoSlime first. This issue will be fixed in the future.
  5. You can now put on your trackers. If you've never used SlimeVR before, just click on Setup Wizard on the lefthand side and follow the instructions. You can skip the Wi-Fi Settings step.

Note

If you somehow accidentally close SlimeVR, you'll need to close MoSlime and follow the Usage section again. (make sure you turn the trackers off and restart bluetooth)

Troubleshooting

  • If trackers are refusing to connect, try stopping the script (mash Ctrl+C till it stops), turn off all the trackers, restart Bluetooth and follow the Usage section again.
  • If your trackers are still refusing to connect, try unparing them, press the button on each tracker 10-15 times to factory reset them (they'll blink red and blue), then pair them again.
  • If you see Safe to start tracking but no trackers in SlimeVR, make sure you have the correct IP address and that both computers are on the same network.
  • If your Linux PC is a desktop and range/performance seems really bad, make sure you have your WiFi/BT antenna connected. Alternatively, you can also use an external Bluetooth dongle but your mileage may vary.

Tested Bluetooth adapters

Contributors

  • @lmore377 - Original Bluetooth reverse-engineering work, Python code, quaternion correction math
  • @PlatinumVsReality - Slime packet generation code, Rust code, wip web interface, graphics, moral support
  • @itstait - Helped optimize multithreading (trust me it used to be much worse)

Resources