//public byte[] SwVer=new byte[2]{0x20,0x01}; public bool CheckDevice() { InteractionData tx = new InteractionData(); tx.buff[0] = 0x03; tx.buff[1] = 0x55; //主机-->设备 InteractionData rx = DeviceInteraction(tx); if (rx == null || rx.CheckDataList() == false) { return(false); } HexID[0] = rx.buff[0x10]; HexID[1] = rx.buff[0x11]; HexID[2] = rx.buff[0x12]; HexID[3] = rx.buff[0x13]; tx = new InteractionData(); rx = DeviceInteraction(tx); if (rx == null || rx.CheckDataList() == false) { return(false); } HexVer[0] = rx.buff[0x10]; HexVer[1] = rx.buff[0x11]; return(true); }