-
Notifications
You must be signed in to change notification settings - Fork 3
Description
Hello all,
Just wondering if anyone had any information on the order that commands need to be sent?
From what I've gathered it looks like it's possible to connect, receive the initial status messages and then send an 'off' command.
When I try this, I get frametype=3 (invalid command).
If I send an INIT (frametype=73) message, I get a 74 message back - as expected.
If I send a HELLO (frametype=1, 4D01) message, I get a 6 message back - as expected.
but when i send an OFF (frametype=1, 4D03) message, I get a 3 message back - indicating an error.
Sent message is FF FF 0A 00 00 00 00 00 00 01 4D 03 5B
Return message is FF FF 0A 40 00 00 00 00 00 03 00 00 4D E3 E1 - basically nothing useful to understand the error.
One thing I have noticed is that E3 E1 doesnt appear to be correct for CRC16/MODBUS - I'd expect it be 99 E5
Update:
The CRC is calculated with CRC16 (not CRC16/MODBUS) and includes all bytes except Frame Separator (FF FF) and Checksum/CRC on the return messages..
Update 2:
I have now solved the issue above - the off/on commands on my device are not 4D02 and 4D03.
Not sure if its possible to determine a protocol version or similar from any of the messages, but I have now determined that the follow are correct for my device:
Off - FF FF 0C 00 00 00 00 00 00 01 5D 01 00 00 5B
On - FF FF 0C 00 00 00 00 00 00 01 5D 01 00 01 5C