cvend
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| cvend [2026-05-03 20:59 UTC (7 months ago)] – ProxCardFunctionReply jordaeday | cvend [2026-11-23 00:56 UTC (5 days ago)] (current) – fix Ultralight reply header to remove emdash qkb | ||
|---|---|---|---|
| Line 32: | Line 32: | ||
| | 0x04 | -> | Status | | | | 0x04 | -> | Status | | | ||
| | 0x05 | <- | StatusReply | e.g. " | | 0x05 | <- | StatusReply | e.g. " | ||
| - | | 0x07 | <- | Heartbeat| sent periodically | + | | 0x07 | <- | Heartbeat| sent every ~3s by reader | |
| | 0x0f | <- | Startup | sent by reader after startup, approx 1 minute after power on, e.g. " | | 0x0f | <- | Startup | sent by reader after startup, approx 1 minute after power on, e.g. " | ||
| - | | 0x10 | -> | Reset | Seems to be unimplemented | | + | | 0x10 | -> | Reset | first byte selects subcommand (2 = restart application, |
| - | | 0x11 | <- | ResetReply | Always seems to be '' | + | | 0x11 | <- | ResetReply | e.g. " |
| - | | 0x20 | -> | LEDs | sets LED status, u32 bitmap; | + | | 0x20 | -> | LEDs | sets LED status, u32 bitmap; |
| | 0x22 | -> | Buzzer | makes the cvend beep; u16 frequency, u16 duration. | | 0x22 | -> | Buzzer | makes the cvend beep; u16 frequency, u16 duration. | ||
| | 0x32 | -> | CardRelease | // registered in ProxCardCtrl:: | | 0x32 | -> | CardRelease | // registered in ProxCardCtrl:: | ||
| Line 42: | Line 42: | ||
| | 0x96 | -> | PutFile | | | | 0x96 | -> | PutFile | | | ||
| | 0x97 | <- | PutFileReply | | | | 0x97 | <- | PutFileReply | | | ||
| - | | 0x98 | -> | GetFile | | | + | | 0x98 | -> | GetFile | '' |
| - | | 0x99 | <- | GetFileReply | | | + | | 0x99 | <- | GetFileReply | '' |
| | 0x9a | -> | DeleteFile | | | | 0x9a | -> | DeleteFile | | | ||
| | 0x9b | <- | DeleteFileReply | | | | 0x9b | <- | DeleteFileReply | | | ||
| - | | 0x9c | -> | FileInfo | | | + | | 0x9c | -> | FileInfo | '' |
| - | | 0x9d | <- | FileInfoReply | | | + | | 0x9d | <- | FileInfoReply | '' |
| - | | 0xa4 | -> | FileList | Seems to list files on the cVEND. First 2 bytes are the path length, remaining bytes are the path to list | | + | | 0xa4 | -> | FileList | '' |
| - | | 0xa5 | <- | FileListReply | First 4 bytes are reply length, remaining bytes seem to be null seperated modification timestamps and file/folder names | | + | | 0xa5 | <- | FileListReply | '' |
| - | | 0xaa | -> | SetTime | | | + | | 0xaa | -> | SetTime | payload is a timestamp |
| | 0xab | <- | SetTimeReply | | | | 0xab | <- | SetTimeReply | | | ||
| | 0xac | -> | ITSOData | // | | 0xac | -> | ITSOData | // | ||
| Line 67: | Line 67: | ||
| | 0xbc | -> | DESFireCommand | sends desfire command, documented in {{ 0: | | 0xbc | -> | DESFireCommand | sends desfire command, documented in {{ 0: | ||
| | 0xbd | <- | DESFireCommandReply | response to command, documented above | | | 0xbd | <- | DESFireCommandReply | response to command, documented above | | ||
| - | | 0xbe | <- | UnhandledCard | sent by reader when a card is presented that is not supported by any enabled ProxCardFunction, | + | | 0xbe | <- | UnhandledCard | sent by reader when a card is presented that is not supported by any enabled ProxCardFunction, |
| | 0xce | -> | | //unknown, registered in IppHandling:: | | 0xce | -> | | //unknown, registered in IppHandling:: | ||
| - | | 0xd0 | -> | EMV | first byte selects subcommand (0 = load config, 1 = preprocess, 2 = toggle polling) | | + | | 0xd0 | -> | EMV | first byte selects subcommand (0 = load config, 1 = preprocess, 2 = toggle |
| - | | 0xd1 | <- | EMVStatus | sent by reader after startup and certain nfc state changes, | + | | 0xd1 | <- | EMVStatus | sent by reader after startup and certain nfc state changes, |
| - | | 0xd4 | -> | | //unknown, registered | + | | 0xd4 | -> | UltralightCommand |
| - | | 0xd5 | <- | UltralightRead | + | | 0xd5 | <- | UltralightReply |
| | 0xe4 | -> | ProxCardFunction | first 2 bytes specify function (4=VdvKa, 5=MifareClassic, | | 0xe4 | -> | ProxCardFunction | first 2 bytes specify function (4=VdvKa, 5=MifareClassic, | ||
| | 0xe5 | <- | ProxCardFunctionReply | Returns 4 byte payload: 0x00, the function number (as above), 0x00, 0x00 | | | 0xe5 | <- | ProxCardFunctionReply | Returns 4 byte payload: 0x00, the function number (as above), 0x00, 0x00 | | ||
| Line 83: | Line 83: | ||
| -> - Host to Reader\\ | -> - Host to Reader\\ | ||
| <- - Reader to Host | <- - Reader to Host | ||
| + | |||
| + | ==== 0x20 LEDs ==== | ||
| + | |||
| + | The '' | ||
| + | |||
| + | ^ bit ^ LED ^ | ||
| + | | 0x01 | status row 1, green | | ||
| + | | 0x02 | status row 2, green | | ||
| + | | 0x04 | status row 3, green | | ||
| + | | 0x08 | status row 4, green | | ||
| + | | 0x10 | status row 3, amber (same LED as 0x04) | | ||
| + | | 0x20 | status row 4, red (same LED as 0x08) | | ||
| + | | 0x40 | NFC logo, right | | ||
| + | | 0x80 | NFC logo, left | | ||
| + | |||
| + | ==== 0xD5 UltralightReply for unsolicited card events ==== | ||
| + | |||
| + | '' | ||
| + | |||
| + | ^ byte 0 ^ meaning ^ payload ^ | ||
| + | | 0x00 | Card entered field | byte 1 = 0x00 (purpose unknown); bytes 2–8 = 7-byte UID (cascade / double UID format, e.g. '' | ||
| + | | 0x01 | Card left field | byte 1 = 0x00 | | ||
| + | |||
| + | ==== 0xD4 UltralightCommand / 0xD5 UltralightReply — subcommands ==== | ||
| + | |||
| + | Host sends 0xD4 with '' | ||
| + | |||
| + | Reply format: '' | ||
| + | |||
| + | Status codes: '' | ||
| + | |||
| + | ^ subcmd ^ name ^ request payload (after subcmd byte) ^ reply payload (after subcmd + status) ^ | ||
| + | | 0x02 | Read | '' | ||
| + | | 0x03 | Write | '' | ||
| + | | 0x04 | Authenticate (raw key) | '' | ||
| + | | 0x05 | Authenticate (key index) | '' | ||
| + | | 0x06 | Authenticate (index + key) | '' | ||
| + | | 0x07 | Abort | //none// — exactly 1 byte total | //empty// | | ||
| + | | 0x00–0x01, | ||
| + | |||
| + | Notes: | ||
| + | * Subcmds 0x02–0x07 are registered in '' | ||
| + | * If no card is in the field, the device echoes '' | ||
| + | * To read all pages of an NTAG 215: send subcmd 0x02 with '' | ||
| + | |||
| + | ==== 0xD1 EMVStatus ==== | ||
| + | |||
| + | '' | ||
| + | |||
| + | < | ||
| + | 05 fffee004 39 outer container, 0x39 bytes | ||
| + | df fe e0 08 01 10 | ||
| + | df fe e0 09 01 01 | ||
| + | df fe e0 0a 03 000000 | ||
| + | df fe e0 0e 08 00...00 | ||
| + | df fe e0 0b 01 00 | ||
| + | df fe e0 0c 06 00...00 | ||
| + | df fe e0 0d 02 0000 | ||
| + | </ | ||
| + | |||
| + | The '' | ||
| ==== Sample reader flow ==== | ==== Sample reader flow ==== | ||
| Line 95: | Line 156: | ||
| - Host sends read command. To read the full contents of file 0x00, the body is '' | - Host sends read command. To read the full contents of file 0x00, the body is '' | ||
| - Reader responds with the status code and file data. | - Reader responds with the status code and file data. | ||
| - | |||
| - | ==== Reader -> Host ==== | ||
| - | |||
| - | packet type 0xED seems to be a log message: | ||
| - | \xBC\xB9\0\xED\0h\xB6\x0306: | ||
| - | |||
| - | 0xB9 - card read? | ||
| - | |||
| - | ==== Host -> reader ==== | ||
| - | 0xBC - appears after every read (ack of some sort?) | ||
| - | |||
| ==== Card read flow ==== | ==== Card read flow ==== | ||
| Line 136: | Line 186: | ||
| 00000070 | 00000070 | ||
| 00000080 | 00000080 | ||
| - | | ||
| - | | ||
| - | | ||
| - | There are 4 bytes appended at the end of some messages (presumably those with ID LSB=1, if the Rust struct description is accurate?) which is not a CRC32 with any polynomial I recognize, but a CRC32 of (message + CRC) is always 0xFFFFFFFF. These 4 bytes are NOT included in the length. | ||
| - | |||
| - | The checksum is _appended_, as can be seen by it following the log message (after the final \0). | ||
| - | |||
| - | is it a _little endian_, _bit negated_ CRC32. Which is weird because the length is big endian?.. | ||
| - | * Host only sends two types of messages after initialization - both of type 0xBC. One is length 1 and the body is always 0x60 (+ negated CRC 2A714F60), the other is of length 4 and the body is always 5A2BC3F9 (+ negated-CRC 11A8A56A) | ||
cvend.1777841983.txt.gz · Last modified: by jordaeday
