Spinner360: protocol
Spinner360 BLE/USB protocol V1.1. ASCII commands, each terminated with \r (0x0D).
Interfaces
Section titled “Interfaces”- BLE name mask:
DT-SPIN-XXXX, whereXXXXis 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.
Commands
Section titled “Commands”| 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).
Decimal in, hexadecimal out
Section titled “Decimal in, hexadecimal out”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
Section titled “Acceleration”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).
Status
Section titled “Status”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 |
BLE safety
Section titled “BLE safety”Set the BLE safety system with B0001\r (ON) / B0000\r (OFF).
Reading replies over BLE
Section titled “Reading replies over BLE”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.
Start-up sequencing
Section titled “Start-up sequencing”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:
- wait for the notification subscription to be confirmed;
- send
V?,A,S?,C?,Aone at a time; - leave roughly 400–500 ms between these initial queries;
- repeat
V?orAif the reply you need did not arrive.
Older controllers
Section titled “Older controllers”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.
Typical flow
Section titled “Typical flow”- Read the version with
V?— this also tells you whether acceleration is supported. Silence here is not fatal; see Older controllers. - Read the status with
A. - Read the speed with
S?; set it withSxxxxif needed. - If acceleration is supported, read
C?and set it withCxxxxif needed. - Start with
P, stop withW. - If BLE safety is on, keep sending
AorS?every 1000–1500 ms while spinning. - Before closing, stop the platform with
W.
Over BLE, pace the opening queries as described in Start-up sequencing.