mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-14 18:48:13 -07:00
New reply frames transmission (reception still to be done)
This commit is contained in:
parent
4eaa2fc5aa
commit
96843c3f47
6 changed files with 112 additions and 23 deletions
|
@ -26,7 +26,7 @@ static pthread_t USB_communication_thread;
|
|||
|
||||
// Transmit buffer.
|
||||
static UsbCommand txBuffer;
|
||||
static uint8_t txBufferNG[USB_PACKET_NG_MAXLEN];
|
||||
static uint8_t txBufferNG[USB_COMMANDNG_MAXLEN];
|
||||
size_t txBufferNGLen;
|
||||
static bool txBuffer_pending = false;
|
||||
static pthread_mutex_t txBufferMutex = PTHREAD_MUTEX_INITIALIZER;
|
||||
|
@ -97,7 +97,7 @@ void SendCommandNG(uint16_t cmd, uint8_t *data, size_t len) {
|
|||
PrintAndLogEx(NORMAL, "Sending bytes to proxmark failed - offline");
|
||||
return;
|
||||
}
|
||||
if (len > USB_CMD_DATA_SIZE) {
|
||||
if (len > USB_DATANG_SIZE) {
|
||||
PrintAndLogEx(WARNING, "Sending %d bytes of payload is too much, abort", len);
|
||||
return;
|
||||
}
|
||||
|
@ -115,7 +115,7 @@ void SendCommandNG(uint16_t cmd, uint8_t *data, size_t len) {
|
|||
pthread_cond_wait(&txBufferSig, &txBufferMutex);
|
||||
}
|
||||
|
||||
tx_pre->magic = USB_PREAMBLE_MAGIC;
|
||||
tx_pre->magic = USB_COMMANDNG_PREAMBLE_MAGIC;
|
||||
tx_pre->length = len;
|
||||
tx_pre->cmd = cmd;
|
||||
memcpy(txBufferNG + sizeof(UsbCommandNGPreamble), data, len);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue