55

I am creating an Android project, in which I have to make an android wearable smartwatch as a game controller that can send commands to games running on a handheld device connected to that smartwatch over BLE(Bluetooth Low Energy).

I designed a controller pad on wearable and can send some hard-coded text to a handheld device app with a soft button click of the controller pad. The issue is, that I have to replace that text with the game commands format expected by games running on handheld devices. And, the app running on a handheld device can listen to text through wearable service. I know that third-party games would not have any wearable service running, so how third-party games will accept/listen to commands sent from the wearable smartwatch?

Third-party games can support hardware controller through Android SDK

3
  • You could parse the incoming text at the app-side, so it functions as a controller. But I believe you're looking to create a generic controller for multiple apps (over which you have no control). You may look up some sources on "BLE controller", I'm not sure if "BLE HID" is what controllers use.
    – Paul
    Jul 22, 2016 at 7:28
  • 2
    This may have some interesting points: bluetooth.org/docman/handlers/downloaddoc.ashx?doc_id=309012. It mentions "force feedback controller", but it should also apply to non-force-feedback controllers, I believe.
    – Paul
    Jul 22, 2016 at 7:32
  • 1
    i think you need make your watch be a bt gamejoy stick.
    – Jiang YD
    Aug 4, 2016 at 3:11

1 Answer 1

0

You could use the "Manifacturer Specific Data" Bytes in the BLE Standard to send some Data Between Wearable and phone.

You could use the watch as a sort of beacon that can send your data in the portion of the message. Then you could read those values and get the data. Note that you can only encode 31 bytes in the Manifactuer Specific Data Section in the standard bluetooth spec and that you can only read the inputs every time you can recieve the bluetooth beacons.

You can see the BLE Spec here. For your Data you could use the Payload.

You can see the BLE Spec here. For your Data you could use the Payload. You would have to scan for the ble beacon permanently and get the newes payload information.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.