Skip to content

Instantly share code, notes, and snippets.

@and7ey
Last active November 17, 2022 16:06
Show Gist options
  • Save and7ey/c299ff2e34ac714621b2ef4f4eeb4ae3 to your computer and use it in GitHub Desktop.
Save and7ey/c299ff2e34ac714621b2ef4f4eeb4ae3 to your computer and use it in GitHub Desktop.

SP107E API

Characteristic: 0000ffe1-0000-1000-8000-00805f9b34fb

Informative

CHECK_DEVICE

Get device information and calculate checksum.

Command byte: 0x01 Data: ? bytes Return: ? bytes Example: ?? ?? ?? 01

  1. ?
  2. ?
  3. Red Color
  4. Green Color
  5. Blue Color
  6. ?
  7. ?
  8. ?
  9. ?
  10. ?
  11. ?
  12. ?
  13. ?
  14. ?
  15. ?

GET_INFO

This command returns the same data as CHECK_DEVICE but without the checksum.

Command byte: 0x02 Data: 0 bytes Return: ? bytes Example: 00 00 00 02

Control

LED_ON

Turn leds on.

Command byte: 0xAA Data: 0 bytes Return: 0 bytes Example: 00 00 00 AA

LED_OFF

Turn leds off.

Command byte: 0xBB Data: 0 bytes Return: 0 bytes Example: 00 00 00 BB

SET_NO_MUSIC_STATIC_COLOR

Set a static color when there is no music.

Command byte: 0x0C Data: 3 bytes Return: 0 bytes The data bytes are red, green and blue (0-255). For example: purple Example: 00 FF FF 0C

Under development

LED CHORD app data

CMD_LED_ON((byte) -86, "CMD_LED_ON"),
CMD_LED_OFF((byte) -69, "CMD_LED_OFF"),
CMD_CHECK_DEVICE((byte) 1, "CMD_CHECK_DEVICE"),
CMD_GET_INFO((byte) 2, "CMD_GET_INFO"),
CMD_RENAME((byte) 3, "CMD_RENAME"),
CMD_SET_RGB((byte) 4, "CMD_SET_RGB_SEQ"),
CMD_SET_IC((byte) 5, "CMD_SET_IC_MODEL"),
CMD_SET_LED_PIXELS_COUNT((byte) 6, "CMD_SET_LED_PIXELS_COUNT"),
CMD_SET_MODE((byte) 8, "CMD_SET_MODE"),
CMD_SET_NO_MUSIC_SPEED((byte) 9, "CMD_SET_NO_MUSIC_SPEED"),
CMD_SET_NO_MUSIC_BRIGHTNESS((byte) 10, "CMD_SET_NO_MUSIC_BRIGHTNESS"),
CMD_SET_NO_MUSIC_WHITE_BRIGHTNESS((byte) 11, "CMD_SET_NO_MUSIC_WHITE_BRIGHTNESS"),
CMD_SET_NO_MUSIC_STATIC_COLOR((byte) 12, "CMD_SET_NO_MUSIC_STATIC_COLOR"),
CMD_SET_NO_MUSIC_AUTO_MODE((byte) 13, "CMD_SET_NO_MUSIC_AUTO_MODE"),
CMD_SET_STRIP_MUSIC_COLOR((byte) 14, "CMD_SET_STRIP_MUSIC_COLOR"),
CMD_SET_STRIP_MUSIC_AUTO_MODE((byte) 15, "CMD_SET_STRIP_MUSIC_AUTO_MODE"),
CMD_SET_SCREEN_MUSIC_COL_COLOR((byte) 16, "CMD_SET_SCREEN_MUSIC_COL_COLOR"),
CMD_SET_SCREEN_MUSIC_DOT_COLOR((byte) 17, "CMD_SET_SCREEN_MUSIC_DOT_COLOR"),
CMD_SET_SCREEN_MUSIC_AUTO_MODE((byte) 18, "CMD_SET_SCREEN_MUSIC_AUTO_MODE"),
CMD_SET_MUSIC_GAIN((byte) 19, "CMD_SET_MUSIC_GAIN");

Modes samples

be992f08
be198408
01d2e008 - rainbow mode
beced108
bfe37a08

@Nicooow
Copy link

Nicooow commented Nov 16, 2022

@monty68
Copy link

monty68 commented Nov 17, 2022

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment