protected int[] transmit56(int[] in) throws Exception {
        //*deb*/System.out.println("transmit56() length: " +in.length);

        int length = in.length;
        int remain = length;
        int out[] = new int[length];
        int pointerInArray = 0;
        int pointerOutArray = 0;
        int partLength = 0;
        int flag = 0;

        while (remain > 0) {
            if (length > 61) {
                partLength = 61;
                remain = remain - 61;
                length = length - 61;
                flag = flags + 0x40; //with SSactive set
            } else {
                partLength = length;
                remain = remain - length;
                flag = flags; //with SSactive not set
            }

            int wbuf[] = new int[AbstractIowDevice.IOW56_SMF_REPORT_LENGTH];
            wbuf[0] = 9;
            wbuf[1] = partLength;
            wbuf[2] = flag;

            for (int t = 0; t < partLength; t++) {
                wbuf[t + 3] = in[pointerInArray++];
            }

            //send report to spi
            //*deb*/printReport("out",wbuf);
            long ret = iow.writeReport(1, wbuf);
            if (ret != 64) {
                throw new Exception("SPI write error!");
            }

            //receive report from spi
            int rbuf[] = (int[]) readQueue.dequeue();
            //*deb*/printReport("in ",rbuf);
            if (rbuf.length == 0) {
                throw new Exception("SPI read error!");
            }
            int count = rbuf[1];
            if (count != partLength) {
                throw new Exception("SPI read error!");
            }
            for (int t = 0; t < partLength; t++) {
                out[pointerOutArray++] = rbuf[t + 2];
            }
        }
        //*deb*/printReport("ret ",out);
        return out;
    }