RSI_User_Manual_ONR_for_PIM400-485-RSI_Using_Extended_Polling_Responses

ONR for PIM400-485-RSI Using Extended Polling Responses

AD-400 APM Address 0

PIM-400-485-RSI RSD Address 0

The Message Bytes column in Table 14-5 shows the first three bytes without the Start and CRC bytes. These are Address, Message Type, and Message Length.

NOTE: The use of Bold, Italic and Bold Italic font is to show the difference in the first three bytes within the table.

Table 14-5: ONR for PIM400-485-RSI using Extended Polling Responses

Message BytesCommand Type/ AddressDecoded MessageNotes
00 77 06 FF FF FF FF FF 08RSD/0x00Address = 0, SET_RSD_CONFIGURATION, Lngth = 6 Byte 1 Low RSD RF Addr = 0xFF – Do not change Byte 2 High RSD RF Addr = 0xFF – Do not change Byte 3 Low APM Range = 0xFF – Do not change Byte 4 High APM Range = 0xFF – Do not change Byte 5 New RSD Address = 0xFF – Do not change Byte 6 Bit 7-6: 00 – reserved Bit 5: 0 – N/A Bit 4-3: 01 – Extended Status Reporting Enabled Bit 2-0: 00 – DCS DisabledConfigure device for extended polling responses.
FF 53 06 2D A3 06 00 00 010xFFAddress = 255, RSD_CONFIGURATION, Lngth = 6 Byte 1 Low RSD RF Addr = 0x2D Byte 2 High RSD RF Addr = 0xA3 Byte 3 RSD Type = 0x06 – PIM400-485 Byte 4 Low APM range = 0x00 Byte 5 High APM range = 0x00 Byte 6 RSD RF Channel = 0x01Response indicating that the previously sent configuration was accepted.
00 3A 00RSD/0x00Address = 0, POLL_RSD_CRC, Lngth = 0Standard poll message.
FF 34 000xFFAddress = 255, RSD_STATUS_IDLE_EXTENDED, Lngth = 0Extended idle polling response.
00 15 04 00 04 00 00RSD/0x00Address = 0, ONR_MSG_TYPE, Lngth = 4 Byte 1 Sub-Command = 0x00 – START_FW_DOWNLOAD Byte 2 Download Target = 0x04 – PIM400-485 Byte 3 Lock Bit Map Low = 0x00 Byte 4 Lock Bit Map High = 0x00ACP request to start a new ONR download session for a PIM400-485.
FF 16 02 00 000xFFAddress = 255, ONR_RESP_TYPE, Lngth = 2 Byte 1 Sub-Command = 0x00 – START_FW_DOWNLOAD_RESP Byte 2 Response Code = 0x00 – No Error: Ready to start downloadThe PIM has verified and accepted the start download request. It is now safe to start downloading the PIM400-485 file.
00 3A 00RSD/0x00Address = 0, POLL_RSD_CRC, Lngth = 0Standard poll message.
FF 34 08 00 00 00 14 00 00 01 010xFFAddress = 255, RSD_STATUS_CHANGE_EXTENDED, Lngth = 8 Byte 1 APM Address = 0x00 Byte 2 Bit 0: Reader Tamper;1=Tamper =>0 Bit 1: Low Battery;1=Low Battery =>0 Bit 2: Loss of RF Communications;1=RF loss =>0 Bit 3: RSD Tamper;1=RSD door is open =>0 Bit 4: Cache Status;1=has been used =>0 Bit 5: Motor Stall;1=Motor is Stalled =>0 Bit 6: Lock Clutch Position;1=door unlocked =>0 Bit 7: Deadbolt Position;1=bolt extended =>0 Byte 3 Bit 0: Request To Exit Active;1=REX Active =>0 Bit 1: APM forced;1=Forced APM =>0 Bit 2: APM Open Too Long;1=APM Open Too Long =>0 Bit 3: Tamper Active;1=Tamper Active =>0 Bit 4: Datalog Ready; =>0 Bit 5: Configuration Mode;1=In Configuration Mode =>0 Bit 6: RSD/APM is in Link Mode;1=Link mode Enabled =>0 Bit 7: AD-400 Battery Critical/AD-300 REN Active;1=True =>0 Byte 4 Bit 0: Trouble;1=APM has trouble =>0 Bit 1: AD-400 Low Li Battery/AD-300;1=Low Battery =>0 Bit 2: Door Position Switch;1=closed =>1 Bit 3: IPB;1=IPB Pressed =>0 Bit 4: Request To Exit Switch;1=inactive =>1 Bit 5: Wireless: Request to Enter Switch/VIP:LBM Status;1=Active/BoltExtended =>0 Bit 6: Key Override;1=key being used =>0 Bit 7: Lock State;1=unlocked, 0=locked =>0 Byte 5 Bits 0 - 7: More Events =>0x00 (0) Byte 6 Card data bit count = 0 Byte 7 Number of extended status bytes = 1 Byte 8 Bits 0-1: ONR Status=01 – ONR ready for next command Bits 2-7: Reserved = 000000When the download starts, the ONR status switches from idle to active and ready. NOTE: The ONR status changes are always reported for the APM address that is lowest on the PIM. This same status can be applied to all linked devices.
00 15 43 01 01 00 0E 02 00 02 17 01 00 00 00 50 49 4D 20 34 38 35 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00RSD/0x00Address = 0, ONR_MSG_TYPE, Lngth = 67 Byte 1 Sub-Command = 0x01 – FW_FILE_BLOCK Byte 2 FW Block ID – Low = 0x01 Byte 3 FW Block ID – High = 0x00 Byte 4-67 first 64 bytes of the PIM400-485-RSI fileACP sends the first block of the PIM400-485-RSI file. NOTE: The block ID value starts from 0x0001 and the FW file data is sent 64 bytes at a time.
FF 16 02 01 000xFFAddress = 255, ONR_RESP_TYPE, Lngth = 2 Byte 1 Sub-Command = 0x01 – FW_FILE_BLOCK_RESP Byte 2 Response Code = 0x00 – No Error: Ready for next blockThe PIM has verified, accepted and stored the FW file block to eeprom. It is now safe to send the next block of the PIM400-485-RSI file.
00 3A 00RSD/0x00Address = 0, POLL_RSD_CRC, Lngth = 0Standard poll message.
FF 34 000xFFAddress = 255, RSD_STATUS_IDLE_EXTENDED, Lngth = 0Extended idle polling response.
00 15 43 01 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00RSD/0x00Address = 0, ONR_MSG_TYPE, Lngth = 67 Byte 1 Sub-Command = 0x01 – FW_FILE_BLOCK Byte 2 FW Block ID – Low = 0x02 Byte 3 FW Block ID – High = 0x00 Byte 4-67 second 64 bytes of the PIM400-485-RSI fileACP sends the second block of the PIM400-485-RSI file. NOTE: The block ID value increments by 1 after successfully sending each FW file block.
FF 16 02 01 000xFFAddress = 255, ONR_RESP_TYPE, Lngth = 2 Byte 1 Sub-Command = 0x01 – FW_FILE_BLOCK_RESP Byte 2 Response Code = 0x00 – No Error: Ready for next blockThe PIM has verified, accepted and stored to the FW file block to eeprom. It is now safe to send the next block of the PIM400-485-RSI reader file.
00 3A 00RSD/0x00Address = 0, POLL_RSD_CRC, Lngth = 0Standard poll message.
FF 34 000xFFAddress = 255, RSD_STATUS_IDLE_EXTENDED, Lngth = 0Extended idle polling response.
Repeat the FW_FILE_BLOCK msg to continue to download the FW file.   
00 15 43 01 BC 05 BA F3 D9 97 B0 FE 09 7C 71 B9 EC DA A1 C5 98 85 BA F3 D9 97 B0 FE 09 7C 71 B9 EC DA A1 C5 98 85 BA F3 D9 97 B0 FE 09 7C 71 B9 EC DA A1 C5 98 85 D7 AA 6A 28 A3 67 A2 D0 BC 32 5F 07 BD BD FF 80RSD/0x00Address = 0, ONR_MSG_TYPE, Lngth = 67 Byte 1 Sub-Command = 0x01 – FW_FILE_BLOCK Byte 2 FW Block ID – Low = 0xBC Byte 3 FW Block ID – High = 0x05 Byte 4-67 Last 64 bytes of the PIM400-485-RSI fileACP sends the last block (block ID = 0x5BC) of the PIM400-485-RSI file.
FF 16 02 01 000xFFAddress = 255, ONR_RESP_TYPE, Lngth = 2 Byte 1 Sub-Command = 0x01 – FW_FILE_BLOCK_RESP Byte 2 Response Code = 0x00 – No Error: Ready for next blockThe PIM has verified, accepted and stored to the FW file block to eeprom. It is now safe to complete the download.
00 3A 00RSD/0x00Address = 0, POLL_RSD_CRC, Lngth = 0Standard poll message.
FF 34 000xFFAddress = 255, RSD_STATUS_IDLE_EXTENDED, Lngth = 0Extended idle polling response.
00 15 01 02RSD/0x00Address = 0, ONR_MSG_TYPE, Lngth = 1 Byte 1 Sub-Command = 0x02 – END_FW_DOWNLOADACP request to complete the FW download and have the PIM verify the downloaded FW file.
FF 16 02 02 010xFFAddress = 255, ONR_RESP_TYPE, Lngth = 2 Byte 1 Sub-Command = 0x02 – END_FW_DOWNLOAD_RESP Byte 2 Response Code = 0x01 – In-ProgressThe PIM has accepted the end FW download request; however, it needs more time to fully verify the downloaded FW file. This is an indication that the ACP should start monitoring the ONR status. In this example this is done by simply continuing to poll and monitoring the ONR status bits in the response.
00 3A 00RSD/0x00Address = 0, POLL_RSD_CRC, Lngth = 0Standard poll message.
FF 34 08 00 00 00 14 00 00 01 020xFFAddress = 255, RSD_STATUS_CHANGE_EXTENDED, Lngth = 8 Byte 1 APM Address = 0x00 Byte 2 Bit 0: Reader Tamper;1=Tamper =>0 Bit 1: Low Battery;1=Low Battery =>0 Bit 2: Loss of RF Communications;1=RF loss =>0 Bit 3: RSD Tamper;1=RSD door is open =>0 Bit 4: Cache Status;1=has been used =>0 Bit 5: Motor Stall;1=Motor is Stalled =>0 Bit 6: Lock Clutch Position;1=door unlocked =>0 Bit 7: Deadbolt Position;1=bolt extended =>0 Byte 3 Bit 0: Request To Exit Active;1=REX Active =>0 Bit 1: APM forced;1=Forced APM =>0 Bit 2: APM Open Too Long;1=APM Open Too Long =>0 Bit 3: Tamper Active;1=Tamper Active =>0 Bit 4: Datalog Ready; =>0 Bit 5: Configuration Mode;1=In Configuration Mode =>0 Bit 6: RSD/APM is in Link Mode;1=Link mode Enabled =>0 Bit 7: AD-400 Battery Critical/AD-300 REN Active;1=True =>0 Byte 4 Bit 0: Trouble;1=APM has trouble =>0 Bit 1: AD-400 Low Li Battery/AD-300;1=Low Battery =>0 Bit 2: Door Position Switch;1=closed =>1 Bit 3: IPB;1=IPB Pressed =>0 Bit 4: Request To Exit Switch;1=inactive =>1 Bit 5: Wireless: Request to Enter Switch/VIP:LBM Status;1=Active/BoltExtended =>0 Bit 6: Key Override;1=key being used =>0 Bit 7: Lock State;1=unlocked, 0=locked =>0 Byte 5 Bits 0 - 7: More Events =>0x00 (0) Byte 6 Card data bit count = 0 Byte 7 Number of extended status bytes = 1 Byte 8 Bits 0-1: ONR Status=10 – ONR In-Progress with previous command Bits 2-7: Reserved = 000000The PIM is busy processing the end FW download message. ONR status switches from “ready” to “In-Progress”. ACP continues to poll until status changes again.
00 3A 00RSD/0x00Address = 0, POLL_RSD_CRC, Lngth = 0Standard poll message.
FF 34 000xFFAddress = 255, RSD_STATUS_IDLE_EXTENDED, Lngth = 0Extended idle polling response – PIM still processing end FW download message.
00 3A 00RSD/0x00Address = 0, POLL_RSD_CRC, Lngth = 0Standard poll message.
FF 34 08 00 00 00 14 00 00 01 010xFFAddress = 255, RSD_STATUS_CHANGE_EXTENDED, Lngth = 8 Byte 1 APM Address = 0x00 Byte 2 Bit 0: Reader Tamper;1=Tamper =>0 Bit 1: Low Battery;1=Low Battery =>0 Bit 2: Loss of RF Communications;1=RF loss =>0 Bit 3: RSD Tamper;1=RSD door is open =>0 Bit 4: Cache Status;1=has been used =>0 Bit 5: Motor Stall;1=Motor is Stalled =>0 Bit 6: Lock Clutch Position;1=door unlocked =>0 Bit 7: Deadbolt Position;1=bolt extended =>0 Byte 3 Bit 0: Request To Exit Active;1=REX Active =>0 Bit 1: APM forced;1=Forced APM =>0 Bit 2: APM Open Too Long;1=APM Open Too Long =>0 Bit 3: Tamper Active;1=Tamper Active =>0 Bit 4: Datalog Ready; =>0 Bit 5: Configuration Mode;1=In Configuration Mode =>0 Bit 6: RSD/APM is in Link Mode;1=Link mode Enabled =>0 Bit 7: AD-400 Battery Critical/AD-300 REN Active;1=True =>0 Byte 4 Bit 0: Trouble;1=APM has trouble =>0 Bit 1: AD-400 Low Li Battery/AD-300;1=Low Battery =>0 Bit 2: Door Position Switch;1=closed =>1 Bit 3: IPB;1=IPB Pressed =>0 Bit 4: Request To Exit Switch;1=inactive =>1 Bit 5: Wireless: Request to Enter Switch/VIP:LBM Status;1=Active/BoltExtended =>0 Bit 6: Key Override;1=key being used =>0 Bit 7: Lock State;1=unlocked, 0=locked =>0 Byte 5 Bits 0 - 7: More Events =>0x00 (0) Byte 6 Card data bit count = 0 Byte 7 Number of extended status bytes = 1 Byte 8 Bits 0-1: ONR Status=01 – ONR ready for next command Bits 2-7: Reserved = 000000The PIM is finished with the end FW download message. Verification was successful, so the ONR status switches back to “ready”. It is now safe to reflash the downloaded firmware.
The PIM download is now complete. The ACP can move on to other activities and reflash the PIM at its earliest convenience.   
00 3A 00RSD/0x00Address = 0, POLL_RSD_CRC, Lngth = 0Standard poll message.
FF 34 000xFFAddress = 255, RSD_STATUS_IDLE_EXTENDED, Lngth = 0Extended idle polling response.
00 15 04 04 02 00 00 Address = 0, ONR_MSG_TYPE, Lngth = 4 Byte 1 Sub-Command = 0x04 – START_FW_REFLASH Byte 2 Reflash Target = 0x02 – PIM400-485 Byte 3 Lock Bit Map – Low = 0x00 Byte 4 Lock Bit Map – High = 0x00The ACP has requested that the PIM reflash all pending FW files. Remember, the PIM falls offline after receiving this request, so it is best to schedule this activity for a low use time to avoid customer impact.
FF 16 02 04 01 Address = 255, ONR_RESP_TYPE, Lngth = 2 Byte 1 Sub-Command = 0x04 – START_FW_REFLASH_RESP Byte 2 Response Code = 0x01 – In-ProgressThe PIM has accepted the command to reflash; however, more time is needed to reflash before the PIM can report success/failure. The ACP starts to monitor ONR status to receive indication that it was a success or not. NOTE: If the PIM fails to reflash, it may remain offline stuck in the bootloader and not able to provide notification of failure.
00 3A 00RSD/0x00Address = 0, POLL_RSD_CRC, Lngth = 0Standard poll message.
No Response  PIM400-485 remains offline for the duration of the reflashing. The ACP continues to poll the device until it comes back online.
Continue polling until the PIM comes back online.   
00 3A 00RSD/0x00Address = 0, POLL_RSD_CRC, Lngth = 0Standard poll message.
FF 34 000xFFAddress = 255, RSD_STATUS_IDLE_EXTENDED, Lngth = 0Extended idle polling response – PIM is back online, programming was successful.
00 47 01 0ARSD/0x00Address = 0, EXTENDED_COMMAND_TYPE, Lngth = 1 Byte 1 Sub-Command = 0x0A – GET_FULL_FIRMWARE_VERSIONACP can verify that the main board updated by querying the FW version.
FF 36 0F 8A 02 17 01 02 03 61 00 03 02 2B 02 02 03 610xFFAddress = 255, EXTENDED_RESPONSE_TYPE, Lngth = 15 Byte 1 Sub-Command = 0x8A – FULL_FIRMWARE_VERSION Byte 2 PIM FW Version Major – 2 Byte 3 PIM FW Version Minor – 23 Byte 4 PIM FW Version Build – 1 Byte 5 PIM Radio FW Version Major – 2 Byte 6 PIM Radio FW Version Minor – 3 Byte 7 PIM Radio FW Version Build – a Byte 8 WAPM Low Address – 0 Byte 9 WAPM 0 Type – 3 – AD-400 Byte 10 WAPM 0 FW Version Major – 2 Byte 11 WAPM 0 FW Version Minor – 43 Byte 12 WAPM 0 FW Version Build – 2 Byte 13 WAPM 0 Radio FW Version Major – 2 Byte 14 WAPM 0 Radio FW Version Minor – 3 Byte 15 WAPM 0 Radio FW Version Build – aThe PIM is now at version 2.23.1, which is the version of the file that was being downloaded

