嗯我已經找到了如何它的工作!
用於關閉蜂鳴器:
retCode = Card.SCardConnect(hContext, readername, Card.SCARD_SHARE_SHARED,
Card.SCARD_PROTOCOL_T0 | Card.SCARD_PROTOCOL_T1, ref hCard, ref Protocol);
Byte[] setBuzzerLoud = new Byte[6];
setBuzzerLoud[0] = 0xE0;
setBuzzerLoud[1] = 0x00;
setBuzzerLoud[2] = 0x00;
setBuzzerLoud[3] = 0x21;
setBuzzerLoud[4] = 0x01;
setBuzzerLoud[5] = 0x77;
uint pcBytesReturned = 0;
Byte[] RecieveBuff = new Byte[64];
uint controlcode = 3225264;
int status = Card.SCardControl(hCard, controlcode, ref setBuzzerLoud[0], 6, ref RecieveBuff[0], RecieveBuff.Length, ref pcBytesReturned);
MessageBox.Show(status.ToString());
用於關閉LED:
retCode = Card.SCardConnect(hContext, readername, Card.SCARD_SHARE_SHARED,
Card.SCARD_PROTOCOL_T0 | Card.SCARD_PROTOCOL_T1, ref hCard, ref Protocol);
Byte[] setLEDOFF = new Byte[6];
setLEDOFF[0] = 0xE0;
setLEDOFF[1] = 0x00;
setLEDOFF[2] = 0x00;
setLEDOFF[3] = 0x21;
setLEDOFF[4] = 0x01;
setLEDOFF[5] = 0x79;
uint pcBytesReturned = 0;
Byte[] RecieveBuff = new Byte[64];
uint controlcode = 3225264;
int status = Card.SCardControl(hCard, controlcode, ref setLEDOFF[0], 6, ref RecieveBuff[0], RecieveBuff.Length, ref pcBytesReturned);
MessageBox.Show(status.ToString());
對於關閉RF:
retCode = Card.SCardConnect(hContext, readername, Card.SCARD_SHARE_SHARED,
Card.SCARD_PROTOCOL_T0 | Card.SCARD_PROTOCOL_T1, ref hCard, ref Protocol);
Byte[] setRFOff = new Byte[6];
setRFOff[0] = 0xE0;
setRFOff[1] = 0x00;
setRFOff[2] = 0x00;
setRFOff[3] = 0x23;
setRFOff[4] = 0x01;
setRFOff[5] = 0x80;
uint pcBytesReturned = 0;
Byte[] RecieveBuff = new Byte[64];
uint controlcode = 3225264;
int status = Card.SCardControl(hCard, controlcode, ref setRFOff[0], 6, ref RecieveBuff[0], RecieveBuff.Length, ref pcBytesReturned);
MessageBox.Show(status.ToString());
有趣的是控制代碼在那裏我調試了鏈接中提到的C++代碼,以便爲這款智能卡讀卡器找到它:
DWORD controlcode = SCARD_CTL_CODE(3500);
轉義碼寫在41/77頁。
SCARD_CTL_CODE(3500)
唯一的問題是如何關閉的設置不會對讀卡器的RFID。我也找到了一篇文章,談論改變一些註冊表項的USB參數,我也會嘗試它。任何能夠幫助我的人都會很高興。
完成! 享受