Write data blocks to unencrypted services.

        This method sends a Write Without Encryption command to the
        tag. The data blocks to overwrite are indicated by a sequence
        of :class:`~nfc.tag.tt3.BlockCode` objects in the parameter
        *block_list*. Each block code must reference one of the
        :class:`~nfc.tag.tt3.ServiceCode` objects in the iterable
        *service_list*. If any of the blocks or services do not exist,
        the tag will stop processing at that point and return a two
        byte error status. The status bytes become the
        :attr:`~nfc.tag.TagCommandError.errno` value of the
        :exc:`~nfc.tag.TagCommandError` exception. The *data* to write
        must be a byte string or array of length ``16 *
        len(block_list)``.

        As an example, the following code writes ``16 * "\\xAA"`` to
        block 5 of service 16, ``16 * "\\xBB"`` to block 0 of service
        80 and ``16 * "\\xCC"`` to block 1 of service 80 (all services
        are writeable without key)::

            sc1 = nfc.tag.tt3.ServiceCode(16, 0x09)
            sc2 = nfc.tag.tt3.ServiceCode(80, 0x09)
            bc1 = nfc.tag.tt3.BlockCode(5, service=0)
            bc2 = nfc.tag.tt3.BlockCode(0, service=1)
            bc3 = nfc.tag.tt3.BlockCode(1, service=1)
            sc_list = [sc1, sc2]
            bc_list = [bc1, bc2, bc3]
            data = 16 * "\\xAA" + 16 * "\\xBB" + 16 * "\\xCC"
            try:
                data = tag.write_without_encryption(sc_list, bc_list, data)
            except nfc.tag.TagCommandError as e:
                if e.errno > 0x00FF:
                    print("the tag returned an error status")
                else:
                    print("command failed with some other error")

        Command execution errors raise :exc:`~nfc.tag.TagCommandError`.

def write_without_encryption(self, service_list, block_list, data):
        """Write data blocks to unencrypted services.

        This method sends a Write Without Encryption command to the
        tag. The data blocks to overwrite are indicated by a sequence
        of :class:`~nfc.tag.tt3.BlockCode` objects in the parameter
        *block_list*. Each block code must reference one of the
        :class:`~nfc.tag.tt3.ServiceCode` objects in the iterable
        *service_list*. If any of the blocks or services do not exist,
        the tag will stop processing at that point and return a two
        byte error status. The status bytes become the
        :attr:`~nfc.tag.TagCommandError.errno` value of the
        :exc:`~nfc.tag.TagCommandError` exception. The *data* to write
        must be a byte string or array of length ``16 *
        len(block_list)``.

        As an example, the following code writes ``16 * "\\xAA"`` to
        block 5 of service 16, ``16 * "\\xBB"`` to block 0 of service
        80 and ``16 * "\\xCC"`` to block 1 of service 80 (all services
        are writeable without key)::

            sc1 = nfc.tag.tt3.ServiceCode(16, 0x09)
            sc2 = nfc.tag.tt3.ServiceCode(80, 0x09)
            bc1 = nfc.tag.tt3.BlockCode(5, service=0)
            bc2 = nfc.tag.tt3.BlockCode(0, service=1)
            bc3 = nfc.tag.tt3.BlockCode(1, service=1)
            sc_list = [sc1, sc2]
            bc_list = [bc1, bc2, bc3]
            data = 16 * "\\xAA" + 16 * "\\xBB" + 16 * "\\xCC"
            try:
                data = tag.write_without_encryption(sc_list, bc_list, data)
            except nfc.tag.TagCommandError as e:
                if e.errno > 0x00FF:
                    print("the tag returned an error status")
                else:
                    print("command failed with some other error")

        Command execution errors raise :exc:`~nfc.tag.TagCommandError`.

        """
        a, b, e = self.pmm[6] & 7, self.pmm[6] >> 3 & 7, self.pmm[6] >> 6
        timeout = 302.1E-6 * ((b + 1) * len(block_list) + a + 1) * 4**e

        data = (chr(len(service_list))
                + ''.join([sc.pack() for sc in service_list])
                + chr(len(block_list))
                + ''.join([bc.pack() for bc in block_list])
                + data)

        log.debug("write w/o encryption service/block list: {0} / {1}".format(
            ' '.join([hexlify(sc.pack()) for sc in service_list]),
            ' '.join([hexlify(bc.pack()) for bc in block_list])))

        self.send_cmd_recv_rsp(0x08, data, timeout)