The iLink, Smart Colorful Bulb MUSIC, is a Bluetooth Low Energie LED RGB Bulb.
One may send commands to handle 0x18 with request commands.
The commands are usually 7 byte long. The structure is the following:
55 aa
.55aa01081506dc # returns status
// Source: http://easyonlineconverter.com/converters/checksum_converter.html // Calcuate 8-bit checksum for string N function calculate_checksum8(form, N) { // convert input value to upper case strN = new String(N); strN = strN.toUpperCase(); strHex = new String("0123456789ABCDEF"); result = 0; fctr = 16; for (i=0; i<strN.length; i++) { if (strN.charAt(i) == " ") continue; v = strHex.indexOf(strN.charAt(i)); if (v < 0) { result = -1; break; } result += v * fctr; if (fctr == 16) fctr = 1; else fctr = 16; } if (result < 0) { strResult = new String("Non-hex character entered"); } else if (fctr == 1) { strResult = new String("Odd number of characters entered. e.g. correct value = aa aa"); } else { // Calculate 2's complement result = (~(result & 0xff) + 1) & 0xFF; // Convert result to string //strResult = new String(result.toString()); strResult = strHex.charAt(Math.floor(result/16)) + strHex.charAt(result%16); } form.CKS8.value = strResult; } function clear_facts(form) { // Clear the checksum result field form.CKS8.value = " "; }
55aa010b0106ed # first packet on connection
55aa01081606db # returns something on connection 1x
55aa01081506dc # returns something on connection 2x
55aa01052206d2 # returns something 5x on connection
55aa01052306d1 # 2x on connection
55aa01050406f0 # returns 0x001a reading 5x on connection
55aa01050c06e8 # returns something
55aa01050806ec # return value differs only in one digit from above, 5x on connection
55aa01040406f1 # on connection (5)
55aa01041406e1 # returns something and changes val 11 and in status (only in animations)