Skip to content

Spinner360: protocol

Spinner360 BLE/USB protocol V1.1. ASCII commands, each terminated with \r (0x0D).

  • BLE name mask: DT-SPIN-XXXX, where XXXX is the controller serial (e.g. DT-SPIN-1234);
  • BLE service: FFE0;
  • BLE characteristic: FFE1;
  • USB (serial): 9600 8N1, device name mask CP210 — the Silabs CP210x bridge may need its driver, see Integration basics;
  • protocol: ASCII; terminator: \r.
Command Purpose Reply
V?\r controller version DT-SPINNER-VX.Y (older controllers may stay silent)
A\r status Azxcv (see below)
P\r start rotation echo P\r
W\r stop rotation echo W\r
S?\r current speed Phhhh\r — hexadecimal
Sxxxx\r set speed Phhhh\r with the applied speed
C?\r current acceleration Chhhh\r — hexadecimal
Cxxxx\r set acceleration Chhhh\r with the applied value
B0001\r / B0000\r BLE safety ON / OFF echo of the command

xxxx — four ASCII digits. Speed — recommended S0015 (slow) … S0090 (very fast).

Set commands take decimal ASCII; the reply carries the value in hexadecimal ASCII. The speed reply is prefixed with P, not S:

TX RX Value
S0093\r P005D\r 0x005D = 93
S0081\r P0051\r 0x0051 = 81
S0059\r P003B\r 0x003B = 59

So the contract is Sdddd\r on write and Phhhh\r in the reply. Acceleration behaves the same way, keeping its own C prefix in both directions.

Acceleration control works only on supported controllers. To detect support, send V?: if the controller replies with a version string (DT-SPINNER-VX.Y), it supports the acceleration setting. If there is no reply, do not use C? / Cxxxx — but note that this says nothing about the rest of the protocol, see Older controllers.

The acceleration value is the time in seconds the platform takes to reach its maximum rotation speed. Default: 20 s.

Command Meaning
C?\r get acceleration → C + value in hexadecimal
Cxxxx\r set acceleration, value in seconds

Recommended range:

  • C0005\r — very fast acceleration (5 s);
  • C0020\r — very slow acceleration (20 s).

A\r returns A followed by status flags: Azxcv over BLE, Azxc over USB (the USB reply omits the BLE-safety flag).

Flag Meaning 0 1
z platform rotation stopped rotating
x Safe stop safe stop activated normal state
c platform power power cord not connected connection OK
v BLE safety system (BLE only) OFF ON

Set the BLE safety system with B0001\r (ON) / B0000\r (OFF).

A notification boundary is not a frame boundary. One callback may deliver a partial frame, and just as often it delivers more than one — an echo together with a status or query reply, or two identical replies in a row.

Buffer the incoming bytes and:

  • accumulate until each 0x0D;
  • drain every complete frame from the buffer, not just the first;
  • treat a second frame as real data, not as trailing garbage;
  • never assume one GATT write produces exactly one notification.

A successful GATT write acknowledgement only means the bytes reached the BLE stack. It does not mean the controller’s parser has processed the command yet, so replies sent immediately after subscribing — or fired off as a tight burst — can be missed entirely.

A sequence that proved reliable on hardware:

  1. wait for the notification subscription to be confirmed;
  2. send V?, A, S?, C?, A one at a time;
  3. leave roughly 400–500 ms between these initial queries;
  4. repeat V? or A if the reply you need did not arrive.

A silent V? does not mean the controller is incompatible. A physical DT-SPIN-0052, with its notification subscription confirmed, ignored two V? probes and a C? — yet ran A, S?, P and W normally.

Read it narrowly: no version reply means the firmware revision and acceleration support are unconfirmed, nothing more. Probe the basic commands separately before deciding the device is unsupported.

  1. Read the version with V? — this also tells you whether acceleration is supported. Silence here is not fatal; see Older controllers.
  2. Read the status with A.
  3. Read the speed with S?; set it with Sxxxx if needed.
  4. If acceleration is supported, read C? and set it with Cxxxx if needed.
  5. Start with P, stop with W.
  6. If BLE safety is on, keep sending A or S? every 1000–1500 ms while spinning.
  7. Before closing, stop the platform with W.

Over BLE, pace the opening queries as described in Start-up sequencing.