Respond to a firmware request.

def respond_fw(self, msg):
        """Respond to a firmware request."""
        req_fw_type, req_fw_ver, req_blk = fw_hex_to_int(msg.payload, 3)
        _LOGGER.debug(
            'Received firmware request with firmware type %s, '
            'firmware version %s, block index %s',
            req_fw_type, req_fw_ver, req_blk)
        fw_type, fw_ver, fware = self._get_fw(
            msg, (self.unstarted, self.started), req_fw_type, req_fw_ver)
        if fware is None:
            return None
        blk_data = fware['data'][
            req_blk * FIRMWARE_BLOCK_SIZE:
            req_blk * FIRMWARE_BLOCK_SIZE + FIRMWARE_BLOCK_SIZE]
        msg = msg.copy(sub_type=self._const.Stream.ST_FIRMWARE_RESPONSE)
        msg.payload = fw_int_to_hex(fw_type, fw_ver, req_blk)
        # format blk_data into payload format
        msg.payload = msg.payload + binascii.hexlify(blk_data).decode('utf-8')
        return msg