全三轨磁条卡读卡器|阅读机|刷卡器MRS100串口通信协议 Communication Protocol
1、Command
Command name | Command code | Command parameters | Remark |
Set working mode | 0x30 | 0x30:Active mode | Upload data after read card |
0x31: Store mode | Store data and do not upload after read card | ||
Check configuration | 0x31 | 0x30 | Get configuration parameters of card reader |
Check version no | 0x32 | 0x30 | Get version no of card reader |
Read magnetic card | 0x33 | 0x30 | Read magnetic card data |
Set baud rate | 0x34 | 0x30:4800 0x31:9600 0x32:19200 0x33:38400 | |
Set track parameter | 0x35 | T1_SS,T1_ES,T2_SS,T2_ES T3_SS,T3_ES,TRn,CR | |
Note:T1_SS:Start symbol of track 1, T1_ES:End symbol of track 1
T2_SS:Start symbol of track 2, T2_ES:End symbol of track 2
T3_SS:Start symbol of track 3,T3_ES:End symbol of track 3
TRn:Read tracks selection:
0x31 track 1
0x32 track 2
0x34 track 3
0x33 track 1 and 2
0x36 track 2 and 3
0x37 track 1.2.3
CR:Tracks end enter to output selection
0x30:Without enter
0x31:With enter
Error command list
0x30 | Command error | ||
0x31 | Command parameters error | ||
0x40 | Read/write storage error | ||
0x41 | With magnetic card data |
2、Command format remark
2.1、Set card reader mode:
0x02 | 0x02 | 0x30 | Mode | 0x03 | BCC |
Return successfully:
0x02 | 0x03 | 0x30 | Mode | ‘Y’ | 0x03 | BCC |
Return with failure:
0x02 | 0x04 | 0x30 | Mode | ‘N’ | ErroCode | 0x03 | BCC |
Mode:0x30: Active mode,0x31:Command mode
ErroCode
2.2、Check configuration:
0x02 | 0x02 | 0x31 | 0x30 | 0x03 | BCC |
Return successfully:
0x02 | 0x04 | 0x31 | 0x30 | ‘Y’ | Config | 0x03 | BCC |
Return with failure:
0x02 | 0x0E | 0x31 | 0x30 | ‘N’ | ErroCode | 0x03 | BCC |
Config:10 bytes:Mode、T1_SS、T1_ES、T2_SS、T2_ES、T3_SS、T3_ES、TrackN、CR、BaudRate。
ErroCode
2.3、Check version no:
0x02 | 0x02 | 0x32 | 0x30 | 0x03 | BCC | |||||||
c0x02 | 0x13 | 0x32 | 0x30 | ‘Y’ | Version | 0x03 | BCC | |||||
Return with failure:
0x02 | 0x04 | 0x32 | 0x30 | ‘N’ | ErroCode | 0x03 | BCC |
Mode:0x30: Active mode,0x31:Command mode
Version:TTCE_RS183_Vx.xx
ErroCode
2.4、Read data:
0x02 | 0x02 | 0x33 | 0x30 | 0x03 | BCC |
Return successfully:
0x02 | 0xxx | 0x33 | 0x30 | ‘Y’ | Data | 0x03 | BCC |
Return with failure:
0x02 | 0x04 | 0x33 | 0x30 | ‘N’ | ErroCode | 0x03 | BCC |
Data is magnetic card data, format is:% track 1 data? ;track 2 data? +track 3 data? ,%;+?is each tracks start/end symbol,if one of track without corresponding start symbol, the end symbol will not be exist also. When this command get magnetic card data that will empty immediately. If execute this command again and do not swiping card that will be return failed.
2.5、Set baud rate:
0x02 | 0x02 | 0x34 | BaudRate | 0x03 | BCC |
Return successfully:
0x02 | 0x03 | 0x34 | BaudRate | ‘Y’ | 0x03 | BCC |
Return with failure:
0x02 | 0x04 | 0x34 | 0x30 | ‘N’ | ErroCode | 0x03 | BCC |
2.6、Set track parameters
0x02 | 0x09 | 0x35 | Config | 0x03 | BCC |
Return successfully:
0x02 | 0x02 | 0x35 | ‘Y’ | 0x03 | BCC |
Return with failure:
0x02 | 0x03 | 0x35 | ‘N’ | ErroCode | 0x03 | BCC |
Config:8 bytes: T1_SS、T1_ES、T2_SS、T2_ES、T3_SS、T3_ES、TrackN、CR。
以上为全三轨磁条卡读卡器|阅读机|刷卡器MRS100串口通信协议 Communication Protocol,欢迎交流!