public void SendCtrlMess() { if (mySocket == null) { mySocket = ConnectSocket.getSocketInstance(); } byte[] messByte = new byte[13]; //帧头 messByte[0] = 0x54; messByte[1] = 0x43; //流水号 messByte[2] = 0x00; messByte[3] = 0x00; messByte[4] = 0x00; messByte[5] = 0x00; // 设备类型 的灯 messByte[6] = 0x01; //设备编号 messByte[7] = 0x01; //功能码 messByte[8] = 0x01; //数据长度 messByte[9] = 0x00; //CRC16校验 messByte[10] = 0x54; messByte[11] = 0x54; //帧尾 messByte[12] = 0xED; mySocket.SendMess(messByte); }