Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Antti/c0f7fd8ec0e480092ac1f80f29247d7c to your computer and use it in GitHub Desktop.
Save Antti/c0f7fd8ec0e480092ac1f80f29247d7c to your computer and use it in GitHub Desktop.
Notes on the reverse engineering of the data for the Neewer-RGB660 PRO leveraging bluetooth low energy.
Notes on the reverse engineering of the data for the Neewer-RGB660 PRO leveraging bluetooth low energy.
NEEWER-RGB660 PRO
02 41 00 0C 00 08 00 04 00 52 0E 00 78 81 01 01 FB
Preamble 02 04 00 0C 00 08 00 04 00 52 0E 00 Value 78 81 01 01 FB
Service UUID: 69400001b5a3f393e0a9e50e24dcca99
Caracteristic: 69400002b5a3f393e0a9e50e24dcca99
Properties: WRITE, WRITE NO RESPONSE
Sample HSL Command to the light:
Bluetooth Bluetooth HCI H4 Bluetooth HCI ACL Packet Bluetooth L2CAP Protocol Bluetooth Attribute Protocol Opcode: Write Command (0x52) 0... .... = Authentication Signature: False .1.. .... = Command: True ..01 0010 = Method: Write Request (0x12) Handle: 0x000e (Unknown: Unknown) [Service UUID: 69400001b5a3f393e0a9e50e24dcca99] [UUID: 69400002b5a3f393e0a9e50e24dcca99] Value: 78860458011864d7
HSV Commands:
***
Value (8 bytes total) is broken into several octets:
1 2 3 4 5 6 7 8
78 86 04 58 01 18 64 D7
Octet 1-3 remain the same regardless of data 78:86:04 Octet 4 is Hue 0-255 degrees 00-FF; Hue 256-365 degrees 00-6E Octet 5 is an overflow from Octet 4; 00 for 0-255 degrees; 01 for 256-365 degrees Octet 6 is Saturation 0-100% 00-64 Octet 7 is Luminance 0-100% 00-64 Octet 8 is a checksum truncated to the lowest 2 bytes. It is a summation of Octet 1-7
For the example 78:86:04:58:01:18:64:D7 The Hue has the hex value of 58 and is 88 degrees (a light green color with the RGB color code of 88FF00 R:136 G:255 B:0 The Saturation has the hex value of 18 and has a decimal value of 24 % (out of 100) The Luminance has the hex value of 64 and has a decimal value of 100% (out of 100) The calculated check sum is D7 { hex(decimal) : 74(120) + 86(134) + 04(4) + 58(88) + 01(1) + 18(24) + 64(100) = a decimal value of 471 471 is 1D7 in hex 1D7 is truncated into only the last 2 octets D7 ignoring the leading 1}
Upon submission of the Write Command to the Service the light will execute the requested color. If the requested command is malformed the fixture will ignore the request. This enumeration was done on a Neewer 660 RGB Pro.
CCT Commands:
***
Same Serivice UUID and Characteristic as HSV Mode This time with 6 Octets
1 2 3 4 5 6
78 87 02 64 26 8B
First thru thrid remain the same. 78 87 02
Fourth Octet is brightness. 0-100% 00-64
Fifth Octet is Color Temp (3200k - 5600k: Dec=32-56 Hex=20-38).
Sixth Octet is a checksum calculated the same as HSV Modes
Effect Commands:
***
Same Serivice UUID and Characteristic as HSV Mode This time with 6 Octets
1 2 3 4 5 6
78 88 02 64 01 67
First thru thrid remain the same. 78 88 02
Fourth Octet is brightness 0-100% 00-64
Fifth Octet is Effect.
01 - Emerengcy Scene A "Cop Car"
02 - Emerengcy Scene B "Ambulance"
03 - Emerengcy Scene C "Fire Truck"
04 - Celebration Scene A "Fireworks"
05 - Celebration Scene B "Party"
06 - Celebration Scene C "Candlelight"
07 - White Light Scene A "Lighting"
08 - White Light Scene B "Paparazzi"
09 - White Light Scene C "TV Screen"
Sixth Octet is a checksum calculated the same as HSV Modes
On/Off Commands:
***
Same Serivice UUID and Characteristic as HSV Mode This time with 5 Octets
1 2 3 4 5
78 81 01 01 FB
Only 2 settings exist for this mode.
Turn On 78 81 01 01 FB
Turn Off 78 81 01 02 FC
First Thru Third Octect Remain the same 78 81 01
Foruth Octect Turns On (01) or Off (02) the fixture's Output
The Fifth Octect is a checksum calculated the same as HSV Modes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment