Motion capture and the layer where a device meets a phone

TuringSense, Inc.  Senior Software Engineer  Santa Clara, California  Jan 2020 – present

C#  Unity  Java  Android  BLE

The stack

Our apps are C# inside Unity: real-time 3D, motion capture, and the Bluetooth link between a sensor garment and the phone driving it. The parts I own sit underneath the 3D: the native Bluetooth layer, written in Java, and the wrapper our apps talk to.

I’ve been a senior software engineer at TuringSense since January 2020, and I’m part-time now.

The plugin we depended on stopped being maintained

Our Bluetooth connection came from a Unity plugin from the Asset Store. During demos in expo halls and hotels, the connection between the phone and the garment would drop and fail to come back. The only recovery we had was to kill the app and start the demo again.

The plugin hadn’t been updated since July 2024, troubleshooting it meant going into the plugin’s own code, and its author couldn’t help. So we wrote our own Android Bluetooth plugin, TSBLE, in Java against the platform’s native BLE API. That let us build reconnection into the native layer.

Working with our hardware and firmware engineers, I’ve also done BLE packet structure work and built BLE mesh through advertisement packets.

The bug that took weeks

Testing turned up a lot of strange reconnection failures. Some came from the Unity and Android layers disagreeing about the connection.

Unity held a connection state, and so did the Android layer. Underneath both of them, the radio would sometimes reconnect on its own without telling the app, so the app still believed it was disconnected. There was a multithreading crash as well, and it took weeks to get the app robust enough for our demos.

What fixed it was deciding which layer was allowed to be right. Now the native layer, TSBLE, owns the connection state. The SDK layer above it polls that state and reconciles, and the app only subscribes to the SDK’s events.

Before that: getting rid of nine seconds

Earlier on, the garment and the app spoke over WiFi. Setting up that link meant finding the best channel and running a series of checks before the connection could be trusted, and a user watched a spinner for around nine seconds every time they connected.

We moved the transport to Bluetooth, and the channel search went away with it. Connecting, including verification, settled at about two to three seconds.

The patent

I’m a co-inventor, second of seven named, on US 12,198,243 B2, “Online interactive platform with motion detection.” It was granted on January 14, 2025, with a priority date in September 2015. It covers comparing a person’s movement against a reference. TuringSense is the assignee.

The last two years

TuringSense’s last App Store release was PIVOT Yoga, in May 2024. Since then, in 2025, we built TSBLE and its reconnection work, and I own that layer.

Mentoring an intern

An intern with no Bluetooth experience worked with me to build TSBLE. By the end she was researching BLE mesh herself. That’s the measure I care about: not what someone can do while you’re sitting next to them, but what they can do once you’re not.