Document VibCrafter Protocol
blackspherefollower opened this issue · comments
BLE Name: be gentle
Service UUID: 53300051-0060-4BD4-BBE5-A6920E4C5663
Tx Characteristic UUID: 53300052-0060-4BD4-BBE5-A6920E4C5663
Rx Characteristic UUID: 53300053-0060-4BD4-BBE5-A6920E4C5663
Packets are encrypted:
byte[] key = "jdk#Cra%f5Vib28r".getBytes("UTF-8");
Cipher instance = Cipher.getInstance("AES/ECB/PKCS5Padding");
instance.init(1, new SecretKeySpec(key, "AES"));
return instance.doFinal(command.getBytes("UTF-8"));
Initialisation:
- Send
Auth:????????;
where ? is[a-zA-Z0-9]
(random but stored) - Receive
XXXX:YYYYYY;
- SHA256 the YYYYYY portion to uppercase hex string, and keep just the first 4 characters to get ZZZZ
- Send
Auth:ZZZZ;
- Receive
OK;
Commands:
- Query capabilities:
GetMotor;
, returnsMotor:2;
(2 motors)GetLight
returnsLight:1;
GetHeat;
returnsHeat:9;
GetVer;
returnsS:PY83:0030;
- Query Battery:
Battery;
returns34;
- Intensity:
MtInt:XXYY;
where XX is 00-99 intensity1, YY is 00-99 intensity2 - Pattern:
MP1233445566;
where 1 and 2 are A-I, 33 and 44 are 00-99 intensity, 55 and 66 are pattern speeds 00-03 AutoLED:NN;
where NN is 00-99- Stop:
MPZZ00000000
ModelData[]{
ModelData("A", R.drawable.selector_shock_wave, R.string.shock_wave, "shockwave.json", false, 16, null),
ModelData("B", R.drawable.selector_swing, R.string.swing, "swing.json", false, 16, null),
ModelData("C", R.drawable.selector_lightning, R.string.lightning, "lighting.json", false, 16, null),
ModelData("D", R.drawable.selector_jump, R.string.jump, "jump.json", false, 16, null),
ModelData("E", R.drawable.selector_bang_bang, R.string.bang_bang, "bangbang.json", false, 16, null),
ModelData("F", R.drawable.selector_parkour, R.string.parkour, "parkour.json", false, 16, null),
ModelData("G", R.drawable.selector_bungy, R.string.bungy, "bungy.json", false, 16, null),
ModelData("H", R.drawable.selector_roller_coaster, R.string.roller_coaster, "roller coaster.json", false, 16, null),
ModelData("I", R.drawable.selector_explosive, R.string.explosive, "Exolosive.json", false, 16, null)});```