Timestamp of 2018.03.23 13:32 in line 2002 of dscKeybusPrintData.cpp #359
-
I've successfully interfaced what I believe to be a DSC PK5500 keypad to an ESP8266. I'm able to read keypad keys and beep and buzz, etc. The keypad is connected stand-alone with no other panel or electronics connected. When initialized, the Date and Time display as "MAR 23/18 1:32p", then the time increments as one might expect. After several failed attempts to set a new time, I found line 2002 in dskKeybusPrintData.cpp mentioning this exact Timestamp. I don't understand the code or what this means. My attempts to set the time with *6 or sending 0x2A or running TimeSyncNTP have all failed. Unfortunately, I don't know which of these if any I should even expect to work. Does the PK5500 have a RTC? Is it the ESP8266 that is incrementing the time or the PK5500? Is the current date and time normally tracked in a "panel", and this is only the keypad? Any answers or pointers in the right direction would help. P.S. I don't know the master code. I tried the Unlocker sketch but it hung at "while (!dsc.status[0] || dsc.status[0] > 0x03) dsc.loop();" in setup(). Thanks in advance! --Keith |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
You can look at my KeypadInterface research in issue #200. I've tried with LCD5500, if needed i could test it with pk5500 and pk5501 in a few weeks. Unlocker sketch is for installer code, not master code. But in installer programming you can view/change master code. |
Beta Was this translation helpful? Give feedback.
-
Thanks kricon for the pointer to #200. That's my use case. I'll continue the date/time discussion there. Regarding this timestamp, I now see that it only appears when I reboot the ESP8266. If I just power cycle the PK5500, it displays Jan 01/01 12:00 a, but still sends and receives data otherwise. So probably the timestamp is sent from the ESP8266 during startup. There is a startupCycle sequence at line 119 of dscKeypad.cpp that sends "0xA5", defined on line 62 of dscKeypad.h, that looks suspicious. I don't understand it yet though and don't want to break anything (yet) by fiddling. |
Beta Was this translation helpful? Give feedback.
-
Confirmed. Changing dscKeypad.h line 62 to read: byte panelCommandA5[8] = {0xA5, 0x19, 0x0E, 0xED, 0x80, 0x00, 0x00, 0x39}; Initializes the PK5500 date to read MAR 23/19 (from MAR 23/18). The encoding is outlined in line 2002 of dskKeybusPrintData.cpp. Changing the 8 to 9 required that the CRC be changed from 0x38 to 0x39. Hopefully I'll be able to debug TimeSyncNTP from here. |
Beta Was this translation helpful? Give feedback.
Confirmed. Changing dscKeypad.h line 62 to read:
byte panelCommandA5[8] = {0xA5, 0x19, 0x0E, 0xED, 0x80, 0x00, 0x00, 0x39};
Initializes the PK5500 date to read MAR 23/19 (from MAR 23/18). The encoding is outlined in line 2002 of dskKeybusPrintData.cpp. Changing the 8 to 9 required that the CRC be changed from 0x38 to 0x39. Hopefully I'll be able to debug TimeSyncNTP from here.