-
Notifications
You must be signed in to change notification settings - Fork 48
Hardware API
reportId - 1 byte. Describes the type of packet. Possible values:
- 01 = ControlPacket (for most operations such as setting the lights or audio)
- 02 = Upload (for updating pro devices)
controlByte1 - 1 byte. Further describes the operation to perform
- FF = Ignore (for standard operations)
- 01 = 1 Firmware Upgrade
- 02 = 2 Echo On
- 04 = 4 Debug
audioMode - 1 byte. Tells the device to play an audio pattern. Examples values:
- 00 = Ignore
- 01 = Play the audio pattern with ID=1
- 02 = Play the audio pattern with ID=2
- FF = Either turn off audio or ignore, depending on audioPlayDuration
ledMode - 1 byte. Tells the device to play an led pattern. Example values:
- 00 = Ignore
- 01 = Manual (use the manualLed byes below)
- 02 = Play the 1nd audio pattern
- 03 = Play the 2nd audio pattern
- FF = Off or ignore, depending on ledPlayDuration
audioPlayDuration - 2 bytes. Duration of audioMode in 10ths of a second. Examples values:
- 0000 = Stop
- 0A00 = 1 second
- 6400 = 10 seconds
- A08C = 60 seconds
- FFFE = forever
- FFFF = ignore
ledPlayDuration - 2 bytes. Duration of ledMode in 10ths of a second. Examples values:
- 0000 = Stop
- 6400 = 10 seconds
- FFFE = forever
- FFFF = ignore
readAudioIndex - Use to request info on an audio pattern. Follow up with a get input report. Examples:
- 00 = Submit a request to read the 0th audio pattern
- 01 = Submit a request to read the 1st audio pattern
- FF = Ignore
readLedIndex - Use to request info on an led pattern. Follow up with a get input report.
- 00 = Submit a request to read the 0th led pattern
- 01 = Submit a request to read the 1st audio pattern
- FF = Ignore
manualLeds0 - Combine with an ledMode of 01 to set the 0th bar of leds
- 00 = Off
- 80 = 50% brightness
- FE = Full brightness
- FF = Ignore
manualLeds1 - Combine with an ledMode of 01 to set the 1st bar of leds Same as manualLeds0
manualLeds2 - Combine with an ledMode of 01 to set the 2nd bar of leds Same as manualLeds0
manualLeds3 - Combine with an ledMode of 01 to set the 3rd bar of leds Same as manualLeds0
manualLeds4 - Combine with an ledMode of 01 to set the 4th bar of leds Same as manualLeds0
Initial control byte:
- 01 (ReportId_In_Info) = Get siren info
- 03 (ReportId_In_ReadAudioPacket) = Get audio pattern info. Prior to calling must submit a control packet with a non FF value for readAudioIndex to identify which audio pattern you want info on.
- 04 (ReportId_In_ReadLedPacket) = Get led pattern info. Prior to calling must submit a control packet with a non FF value for readLedIndex to identify which audio pattern you want info on.
Pattern Id - 1 byte.
- 01 = Pattern ID you requested has ID=1
- 02 = Pattern ID you requested has ID=2
- FF = There is no pattern matching the ID you requested
Pattern Name - 20 bytes of ASCII characters
FirmwareVersion - The firmware version of the connected device.
HardwareType - The type of hardware of the connected device
- 01 - Standard. No additional memory for audio and LED patterns.
- 02 - Pro. Additional memory for audio and LED patterns.
HardwareVersion - The hardware version of the connected device. This value will not change unless you buy new hardware.
ExternalMemorySize - If this is a Pro model this will return the number of bytes to store additional LED and audio patterns. If this is a .Standard model this will return 0.
AudioMode
- 00 - the audio is currently off
- 01 - the audio is currently playing audio ID = 1
AudioPlayDuration - The time remaining on the current audio output.
LedMode - What the LED's are currently doing
- 00 - the LEDs are currently off
- 01 - indicates the LEDs are currently in manual mode
- 02 - the LED's are currently paying audio ID = 2
LedPlayDuration - The time remaining on the current LED output.
01FFFF02FFFF6400FFFFFFFFFFFFFF0000000000000000000000000000000000000000000000
Broken Down:
- 01 - reportId = ControlPacket
- FF - controlByte1 = Ignore (standard operation)
- FF - audioMode = Turn Off Audio or ignore
- 02 - Play the audio pattern with an ID of 2
- FFFF - audioPlayDuration = ignore
- 6400 - ledPlayDuration = 10 seconds * 10 = 100 = 6400
readAudioIndex
- FF = Ignore
readLedIndex
- FF = Ignore
manualLeds0
- 00 = Off
- 80 = 50% brightness
- FE = Full brightness
- FF = Ignore
manualLeds1
- Same as manualLeds0
manualLeds2 =ff
- Same as manualLeds0
manualLeds3 =ff
- Same as manualLeds0
manualLeds4 =ff
- Same as manualLeds0
01FFFFFFFFFFFFFFFF00FFFFFFFFFF0000000000000000000000000000000000000000000000
- 01 - ReportId: Control Packet
- FF - controlByte1: Ignore (standard operation)
- FF - Audio mode: Ignore
- FF - Led mode: Ignore
- FFFF - AudioPlayDuration: Ignore
- FFFF - LedPlayDuration: Ignore
- FF - ReadAudioIndex: Ignore
- 00 - ReadLedIndex: Give me LED info at index zero
- FF - ManualLed1: Ignore
- FF - ManualLed2: Ignore
- FF - ManualLed3: Ignore
- FF - ManualLed4: Ignore
- FF - ManualLed5: Ignore
- 0000000000000000000000000000000000000000000000 - not used
024F6E2F4F66660000000000000000000000000000
Aka: 02ON/OFF0000…
- 02 = The pattern you requested has ID=2
- 4F = The first letter of the pattern you requested is 'O'
- 6e = The second letter is 'n'
- 2F = The third letter is '/'
- …