UBTech robot Bluetooth communication protocal
A few protocols have been analyzed by experts, as follows:
Communication protocol format (fixed length 10 bytes):
Frame header (2 bytes) ID (1 byte) command (1 byte) parameters (4 bytes) SUM (1 byte) end of frame (1 byte)
Frame header:FA AF, frame tail:ED, SUM=ID+command+parameter, take the lowest bit 1 byte
Commands can be experimented in the order 01...FF.
Commands that have been experimented so far (CD command is to modify the servo id)
Read data: FA AF id 02 00 00 00 00 SUM ED
Servo answer: FA AF id AA actual angle sum ED
Write servo: FA AF id 01 angle sum ED
FA AF 01 04 01 00 00 00 06 ED Turn off led light
FA AF 01 04 00 00 00 00 05 ED Turn on the led light
Modify Servo ID: FA AF ID CD 0 newid 0 0 SUM ED
Bluetooth communication.
BT Handshake Machine
fb bf 06 01 00 07 ed
Get action table
fb bf 06 02 00 08 ed
Heartbeat packets
fb bf 06 08 00 0E ed
Read machine status
fb bf 06 0A 00 10 ed
Volume adjustment//val=00-ff
fb bf 06 0B val chk ed
All servos power down
fb bf 06 0C 00 12 ed
All servo lights control//00 off,01 on
fb bf 06 0D 00 13 ed
fb bf 06 0D 01 14 ed
Read machine battery level
fb bf 06 18 00 1e ed
Return:FB BF 09 18 22 DD 01 64 85 ED
Parameter 1 (2B): voltage value (mV)
Parameter 2 (1B): whether to charge or not (0X00-no, 0X01-yes, 0X02-no battery)
Parameter 3 (1B): Power percentage (0~100)
Control single servo movement
/ / 01 servo steering to 40 degrees (0x28),time 255*20ms (0xff)
fb bf 0a 22 01 28 ff 00 ff 53 ed
//1/01 servo turn to 0 degree, time 1 sec
fb bf 0a 22 01 00 32 00 ff 5e ed
//01 servo to 180 degrees, time 1 sec.
fb bf 0a 22 01 b4 32 00 ff 12 ed
//01 servo to 180 degrees, time 255*20ms (0xff)
fb bf 0a 22 01 b4 ff 00 ff df ed
Read back single servo angle (power down)
fb bf 06 24 01 2b ed
Set individual servo offset value
/ / 13 servo offset value set to ff f2
fb bf 08 26 0d ff f2 2c ed
fb bf 08 26 0b 00 10 49 ed
Read individual servo offset values
fb bf 06 28 01 2f ed
fb bf 06 28 02 30 ed
fb bf 06 28 0d 3b ed
fb bf 06 28 0b 39 ed