diff --git a/armsrc/appmain.c b/armsrc/appmain.c index 133477033..f9138411b 100644 --- a/armsrc/appmain.c +++ b/armsrc/appmain.c @@ -2803,10 +2803,6 @@ static void PacketReceived(PacketCommandNG *packet) { SmartCardAtr(); break; } - case CMD_SMART_SETBAUD: { - SmartCardSetBaud(packet->oldarg[0]); - break; - } case CMD_SMART_PPS: { SmartCardPPS((const smart_card_pps_t *)packet->data.asBytes); break; diff --git a/armsrc/i2c.c b/armsrc/i2c.c index 4f68efb09..7bfded89e 100644 --- a/armsrc/i2c.c +++ b/armsrc/i2c.c @@ -1420,22 +1420,6 @@ void SmartCardUpgrade(uint64_t arg0) { BigBuf_free(); } -// Send a single byte to the SIM module's CMD_SETBAUD opcode (0x04). -// The 8051 firmware uses this to reload Timer1 (UART0 baud generator). -// Until 2026 the implementation was an empty stub; the SIM module silently -// ignored any host-driven baud renegotiation. Some smart cards (notably the -// HID Artemis SLE88 SAM family) advertise non-default Fi/Di in TA1 and need -// PPS to switch the bridge baud post-ATR. -void SmartCardSetBaud(uint64_t arg0) { - LED_D_ON(); - I2C_Reset_EnterMainProgram(); - bool ok = I2C_WriteByte((uint8_t)(arg0 & 0xFF), - I2C_DEVICE_CMD_SETBAUD, - I2C_DEVICE_ADDRESS_MAIN); - reply_ng(CMD_SMART_SETBAUD, ok ? PM3_SUCCESS : PM3_ESOFT, NULL, 0); - LEDsoff(); -} - /* * ISO/IEC 7816-3 clause 9 protocol and parameter selection. * diff --git a/armsrc/i2c.h b/armsrc/i2c.h index 0795eba8e..05c9bba8e 100644 --- a/armsrc/i2c.h +++ b/armsrc/i2c.h @@ -126,7 +126,6 @@ bool GetATR(smart_card_atr_t *card_ptr, bool verbose); void SmartCardAtr(void); void SmartCardRaw(const smart_card_raw_t *p); void SmartCardUpgrade(uint64_t arg0); -void SmartCardSetBaud(uint64_t arg0); void SmartCardSetClock(uint64_t arg0); void SmartCardPPS(const smart_card_pps_t *p); void I2C_print_status(void); diff --git a/include/pm3_cmd.h b/include/pm3_cmd.h index 19afa422f..accbb374f 100644 --- a/include/pm3_cmd.h +++ b/include/pm3_cmd.h @@ -828,7 +828,8 @@ typedef struct { #define CMD_SMART_UPGRADE 0x0141 #define CMD_SMART_UPLOAD 0x0142 #define CMD_SMART_ATR 0x0143 -#define CMD_SMART_SETBAUD 0x0144 +// 0x0144 was CMD_SMART_SETBAUD, removed - never had a client caller; the SIM +// module rate is driven by SmartCardPPS() and sc_rate_restore() instead #define CMD_SMART_SETCLOCK 0x0145 #define CMD_SMART_PPS 0x0146