Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Rockbox Ports are now being developed for various digital audio players!

+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Hardware
| | |-+  iPod Mini 1G - IAP - Creating a custom accessory
« previous next »
  • Print
Pages: [1]

Author Topic: iPod Mini 1G - IAP - Creating a custom accessory  (Read 553 times)

Offline shelob144

  • Member
  • *
  • Posts: 2
iPod Mini 1G - IAP - Creating a custom accessory
« on: February 25, 2022, 10:50:35 PM »
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:
Code: [Select]
//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
Logged

Offline shelob144

  • Member
  • *
  • Posts: 2
Re: iPod Mini 1G - IAP - Creating a custom accessory
« Reply #1 on: March 24, 2022, 06:12:01 PM »
My code works perfectly fine on my new iPod Classic 5G, so the Rockbox implementation of the IAP does work, just not properly on the iPod Mini 1G apparently.
Logged

Offline 7o9

  • Member
  • *
  • Posts: 117
Re: iPod Mini 1G - IAP - Creating a custom accessory
« Reply #2 on: March 25, 2022, 12:44:16 PM »
I am not saying it might help to try a current dev build, but 3.15 is very old now.

If it does not work with current either, I am sure a patch to make it work is welcomed.
Logged

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Hardware
| | |-+  iPod Mini 1G - IAP - Creating a custom accessory
 

  • SMF 2.0.19 | SMF © 2021, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.021 seconds with 18 queries.