Several changes in the initial connection, see details:

* TestProxmark uses pingng
* New command CMD_CAPABILITIES to transmit capabilities from pm3 to host
* Use TestProxmark to retrieve capabilities with that new command
* CloseProxmark if TestProxmark fails
* Hide baudrate for USB and retrieve real baudrate from pm3 for BT
This commit is contained in:
Philippe Teuwen 2019-04-27 02:46:20 +02:00
commit e2e0b704c5
5 changed files with 54 additions and 15 deletions

View file

@ -429,6 +429,16 @@ void SendStatus(void) {
reply_old(CMD_ACK, 1, 0, 0, 0, 0);
}
void SendCapabilities(void) {
capabilities_t capabilities;
capabilities.via_fpc = reply_via_fpc;
if (reply_via_fpc)
capabilities.baudrate = USART_BAUD_RATE;
else
capabilities.baudrate = 0; // no real baudrate for USB-CDC
reply_ng(CMD_CAPABILITIES, PM3_SUCCESS, (uint8_t *)&capabilities, sizeof(capabilities));
}
// Show some leds in a pattern to identify StandAlone mod is running
void StandAloneMode(void) {
@ -1439,6 +1449,8 @@ static void PacketReceived(PacketCommandNG *packet) {
case CMD_STATUS:
SendStatus();
break;
case CMD_CAPABILITIES:
SendCapabilities();
case CMD_PING:
if (packet->ng) {
reply_ng(CMD_PING, PM3_SUCCESS, packet->data.asBytes, packet->length);