Summarized Example:

AD-400 APM Address 0

PIM-400-485-RSI RSD Address 0

NOTE: Write indicates a message from the ACP; Read indicates a response from the PIM400-485-RSI.

Write: 0A 00 3A 00 5E EA

Read: 0A FF 34 00 C7 F9

Write: 0A 00 15 04 00 04 00 00 43 0C START_FW_DOWNLOAD message targeting the PIM400-485

Read: 0A FF 16 02 00 00 F1 08 START_FW_DOWNLOAD_RESP indicating that request was accepted

Write: 0A 00 3A 00 5E EA

Read: 0A FF 34 08 00 01 00 15 00 00 01 01 26 2C RSD_STATUS_CHANGE_EXTENDED indicates ONR status switched from idle to ready

Write: 0A 00 3A 00 5E EA

Read 0A FF 34 00 C7 F9

Write: 0A 00 15 43 01 01 00 0E 02 00 02 63 09 00 00 00 50 49 4D 20 34 38 35 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 A3 26 FW_FILE_BLOCK message with 1st block

Read: 0A FF 16 02 01 00 C0 3B FW_FILE_BLOCK_RESP indicating that data block was accepted

Write: 0A 00 3A 00 5E EA

Read: 0A FF 34 00 C7 F9

Write: 0A 00 15 43 01 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 6B 0D FW_FILE_BLOCK message with 2nd block

Read: 0A FF 16 02 01 00 C0 3B FW_FILE_BLOCK_RESP indicating that data block was accepted

…Repeats to continue downloading PIM FW file

Write: 0A 00 3A 00 5E EA

Read: 0A FF 34 00 C7 F9

Write: 0A 00 15 43 01 BC 05 BA F3 D9 97 B0 FE 09 7C 71 B9 EC DA A1 C5 98 85 BA F3 D9 97 B0 FE 09 7C 71 B9 EC DA A1 C5 98 85 BA F3 D9 97 B0 FE 09 7C 71 B9 EC DA A1 C5 98 85 D7 AA 6A 28 A3 67 A2 D0 BC 32 5F 07 BD BD FF 80 6E EE FW_FILE_BLOCK message with last block

Read: 0A FF 16 02 01 00 C0 3B FW_FILE_BLOCK_RESP indicating that data block was accepted

Write: 0A 00 3A 00 5E EA

Read: 0A FF 34 00 C7 F9

Write: 0A 00 15 01 02 E0 BB END_FW_DOWNLOAD message

Read: 0A FF 16 02 02 01 B2 7E END_FW_DOWNLOAD_RESP indicating that message was received, but need more time to process

Write: 0A 00 3A 00 5E EA

Read: 0A FF 34 08 00 01 00 11 00 00 01 02 43 95 RSD_STATUS_CHANGE_EXTENDED indicates ONR status switched from ready to In-Progress

Write: 0A 00 3A 00 5E EA

Read: 0A FF 34 00 C7 F9

…Continue polling until the FW file verification is complete

Write: 0A 00 3A 00 5E EA

Read: 0A FF 34 08 00 01 00 11 00 00 01 01 20 A5 RSD_STATUS_CHANGE_EXTENDED indicates ONR status switched from In-Progress to ready

Write: 0A 00 3A 00 5E EA

Read: 0A FF 34 00 C7 F9

PIM download session is now complete. The ACP can choose to reflash the PIM at its earliest convenience.

Write: 0A 00 3A 00 5E EA

Read: 0A FF 34 00 C7 F9

Write: 0A 00 15 04 04 02 00 00 12 74 START_FW_DOWNLOAD message targeting the PIM400-485 board

Read: 0A FF 16 02 04 01 14 D4 START_FW_DOWNLOAD_RESP indicating that request was accepted

Write: 0A 00 3A 00 5E EA

Read: 0A FF 34 08 00 01 00 11 00 00 01 02 43 95 RSD_STATUS_CHANGE_EXTENDED indicates ONR status switched from ready to In-Progress

PIM will shortly fall offline and reflash

Write: 0A 00 3A 00 5E EA

No response – Still offline

Write: 0A 00 3A 00 5E EA

Read: 0A FF 34 08 00 01 28 15 00 00 01 00 4D 04 RSD_STATUS_CHANGE_EXTENDED indicates ONR status switched from In-Progress to idle