diff --git a/apps/iap/iap-lingo0.c b/apps/iap/iap-lingo0.c index e69b42b..2cb33c4 100644 --- a/apps/iap/iap-lingo0.c +++ b/apps/iap/iap-lingo0.c @@ -432,7 +432,7 @@ void iap_handlepkt_mode0(const unsigned int len, const unsigned char *buf) IAP_TX_PUT(lingo); IAP_TX_PUT(LINGO_MAJOR(lingo)); IAP_TX_PUT(LINGO_MINOR(lingo)); - + device.lingoes |= BIT_N(lingo); iap_send_tx(); } else { cmd_ack(cmd, IAP_ACK_BAD_PARAM); @@ -445,6 +445,34 @@ void iap_handlepkt_mode0(const unsigned int len, const unsigned char *buf) * Sent from the iPod to the device */ + /* RequestTransportMaxPayloadSize (0x11) + * + * Packet format (offset in buf[]: Description) + * 0x00: Lingo ID: General Lingo, always 0x00 + * 0x01: Command, always 0x11 + * 0x02-0x03: transId + */ + case 0x10: + { + unsigned char transIdHigh = buf[2]; + unsigned char transIdLow = buf[3]; + IAP_TX_INIT(0x00, 0x12); + IAP_TX_PUT(transIdHigh); + IAP_TX_PUT(transIdLow); + IAP_TX_PUT_U16(0xffff); + iap_send_tx(); + } + break; + + /* ReturnTransportMaxPayloadSize (0x12) + * + * Packet format (offset in buf[]: Description) + * 0x00: Lingo ID: General Lingo, always 0x00 + * 0x01: Command, always 0x11 + * 0x02-0x03: transId + * 0x04-0x05: maxPayload + */ + /* IdentifyDeviceLingoes (0x13); * * Used by a device to inform the iPod of the devices @@ -1045,9 +1073,8 @@ void iap_handlepkt_mode0(const unsigned int len, const unsigned char *buf) { #ifdef LOGF_ENABLE logf("iap: Unsupported Mode00 Command"); -#else - cmd_ack(cmd, IAP_ACK_BAD_PARAM); #endif + cmd_ack(cmd, IAP_ACK_BAD_PARAM); break; } }