public static byte[] makeBCC(byte[] orgTx) {
		int dleInOrgCnt = 0;
		for (int j = 0; j < orgTx.length; j++) {
			if (orgTx[j] == DLE)
				dleInOrgCnt++;
		}

		byte[] fwTx = new byte[orgTx.length + 5 + dleInOrgCnt];

		byte bcc_value = 0;
		int i = 0, k = 0;

		fwTx[k++] = DLE; // 0
		fwTx[k++] = STX; // 1
		for (i = 0; i < orgTx.length; i++) {
			fwTx[k++] = orgTx[i];
			if (orgTx[i] == DLE)
				fwTx[k++] = DLE;
		}
		for (i = 2; i < k; i++) {
			if ((fwTx[i] == DLE) && (fwTx[i + 1] == DLE))
				i++;
			bcc_value ^= fwTx[i];
		}
		fwTx[i++] = DLE;
		fwTx[i++] = ETX;
		bcc_value ^= DLE;
		bcc_value ^= ETX;

		// frm -> BCC_VALUE = (char)bcc_value;
		fwTx[i++] = bcc_value;
		// frm -> FwTxCnt = i;
		return fwTx;
	}