Datasheet

dS3484
dS3484 User Manual v4.03
Binary Command Set – continued.
0x35 Get Analogue inputs (1 byte command returning 8 bytes)
This returns all 4 analogue inputs. 8 bytes are returned, 2 for each analogue input.
Byte 1 byte 2 for example:
0x02 0x3E combined to 0x023E, or 574 decimal for input 1.
Byte 3 byte 4
0x01 0xFB combined to 0x01FB, or 507 decimal for input 2.
Byte 5 byte 6
0x01 0x8A combined to 0x018A, or 394 decimal for input 3.
Byte 7 byte 8
0x03 0x2C combined to 0x032C, or 812 decimal for input 4.
0x36 0x01 Get Counters (2 byte command – returning 8 bytes)
This command is used to get the counters. The second byte is the counter number, counter 1
in this case.
The first 4 bytes returned is the current counter value. This 32-bit (4 bytes) value is returned
high byte first. The second group of 4 bytes returned is the capture register for this counter,
also a 32-bit (4 byte) value returned high byte first.
AES binary command set
The AES Binary commands are the same as the Binary commands described above. The only
difference is that they are AES encrypted and always 16 bytes in length. The first bytes are the
same as described in the Binary command set. The last 4 bytes is the Nonce (a random
number) and the bytes in the middle are undefined. The module will decrypt the command,
generate the response and encrypt it before returning it to you.
Your program that controls the module will need to encrypt the commands and then decrypt
the response.
We use AES256 CBC encryption, hence the requirement for a 256 bit (or 32 byte) key. To
complete the security we use a random IV generated by a cryptoghraphically secure random
number generator (ISAAC).
To control the module you will need to send the commands with AES encryption. To help you
with this we have examples in C#, Java and Python. The C# and Java applications are
complete and may be used or modified as you wish.
To prevent re-play (or Playback) attacks the command packet includes a Nonce. This takes the
form of a 32-bit (4 byte) random number in positions 12, 13, 14 & 15 of the 16 byte data
Copyright © 2016-2018, Devantech Ltd.
All rights reserved.
www.robot-electronics.co.uk
38