Skip to content

Instantly share code, notes, and snippets.

@mikklfr
Last active March 25, 2018 08:22
Show Gist options
  • Save mikklfr/1e8ee1f5386ba854b014ab4e4d6b0199 to your computer and use it in GitHub Desktop.
Save mikklfr/1e8ee1f5386ba854b014ab4e4d6b0199 to your computer and use it in GitHub Desktop.
AWOX_SML_C9
/*
Please add Neatle library to your project https://github.com/inovait/neatle
Writing sample :
.write(UUID.fromString(AWOX_AL_BC7_LIGHT_COLOR_SERVICE), UUID.fromString(AWOX_AL_BC7_LIGHT_COLOR_CHARAC), new InputSource() {
@Override
public void open() throws IOException {
}
@Override
public byte[] nextChunk() throws IOException {
return AWOX_AL_BC7_COLOR_GREEN;
}
@Override
public void close() throws IOException {
}
}, new CommandObserver() {
@Override
public void finished(Command command, CommandResult result) {
}
})
*/
private final static String AWOX_AL_BC7_LIGHT_SET_STATE_SERVICE = "33160fb9-5b27-4e70-b0f8-ff411e3ae078";
private final static String AWOX_AL_BC7_LIGHT_SET_STATE_CHARAC = "217887f8-0af2-4002-9c05-24c9ecf71600";
private final static String AWOX_AL_BC7_LIGHT_STATE_READ_CHARAC = "217887f8-0af2-4002-9c05-24c9ecf71600"; //0x00 or 0x01
private final static byte[] AWOX_AL_BC7_LIGHT_ON = new byte[]{0x01};
private final static byte[] AWOX_AL_BC7_LIGHT_OFF = new byte[]{0x00};
private final static String AWOX_AL_BC7_LIGHT_COLOR_SERVICE = "b882e31b-5096-43d1-90a9-edbf95073337";
private final static String AWOX_AL_BC7_LIGHT_COLOR_CHARAC = "74532143-fff1-460d-8e8a-370f934d40be";
private final static String AWOX_AL_BC7_LIGHT_COLOR_READ = "74532143-fff1-460d-8e8a-370f934d40be"; // RGB color
private final static byte[] AWOX_AL_BC7_COLOR_GREEN = new byte[]{0x00, (byte) 0xff, 0x00};
private final static byte[] AWOX_AL_BC7_COLOR_RED = new byte[]{(byte) 0xff, 0x00, 0x00};
private final static byte[] AWOX_AL_BC7_COLOR_BLUE = new byte[]{0x00, 0x00, (byte) 0xff};
private final static byte[] AWOX_AL_BC7_COLOR_WHITE = new byte[]{(byte) 0xff, (byte) 0xff, (byte) 0xff};
private final static byte[] AWOX_AL_BC7_COLOR_GRAY = new byte[]{(byte) 0x11, (byte) 0x11, (byte) 0x11};
private final static String AWOX_AL_BC7_LIGHT_COLOR_INTENSITY_SERVICE = "b882e31b-5096-43d1-90a9-edbf95073337";
private final static String AWOX_AL_BC7_LIGHT_COLOR_INTENSITY_CHARAC = "1c537b0a-4eaa-4e19-b98c-eaaa5bcd9bc9";
private final static byte[] AWOX_AL_BC7_COLOR_INTENSITY_MIN = new byte[]{0x00};
private final static byte[] AWOX_AL_BC7_COLOR_INTENSITY_LOW = new byte[]{0x05};
private final static byte[] AWOX_AL_BC7_COLOR_INTENSITY_MIDDLE = new byte[]{0x32};
private final static byte[] AWOX_AL_BC7_COLOR_INTENSITY_MAX = new byte[]{0x64};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment