That requires you to have a bike where the current gear is recognized digitally and the bike has a standard way of getting that data to an external device (or it requires you to put a sensor on the gear lever). For that matter, it requires you to have a bike with a manual transmission. There's lots of electric bikes, bikes with fully automatic transmissions, and bikes that simply don't have the electronics (not to mention a standard way to interface with them).
Actually in thinking about it, if you had access (digitally) to the current gear, you probably also have tachometer and velocity data as well through whatever that connection is anyway.
On the other hand, a motion sensor works for all bikes and is quite robust.
You can infer the gear based on vehicle speed and engine speed.
That's how gear indications work on most manual cars too: there's no actual sensor telling what gear is selected (other than reverse, and sometimes clutch pedal and neutral).
An existing brake light product, the Billy light from Clearwater, integrates with the BMW canbus to pull the bike's acceleration data and use that as a basis for what this light appears to do.
I can imagine there's enough of a market for BMW accessories that they can make it work, but if you want to address other bikes with the same device, you need a different approach.
Agreed, I was more responding to the idea of tying into existing sensors or motorcycle data as noted above. The light I mentioned is part of a bigger lighting system that works through a CAN interface and has all kinds of control of settings through a somewhat convoluted overlay on existing bike inputs, like press this switch, then these, then turn the wonder wheel to adjust brightness.
Actually in thinking about it, if you had access (digitally) to the current gear, you probably also have tachometer and velocity data as well through whatever that connection is anyway.
On the other hand, a motion sensor works for all bikes and is quite robust.