Hi,
I have recently been experimenting with controlling my 1st Gen iPod mini with an Arduino (using the dock connector's RX pin, fed by the TX pin of the Arduino).
I am able to successfully send iPod Remote commands (i.e. Mode 2 commands described here ->
http://www.ipodlinux.org/Apple_Accessory_Protocol/) to the default Apple operating system, but Rockbox doesn't seem to react to the commands that I send. I am using Rockbox version 3.15.
The Arduino is being powered properly, and the baud rate settings match (19200).
The default operating system's IAP implementation is satisfied with simple Mode 2 commands (no additional setup commands required). I looked into the Rockbox source code a bit, and it looks like you have to send the appropriate Mode 0 (
http://www.ipodlinux.org/Apple_Accessory_Protocol/) command in order to negotiate lingos. I am pretty sure I added this to my code correctly (so that I can have access to lingo 2), but am still not able to get Rockbox to register my IAP commands.
So basically, my question is: are there any other IAP commands that I need to add to my project in order to get it to work with Rockbox's implementation of the IAP? I'll include the pseudocode for the serial commands I am currently sending:
//Lingo negotiation portion
TX_Write(0xFF) //Header byte 1
TX_Write(0x55) //Header byte 2
TX_Write(0x03) //Length of mode+command+parameter
TX_Write(0x00) //Mode (lingo 0)
TX_Write(0x01) //Command byte 1
TX_Write(0x02) //Command byte 2
TX_Write(0xFA) //Checksum
Delay(2000) //Wait 2 seconds
//Play/pause command
TX_Write(0xFF) //Header byte 1
TX_Write(0x55) //Header byte 2
TX_Write(0x03) //Length of mode+command+parameter
TX_Write(0x02) //Mode (lingo 2, which should be negotiated by now)
TX_Write(0x00) //Command byte 1
TX_Write(0x01) //Command byte 2
TX_Write(0xFA) //Checksum
Delay(15) //Wait 15 ms (so that we send a command roughly 66 times per second)
//Release Button Command
TX_Write(0xFF) //Header byte 1
TX_Write(0x55) //Header byte 2
TX_Write(0x03) //Length of mode+command+parameter
TX_Write(0x02) //Mode (lingo 2, which should be negotiated by now)
TX_Write(0x00) //Command byte 1
TX_Write(0x00) //Command byte 2
TX_Write(0xFB) //Checksum