Skip to content

Define command protocol between backend and robotic hand #5

@GoodKimchi

Description

@GoodKimchi

Bluetooth Command Protocol (Draft)

This document describes the current Bluetooth command protocol used by the Rebelia Hand firmware and defines how the backend should interface with it.
The backend server will communicate with the robotic hand using Bluetooth Serial (SPP).

The firmware currently parses commands in processStringCmd() inside RebeliaRobot.ino.
Commands are sent as plain text strings over Bluetooth (often newline-terminated, e.g. \r\n).

Command Types Observed in Firmware

Grasp commands:
-POWER
-POWERSMALL
-MONKEY
-PINCH
-RELAX

Important behavior:

The firmware uses a stateful two-step control model:

  1. Send a grasp command (e.g. PINCH)
  2. Send a closure percentage (e.g. 60)

Example:

PINCH\r\n
60\r\n

Closure percentage

A numeric string represents the closure factor of the hand.

Example:
50

  • Range: 0–100
  • 0 = fully open
  • 100 = fully closed

Finger control:
FI // index finger
FM // middle finger
FR // ring finger
FT // thumb flex
RT // thumb rotation

Other commands:
INSTALL
TEST
CONTROL
POS
MOVE
CALIBRATE

Goals for this issue:

  • Document the full command set supported by the firmware
  • Confirm message formatting (line endings / spacing)
  • Define which commands should be exposed through the backend API
  • Ensure the backend sends commands compatible with the current firmware protocol

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentationenhancementNew feature or request

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions