diff -Naur '--exclude=.*' make/lightmanager.orig/Config.in make/lightmanager/Config.in
--- make/lightmanager.orig/Config.in 1970-01-01 01:00:00.000000000 +0100
+++ make/lightmanager/Config.in 2012-07-03 14:53:45.000000000 +0200
@@ -0,0 +1,10 @@
+config FREETZ_PACKAGE_LIGHTMANAGER
+ bool "lightmanager 0.1 (binary only)"
+ select FREETZ_LIB_libusb_1
+ default n
+ help
+ It's a little linux server program which allows you to control
+ your jbmedia LightManager connected via USB. The program uses
+ LibUSB 1.0 and a few standart Linux network headers.
+ IPPF: http://www.ip-phone-forum.de/showthread.php?t=249984
+ WWW: https://code.google.com/p/light-manager-c/
diff -Naur '--exclude=.*' make/lightmanager.orig/lightmanager.mk make/lightmanager/lightmanager.mk
--- make/lightmanager.orig/lightmanager.mk 1970-01-01 01:00:00.000000000 +0100
+++ make/lightmanager/lightmanager.mk 2012-07-03 15:04:20.000000000 +0200
@@ -0,0 +1,27 @@
+$(call PKG_INIT_BIN, 0.1)
+$(PKG)_BINARY:=$($(PKG)_DIR)/$(pkg)
+$(PKG)_TARGET_BINARY:=$($(PKG)_DEST_DIR)/usr/bin/$(pkg)
+
+$(PKG)_DEPENDS_ON :=libusb1
+
+$(PKG_LOCALSOURCE_PACKAGE)
+$(PKG_CONFIGURED_NOP)
+
+$($(PKG)_BINARY): $($(PKG)_DIR)/.configured
+ $(SUBMAKE) -C $(LIGHTMANAGER_DIR) \
+ CC="$(TARGET_CC)" \
+ CFLAGS="$(TARGET_CFLAGS)"
+
+$($(PKG)_TARGET_BINARY): $($(PKG)_BINARY)
+ $(INSTALL_BINARY_STRIP)
+
+$(pkg)-precompiled: $($(PKG)_TARGET_BINARY)
+
+$(pkg)-clean:
+ -$(SUBMAKE) -C $(LIGHTMANAGER_DIR) clean
+ $(RM) $(LIGHTMANAGER_DIR)/.configured
+
+$(pkg)-uninstall:
+ $(RM) $(LIGHTMANAGER_TARGET_BINARY)
+
+$(PKG_FINISH)
diff -Naur '--exclude=.*' make/lightmanager.orig/src/actors.h make/lightmanager/src/actors.h
--- make/lightmanager.orig/src/actors.h 1970-01-01 01:00:00.000000000 +0100
+++ make/lightmanager/src/actors.h 2012-07-03 13:22:52.000000000 +0200
@@ -0,0 +1,560 @@
+/*
+ * actors.h
+ *
+ * Contains code to be send to LightManager
+ *
+ * Created on: 02.07.2012
+ * Author: zwiebelchen
+ */
+
+#ifndef ACTORS_H_
+#define ACTORS_H_
+
+// Intertechno devices
+
+unsigned char A1_ON[] = { 0x05, 0x00, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char A2_ON[] = { 0x05, 0x01, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char A3_ON[] = { 0x05, 0x02, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char A4_ON[] = { 0x05, 0x03, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char A5_ON[] = { 0x05, 0x04, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char A6_ON[] = { 0x05, 0x05, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char A7_ON[] = { 0x05, 0x06, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char A8_ON[] = { 0x05, 0x07, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char A9_ON[] = { 0x05, 0x08, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char A10_ON[] = { 0x05, 0x09, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char A11_ON[] = { 0x05, 0x0a, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char A12_ON[] = { 0x05, 0x0b, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char A13_ON[] = { 0x05, 0x0c, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char A14_ON[] = { 0x05, 0x0d, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char A15_ON[] = { 0x05, 0x0e, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char A16_ON[] = { 0x05, 0x0f, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+
+unsigned char A1_OFF[] = { 0x05, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char A2_OFF[] = { 0x05, 0x01, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char A3_OFF[] = { 0x05, 0x02, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char A4_OFF[] = { 0x05, 0x03, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char A5_OFF[] = { 0x05, 0x04, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char A6_OFF[] = { 0x05, 0x05, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char A7_OFF[] = { 0x05, 0x06, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char A8_OFF[] = { 0x05, 0x07, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char A9_OFF[] = { 0x05, 0x08, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char A10_OFF[] = { 0x05, 0x09, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char A11_OFF[] = { 0x05, 0x0a, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char A12_OFF[] = { 0x05, 0x0b, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char A13_OFF[] = { 0x05, 0x0c, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char A14_OFF[] = { 0x05, 0x0d, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char A15_OFF[] = { 0x05, 0x0e, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char A16_OFF[] = { 0x05, 0x0f, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+
+unsigned char B1_ON[] = { 0x05, 0x10, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char B2_ON[] = { 0x05, 0x11, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char B3_ON[] = { 0x05, 0x12, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char B4_ON[] = { 0x05, 0x13, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char B5_ON[] = { 0x05, 0x14, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char B6_ON[] = { 0x05, 0x15, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char B7_ON[] = { 0x05, 0x16, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char B8_ON[] = { 0x05, 0x17, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char B9_ON[] = { 0x05, 0x18, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char B10_ON[] = { 0x05, 0x19, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char B11_ON[] = { 0x05, 0x1a, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char B12_ON[] = { 0x05, 0x1b, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char B13_ON[] = { 0x05, 0x1c, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char B14_ON[] = { 0x05, 0x1d, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char B15_ON[] = { 0x05, 0x1e, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char B16_ON[] = { 0x05, 0x1f, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+
+unsigned char B1_OFF[] = { 0x05, 0x10, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char B2_OFF[] = { 0x05, 0x11, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char B3_OFF[] = { 0x05, 0x12, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char B4_OFF[] = { 0x05, 0x13, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char B5_OFF[] = { 0x05, 0x14, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char B6_OFF[] = { 0x05, 0x15, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char B7_OFF[] = { 0x05, 0x16, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char B8_OFF[] = { 0x05, 0x17, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char B9_OFF[] = { 0x05, 0x18, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char B10_OFF[] = { 0x05, 0x19, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char B11_OFF[] = { 0x05, 0x1a, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char B12_OFF[] = { 0x05, 0x1b, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char B13_OFF[] = { 0x05, 0x1c, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char B14_OFF[] = { 0x05, 0x1d, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char B15_OFF[] = { 0x05, 0x1e, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char B16_OFF[] = { 0x05, 0x1f, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+
+unsigned char C1_ON[] = { 0x05, 0x20, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char C2_ON[] = { 0x05, 0x21, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char C3_ON[] = { 0x05, 0x22, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char C4_ON[] = { 0x05, 0x23, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char C5_ON[] = { 0x05, 0x24, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char C6_ON[] = { 0x05, 0x25, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char C7_ON[] = { 0x05, 0x26, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char C8_ON[] = { 0x05, 0x27, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char C9_ON[] = { 0x05, 0x28, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char C10_ON[] = { 0x05, 0x29, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char C11_ON[] = { 0x05, 0x2a, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char C12_ON[] = { 0x05, 0x2b, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char C13_ON[] = { 0x05, 0x2c, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char C14_ON[] = { 0x05, 0x2d, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char C15_ON[] = { 0x05, 0x2e, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char C16_ON[] = { 0x05, 0x2f, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+
+unsigned char C1_OFF[] = { 0x05, 0x20, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char C2_OFF[] = { 0x05, 0x21, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char C3_OFF[] = { 0x05, 0x22, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char C4_OFF[] = { 0x05, 0x23, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char C5_OFF[] = { 0x05, 0x24, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char C6_OFF[] = { 0x05, 0x25, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char C7_OFF[] = { 0x05, 0x26, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char C8_OFF[] = { 0x05, 0x27, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char C9_OFF[] = { 0x05, 0x28, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char C10_OFF[] = { 0x05, 0x29, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char C11_OFF[] = { 0x05, 0x2a, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char C12_OFF[] = { 0x05, 0x2b, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char C13_OFF[] = { 0x05, 0x2c, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char C14_OFF[] = { 0x05, 0x2d, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char C15_OFF[] = { 0x05, 0x2e, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char C16_OFF[] = { 0x05, 0x2f, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+
+unsigned char D1_ON[] = { 0x05, 0x30, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char D2_ON[] = { 0x05, 0x31, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char D3_ON[] = { 0x05, 0x32, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char D4_ON[] = { 0x05, 0x33, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char D5_ON[] = { 0x05, 0x34, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char D6_ON[] = { 0x05, 0x35, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char D7_ON[] = { 0x05, 0x36, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char D8_ON[] = { 0x05, 0x37, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char D9_ON[] = { 0x05, 0x38, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char D10_ON[] = { 0x05, 0x39, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char D11_ON[] = { 0x05, 0x3a, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char D12_ON[] = { 0x05, 0x3b, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char D13_ON[] = { 0x05, 0x3c, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char D14_ON[] = { 0x05, 0x3d, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char D15_ON[] = { 0x05, 0x3e, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char D16_ON[] = { 0x05, 0x3f, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+
+unsigned char D1_OFF[] = { 0x05, 0x30, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char D2_OFF[] = { 0x05, 0x31, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char D3_OFF[] = { 0x05, 0x32, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char D4_OFF[] = { 0x05, 0x33, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char D5_OFF[] = { 0x05, 0x34, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char D6_OFF[] = { 0x05, 0x35, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char D7_OFF[] = { 0x05, 0x36, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char D8_OFF[] = { 0x05, 0x37, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char D9_OFF[] = { 0x05, 0x38, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char D10_OFF[] = { 0x05, 0x39, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char D11_OFF[] = { 0x05, 0x3a, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char D12_OFF[] = { 0x05, 0x3b, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char D13_OFF[] = { 0x05, 0x3c, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char D14_OFF[] = { 0x05, 0x3d, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char D15_OFF[] = { 0x05, 0x3e, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char D16_OFF[] = { 0x05, 0x3f, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+
+unsigned char E1_ON[] = { 0x05, 0x40, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char E2_ON[] = { 0x05, 0x41, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char E3_ON[] = { 0x05, 0x42, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char E4_ON[] = { 0x05, 0x43, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char E5_ON[] = { 0x05, 0x44, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char E6_ON[] = { 0x05, 0x45, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char E7_ON[] = { 0x05, 0x46, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char E8_ON[] = { 0x05, 0x47, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char E9_ON[] = { 0x05, 0x48, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char E10_ON[] = { 0x05, 0x49, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char E11_ON[] = { 0x05, 0x4a, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char E12_ON[] = { 0x05, 0x4b, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char E13_ON[] = { 0x05, 0x4c, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char E14_ON[] = { 0x05, 0x4d, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char E15_ON[] = { 0x05, 0x4e, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char E16_ON[] = { 0x05, 0x4f, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+
+unsigned char E1_OFF[] = { 0x05, 0x40, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char E2_OFF[] = { 0x05, 0x41, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char E3_OFF[] = { 0x05, 0x42, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char E4_OFF[] = { 0x05, 0x43, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char E5_OFF[] = { 0x05, 0x44, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char E6_OFF[] = { 0x05, 0x45, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char E7_OFF[] = { 0x05, 0x46, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char E8_OFF[] = { 0x05, 0x47, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char E9_OFF[] = { 0x05, 0x48, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char E10_OFF[] = { 0x05, 0x49, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char E11_OFF[] = { 0x05, 0x4a, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char E12_OFF[] = { 0x05, 0x4b, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char E13_OFF[] = { 0x05, 0x4c, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char E14_OFF[] = { 0x05, 0x4d, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char E15_OFF[] = { 0x05, 0x4e, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char E16_OFF[] = { 0x05, 0x4f, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+
+unsigned char F1_ON[] = { 0x05, 0x50, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char F2_ON[] = { 0x05, 0x51, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char F3_ON[] = { 0x05, 0x52, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char F4_ON[] = { 0x05, 0x53, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char F5_ON[] = { 0x05, 0x54, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char F6_ON[] = { 0x05, 0x55, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char F7_ON[] = { 0x05, 0x56, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char F8_ON[] = { 0x05, 0x57, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char F9_ON[] = { 0x05, 0x58, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char F10_ON[] = { 0x05, 0x59, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char F11_ON[] = { 0x05, 0x5a, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char F12_ON[] = { 0x05, 0x5b, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char F13_ON[] = { 0x05, 0x5c, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char F14_ON[] = { 0x05, 0x5d, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char F15_ON[] = { 0x05, 0x5e, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char F16_ON[] = { 0x05, 0x5f, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+
+unsigned char F1_OFF[] = { 0x05, 0x50, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char F2_OFF[] = { 0x05, 0x51, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char F3_OFF[] = { 0x05, 0x52, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char F4_OFF[] = { 0x05, 0x53, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char F5_OFF[] = { 0x05, 0x54, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char F6_OFF[] = { 0x05, 0x55, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char F7_OFF[] = { 0x05, 0x56, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char F8_OFF[] = { 0x05, 0x57, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char F9_OFF[] = { 0x05, 0x58, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char F10_OFF[] = { 0x05, 0x59, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char F11_OFF[] = { 0x05, 0x5a, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char F12_OFF[] = { 0x05, 0x5b, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char F13_OFF[] = { 0x05, 0x5c, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char F14_OFF[] = { 0x05, 0x5d, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char F15_OFF[] = { 0x05, 0x5e, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char F16_OFF[] = { 0x05, 0x5f, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+
+
+unsigned char G1_ON[] = { 0x05, 0x60, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char G2_ON[] = { 0x05, 0x61, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char G3_ON[] = { 0x05, 0x62, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char G4_ON[] = { 0x05, 0x63, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char G5_ON[] = { 0x05, 0x64, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char G6_ON[] = { 0x05, 0x65, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char G7_ON[] = { 0x05, 0x66, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char G8_ON[] = { 0x05, 0x67, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char G9_ON[] = { 0x05, 0x68, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char G10_ON[] = { 0x05, 0x69, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char G11_ON[] = { 0x05, 0x6a, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char G12_ON[] = { 0x05, 0x6b, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char G13_ON[] = { 0x05, 0x6c, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char G14_ON[] = { 0x05, 0x6d, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char G15_ON[] = { 0x05, 0x6e, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char G16_ON[] = { 0x05, 0x6f, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+
+unsigned char G1_OFF[] = { 0x05, 0x60, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char G2_OFF[] = { 0x05, 0x61, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char G3_OFF[] = { 0x05, 0x62, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char G4_OFF[] = { 0x05, 0x63, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char G5_OFF[] = { 0x05, 0x64, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char G6_OFF[] = { 0x05, 0x65, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char G7_OFF[] = { 0x05, 0x66, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char G8_OFF[] = { 0x05, 0x67, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char G9_OFF[] = { 0x05, 0x68, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char G10_OFF[] = { 0x05, 0x69, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char G11_OFF[] = { 0x05, 0x6a, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char G12_OFF[] = { 0x05, 0x6b, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char G13_OFF[] = { 0x05, 0x6c, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char G14_OFF[] = { 0x05, 0x6d, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char G15_OFF[] = { 0x05, 0x6e, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char G16_OFF[] = { 0x05, 0x6f, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+
+unsigned char H1_ON[] = { 0x05, 0x70, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char H2_ON[] = { 0x05, 0x71, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char H3_ON[] = { 0x05, 0x72, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char H4_ON[] = { 0x05, 0x73, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char H5_ON[] = { 0x05, 0x74, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char H6_ON[] = { 0x05, 0x75, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char H7_ON[] = { 0x05, 0x76, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char H8_ON[] = { 0x05, 0x77, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char H9_ON[] = { 0x05, 0x78, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char H10_ON[] = { 0x05, 0x79, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char H11_ON[] = { 0x05, 0x7a, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char H12_ON[] = { 0x05, 0x7b, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char H13_ON[] = { 0x05, 0x7c, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char H14_ON[] = { 0x05, 0x7d, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char H15_ON[] = { 0x05, 0x7e, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char H16_ON[] = { 0x05, 0x7f, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+
+unsigned char H1_OFF[] = { 0x05, 0x70, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char H2_OFF[] = { 0x05, 0x71, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char H3_OFF[] = { 0x05, 0x72, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char H4_OFF[] = { 0x05, 0x73, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char H5_OFF[] = { 0x05, 0x74, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char H6_OFF[] = { 0x05, 0x75, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char H7_OFF[] = { 0x05, 0x76, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char H8_OFF[] = { 0x05, 0x77, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char H9_OFF[] = { 0x05, 0x78, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char H10_OFF[] = { 0x05, 0x79, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char H11_OFF[] = { 0x05, 0x7a, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char H12_OFF[] = { 0x05, 0x7b, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char H13_OFF[] = { 0x05, 0x7c, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char H14_OFF[] = { 0x05, 0x7d, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char H15_OFF[] = { 0x05, 0x7e, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char H16_OFF[] = { 0x05, 0x7f, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+
+unsigned char I1_ON[] = { 0x05, 0x80, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char I2_ON[] = { 0x05, 0x81, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char I3_ON[] = { 0x05, 0x82, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char I4_ON[] = { 0x05, 0x83, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char I5_ON[] = { 0x05, 0x84, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char I6_ON[] = { 0x05, 0x85, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char I7_ON[] = { 0x05, 0x86, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char I8_ON[] = { 0x05, 0x87, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char I9_ON[] = { 0x05, 0x88, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char I10_ON[] = { 0x05, 0x89, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char I11_ON[] = { 0x05, 0x8a, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char I12_ON[] = { 0x05, 0x8b, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char I13_ON[] = { 0x05, 0x8c, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char I14_ON[] = { 0x05, 0x8d, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char I15_ON[] = { 0x05, 0x8e, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char I16_ON[] = { 0x05, 0x8f, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+
+unsigned char I1_OFF[] = { 0x05, 0x80, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char I2_OFF[] = { 0x05, 0x81, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char I3_OFF[] = { 0x05, 0x82, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char I4_OFF[] = { 0x05, 0x83, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char I5_OFF[] = { 0x05, 0x84, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char I6_OFF[] = { 0x05, 0x85, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char I7_OFF[] = { 0x05, 0x86, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char I8_OFF[] = { 0x05, 0x87, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char I9_OFF[] = { 0x05, 0x88, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char I10_OFF[] = { 0x05, 0x89, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char I11_OFF[] = { 0x05, 0x8a, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char I12_OFF[] = { 0x05, 0x8b, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char I13_OFF[] = { 0x05, 0x8c, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char I14_OFF[] = { 0x05, 0x8d, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char I15_OFF[] = { 0x05, 0x8e, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char I16_OFF[] = { 0x05, 0x8f, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+
+unsigned char J1_ON[] = { 0x05, 0x90, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char J2_ON[] = { 0x05, 0x91, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char J3_ON[] = { 0x05, 0x92, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char J4_ON[] = { 0x05, 0x93, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char J5_ON[] = { 0x05, 0x94, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char J6_ON[] = { 0x05, 0x95, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char J7_ON[] = { 0x05, 0x96, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char J8_ON[] = { 0x05, 0x97, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char J9_ON[] = { 0x05, 0x98, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char J10_ON[] = { 0x05, 0x99, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char J11_ON[] = { 0x05, 0x9a, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char J12_ON[] = { 0x05, 0x9b, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char J13_ON[] = { 0x05, 0x9c, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char J14_ON[] = { 0x05, 0x9d, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char J15_ON[] = { 0x05, 0x9e, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char J16_ON[] = { 0x05, 0x9f, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+
+unsigned char J1_OFF[] = { 0x05, 0x90, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char J2_OFF[] = { 0x05, 0x91, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char J3_OFF[] = { 0x05, 0x92, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char J4_OFF[] = { 0x05, 0x93, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char J5_OFF[] = { 0x05, 0x94, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char J6_OFF[] = { 0x05, 0x95, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char J7_OFF[] = { 0x05, 0x96, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char J8_OFF[] = { 0x05, 0x97, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char J9_OFF[] = { 0x05, 0x98, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char J10_OFF[] = { 0x05, 0x99, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char J11_OFF[] = { 0x05, 0x9a, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char J12_OFF[] = { 0x05, 0x9b, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char J13_OFF[] = { 0x05, 0x9c, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char J14_OFF[] = { 0x05, 0x9d, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char J15_OFF[] = { 0x05, 0x9e, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char J16_OFF[] = { 0x05, 0x9f, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+
+unsigned char K1_ON[] = { 0x05, 0xa0, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char K2_ON[] = { 0x05, 0xa1, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char K3_ON[] = { 0x05, 0xa2, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char K4_ON[] = { 0x05, 0xa3, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char K5_ON[] = { 0x05, 0xa4, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char K6_ON[] = { 0x05, 0xa5, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char K7_ON[] = { 0x05, 0xa6, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char K8_ON[] = { 0x05, 0xa7, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char K9_ON[] = { 0x05, 0xa8, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char K10_ON[] = { 0x05, 0xa9, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char K11_ON[] = { 0x05, 0xaa, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char K12_ON[] = { 0x05, 0xab, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char K13_ON[] = { 0x05, 0xac, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char K14_ON[] = { 0x05, 0xad, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char K15_ON[] = { 0x05, 0xae, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char K16_ON[] = { 0x05, 0xaf, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+
+unsigned char K1_OFF[] = { 0x05, 0xa0, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char K2_OFF[] = { 0x05, 0xa1, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char K3_OFF[] = { 0x05, 0xa2, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char K4_OFF[] = { 0x05, 0xa3, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char K5_OFF[] = { 0x05, 0xa4, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char K6_OFF[] = { 0x05, 0xa5, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char K7_OFF[] = { 0x05, 0xa6, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char K8_OFF[] = { 0x05, 0xa7, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char K9_OFF[] = { 0x05, 0xa8, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char K10_OFF[] = { 0x05, 0xa9, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char K11_OFF[] = { 0x05, 0xaa, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char K12_OFF[] = { 0x05, 0xab, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char K13_OFF[] = { 0x05, 0xac, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char K14_OFF[] = { 0x05, 0xad, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char K15_OFF[] = { 0x05, 0xae, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char K16_OFF[] = { 0x05, 0xaf, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+
+unsigned char L1_ON[] = { 0x05, 0xb0, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char L2_ON[] = { 0x05, 0xb1, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char L3_ON[] = { 0x05, 0xb2, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char L4_ON[] = { 0x05, 0xb3, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char L5_ON[] = { 0x05, 0xb4, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char L6_ON[] = { 0x05, 0xb5, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char L7_ON[] = { 0x05, 0xb6, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char L8_ON[] = { 0x05, 0xb7, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char L9_ON[] = { 0x05, 0xb8, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char L10_ON[] = { 0x05, 0xb9, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char L11_ON[] = { 0x05, 0xba, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char L12_ON[] = { 0x05, 0xbb, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char L13_ON[] = { 0x05, 0xbc, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char L14_ON[] = { 0x05, 0xbd, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char L15_ON[] = { 0x05, 0xbe, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char L16_ON[] = { 0x05, 0xbf, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+
+unsigned char L1_OFF[] = { 0x05, 0xb0, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char L2_OFF[] = { 0x05, 0xb1, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char L3_OFF[] = { 0x05, 0xb2, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char L4_OFF[] = { 0x05, 0xb3, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char L5_OFF[] = { 0x05, 0xb4, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char L6_OFF[] = { 0x05, 0xb5, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char L7_OFF[] = { 0x05, 0xb6, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char L8_OFF[] = { 0x05, 0xb7, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char L9_OFF[] = { 0x05, 0xb8, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char L10_OFF[] = { 0x05, 0xb9, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char L11_OFF[] = { 0x05, 0xba, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char L12_OFF[] = { 0x05, 0xbb, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char L13_OFF[] = { 0x05, 0xbc, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char L14_OFF[] = { 0x05, 0xbd, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char L15_OFF[] = { 0x05, 0xbe, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char L16_OFF[] = { 0x05, 0xbf, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+
+unsigned char M1_ON[] = { 0x05, 0xc0, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char M2_ON[] = { 0x05, 0xc1, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char M3_ON[] = { 0x05, 0xc2, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char M4_ON[] = { 0x05, 0xc3, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char M5_ON[] = { 0x05, 0xc4, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char M6_ON[] = { 0x05, 0xc5, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char M7_ON[] = { 0x05, 0xc6, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char M8_ON[] = { 0x05, 0xc7, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char M9_ON[] = { 0x05, 0xc8, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char M10_ON[] = { 0x05, 0xc9, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char M11_ON[] = { 0x05, 0xca, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char M12_ON[] = { 0x05, 0xcb, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char M13_ON[] = { 0x05, 0xcc, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char M14_ON[] = { 0x05, 0xcd, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char M15_ON[] = { 0x05, 0xce, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char M16_ON[] = { 0x05, 0xcf, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+
+unsigned char M1_OFF[] = { 0x05, 0xc0, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char M2_OFF[] = { 0x05, 0xc1, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char M3_OFF[] = { 0x05, 0xc2, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char M4_OFF[] = { 0x05, 0xc3, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char M5_OFF[] = { 0x05, 0xc4, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char M6_OFF[] = { 0x05, 0xc5, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char M7_OFF[] = { 0x05, 0xc6, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char M8_OFF[] = { 0x05, 0xc7, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char M9_OFF[] = { 0x05, 0xc8, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char M10_OFF[] = { 0x05, 0xc9, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char M11_OFF[] = { 0x05, 0xca, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char M12_OFF[] = { 0x05, 0xcb, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char M13_OFF[] = { 0x05, 0xcc, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char M14_OFF[] = { 0x05, 0xcd, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char M15_OFF[] = { 0x05, 0xce, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char M16_OFF[] = { 0x05, 0xcf, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+
+unsigned char N1_ON[] = { 0x05, 0xd0, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char N2_ON[] = { 0x05, 0xd1, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char N3_ON[] = { 0x05, 0xd2, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char N4_ON[] = { 0x05, 0xd3, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char N5_ON[] = { 0x05, 0xd4, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char N6_ON[] = { 0x05, 0xd5, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char N7_ON[] = { 0x05, 0xd6, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char N8_ON[] = { 0x05, 0xd7, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char N9_ON[] = { 0x05, 0xd8, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char N10_ON[] = { 0x05, 0xd9, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char N11_ON[] = { 0x05, 0xda, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char N12_ON[] = { 0x05, 0xdb, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char N13_ON[] = { 0x05, 0xdc, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char N14_ON[] = { 0x05, 0xdd, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char N15_ON[] = { 0x05, 0xde, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char N16_ON[] = { 0x05, 0xdf, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+
+unsigned char N1_OFF[] = { 0x05, 0xd0, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char N2_OFF[] = { 0x05, 0xd1, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char N3_OFF[] = { 0x05, 0xd2, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char N4_OFF[] = { 0x05, 0xd3, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char N5_OFF[] = { 0x05, 0xd4, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char N6_OFF[] = { 0x05, 0xd5, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char N7_OFF[] = { 0x05, 0xd6, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char N8_OFF[] = { 0x05, 0xd7, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char N9_OFF[] = { 0x05, 0xd8, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char N10_OFF[] = { 0x05, 0xd9, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char N11_OFF[] = { 0x05, 0xda, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char N12_OFF[] = { 0x05, 0xdb, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char N13_OFF[] = { 0x05, 0xdc, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char N14_OFF[] = { 0x05, 0xdd, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char N15_OFF[] = { 0x05, 0xde, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char N16_OFF[] = { 0x05, 0xdf, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+
+unsigned char O1_ON[] = { 0x05, 0xe0, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char O2_ON[] = { 0x05, 0xe1, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char O3_ON[] = { 0x05, 0xe2, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char O4_ON[] = { 0x05, 0xe3, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char O5_ON[] = { 0x05, 0xe4, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char O6_ON[] = { 0x05, 0xe5, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char O7_ON[] = { 0x05, 0xe6, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char O8_ON[] = { 0x05, 0xe7, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char O9_ON[] = { 0x05, 0xe8, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char O10_ON[] = { 0x05, 0xe9, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char O11_ON[] = { 0x05, 0xea, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char O12_ON[] = { 0x05, 0xeb, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char O13_ON[] = { 0x05, 0xec, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char O14_ON[] = { 0x05, 0xed, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char O15_ON[] = { 0x05, 0xee, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char O16_ON[] = { 0x05, 0xef, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+
+unsigned char O1_OFF[] = { 0x05, 0xe0, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char O2_OFF[] = { 0x05, 0xe1, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char O3_OFF[] = { 0x05, 0xe2, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char O4_OFF[] = { 0x05, 0xe3, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char O5_OFF[] = { 0x05, 0xe4, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char O6_OFF[] = { 0x05, 0xe5, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char O7_OFF[] = { 0x05, 0xe6, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char O8_OFF[] = { 0x05, 0xe7, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char O9_OFF[] = { 0x05, 0xe8, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char O10_OFF[] = { 0x05, 0xe9, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char O11_OFF[] = { 0x05, 0xea, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char O12_OFF[] = { 0x05, 0xeb, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char O13_OFF[] = { 0x05, 0xec, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char O14_OFF[] = { 0x05, 0xed, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char O15_OFF[] = { 0x05, 0xee, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char O16_OFF[] = { 0x05, 0xef, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+
+unsigned char P1_ON[] = { 0x05, 0xf0, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char P2_ON[] = { 0x05, 0xf1, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char P3_ON[] = { 0x05, 0xf2, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char P4_ON[] = { 0x05, 0xf3, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char P5_ON[] = { 0x05, 0xf4, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char P6_ON[] = { 0x05, 0xf5, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char P7_ON[] = { 0x05, 0xf6, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char P8_ON[] = { 0x05, 0xf7, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char P9_ON[] = { 0x05, 0xf8, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char P10_ON[] = { 0x05, 0xf9, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char P11_ON[] = { 0x05, 0xfa, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char P12_ON[] = { 0x05, 0xfb, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char P13_ON[] = { 0x05, 0xfc, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char P14_ON[] = { 0x05, 0xfd, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char P15_ON[] = { 0x05, 0xfe, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char P16_ON[] = { 0x05, 0xff, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00};
+
+unsigned char P1_OFF[] = { 0x05, 0xf0, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char P2_OFF[] = { 0x05, 0xf1, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char P3_OFF[] = { 0x05, 0xf2, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char P4_OFF[] = { 0x05, 0xf3, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char P5_OFF[] = { 0x05, 0xf4, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char P6_OFF[] = { 0x05, 0xf5, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char P7_OFF[] = { 0x05, 0xf6, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char P8_OFF[] = { 0x05, 0xf7, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char P9_OFF[] = { 0x05, 0xf8, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char P10_OFF[] = { 0x05, 0xf9, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char P11_OFF[] = { 0x05, 0xfa, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char P12_OFF[] = { 0x05, 0xfb, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char P13_OFF[] = { 0x05, 0xfc, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char P14_OFF[] = { 0x05, 0xfd, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char P15_OFF[] = { 0x05, 0xfe, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+unsigned char P16_OFF[] = { 0x05, 0xff, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
+
+#endif /* ACTORS_H_ */
diff -Naur '--exclude=.*' make/lightmanager.orig/src/lightmanager.c make/lightmanager/src/lightmanager.c
--- make/lightmanager.orig/src/lightmanager.c 1970-01-01 01:00:00.000000000 +0100
+++ make/lightmanager/src/lightmanager.c 2012-07-03 14:59:50.000000000 +0200
@@ -0,0 +1,1145 @@
+/*
+ ============================================================================
+ Name : LightManagerC.c
+ Author : zwiebelchen
+ Version :
+ Copyright : GPL
+ Description : LightManagerC
+ ============================================================================
+ */
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <libusb-1.0/libusb.h>
+#include <fcntl.h>
+#include <errno.h>
+#include <time.h>
+
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <netdb.h>
+#include <arpa/inet.h>
+#include <unistd.h>
+
+#include "actors.h"
+
+static const int PORT = 3456;
+static const int RECEIVE_BUFFER = 1024;
+
+void sendToUSB(libusb_device_handle* dev_handle, unsigned char* deviceCode) {
+ int actual;
+ libusb_interrupt_transfer(dev_handle, (1 | LIBUSB_ENDPOINT_OUT), deviceCode,
+ 8, &actual, 8);
+ libusb_interrupt_transfer(dev_handle, (0x82 | LIBUSB_ENDPOINT_IN),
+ deviceCode, 8, &actual, 8);
+}
+
+int handleInput(char* input, libusb_device_handle* dev_handle) {
+ printf("Handling input...");
+ if (strncmp(input, "A1_ON", 5) == 0) {
+ sendToUSB(dev_handle, 0);
+ } else if (strncmp(input, "A2_ON", 5) == 0) {
+ sendToUSB(dev_handle, 0);
+ } else if (strncmp(input, "A3_ON", 5) == 0) {
+ sendToUSB(dev_handle, 0);
+ } else if (strncmp(input, "A4_ON", 5) == 0) {
+ sendToUSB(dev_handle, 0);
+ } else if (strncmp(input, "A5_ON", 5) == 0) {
+ sendToUSB(dev_handle, 0);
+ } else if (strncmp(input, "A6_ON", 5) == 0) {
+ sendToUSB(dev_handle, A6_ON);
+ } else if (strncmp(input, "A7_ON", 5) == 0) {
+ sendToUSB(dev_handle, A7_ON);
+ } else if (strncmp(input, "A8_ON", 5) == 0) {
+ sendToUSB(dev_handle, A8_ON);
+ } else if (strncmp(input, "A9_ON", 5) == 0) {
+ sendToUSB(dev_handle, A9_ON);
+ } else if (strncmp(input, "A10_ON", 6) == 0) {
+ sendToUSB(dev_handle, A10_ON);
+ } else if (strncmp(input, "A11_ON", 6) == 0) {
+ sendToUSB(dev_handle, A11_ON);
+ } else if (strncmp(input, "A12_ON", 6) == 0) {
+ sendToUSB(dev_handle, A12_ON);
+ } else if (strncmp(input, "A13_ON", 6) == 0) {
+ sendToUSB(dev_handle, A13_ON);
+ } else if (strncmp(input, "A14_ON", 6) == 0) {
+ sendToUSB(dev_handle, A14_ON);
+ } else if (strncmp(input, "A15_ON", 6) == 0) {
+ sendToUSB(dev_handle, A15_ON);
+ } else if (strncmp(input, "A16_ON", 6) == 0) {
+ sendToUSB(dev_handle, A16_ON);
+ } else if (strncmp(input, "A1_OFF", 6) == 0) {
+ sendToUSB(dev_handle, A1_OFF);
+ } else if (strncmp(input, "A2_OFF", 6) == 0) {
+ sendToUSB(dev_handle, A2_OFF);
+ } else if (strncmp(input, "A3_OFF", 6) == 0) {
+ sendToUSB(dev_handle, A3_OFF);
+ } else if (strncmp(input, "A4_OFF", 6) == 0) {
+ sendToUSB(dev_handle, A4_OFF);
+ } else if (strncmp(input, "A5_OFF", 6) == 0) {
+ sendToUSB(dev_handle, A5_OFF);
+ } else if (strncmp(input, "A6_OFF", 6) == 0) {
+ sendToUSB(dev_handle, A6_OFF);
+ } else if (strncmp(input, "A7_OFF", 6) == 0) {
+ sendToUSB(dev_handle, A7_OFF);
+ } else if (strncmp(input, "A8_OFF", 6) == 0) {
+ sendToUSB(dev_handle, A8_OFF);
+ } else if (strncmp(input, "A9_OFF", 6) == 0) {
+ sendToUSB(dev_handle, A9_OFF);
+ } else if (strncmp(input, "A10_OFF", 7) == 0) {
+ sendToUSB(dev_handle, A10_OFF);
+ } else if (strncmp(input, "A11_OFF", 7) == 0) {
+ sendToUSB(dev_handle, A11_OFF);
+ } else if (strncmp(input, "A12_OFF", 7) == 0) {
+ sendToUSB(dev_handle, A12_OFF);
+ } else if (strncmp(input, "A13_OFF", 7) == 0) {
+ sendToUSB(dev_handle, A13_OFF);
+ } else if (strncmp(input, "A14_OFF", 7) == 0) {
+ sendToUSB(dev_handle, A14_OFF);
+ } else if (strncmp(input, "A15_OFF", 7) == 0) {
+ sendToUSB(dev_handle, A15_OFF);
+ } else if (strncmp(input, "A16_OFF", 7) == 0) {
+ sendToUSB(dev_handle, A16_OFF);
+ } else if (strncmp(input, "B1_ON", 5) == 0) {
+ sendToUSB(dev_handle, B1_ON);
+ } else if (strncmp(input, "B2_ON", 5) == 0) {
+ sendToUSB(dev_handle, B2_ON);
+ } else if (strncmp(input, "B3_ON", 5) == 0) {
+ sendToUSB(dev_handle, B3_ON);
+ } else if (strncmp(input, "B4_ON", 5) == 0) {
+ sendToUSB(dev_handle, B4_ON);
+ } else if (strncmp(input, "B5_ON", 5) == 0) {
+ sendToUSB(dev_handle, B5_ON);
+ } else if (strncmp(input, "B6_ON", 5) == 0) {
+ sendToUSB(dev_handle, B6_ON);
+ } else if (strncmp(input, "B7_ON", 5) == 0) {
+ sendToUSB(dev_handle, B7_ON);
+ } else if (strncmp(input, "B8_ON", 5) == 0) {
+ sendToUSB(dev_handle, B8_ON);
+ } else if (strncmp(input, "B9_ON", 5) == 0) {
+ sendToUSB(dev_handle, B9_ON);
+ } else if (strncmp(input, "B10_ON", 6) == 0) {
+ sendToUSB(dev_handle, B10_ON);
+ } else if (strncmp(input, "B11_ON", 6) == 0) {
+ sendToUSB(dev_handle, B11_ON);
+ } else if (strncmp(input, "B12_ON", 6) == 0) {
+ sendToUSB(dev_handle, B12_ON);
+ } else if (strncmp(input, "B13_ON", 6) == 0) {
+ sendToUSB(dev_handle, B13_ON);
+ } else if (strncmp(input, "B14_ON", 6) == 0) {
+ sendToUSB(dev_handle, B14_ON);
+ } else if (strncmp(input, "B15_ON", 6) == 0) {
+ sendToUSB(dev_handle, B15_ON);
+ } else if (strncmp(input, "B16_ON", 6) == 0) {
+ sendToUSB(dev_handle, B16_ON);
+ } else if (strncmp(input, "B1_OFF", 6) == 0) {
+ sendToUSB(dev_handle, B1_OFF);
+ } else if (strncmp(input, "B2_OFF", 6) == 0) {
+ sendToUSB(dev_handle, B2_OFF);
+ } else if (strncmp(input, "B3_OFF", 6) == 0) {
+ sendToUSB(dev_handle, B3_OFF);
+ } else if (strncmp(input, "B4_OFF", 6) == 0) {
+ sendToUSB(dev_handle, B4_OFF);
+ } else if (strncmp(input, "B5_OFF", 6) == 0) {
+ sendToUSB(dev_handle, B5_OFF);
+ } else if (strncmp(input, "B6_OFF", 6) == 0) {
+ sendToUSB(dev_handle, B6_OFF);
+ } else if (strncmp(input, "B7_OFF", 6) == 0) {
+ sendToUSB(dev_handle, B7_OFF);
+ } else if (strncmp(input, "B8_OFF", 6) == 0) {
+ sendToUSB(dev_handle, B8_OFF);
+ } else if (strncmp(input, "B9_OFF", 6) == 0) {
+ sendToUSB(dev_handle, B9_OFF);
+ } else if (strncmp(input, "B10_OFF", 7) == 0) {
+ sendToUSB(dev_handle, B10_OFF);
+ } else if (strncmp(input, "B11_OFF", 7) == 0) {
+ sendToUSB(dev_handle, B11_OFF);
+ } else if (strncmp(input, "B12_OFF", 7) == 0) {
+ sendToUSB(dev_handle, B12_OFF);
+ } else if (strncmp(input, "B13_OFF", 7) == 0) {
+ sendToUSB(dev_handle, B13_OFF);
+ } else if (strncmp(input, "B14_OFF", 7) == 0) {
+ sendToUSB(dev_handle, B14_OFF);
+ } else if (strncmp(input, "B15_OFF", 7) == 0) {
+ sendToUSB(dev_handle, B15_OFF);
+ } else if (strncmp(input, "B16_OFF", 7) == 0) {
+ sendToUSB(dev_handle, B16_OFF);
+ } else if (strncmp(input, "C1_ON", 5) == 0) {
+ sendToUSB(dev_handle, C1_ON);
+ } else if (strncmp(input, "C2_ON", 5) == 0) {
+ sendToUSB(dev_handle, C2_ON);
+ } else if (strncmp(input, "C3_ON", 5) == 0) {
+ sendToUSB(dev_handle, C3_ON);
+ } else if (strncmp(input, "C4_ON", 5) == 0) {
+ sendToUSB(dev_handle, C4_ON);
+ } else if (strncmp(input, "C5_ON", 5) == 0) {
+ sendToUSB(dev_handle, C5_ON);
+ } else if (strncmp(input, "C6_ON", 5) == 0) {
+ sendToUSB(dev_handle, C6_ON);
+ } else if (strncmp(input, "C7_ON", 5) == 0) {
+ sendToUSB(dev_handle, C7_ON);
+ } else if (strncmp(input, "C8_ON", 5) == 0) {
+ sendToUSB(dev_handle, C8_ON);
+ } else if (strncmp(input, "C9_ON", 5) == 0) {
+ sendToUSB(dev_handle, C9_ON);
+ } else if (strncmp(input, "C10_ON", 6) == 0) {
+ sendToUSB(dev_handle, C10_ON);
+ } else if (strncmp(input, "C11_ON", 6) == 0) {
+ sendToUSB(dev_handle, C11_ON);
+ } else if (strncmp(input, "C12_ON", 6) == 0) {
+ sendToUSB(dev_handle, C12_ON);
+ } else if (strncmp(input, "C13_ON", 6) == 0) {
+ sendToUSB(dev_handle, C13_ON);
+ } else if (strncmp(input, "C14_ON", 6) == 0) {
+ sendToUSB(dev_handle, C14_ON);
+ } else if (strncmp(input, "C15_ON", 6) == 0) {
+ sendToUSB(dev_handle, C15_ON);
+ } else if (strncmp(input, "C16_ON", 6) == 0) {
+ sendToUSB(dev_handle, C16_ON);
+ } else if (strncmp(input, "C1_OFF", 6) == 0) {
+ sendToUSB(dev_handle, C1_OFF);
+ } else if (strncmp(input, "C2_OFF", 6) == 0) {
+ sendToUSB(dev_handle, C2_OFF);
+ } else if (strncmp(input, "C3_OFF", 6) == 0) {
+ sendToUSB(dev_handle, C3_OFF);
+ } else if (strncmp(input, "C4_OFF", 6) == 0) {
+ sendToUSB(dev_handle, C4_OFF);
+ } else if (strncmp(input, "C5_OFF", 6) == 0) {
+ sendToUSB(dev_handle, C5_OFF);
+ } else if (strncmp(input, "C6_OFF", 6) == 0) {
+ sendToUSB(dev_handle, C6_OFF);
+ } else if (strncmp(input, "C7_OFF", 6) == 0) {
+ sendToUSB(dev_handle, C7_OFF);
+ } else if (strncmp(input, "C8_OFF", 6) == 0) {
+ sendToUSB(dev_handle, C8_OFF);
+ } else if (strncmp(input, "C9_OFF", 6) == 0) {
+ sendToUSB(dev_handle, C9_OFF);
+ } else if (strncmp(input, "C10_OFF", 7) == 0) {
+ sendToUSB(dev_handle, C10_OFF);
+ } else if (strncmp(input, "C11_OFF", 7) == 0) {
+ sendToUSB(dev_handle, C11_OFF);
+ } else if (strncmp(input, "C12_OFF", 7) == 0) {
+ sendToUSB(dev_handle, C12_OFF);
+ } else if (strncmp(input, "C13_OFF", 7) == 0) {
+ sendToUSB(dev_handle, C13_OFF);
+ } else if (strncmp(input, "C14_OFF", 7) == 0) {
+ sendToUSB(dev_handle, C14_OFF);
+ } else if (strncmp(input, "C15_OFF", 7) == 0) {
+ sendToUSB(dev_handle, C15_OFF);
+ } else if (strncmp(input, "C16_OFF", 7) == 0) {
+ sendToUSB(dev_handle, C16_OFF);
+ } else if (strncmp(input, "D1_ON", 5) == 0) {
+ sendToUSB(dev_handle, D1_ON);
+ } else if (strncmp(input, "D2_ON", 5) == 0) {
+ sendToUSB(dev_handle, D2_ON);
+ } else if (strncmp(input, "D3_ON", 5) == 0) {
+ sendToUSB(dev_handle, D3_ON);
+ } else if (strncmp(input, "D4_ON", 5) == 0) {
+ sendToUSB(dev_handle, D4_ON);
+ } else if (strncmp(input, "D5_ON", 5) == 0) {
+ sendToUSB(dev_handle, D5_ON);
+ } else if (strncmp(input, "D6_ON", 5) == 0) {
+ sendToUSB(dev_handle, D6_ON);
+ } else if (strncmp(input, "D7_ON", 5) == 0) {
+ sendToUSB(dev_handle, D7_ON);
+ } else if (strncmp(input, "D8_ON", 5) == 0) {
+ sendToUSB(dev_handle, D8_ON);
+ } else if (strncmp(input, "D9_ON", 5) == 0) {
+ sendToUSB(dev_handle, D9_ON);
+ } else if (strncmp(input, "D10_ON", 6) == 0) {
+ sendToUSB(dev_handle, D10_ON);
+ } else if (strncmp(input, "D11_ON", 6) == 0) {
+ sendToUSB(dev_handle, D11_ON);
+ } else if (strncmp(input, "D12_ON", 6) == 0) {
+ sendToUSB(dev_handle, D12_ON);
+ } else if (strncmp(input, "D13_ON", 6) == 0) {
+ sendToUSB(dev_handle, D13_ON);
+ } else if (strncmp(input, "D14_ON", 6) == 0) {
+ sendToUSB(dev_handle, D14_ON);
+ } else if (strncmp(input, "D15_ON", 6) == 0) {
+ sendToUSB(dev_handle, D15_ON);
+ } else if (strncmp(input, "D16_ON", 6) == 0) {
+ sendToUSB(dev_handle, D16_ON);
+ } else if (strncmp(input, "D1_OFF", 6) == 0) {
+ sendToUSB(dev_handle, D1_OFF);
+ } else if (strncmp(input, "D2_OFF", 6) == 0) {
+ sendToUSB(dev_handle, D2_OFF);
+ } else if (strncmp(input, "D3_OFF", 6) == 0) {
+ sendToUSB(dev_handle, D3_OFF);
+ } else if (strncmp(input, "D4_OFF", 6) == 0) {
+ sendToUSB(dev_handle, D4_OFF);
+ } else if (strncmp(input, "D5_OFF", 6) == 0) {
+ sendToUSB(dev_handle, D5_OFF);
+ } else if (strncmp(input, "D6_OFF", 6) == 0) {
+ sendToUSB(dev_handle, D6_OFF);
+ } else if (strncmp(input, "D7_OFF", 6) == 0) {
+ sendToUSB(dev_handle, D7_OFF);
+ } else if (strncmp(input, "D8_OFF", 6) == 0) {
+ sendToUSB(dev_handle, D8_OFF);
+ } else if (strncmp(input, "D9_OFF", 6) == 0) {
+ sendToUSB(dev_handle, D9_OFF);
+ } else if (strncmp(input, "D10_OFF", 7) == 0) {
+ sendToUSB(dev_handle, D10_OFF);
+ } else if (strncmp(input, "D11_OFF", 7) == 0) {
+ sendToUSB(dev_handle, D11_OFF);
+ } else if (strncmp(input, "D12_OFF", 7) == 0) {
+ sendToUSB(dev_handle, D12_OFF);
+ } else if (strncmp(input, "D13_OFF", 7) == 0) {
+ sendToUSB(dev_handle, D13_OFF);
+ } else if (strncmp(input, "D14_OFF", 7) == 0) {
+ sendToUSB(dev_handle, D14_OFF);
+ } else if (strncmp(input, "D15_OFF", 7) == 0) {
+ sendToUSB(dev_handle, D15_OFF);
+ } else if (strncmp(input, "D16_OFF", 7) == 0) {
+ sendToUSB(dev_handle, D16_OFF);
+ } else if (strncmp(input, "E1_ON", 5) == 0) {
+ sendToUSB(dev_handle, E1_ON);
+ } else if (strncmp(input, "E2_ON", 5) == 0) {
+ sendToUSB(dev_handle, E2_ON);
+ } else if (strncmp(input, "E3_ON", 5) == 0) {
+ sendToUSB(dev_handle, E3_ON);
+ } else if (strncmp(input, "E4_ON", 5) == 0) {
+ sendToUSB(dev_handle, E4_ON);
+ } else if (strncmp(input, "E5_ON", 5) == 0) {
+ sendToUSB(dev_handle, E5_ON);
+ } else if (strncmp(input, "E6_ON", 5) == 0) {
+ sendToUSB(dev_handle, E6_ON);
+ } else if (strncmp(input, "E7_ON", 5) == 0) {
+ sendToUSB(dev_handle, E7_ON);
+ } else if (strncmp(input, "E8_ON", 5) == 0) {
+ sendToUSB(dev_handle, E8_ON);
+ } else if (strncmp(input, "E9_ON", 5) == 0) {
+ sendToUSB(dev_handle, E9_ON);
+ } else if (strncmp(input, "E10_ON", 6) == 0) {
+ sendToUSB(dev_handle, E10_ON);
+ } else if (strncmp(input, "E11_ON", 6) == 0) {
+ sendToUSB(dev_handle, E11_ON);
+ } else if (strncmp(input, "E12_ON", 6) == 0) {
+ sendToUSB(dev_handle, E12_ON);
+ } else if (strncmp(input, "E13_ON", 6) == 0) {
+ sendToUSB(dev_handle, E13_ON);
+ } else if (strncmp(input, "E14_ON", 6) == 0) {
+ sendToUSB(dev_handle, E14_ON);
+ } else if (strncmp(input, "E15_ON", 6) == 0) {
+ sendToUSB(dev_handle, E15_ON);
+ } else if (strncmp(input, "E16_ON", 6) == 0) {
+ sendToUSB(dev_handle, E16_ON);
+ } else if (strncmp(input, "E1_OFF", 6) == 0) {
+ sendToUSB(dev_handle, E1_OFF);
+ } else if (strncmp(input, "E2_OFF", 6) == 0) {
+ sendToUSB(dev_handle, E2_OFF);
+ } else if (strncmp(input, "E3_OFF", 6) == 0) {
+ sendToUSB(dev_handle, E3_OFF);
+ } else if (strncmp(input, "E4_OFF", 6) == 0) {
+ sendToUSB(dev_handle, E4_OFF);
+ } else if (strncmp(input, "E5_OFF", 6) == 0) {
+ sendToUSB(dev_handle, E5_OFF);
+ } else if (strncmp(input, "E6_OFF", 6) == 0) {
+ sendToUSB(dev_handle, E6_OFF);
+ } else if (strncmp(input, "E7_OFF", 6) == 0) {
+ sendToUSB(dev_handle, E7_OFF);
+ } else if (strncmp(input, "E8_OFF", 6) == 0) {
+ sendToUSB(dev_handle, E8_OFF);
+ } else if (strncmp(input, "E9_OFF", 6) == 0) {
+ sendToUSB(dev_handle, E9_OFF);
+ } else if (strncmp(input, "E10_OFF", 7) == 0) {
+ sendToUSB(dev_handle, E10_OFF);
+ } else if (strncmp(input, "E11_OFF", 7) == 0) {
+ sendToUSB(dev_handle, E11_OFF);
+ } else if (strncmp(input, "E12_OFF", 7) == 0) {
+ sendToUSB(dev_handle, E12_OFF);
+ } else if (strncmp(input, "E13_OFF", 7) == 0) {
+ sendToUSB(dev_handle, E13_OFF);
+ } else if (strncmp(input, "E14_OFF", 7) == 0) {
+ sendToUSB(dev_handle, E14_OFF);
+ } else if (strncmp(input, "E15_OFF", 7) == 0) {
+ sendToUSB(dev_handle, E15_OFF);
+ } else if (strncmp(input, "E16_OFF", 7) == 0) {
+ sendToUSB(dev_handle, E16_OFF);
+ } else if (strncmp(input, "F1_ON", 5) == 0) {
+ sendToUSB(dev_handle, F1_ON);
+ } else if (strncmp(input, "F2_ON", 5) == 0) {
+ sendToUSB(dev_handle, F2_ON);
+ } else if (strncmp(input, "F3_ON", 5) == 0) {
+ sendToUSB(dev_handle, F3_ON);
+ } else if (strncmp(input, "F4_ON", 5) == 0) {
+ sendToUSB(dev_handle, F4_ON);
+ } else if (strncmp(input, "F5_ON", 5) == 0) {
+ sendToUSB(dev_handle, F5_ON);
+ } else if (strncmp(input, "F6_ON", 5) == 0) {
+ sendToUSB(dev_handle, F6_ON);
+ } else if (strncmp(input, "F7_ON", 5) == 0) {
+ sendToUSB(dev_handle, F7_ON);
+ } else if (strncmp(input, "F8_ON", 5) == 0) {
+ sendToUSB(dev_handle, F8_ON);
+ } else if (strncmp(input, "F9_ON", 5) == 0) {
+ sendToUSB(dev_handle, F9_ON);
+ } else if (strncmp(input, "F10_ON", 6) == 0) {
+ sendToUSB(dev_handle, F10_ON);
+ } else if (strncmp(input, "F11_ON", 6) == 0) {
+ sendToUSB(dev_handle, F11_ON);
+ } else if (strncmp(input, "F12_ON", 6) == 0) {
+ sendToUSB(dev_handle, F12_ON);
+ } else if (strncmp(input, "F13_ON", 6) == 0) {
+ sendToUSB(dev_handle, F13_ON);
+ } else if (strncmp(input, "F14_ON", 6) == 0) {
+ sendToUSB(dev_handle, F14_ON);
+ } else if (strncmp(input, "F15_ON", 6) == 0) {
+ sendToUSB(dev_handle, F15_ON);
+ } else if (strncmp(input, "F16_ON", 6) == 0) {
+ sendToUSB(dev_handle, F16_ON);
+ } else if (strncmp(input, "F1_OFF", 6) == 0) {
+ sendToUSB(dev_handle, F1_OFF);
+ } else if (strncmp(input, "F2_OFF", 6) == 0) {
+ sendToUSB(dev_handle, F2_OFF);
+ } else if (strncmp(input, "F3_OFF", 6) == 0) {
+ sendToUSB(dev_handle, F3_OFF);
+ } else if (strncmp(input, "F4_OFF", 6) == 0) {
+ sendToUSB(dev_handle, F4_OFF);
+ } else if (strncmp(input, "F5_OFF", 6) == 0) {
+ sendToUSB(dev_handle, F5_OFF);
+ } else if (strncmp(input, "F6_OFF", 6) == 0) {
+ sendToUSB(dev_handle, F6_OFF);
+ } else if (strncmp(input, "F7_OFF", 6) == 0) {
+ sendToUSB(dev_handle, F7_OFF);
+ } else if (strncmp(input, "F8_OFF", 6) == 0) {
+ sendToUSB(dev_handle, F8_OFF);
+ } else if (strncmp(input, "F9_OFF", 6) == 0) {
+ sendToUSB(dev_handle, F9_OFF);
+ } else if (strncmp(input, "F10_OFF", 7) == 0) {
+ sendToUSB(dev_handle, F10_OFF);
+ } else if (strncmp(input, "F11_OFF", 7) == 0) {
+ sendToUSB(dev_handle, F11_OFF);
+ } else if (strncmp(input, "F12_OFF", 7) == 0) {
+ sendToUSB(dev_handle, F12_OFF);
+ } else if (strncmp(input, "F13_OFF", 7) == 0) {
+ sendToUSB(dev_handle, F13_OFF);
+ } else if (strncmp(input, "F14_OFF", 7) == 0) {
+ sendToUSB(dev_handle, F14_OFF);
+ } else if (strncmp(input, "F15_OFF", 7) == 0) {
+ sendToUSB(dev_handle, F15_OFF);
+ } else if (strncmp(input, "F16_OFF", 7) == 0) {
+ sendToUSB(dev_handle, F16_OFF);
+ } else if (strncmp(input, "G1_ON", 5) == 0) {
+ sendToUSB(dev_handle, G1_ON);
+ } else if (strncmp(input, "G2_ON", 5) == 0) {
+ sendToUSB(dev_handle, G2_ON);
+ } else if (strncmp(input, "G3_ON", 5) == 0) {
+ sendToUSB(dev_handle, G3_ON);
+ } else if (strncmp(input, "G4_ON", 5) == 0) {
+ sendToUSB(dev_handle, G4_ON);
+ } else if (strncmp(input, "G5_ON", 5) == 0) {
+ sendToUSB(dev_handle, G5_ON);
+ } else if (strncmp(input, "G6_ON", 5) == 0) {
+ sendToUSB(dev_handle, G6_ON);
+ } else if (strncmp(input, "G7_ON", 5) == 0) {
+ sendToUSB(dev_handle, G7_ON);
+ } else if (strncmp(input, "G8_ON", 5) == 0) {
+ sendToUSB(dev_handle, G8_ON);
+ } else if (strncmp(input, "G9_ON", 5) == 0) {
+ sendToUSB(dev_handle, G9_ON);
+ } else if (strncmp(input, "G10_ON", 6) == 0) {
+ sendToUSB(dev_handle, G10_ON);
+ } else if (strncmp(input, "G11_ON", 6) == 0) {
+ sendToUSB(dev_handle, G11_ON);
+ } else if (strncmp(input, "G12_ON", 6) == 0) {
+ sendToUSB(dev_handle, G12_ON);
+ } else if (strncmp(input, "G13_ON", 6) == 0) {
+ sendToUSB(dev_handle, G13_ON);
+ } else if (strncmp(input, "G14_ON", 6) == 0) {
+ sendToUSB(dev_handle, G14_ON);
+ } else if (strncmp(input, "G15_ON", 6) == 0) {
+ sendToUSB(dev_handle, G15_ON);
+ } else if (strncmp(input, "G16_ON", 6) == 0) {
+ sendToUSB(dev_handle, G16_ON);
+ } else if (strncmp(input, "G1_OFF", 6) == 0) {
+ sendToUSB(dev_handle, G1_OFF);
+ } else if (strncmp(input, "G2_OFF", 6) == 0) {
+ sendToUSB(dev_handle, G2_OFF);
+ } else if (strncmp(input, "G3_OFF", 6) == 0) {
+ sendToUSB(dev_handle, G3_OFF);
+ } else if (strncmp(input, "G4_OFF", 6) == 0) {
+ sendToUSB(dev_handle, G4_OFF);
+ } else if (strncmp(input, "G5_OFF", 6) == 0) {
+ sendToUSB(dev_handle, G5_OFF);
+ } else if (strncmp(input, "G6_OFF", 6) == 0) {
+ sendToUSB(dev_handle, G6_OFF);
+ } else if (strncmp(input, "G7_OFF", 6) == 0) {
+ sendToUSB(dev_handle, G7_OFF);
+ } else if (strncmp(input, "G8_OFF", 6) == 0) {
+ sendToUSB(dev_handle, G8_OFF);
+ } else if (strncmp(input, "G9_OFF", 6) == 0) {
+ sendToUSB(dev_handle, G9_OFF);
+ } else if (strncmp(input, "G10_OFF", 7) == 0) {
+ sendToUSB(dev_handle, G10_OFF);
+ } else if (strncmp(input, "G11_OFF", 7) == 0) {
+ sendToUSB(dev_handle, G11_OFF);
+ } else if (strncmp(input, "G12_OFF", 7) == 0) {
+ sendToUSB(dev_handle, G12_OFF);
+ } else if (strncmp(input, "G13_OFF", 7) == 0) {
+ sendToUSB(dev_handle, G13_OFF);
+ } else if (strncmp(input, "G14_OFF", 7) == 0) {
+ sendToUSB(dev_handle, G14_OFF);
+ } else if (strncmp(input, "G15_OFF", 7) == 0) {
+ sendToUSB(dev_handle, G15_OFF);
+ } else if (strncmp(input, "G16_OFF", 7) == 0) {
+ sendToUSB(dev_handle, G16_OFF);
+ } else if (strncmp(input, "H1_ON", 5) == 0) {
+ sendToUSB(dev_handle, H1_ON);
+ } else if (strncmp(input, "H2_ON", 5) == 0) {
+ sendToUSB(dev_handle, H2_ON);
+ } else if (strncmp(input, "H3_ON", 5) == 0) {
+ sendToUSB(dev_handle, H3_ON);
+ } else if (strncmp(input, "H4_ON", 5) == 0) {
+ sendToUSB(dev_handle, H4_ON);
+ } else if (strncmp(input, "H5_ON", 5) == 0) {
+ sendToUSB(dev_handle, H5_ON);
+ } else if (strncmp(input, "H6_ON", 5) == 0) {
+ sendToUSB(dev_handle, H6_ON);
+ } else if (strncmp(input, "H7_ON", 5) == 0) {
+ sendToUSB(dev_handle, H7_ON);
+ } else if (strncmp(input, "H8_ON", 5) == 0) {
+ sendToUSB(dev_handle, H8_ON);
+ } else if (strncmp(input, "H9_ON", 5) == 0) {
+ sendToUSB(dev_handle, H9_ON);
+ } else if (strncmp(input, "H10_ON", 6) == 0) {
+ sendToUSB(dev_handle, H10_ON);
+ } else if (strncmp(input, "H11_ON", 6) == 0) {
+ sendToUSB(dev_handle, H11_ON);
+ } else if (strncmp(input, "H12_ON", 6) == 0) {
+ sendToUSB(dev_handle, H12_ON);
+ } else if (strncmp(input, "H13_ON", 6) == 0) {
+ sendToUSB(dev_handle, H13_ON);
+ } else if (strncmp(input, "H14_ON", 6) == 0) {
+ sendToUSB(dev_handle, H14_ON);
+ } else if (strncmp(input, "H15_ON", 6) == 0) {
+ sendToUSB(dev_handle, H15_ON);
+ } else if (strncmp(input, "H16_ON", 6) == 0) {
+ sendToUSB(dev_handle, H16_ON);
+ } else if (strncmp(input, "H1_OFF", 6) == 0) {
+ sendToUSB(dev_handle, H1_OFF);
+ } else if (strncmp(input, "H2_OFF", 6) == 0) {
+ sendToUSB(dev_handle, H2_OFF);
+ } else if (strncmp(input, "H3_OFF", 6) == 0) {
+ sendToUSB(dev_handle, H3_OFF);
+ } else if (strncmp(input, "H4_OFF", 6) == 0) {
+ sendToUSB(dev_handle, H4_OFF);
+ } else if (strncmp(input, "H5_OFF", 6) == 0) {
+ sendToUSB(dev_handle, H5_OFF);
+ } else if (strncmp(input, "H6_OFF", 6) == 0) {
+ sendToUSB(dev_handle, H6_OFF);
+ } else if (strncmp(input, "H7_OFF", 6) == 0) {
+ sendToUSB(dev_handle, H7_OFF);
+ } else if (strncmp(input, "H8_OFF", 6) == 0) {
+ sendToUSB(dev_handle, H8_OFF);
+ } else if (strncmp(input, "H9_OFF", 6) == 0) {
+ sendToUSB(dev_handle, H9_OFF);
+ } else if (strncmp(input, "H10_OFF", 7) == 0) {
+ sendToUSB(dev_handle, H10_OFF);
+ } else if (strncmp(input, "H11_OFF", 7) == 0) {
+ sendToUSB(dev_handle, H11_OFF);
+ } else if (strncmp(input, "H12_OFF", 7) == 0) {
+ sendToUSB(dev_handle, H12_OFF);
+ } else if (strncmp(input, "H13_OFF", 7) == 0) {
+ sendToUSB(dev_handle, H13_OFF);
+ } else if (strncmp(input, "H14_OFF", 7) == 0) {
+ sendToUSB(dev_handle, H14_OFF);
+ } else if (strncmp(input, "H15_OFF", 7) == 0) {
+ sendToUSB(dev_handle, H15_OFF);
+ } else if (strncmp(input, "H16_OFF", 7) == 0) {
+ sendToUSB(dev_handle, H16_OFF);
+ } else if (strncmp(input, "I1_ON", 5) == 0) {
+ sendToUSB(dev_handle, I1_ON);
+ } else if (strncmp(input, "I2_ON", 5) == 0) {
+ sendToUSB(dev_handle, I2_ON);
+ } else if (strncmp(input, "I3_ON", 5) == 0) {
+ sendToUSB(dev_handle, I3_ON);
+ } else if (strncmp(input, "I4_ON", 5) == 0) {
+ sendToUSB(dev_handle, I4_ON);
+ } else if (strncmp(input, "I5_ON", 5) == 0) {
+ sendToUSB(dev_handle, I5_ON);
+ } else if (strncmp(input, "I6_ON", 5) == 0) {
+ sendToUSB(dev_handle, I6_ON);
+ } else if (strncmp(input, "I7_ON", 5) == 0) {
+ sendToUSB(dev_handle, I7_ON);
+ } else if (strncmp(input, "I8_ON", 5) == 0) {
+ sendToUSB(dev_handle, I8_ON);
+ } else if (strncmp(input, "I9_ON", 5) == 0) {
+ sendToUSB(dev_handle, I9_ON);
+ } else if (strncmp(input, "I10_ON", 6) == 0) {
+ sendToUSB(dev_handle, I10_ON);
+ } else if (strncmp(input, "I11_ON", 6) == 0) {
+ sendToUSB(dev_handle, I11_ON);
+ } else if (strncmp(input, "I12_ON", 6) == 0) {
+ sendToUSB(dev_handle, I12_ON);
+ } else if (strncmp(input, "I13_ON", 6) == 0) {
+ sendToUSB(dev_handle, I13_ON);
+ } else if (strncmp(input, "I14_ON", 6) == 0) {
+ sendToUSB(dev_handle, I14_ON);
+ } else if (strncmp(input, "I15_ON", 6) == 0) {
+ sendToUSB(dev_handle, I15_ON);
+ } else if (strncmp(input, "I16_ON", 6) == 0) {
+ sendToUSB(dev_handle, I16_ON);
+ } else if (strncmp(input, "I1_OFF", 6) == 0) {
+ sendToUSB(dev_handle, I1_OFF);
+ } else if (strncmp(input, "I2_OFF", 6) == 0) {
+ sendToUSB(dev_handle, I2_OFF);
+ } else if (strncmp(input, "I3_OFF", 6) == 0) {
+ sendToUSB(dev_handle, I3_OFF);
+ } else if (strncmp(input, "I4_OFF", 6) == 0) {
+ sendToUSB(dev_handle, I4_OFF);
+ } else if (strncmp(input, "I5_OFF", 6) == 0) {
+ sendToUSB(dev_handle, I5_OFF);
+ } else if (strncmp(input, "I6_OFF", 6) == 0) {
+ sendToUSB(dev_handle, I6_OFF);
+ } else if (strncmp(input, "I7_OFF", 6) == 0) {
+ sendToUSB(dev_handle, I7_OFF);
+ } else if (strncmp(input, "I8_OFF", 6) == 0) {
+ sendToUSB(dev_handle, I8_OFF);
+ } else if (strncmp(input, "I9_OFF", 6) == 0) {
+ sendToUSB(dev_handle, I9_OFF);
+ } else if (strncmp(input, "I10_OFF", 7) == 0) {
+ sendToUSB(dev_handle, I10_OFF);
+ } else if (strncmp(input, "I11_OFF", 7) == 0) {
+ sendToUSB(dev_handle, I11_OFF);
+ } else if (strncmp(input, "I12_OFF", 7) == 0) {
+ sendToUSB(dev_handle, I12_OFF);
+ } else if (strncmp(input, "I13_OFF", 7) == 0) {
+ sendToUSB(dev_handle, I13_OFF);
+ } else if (strncmp(input, "I14_OFF", 7) == 0) {
+ sendToUSB(dev_handle, I14_OFF);
+ } else if (strncmp(input, "I15_OFF", 7) == 0) {
+ sendToUSB(dev_handle, I15_OFF);
+ } else if (strncmp(input, "I16_OFF", 7) == 0) {
+ sendToUSB(dev_handle, I16_OFF);
+ } else if (strncmp(input, "J1_ON", 5) == 0) {
+ sendToUSB(dev_handle, J1_ON);
+ } else if (strncmp(input, "J2_ON", 5) == 0) {
+ sendToUSB(dev_handle, J2_ON);
+ } else if (strncmp(input, "J3_ON", 5) == 0) {
+ sendToUSB(dev_handle, J3_ON);
+ } else if (strncmp(input, "J4_ON", 5) == 0) {
+ sendToUSB(dev_handle, J4_ON);
+ } else if (strncmp(input, "J5_ON", 5) == 0) {
+ sendToUSB(dev_handle, J5_ON);
+ } else if (strncmp(input, "J6_ON", 5) == 0) {
+ sendToUSB(dev_handle, J6_ON);
+ } else if (strncmp(input, "J7_ON", 5) == 0) {
+ sendToUSB(dev_handle, J7_ON);
+ } else if (strncmp(input, "J8_ON", 5) == 0) {
+ sendToUSB(dev_handle, J8_ON);
+ } else if (strncmp(input, "J9_ON", 5) == 0) {
+ sendToUSB(dev_handle, J9_ON);
+ } else if (strncmp(input, "J10_ON", 6) == 0) {
+ sendToUSB(dev_handle, J10_ON);
+ } else if (strncmp(input, "J11_ON", 6) == 0) {
+ sendToUSB(dev_handle, J11_ON);
+ } else if (strncmp(input, "J12_ON", 6) == 0) {
+ sendToUSB(dev_handle, J12_ON);
+ } else if (strncmp(input, "J13_ON", 6) == 0) {
+ sendToUSB(dev_handle, J13_ON);
+ } else if (strncmp(input, "J14_ON", 6) == 0) {
+ sendToUSB(dev_handle, J14_ON);
+ } else if (strncmp(input, "J15_ON", 6) == 0) {
+ sendToUSB(dev_handle, J15_ON);
+ } else if (strncmp(input, "J16_ON", 6) == 0) {
+ sendToUSB(dev_handle, J16_ON);
+ } else if (strncmp(input, "J1_OFF", 6) == 0) {
+ sendToUSB(dev_handle, J1_OFF);
+ } else if (strncmp(input, "J2_OFF", 6) == 0) {
+ sendToUSB(dev_handle, J2_OFF);
+ } else if (strncmp(input, "J3_OFF", 6) == 0) {
+ sendToUSB(dev_handle, J3_OFF);
+ } else if (strncmp(input, "J4_OFF", 6) == 0) {
+ sendToUSB(dev_handle, J4_OFF);
+ } else if (strncmp(input, "J5_OFF", 6) == 0) {
+ sendToUSB(dev_handle, J5_OFF);
+ } else if (strncmp(input, "J6_OFF", 6) == 0) {
+ sendToUSB(dev_handle, J6_OFF);
+ } else if (strncmp(input, "J7_OFF", 6) == 0) {
+ sendToUSB(dev_handle, J7_OFF);
+ } else if (strncmp(input, "J8_OFF", 6) == 0) {
+ sendToUSB(dev_handle, J8_OFF);
+ } else if (strncmp(input, "J9_OFF", 6) == 0) {
+ sendToUSB(dev_handle, J9_OFF);
+ } else if (strncmp(input, "J10_OFF", 7) == 0) {
+ sendToUSB(dev_handle, J10_OFF);
+ } else if (strncmp(input, "J11_OFF", 7) == 0) {
+ sendToUSB(dev_handle, J11_OFF);
+ } else if (strncmp(input, "J12_OFF", 7) == 0) {
+ sendToUSB(dev_handle, J12_OFF);
+ } else if (strncmp(input, "J13_OFF", 7) == 0) {
+ sendToUSB(dev_handle, J13_OFF);
+ } else if (strncmp(input, "J14_OFF", 7) == 0) {
+ sendToUSB(dev_handle, J14_OFF);
+ } else if (strncmp(input, "J15_OFF", 7) == 0) {
+ sendToUSB(dev_handle, J15_OFF);
+ } else if (strncmp(input, "J16_OFF", 7) == 0) {
+ sendToUSB(dev_handle, J16_OFF);
+ } else if (strncmp(input, "K1_ON", 5) == 0) {
+ sendToUSB(dev_handle, K1_ON);
+ } else if (strncmp(input, "K2_ON", 5) == 0) {
+ sendToUSB(dev_handle, K2_ON);
+ } else if (strncmp(input, "K3_ON", 5) == 0) {
+ sendToUSB(dev_handle, K3_ON);
+ } else if (strncmp(input, "K4_ON", 5) == 0) {
+ sendToUSB(dev_handle, K4_ON);
+ } else if (strncmp(input, "K5_ON", 5) == 0) {
+ sendToUSB(dev_handle, K5_ON);
+ } else if (strncmp(input, "K6_ON", 5) == 0) {
+ sendToUSB(dev_handle, K6_ON);
+ } else if (strncmp(input, "K7_ON", 5) == 0) {
+ sendToUSB(dev_handle, K7_ON);
+ } else if (strncmp(input, "K8_ON", 5) == 0) {
+ sendToUSB(dev_handle, K8_ON);
+ } else if (strncmp(input, "K9_ON", 5) == 0) {
+ sendToUSB(dev_handle, K9_ON);
+ } else if (strncmp(input, "K10_ON", 6) == 0) {
+ sendToUSB(dev_handle, K10_ON);
+ } else if (strncmp(input, "K11_ON", 6) == 0) {
+ sendToUSB(dev_handle, K11_ON);
+ } else if (strncmp(input, "K12_ON", 6) == 0) {
+ sendToUSB(dev_handle, K12_ON);
+ } else if (strncmp(input, "K13_ON", 6) == 0) {
+ sendToUSB(dev_handle, K13_ON);
+ } else if (strncmp(input, "K14_ON", 6) == 0) {
+ sendToUSB(dev_handle, K14_ON);
+ } else if (strncmp(input, "K15_ON", 6) == 0) {
+ sendToUSB(dev_handle, K15_ON);
+ } else if (strncmp(input, "K16_ON", 6) == 0) {
+ sendToUSB(dev_handle, K16_ON);
+ } else if (strncmp(input, "K1_OFF", 6) == 0) {
+ sendToUSB(dev_handle, K1_OFF);
+ } else if (strncmp(input, "K2_OFF", 6) == 0) {
+ sendToUSB(dev_handle, K2_OFF);
+ } else if (strncmp(input, "K3_OFF", 6) == 0) {
+ sendToUSB(dev_handle, K3_OFF);
+ } else if (strncmp(input, "K4_OFF", 6) == 0) {
+ sendToUSB(dev_handle, K4_OFF);
+ } else if (strncmp(input, "K5_OFF", 6) == 0) {
+ sendToUSB(dev_handle, K5_OFF);
+ } else if (strncmp(input, "K6_OFF", 6) == 0) {
+ sendToUSB(dev_handle, K6_OFF);
+ } else if (strncmp(input, "K7_OFF", 6) == 0) {
+ sendToUSB(dev_handle, K7_OFF);
+ } else if (strncmp(input, "K8_OFF", 6) == 0) {
+ sendToUSB(dev_handle, K8_OFF);
+ } else if (strncmp(input, "K9_OFF", 6) == 0) {
+ sendToUSB(dev_handle, K9_OFF);
+ } else if (strncmp(input, "K10_OFF", 7) == 0) {
+ sendToUSB(dev_handle, K10_OFF);
+ } else if (strncmp(input, "K11_OFF", 7) == 0) {
+ sendToUSB(dev_handle, K11_OFF);
+ } else if (strncmp(input, "K12_OFF", 7) == 0) {
+ sendToUSB(dev_handle, K12_OFF);
+ } else if (strncmp(input, "K13_OFF", 7) == 0) {
+ sendToUSB(dev_handle, K13_OFF);
+ } else if (strncmp(input, "K14_OFF", 7) == 0) {
+ sendToUSB(dev_handle, K14_OFF);
+ } else if (strncmp(input, "K15_OFF", 7) == 0) {
+ sendToUSB(dev_handle, K15_OFF);
+ } else if (strncmp(input, "K16_OFF", 7) == 0) {
+ sendToUSB(dev_handle, K16_OFF);
+ } else if (strncmp(input, "L1_ON", 5) == 0) {
+ sendToUSB(dev_handle, L1_ON);
+ } else if (strncmp(input, "L2_ON", 5) == 0) {
+ sendToUSB(dev_handle, L2_ON);
+ } else if (strncmp(input, "L3_ON", 5) == 0) {
+ sendToUSB(dev_handle, L3_ON);
+ } else if (strncmp(input, "L4_ON", 5) == 0) {
+ sendToUSB(dev_handle, L4_ON);
+ } else if (strncmp(input, "L5_ON", 5) == 0) {
+ sendToUSB(dev_handle, L5_ON);
+ } else if (strncmp(input, "L6_ON", 5) == 0) {
+ sendToUSB(dev_handle, L6_ON);
+ } else if (strncmp(input, "L7_ON", 5) == 0) {
+ sendToUSB(dev_handle, L7_ON);
+ } else if (strncmp(input, "L8_ON", 5) == 0) {
+ sendToUSB(dev_handle, L8_ON);
+ } else if (strncmp(input, "L9_ON", 5) == 0) {
+ sendToUSB(dev_handle, L9_ON);
+ } else if (strncmp(input, "L10_ON", 6) == 0) {
+ sendToUSB(dev_handle, L10_ON);
+ } else if (strncmp(input, "L11_ON", 6) == 0) {
+ sendToUSB(dev_handle, L11_ON);
+ } else if (strncmp(input, "L12_ON", 6) == 0) {
+ sendToUSB(dev_handle, L12_ON);
+ } else if (strncmp(input, "L13_ON", 6) == 0) {
+ sendToUSB(dev_handle, L13_ON);
+ } else if (strncmp(input, "L14_ON", 6) == 0) {
+ sendToUSB(dev_handle, L14_ON);
+ } else if (strncmp(input, "L15_ON", 6) == 0) {
+ sendToUSB(dev_handle, L15_ON);
+ } else if (strncmp(input, "L16_ON", 6) == 0) {
+ sendToUSB(dev_handle, L16_ON);
+ } else if (strncmp(input, "L1_OFF", 6) == 0) {
+ sendToUSB(dev_handle, L1_OFF);
+ } else if (strncmp(input, "L2_OFF", 6) == 0) {
+ sendToUSB(dev_handle, L2_OFF);
+ } else if (strncmp(input, "L3_OFF", 6) == 0) {
+ sendToUSB(dev_handle, L3_OFF);
+ } else if (strncmp(input, "L4_OFF", 6) == 0) {
+ sendToUSB(dev_handle, L4_OFF);
+ } else if (strncmp(input, "L5_OFF", 6) == 0) {
+ sendToUSB(dev_handle, L5_OFF);
+ } else if (strncmp(input, "L6_OFF", 6) == 0) {
+ sendToUSB(dev_handle, L6_OFF);
+ } else if (strncmp(input, "L7_OFF", 6) == 0) {
+ sendToUSB(dev_handle, L7_OFF);
+ } else if (strncmp(input, "L8_OFF", 6) == 0) {
+ sendToUSB(dev_handle, L8_OFF);
+ } else if (strncmp(input, "L9_OFF", 6) == 0) {
+ sendToUSB(dev_handle, L9_OFF);
+ } else if (strncmp(input, "L10_OFF", 7) == 0) {
+ sendToUSB(dev_handle, L10_OFF);
+ } else if (strncmp(input, "L11_OFF", 7) == 0) {
+ sendToUSB(dev_handle, L11_OFF);
+ } else if (strncmp(input, "L12_OFF", 7) == 0) {
+ sendToUSB(dev_handle, L12_OFF);
+ } else if (strncmp(input, "L13_OFF", 7) == 0) {
+ sendToUSB(dev_handle, L13_OFF);
+ } else if (strncmp(input, "L14_OFF", 7) == 0) {
+ sendToUSB(dev_handle, L14_OFF);
+ } else if (strncmp(input, "L15_OFF", 7) == 0) {
+ sendToUSB(dev_handle, L15_OFF);
+ } else if (strncmp(input, "L16_OFF", 7) == 0) {
+ sendToUSB(dev_handle, L16_OFF);
+ } else if (strncmp(input, "M1_ON", 5) == 0) {
+ sendToUSB(dev_handle, M1_ON);
+ } else if (strncmp(input, "M2_ON", 5) == 0) {
+ sendToUSB(dev_handle, M2_ON);
+ } else if (strncmp(input, "M3_ON", 5) == 0) {
+ sendToUSB(dev_handle, M3_ON);
+ } else if (strncmp(input, "M4_ON", 5) == 0) {
+ sendToUSB(dev_handle, M4_ON);
+ } else if (strncmp(input, "M5_ON", 5) == 0) {
+ sendToUSB(dev_handle, M5_ON);
+ } else if (strncmp(input, "M6_ON", 5) == 0) {
+ sendToUSB(dev_handle, M6_ON);
+ } else if (strncmp(input, "M7_ON", 5) == 0) {
+ sendToUSB(dev_handle, M7_ON);
+ } else if (strncmp(input, "M8_ON", 5) == 0) {
+ sendToUSB(dev_handle, M8_ON);
+ } else if (strncmp(input, "M9_ON", 5) == 0) {
+ sendToUSB(dev_handle, M9_ON);
+ } else if (strncmp(input, "M10_ON", 6) == 0) {
+ sendToUSB(dev_handle, M10_ON);
+ } else if (strncmp(input, "M11_ON", 6) == 0) {
+ sendToUSB(dev_handle, M11_ON);
+ } else if (strncmp(input, "M12_ON", 6) == 0) {
+ sendToUSB(dev_handle, M12_ON);
+ } else if (strncmp(input, "M13_ON", 6) == 0) {
+ sendToUSB(dev_handle, M13_ON);
+ } else if (strncmp(input, "M14_ON", 6) == 0) {
+ sendToUSB(dev_handle, M14_ON);
+ } else if (strncmp(input, "M15_ON", 6) == 0) {
+ sendToUSB(dev_handle, M15_ON);
+ } else if (strncmp(input, "M16_ON", 6) == 0) {
+ sendToUSB(dev_handle, M16_ON);
+ } else if (strncmp(input, "M1_OFF", 6) == 0) {
+ sendToUSB(dev_handle, M1_OFF);
+ } else if (strncmp(input, "M2_OFF", 6) == 0) {
+ sendToUSB(dev_handle, M2_OFF);
+ } else if (strncmp(input, "M3_OFF", 6) == 0) {
+ sendToUSB(dev_handle, M3_OFF);
+ } else if (strncmp(input, "M4_OFF", 6) == 0) {
+ sendToUSB(dev_handle, M4_OFF);
+ } else if (strncmp(input, "M5_OFF", 6) == 0) {
+ sendToUSB(dev_handle, M5_OFF);
+ } else if (strncmp(input, "M6_OFF", 6) == 0) {
+ sendToUSB(dev_handle, M6_OFF);
+ } else if (strncmp(input, "M7_OFF", 6) == 0) {
+ sendToUSB(dev_handle, M7_OFF);
+ } else if (strncmp(input, "M8_OFF", 6) == 0) {
+ sendToUSB(dev_handle, M8_OFF);
+ } else if (strncmp(input, "M9_OFF", 6) == 0) {
+ sendToUSB(dev_handle, M9_OFF);
+ } else if (strncmp(input, "M10_OFF", 7) == 0) {
+ sendToUSB(dev_handle, M10_OFF);
+ } else if (strncmp(input, "M11_OFF", 7) == 0) {
+ sendToUSB(dev_handle, M11_OFF);
+ } else if (strncmp(input, "M12_OFF", 7) == 0) {
+ sendToUSB(dev_handle, M12_OFF);
+ } else if (strncmp(input, "M13_OFF", 7) == 0) {
+ sendToUSB(dev_handle, M13_OFF);
+ } else if (strncmp(input, "M14_OFF", 7) == 0) {
+ sendToUSB(dev_handle, M14_OFF);
+ } else if (strncmp(input, "M15_OFF", 7) == 0) {
+ sendToUSB(dev_handle, M15_OFF);
+ } else if (strncmp(input, "M16_OFF", 7) == 0) {
+ sendToUSB(dev_handle, M16_OFF);
+ } else if (strncmp(input, "N1_ON", 5) == 0) {
+ sendToUSB(dev_handle, N1_ON);
+ } else if (strncmp(input, "N2_ON", 5) == 0) {
+ sendToUSB(dev_handle, N2_ON);
+ } else if (strncmp(input, "N3_ON", 5) == 0) {
+ sendToUSB(dev_handle, N3_ON);
+ } else if (strncmp(input, "N4_ON", 5) == 0) {
+ sendToUSB(dev_handle, N4_ON);
+ } else if (strncmp(input, "N5_ON", 5) == 0) {
+ sendToUSB(dev_handle, N5_ON);
+ } else if (strncmp(input, "N6_ON", 5) == 0) {
+ sendToUSB(dev_handle, N6_ON);
+ } else if (strncmp(input, "N7_ON", 5) == 0) {
+ sendToUSB(dev_handle, N7_ON);
+ } else if (strncmp(input, "N8_ON", 5) == 0) {
+ sendToUSB(dev_handle, N8_ON);
+ } else if (strncmp(input, "N9_ON", 5) == 0) {
+ sendToUSB(dev_handle, N9_ON);
+ } else if (strncmp(input, "N10_ON", 6) == 0) {
+ sendToUSB(dev_handle, N10_ON);
+ } else if (strncmp(input, "N11_ON", 6) == 0) {
+ sendToUSB(dev_handle, N11_ON);
+ } else if (strncmp(input, "N12_ON", 6) == 0) {
+ sendToUSB(dev_handle, N12_ON);
+ } else if (strncmp(input, "N13_ON", 6) == 0) {
+ sendToUSB(dev_handle, N13_ON);
+ } else if (strncmp(input, "N14_ON", 6) == 0) {
+ sendToUSB(dev_handle, N14_ON);
+ } else if (strncmp(input, "N15_ON", 6) == 0) {
+ sendToUSB(dev_handle, N15_ON);
+ } else if (strncmp(input, "N16_ON", 6) == 0) {
+ sendToUSB(dev_handle, N16_ON);
+ } else if (strncmp(input, "N1_OFF", 6) == 0) {
+ sendToUSB(dev_handle, N1_OFF);
+ } else if (strncmp(input, "N2_OFF", 6) == 0) {
+ sendToUSB(dev_handle, N2_OFF);
+ } else if (strncmp(input, "N3_OFF", 6) == 0) {
+ sendToUSB(dev_handle, N3_OFF);
+ } else if (strncmp(input, "N4_OFF", 6) == 0) {
+ sendToUSB(dev_handle, N4_OFF);
+ } else if (strncmp(input, "N5_OFF", 6) == 0) {
+ sendToUSB(dev_handle, N5_OFF);
+ } else if (strncmp(input, "N6_OFF", 6) == 0) {
+ sendToUSB(dev_handle, N6_OFF);
+ } else if (strncmp(input, "N7_OFF", 6) == 0) {
+ sendToUSB(dev_handle, N7_OFF);
+ } else if (strncmp(input, "N8_OFF", 6) == 0) {
+ sendToUSB(dev_handle, N8_OFF);
+ } else if (strncmp(input, "N9_OFF", 6) == 0) {
+ sendToUSB(dev_handle, N9_OFF);
+ } else if (strncmp(input, "N10_OFF", 7) == 0) {
+ sendToUSB(dev_handle, N10_OFF);
+ } else if (strncmp(input, "N11_OFF", 7) == 0) {
+ sendToUSB(dev_handle, N11_OFF);
+ } else if (strncmp(input, "N12_OFF", 7) == 0) {
+ sendToUSB(dev_handle, N12_OFF);
+ } else if (strncmp(input, "N13_OFF", 7) == 0) {
+ sendToUSB(dev_handle, N13_OFF);
+ } else if (strncmp(input, "N14_OFF", 7) == 0) {
+ sendToUSB(dev_handle, N14_OFF);
+ } else if (strncmp(input, "N15_OFF", 7) == 0) {
+ sendToUSB(dev_handle, N15_OFF);
+ } else if (strncmp(input, "N16_OFF", 7) == 0) {
+ sendToUSB(dev_handle, N16_OFF);
+ } else if (strncmp(input, "O1_ON", 5) == 0) {
+ sendToUSB(dev_handle, O1_ON);
+ } else if (strncmp(input, "O2_ON", 5) == 0) {
+ sendToUSB(dev_handle, O2_ON);
+ } else if (strncmp(input, "O3_ON", 5) == 0) {
+ sendToUSB(dev_handle, O3_ON);
+ } else if (strncmp(input, "O4_ON", 5) == 0) {
+ sendToUSB(dev_handle, O4_ON);
+ } else if (strncmp(input, "O5_ON", 5) == 0) {
+ sendToUSB(dev_handle, O5_ON);
+ } else if (strncmp(input, "O6_ON", 5) == 0) {
+ sendToUSB(dev_handle, O6_ON);
+ } else if (strncmp(input, "O7_ON", 5) == 0) {
+ sendToUSB(dev_handle, O7_ON);
+ } else if (strncmp(input, "O8_ON", 5) == 0) {
+ sendToUSB(dev_handle, O8_ON);
+ } else if (strncmp(input, "O9_ON", 5) == 0) {
+ sendToUSB(dev_handle, O9_ON);
+ } else if (strncmp(input, "O10_ON", 6) == 0) {
+ sendToUSB(dev_handle, O10_ON);
+ } else if (strncmp(input, "O11_ON", 6) == 0) {
+ sendToUSB(dev_handle, O11_ON);
+ } else if (strncmp(input, "O12_ON", 6) == 0) {
+ sendToUSB(dev_handle, O12_ON);
+ } else if (strncmp(input, "O13_ON", 6) == 0) {
+ sendToUSB(dev_handle, O13_ON);
+ } else if (strncmp(input, "O14_ON", 6) == 0) {
+ sendToUSB(dev_handle, O14_ON);
+ } else if (strncmp(input, "O15_ON", 6) == 0) {
+ sendToUSB(dev_handle, O15_ON);
+ } else if (strncmp(input, "O16_ON", 6) == 0) {
+ sendToUSB(dev_handle, O16_ON);
+ } else if (strncmp(input, "O1_OFF", 6) == 0) {
+ sendToUSB(dev_handle, O1_OFF);
+ } else if (strncmp(input, "O2_OFF", 6) == 0) {
+ sendToUSB(dev_handle, O2_OFF);
+ } else if (strncmp(input, "O3_OFF", 6) == 0) {
+ sendToUSB(dev_handle, O3_OFF);
+ } else if (strncmp(input, "O4_OFF", 6) == 0) {
+ sendToUSB(dev_handle, O4_OFF);
+ } else if (strncmp(input, "O5_OFF", 6) == 0) {
+ sendToUSB(dev_handle, O5_OFF);
+ } else if (strncmp(input, "O6_OFF", 6) == 0) {
+ sendToUSB(dev_handle, O6_OFF);
+ } else if (strncmp(input, "O7_OFF", 6) == 0) {
+ sendToUSB(dev_handle, O7_OFF);
+ } else if (strncmp(input, "O8_OFF", 6) == 0) {
+ sendToUSB(dev_handle, O8_OFF);
+ } else if (strncmp(input, "O9_OFF", 6) == 0) {
+ sendToUSB(dev_handle, O9_OFF);
+ } else if (strncmp(input, "O10_OFF", 7) == 0) {
+ sendToUSB(dev_handle, O10_OFF);
+ } else if (strncmp(input, "O11_OFF", 7) == 0) {
+ sendToUSB(dev_handle, O11_OFF);
+ } else if (strncmp(input, "O12_OFF", 7) == 0) {
+ sendToUSB(dev_handle, O12_OFF);
+ } else if (strncmp(input, "O13_OFF", 7) == 0) {
+ sendToUSB(dev_handle, O13_OFF);
+ } else if (strncmp(input, "O14_OFF", 7) == 0) {
+ sendToUSB(dev_handle, O14_OFF);
+ } else if (strncmp(input, "O15_OFF", 7) == 0) {
+ sendToUSB(dev_handle, O15_OFF);
+ } else if (strncmp(input, "O16_OFF", 7) == 0) {
+ sendToUSB(dev_handle, O16_OFF);
+ } else if (strncmp(input, "P1_ON", 5) == 0) {
+ sendToUSB(dev_handle, P1_ON);
+ } else if (strncmp(input, "P2_ON", 5) == 0) {
+ sendToUSB(dev_handle, P2_ON);
+ } else if (strncmp(input, "P3_ON", 5) == 0) {
+ sendToUSB(dev_handle, P3_ON);
+ } else if (strncmp(input, "P4_ON", 5) == 0) {
+ sendToUSB(dev_handle, P4_ON);
+ } else if (strncmp(input, "P5_ON", 5) == 0) {
+ sendToUSB(dev_handle, P5_ON);
+ } else if (strncmp(input, "P6_ON", 5) == 0) {
+ sendToUSB(dev_handle, P6_ON);
+ } else if (strncmp(input, "P7_ON", 5) == 0) {
+ sendToUSB(dev_handle, P7_ON);
+ } else if (strncmp(input, "P8_ON", 5) == 0) {
+ sendToUSB(dev_handle, P8_ON);
+ } else if (strncmp(input, "P9_ON", 5) == 0) {
+ sendToUSB(dev_handle, P9_ON);
+ } else if (strncmp(input, "P10_ON", 6) == 0) {
+ sendToUSB(dev_handle, P10_ON);
+ } else if (strncmp(input, "P11_ON", 6) == 0) {
+ sendToUSB(dev_handle, P11_ON);
+ } else if (strncmp(input, "P12_ON", 6) == 0) {
+ sendToUSB(dev_handle, P12_ON);
+ } else if (strncmp(input, "P13_ON", 6) == 0) {
+ sendToUSB(dev_handle, P13_ON);
+ } else if (strncmp(input, "P14_ON", 6) == 0) {
+ sendToUSB(dev_handle, P14_ON);
+ } else if (strncmp(input, "P15_ON", 6) == 0) {
+ sendToUSB(dev_handle, P15_ON);
+ } else if (strncmp(input, "P16_ON", 6) == 0) {
+ sendToUSB(dev_handle, P16_ON);
+ } else if (strncmp(input, "P1_OFF", 6) == 0) {
+ sendToUSB(dev_handle, P1_OFF);
+ } else if (strncmp(input, "P2_OFF", 6) == 0) {
+ sendToUSB(dev_handle, P2_OFF);
+ } else if (strncmp(input, "P3_OFF", 6) == 0) {
+ sendToUSB(dev_handle, P3_OFF);
+ } else if (strncmp(input, "P4_OFF", 6) == 0) {
+ sendToUSB(dev_handle, P4_OFF);
+ } else if (strncmp(input, "P5_OFF", 6) == 0) {
+ sendToUSB(dev_handle, P5_OFF);
+ } else if (strncmp(input, "P6_OFF", 6) == 0) {
+ sendToUSB(dev_handle, P6_OFF);
+ } else if (strncmp(input, "P7_OFF", 6) == 0) {
+ sendToUSB(dev_handle, P7_OFF);
+ } else if (strncmp(input, "P8_OFF", 6) == 0) {
+ sendToUSB(dev_handle, P8_OFF);
+ } else if (strncmp(input, "P9_OFF", 6) == 0) {
+ sendToUSB(dev_handle, P9_OFF);
+ } else if (strncmp(input, "P10_OFF", 7) == 0) {
+ sendToUSB(dev_handle, P10_OFF);
+ } else if (strncmp(input, "P11_OFF", 7) == 0) {
+ sendToUSB(dev_handle, P11_OFF);
+ } else if (strncmp(input, "P12_OFF", 7) == 0) {
+ sendToUSB(dev_handle, P12_OFF);
+ } else if (strncmp(input, "P13_OFF", 7) == 0) {
+ sendToUSB(dev_handle, P13_OFF);
+ } else if (strncmp(input, "P14_OFF", 7) == 0) {
+ sendToUSB(dev_handle, P14_OFF);
+ } else if (strncmp(input, "P15_OFF", 7) == 0) {
+ sendToUSB(dev_handle, P15_OFF);
+ } else if (strncmp(input, "P16_OFF", 7) == 0) {
+ sendToUSB(dev_handle, P16_OFF);
+ } else if (strncmp(input, "quit", 4) == 0
+ || strncmp(input, "exit", 4) == 0) {
+ return -1;
+ }
+ return 0;
+}
+
+int main() {
+ struct sockaddr_in client, server;
+
+ int sock, fd;
+ unsigned int len;
+ sock = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP);
+
+ memset(&server, 0, sizeof(server));
+
+ server.sin_family = AF_INET;
+ server.sin_addr.s_addr = htonl(INADDR_ANY);
+ server.sin_port = htons(PORT);
+
+ if (bind(sock, (struct sockaddr*) &server, sizeof(server)) < 0) {
+ printf("Can't bind socket");
+ return (-1);
+ }
+
+ if (listen(sock, 5) == -1) {
+ printf("Can't listen on socket");
+ return (-1);
+ }
+ printf("server listeting...");
+ libusb_device_handle *dev_handle;
+ libusb_context *usbContext = NULL;
+ int r; //for return values
+ r = libusb_init(&usbContext);
+ if (r < 0) {
+ printf("Init Error %i\n", r);
+ return 1;
+ }
+
+ dev_handle = libusb_open_device_with_vid_pid(usbContext, 5824, 2610); //VendorID and ProductID in decimal
+ if (dev_handle == NULL)
+ printf("Cannot open device");
+
+ if (libusb_kernel_driver_active(dev_handle, 0) == 1) {
+ printf("Kernel Driver Active");
+ if (libusb_detach_kernel_driver(dev_handle, 0) == 0)
+ printf("Kernel Driver Detached!");
+ }
+ r = libusb_claim_interface(dev_handle, 0);
+ if (r < 0) {
+ printf("Cannot Claim Interface");
+ return 1;
+ }
+
+ while (1) {
+ len = sizeof(client);
+ fd = accept(sock, (struct sockaddr*) &client, &len);
+ if (fd < 0) {
+ printf("Error, can't accept connection");
+ return -1;
+ }
+ char* receiveBuffer[RECEIVE_BUFFER];
+ while (recv(fd, receiveBuffer, RECEIVE_BUFFER, 0) != -1) {
+
+ if (handleInput(receiveBuffer, dev_handle) == -1) {
+ close(fd);
+ }
+
+ }
+ }
+
+ r = libusb_release_interface(dev_handle, 0);
+ if (r != 0) {
+ printf("Cannot Release Interface");
+ return 1;
+ }
+
+ libusb_close(dev_handle);
+ libusb_exit(usbContext);
+ return 0;
+}
diff -Naur '--exclude=.*' make/lightmanager.orig/src/Makefile make/lightmanager/src/Makefile
--- make/lightmanager.orig/src/Makefile 1970-01-01 01:00:00.000000000 +0100
+++ make/lightmanager/src/Makefile 2012-07-03 15:03:41.000000000 +0200
@@ -0,0 +1,13 @@
+# Name : LightManagerC.c
+# Author : zwiebelchen
+# Version :
+# Copyright : GPL
+# Description : LightManagerC
+
+CC=
+CFLAGS=
+
+all: lightmanager
+
+lightmanager: lightmanager.c
+ ${CC} ${CFLAGS} -o lightmanager lightmanager.c -lusb-1.0