📄 apple accessory protocot.mht
字号:
From: <由 Microsoft Internet Explorer 5 保存>
Subject: Apple Accessory Protocol - wikiPodLinux
Date: Wed, 8 Aug 2007 14:26:59 +0800
MIME-Version: 1.0
Content-Type: multipart/related;
type="text/html";
boundary="----=_NextPart_000_0033_01C7D9C8.2DFA1840"
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138
This is a multi-part message in MIME format.
------=_NextPart_000_0033_01C7D9C8.2DFA1840
Content-Type: text/html;
charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Content-Location: http://ipodlinux.org/Apple_Accessory_Protocol
=EF=BB=BF<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" =
"http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<HTML lang=3Den dir=3Dltr xml:lang=3D"en"=20
xmlns=3D"http://www.w3.org/1999/xhtml"><HEAD><TITLE>Apple Accessory =
Protocol - wikiPodLinux</TITLE>
<META http-equiv=3DContent-Type content=3D"text/html; charset=3Dutf-8">
<META content=3D"Apple Accessory Protocol" name=3DKEYWORDS>
<META content=3Dindex,follow name=3Drobots><LINK href=3D"/favicon.ico"=20
rel=3D"shortcut icon"><LINK title=3D"Creative Commons"=20
href=3D"/index.php?title=3DApple_Accessory_Protocol&action=3Dcreative=
commons"=20
type=3Dapplication/rdf+xml rel=3Dmeta><LINK=20
href=3D"http://www.gnu.org/copyleft/fdl.html" rel=3Dcopyright>
<STYLE type=3Dtext/css media=3Dscreen,projection>@import url( =
/stylesheets/monobook/main.css );
</STYLE>
<LINK media=3Dprint =
href=3D"http://ipodlinux.org/stylesheets/common/commonPrint.css"=20
type=3Dtext/css rel=3Dstylesheet><!--[if lt IE 5.5000]><style =
type=3D"text/css">@import =
"/stylesheets/monobook/IE50Fixes.css";</style><![endif]--><!--[if IE =
5.5000]><style type=3D"text/css">@import =
"/stylesheets/monobook/IE55Fixes.css";</style><![endif]--><!--[if IE 6]>
<STYLE type=3Dtext/css>@import url( /stylesheets/monobook/IE60Fixes.css =
);
</STYLE>
<![endif]--><!--[if IE]>
<SCRIPT src=3D"http://ipodlinux.org/stylesheets/common/IEFixes.js"=20
type=3Dtext/javascript></SCRIPT>
<META http-equiv=3Dimagetoolbar content=3Dno><![endif]-->
<SCRIPT =
src=3D"http://ipodlinux.org/index.php?title=3D-&action=3Draw&gen=3D=
js"=20
type=3Dtext/javascript></SCRIPT>
<SCRIPT src=3D"http://ipodlinux.org/stylesheets/common/wikibits.js"=20
type=3Dtext/javascript></SCRIPT>
<STYLE type=3Dtext/css>@import url( =
/index.php?title=3DMediaWiki:Monobook.css&action=3Draw&ctype=3Dtext/css&s=
maxage=3D18000 );
@import url( /index.php?title=3D-&action=3Draw&gen=3Dcss );
</STYLE>
<META content=3D"MSHTML 6.00.2900.3132" name=3DGENERATOR></HEAD>
<BODY class=3Dns-0>
<DIV id=3DglobalWrapper>
<DIV id=3Dcolumn-content>
<DIV id=3Dcontent><A id=3DcontentTop name=3Dtop></A>
<H1 class=3DfirstHeading>Apple Accessory Protocol</H1>
<DIV id=3DbodyContent>
<H3 id=3DsiteSub>From wikiPodLinux</H3>
<DIV id=3DcontentSub></DIV><!-- start content -->
<P>The Apple Accessory Protocol is used for communication between the =
iPod and=20
<A title=3D"Serial Port" =
href=3D"http://ipodlinux.org/Serial_Port">serially=20
connected</A> accessories (such as the <A title=3DRemote=20
href=3D"http://ipodlinux.org/Remote">Remote</A>, iTalk etc). The =
protocol was=20
introduced with the 3rd generation iPods, and at present it is assumed =
is also=20
compatible with the 4th generation iPods and mini iPods. (The <A=20
title=3D"Dock Connector" =
href=3D"http://ipodlinux.org/Dock_Connector">Dock=20
Connector</A> provides access to this communication channel as well.) =
</P>
<P>The connections uses a standard 8N1 serial protocol. The original =
speed rate=20
is 19200 baud - higher rates (up to 57600 baud) work properly (tested =
the 5G)=20
but make trouble sending large amounts of data (picture blocks) faster =
than=20
38400 baud. </P>
<P><BR></P>
<TABLE id=3Dtoc border=3D0>
<TBODY>
<TR id=3Dtoctitle>
<TD align=3Dmiddle><B>Table of contents</B>
<SCRIPT =
type=3Dtext/javascript>showTocToggle("show","hide")</SCRIPT>
</TD></TR>
<TR id=3Dtocinside>
<TD>
<DIV class=3Dtocline><A=20
=
href=3D"http://ipodlinux.org/Apple_Accessory_Protocol#Request.2FResponse_=
Structure">1=20
Request/Response Structure</A><BR></DIV>
<DIV class=3Dtocline><A=20
href=3D"http://ipodlinux.org/Apple_Accessory_Protocol#Mode_List">2 =
Mode=20
List</A><BR></DIV>
<DIV class=3Dtocline><A=20
=
href=3D"http://ipodlinux.org/Apple_Accessory_Protocol#Mode_Switching_.28M=
ode_0.29">3=20
Mode Switching (Mode 0)</A><BR></DIV>
<DIV class=3Dtocline><A=20
=
href=3D"http://ipodlinux.org/Apple_Accessory_Protocol#Voice_Memo_.28Mode_=
1.29">4=20
Voice Memo (Mode 1)</A><BR></DIV>
<DIV class=3Dtocline><A=20
=
href=3D"http://ipodlinux.org/Apple_Accessory_Protocol#iPod_Remote_.28Mode=
_2.29">5=20
iPod Remote (Mode 2)</A><BR></DIV>
<DIV class=3Dtocline><A=20
=
href=3D"http://ipodlinux.org/Apple_Accessory_Protocol#Advanced_Remote_.28=
Mode_4.29">6=20
Advanced Remote (Mode 4)</A><BR></DIV>
<DIV class=3Dtocindent>
<P><A =
href=3D"http://ipodlinux.org/Apple_Accessory_Protocol#Type_Bytes">6.1=20
Type Bytes</A><BR><A=20
=
href=3D"http://ipodlinux.org/Apple_Accessory_Protocol#Picture_Blocks">6.2=
=20
Picture Blocks</A><BR></P></DIV>
<DIV class=3Dtocline><A=20
href=3D"http://ipodlinux.org/Apple_Accessory_Protocol#Credits">7=20
Credits</A><BR></DIV></TD></TR></TBODY></TABLE>
<DIV class=3Deditsection style=3D"FLOAT: right; MARGIN-LEFT: 5px">[<A=20
title=3D"Apple Accessory Protocol"=20
href=3D"http://ipodlinux.org/index.php?title=3DApple_Accessory_Protocol&a=
mp;action=3Dedit&section=3D1">edit</A>]</DIV><A=20
name=3DRequest.2FResponse_Structure></A>
<H2>Request/Response Structure</H2>
<P>The request and response messages follow this general form. </P>
<TABLE cellSpacing=3D0 cellPadding=3D5 border=3D1>
<CAPTION><B>Request/Response Message</B> </CAPTION>
<TBODY>
<TR>
<TH style=3D"BACKGROUND: #efefef">field </TH>
<TH style=3D"BACKGROUND: #efefef">size </TH>
<TH style=3D"BACKGROUND: #efefef">value </TH></TR>
<TR>
<TD>header </TD>
<TD>2 </TD>
<TD>0xff 0x55 </TD></TR>
<TR>
<TD>length </TD>
<TD>1 </TD>
<TD>size of mode + command + parameter </TD></TR>
<TR>
<TD>mode </TD>
<TD>1 </TD>
<TD>the mode the command is referring to </TD></TR>
<TR>
<TD>command </TD>
<TD>2 </TD>
<TD>the two byte command </TD></TR>
<TR>
<TD>parameter </TD>
<TD>0..n </TD>
<TD>optional parameter, depending on the command </TD></TR>
<TR>
<TD>checksum </TD>
<TD>1 </TD>
<TD>0x100 - ( (sum of all length/mode/command/parameter bytes) & =
0xFF)=20
</TD></TR></TBODY></TABLE>
<P>The mode in the message indicates which mode the command belongs to, =
these=20
same mode values are used in the mode switching command below. <BR></P>
<DIV class=3Deditsection style=3D"FLOAT: right; MARGIN-LEFT: 5px">[<A=20
title=3D"Apple Accessory Protocol"=20
href=3D"http://ipodlinux.org/index.php?title=3DApple_Accessory_Protocol&a=
mp;action=3Dedit&section=3D2">edit</A>]</DIV><A=20
name=3DMode_List></A>
<H2>Mode List</H2>
<TABLE cellSpacing=3D0 cellPadding=3D5 border=3D1>
<CAPTION><B>List of Modes</B> </CAPTION>
<TBODY>
<TR>
<TH style=3D"BACKGROUND: #efefef">Mode Number </TH>
<TH style=3D"BACKGROUND: #efefef">Purpose </TH></TR>
<TR>
<TD>0x00 </TD>
<TD>Mode switching </TD></TR>
<TR>
<TD>0x01 </TD>
<TD>Voice Recorder </TD></TR>
<TR>
<TD>0x02 </TD>
<TD>Simple Remote </TD></TR>
<TR>
<TD>0x03 </TD>
<TD>Request Mode Status </TD></TR>
<TR>
<TD>0x04 </TD>
<TD>AiR Mode </TD></TR></TBODY></TABLE>
<DIV class=3Deditsection style=3D"FLOAT: right; MARGIN-LEFT: 5px">[<A=20
title=3D"Apple Accessory Protocol"=20
href=3D"http://ipodlinux.org/index.php?title=3DApple_Accessory_Protocol&a=
mp;action=3Dedit&section=3D3">edit</A>]</DIV><A=20
name=3DMode_Switching_.28Mode_0.29></A>
<H2>Mode Switching (Mode 0)</H2>
<TABLE cellSpacing=3D0 cellPadding=3D5 border=3D1>
<CAPTION><B>Mode 0 Commands</B> </CAPTION>
<TBODY>
<TR>
<TH style=3D"BACKGROUND: #efefef">Command </TH>
<TH style=3D"BACKGROUND: #efefef">Purpose </TH></TR>
<TR>
<TD><B>0x01 0x01</B> </TD>
<TD>Switch to Voice Recorder mode, not working on G5 </TD></TR>
<TR>
<TD><B>0x01 0x02</B> </TD>
<TD>Switch to iPod Remote mode </TD></TR>
<TR>
<TD><B>0x01 0x04</B> </TD>
<TD>Switch to AiR mode </TD></TR>
<TR>
<TD><B>0x03</B> </TD>
<TD>Get current mode status </TD></TR>
<TR>
<TD>0x04 xx </TD>
<TD>(response) the current mode number (xx is the mode returned by =
the=20
iPod), 0x04 0x01 could also be an indicator that the iPod is =
currently=20
busy - I frequently get this skipping tracks very fast --- this =
info is=20
not 100% correct, I=C2=B4m getting different responses. Will try =
to work this=20
out later. </TD></TR>
<TR>
<TD><B>0x05</B> </TD>
<TD>Switch to AiR mode (same as 0x01 0x04?) </TD></TR>
<TR>
<TD><B>0x06</B> </TD>
<TD>Switch to iPod Remote mode (same as 0x01 0x02?) =
</TD></TR></TBODY></TABLE>
<P>Clearly there's stuff here waiting to be figured out. </P>
<DIV class=3Deditsection style=3D"FLOAT: right; MARGIN-LEFT: 5px">[<A=20
title=3D"Apple Accessory Protocol"=20
href=3D"http://ipodlinux.org/index.php?title=3DApple_Accessory_Protocol&a=
mp;action=3Dedit&section=3D4">edit</A>]</DIV><A=20
name=3DVoice_Memo_.28Mode_1.29></A>
<H2>Voice Memo (Mode 1)</H2>
<P>The mode 1 commands are used for the voice recording functions. To =
initiate=20
the recording mode on the iPod the send the switch to mode 0x01 command =
- this=20
will switch the iPod display to the "Voice Memo" screen. When the record =
button=20
is pressed the iPod will send the command "0x00 0x00", sending the =
command to=20
switch to mode 0x01 will start the actual recording. </P>
<TABLE cellSpacing=3D0 cellPadding=3D5 border=3D1>
<CAPTION><B>Mode 1 Commands</B> </CAPTION>
<TBODY>
<TR>
<TH style=3D"BACKGROUND: #efefef">Command </TH>
<TH style=3D"BACKGROUND: #efefef">Purpose </TH></TR>
<TR>
<TD>0x01 0x00 </TD>
<TD>Recording has started. </TD></TR>
<TR>
<TD>0x01 0x01 </TD>
<TD>Recording has stopped (or paused). </TD></TR></TBODY></TABLE>
<DIV class=3Deditsection style=3D"FLOAT: right; MARGIN-LEFT: 5px">[<A=20
title=3D"Apple Accessory Protocol"=20
href=3D"http://ipodlinux.org/index.php?title=3DApple_Accessory_Protocol&a=
mp;action=3Dedit&section=3D5">edit</A>]</DIV><A=20
name=3DiPod_Remote_.28Mode_2.29></A>
<H2>iPod Remote (Mode 2)</H2>
<P>The mode 2 commands are used by the remote control to signal button =
presses.=20
When a button is pressed the appropriate code is send 66 times per =
second until=20
the button is released at which point the button released command is =
sent. </P>
<P>Note that the 3 and 4 byte commands may not work for older (tested on =
a 3g)=20
iPods. They are valid for newer (tested on an iPod Nano) iPods however. =
</P>
<TABLE cellSpacing=3D0 cellPadding=3D5 border=3D1>
<CAPTION><B>Mode 2 Commands</B> </CAPTION>
<TBODY>
<TR>
<TH style=3D"BACKGROUND: #efefef">Command </TH>
<TH style=3D"BACKGROUND: #efefef">Purpose </TH></TR>
<TR>
<TD>0x00 0x00 </TD>
<TD>Button Released </TD></TR>
<TR>
<TD>0x00 0x01 </TD>
<TD>Play </TD></TR>
<TR>
<TD>0x00 0x02 </TD>
<TD>Vol+ </TD></TR>
<TR>
<TD>0x00 0x04 </TD>
<TD>Vol- </TD></TR>
<TR>
<TD>0x00 0x08 </TD>
<TD>Skip> </TD></TR>
<TR>
<TD>0x00 0x10 </TD>
<TD>Skip< </TD></TR>
<TR>
<TD>0x00 0x20 </TD>
<TD>Next Album </TD></TR>
<TR>
<TD>0x00 0x40 </TD>
<TD>Previous Album </TD></TR>
<TR>
<TD>0x00 0x80 </TD>
<TD>Stop </TD></TR>
<TR>
<TD>0x00 0x00 0x01 </TD>
<TD>Play (just play, no pause) </TD></TR>
<TR>
<TD>0x00 0x00 0x02 </TD>
<TD>Pause (just pause, no play) </TD></TR>
<TR>
<TD>0x00 0x00 0x04 </TD>
<TD>Mute (toggle) </TD></TR>
<TR>
<TD>0x00 0x00 0x20 </TD>
<TD>Next Playlist </TD></TR>
<TR>
<TD>0x00 0x00 0x40 </TD>
<TD>Previous Playlist </TD></TR>
<TR>
<TD>0x00 0x00 0x80 </TD>
<TD>Toggles Shuffle </TD></TR>
<TR>
<TD>0x00 0x00 0x00 0x01 </TD>
<TD>Toggles Repeat </TD></TR>
<TR>
<TD>0x00 0x00 0x00 0x04 </TD>
<TD>Ipod Off </TD></TR>
<TR>
<TD>0x00 0x00 0x00 0x08 </TD>
<TD>Ipod On </TD></TR>
<TR>
<TD>0x00 0x00 0x00 0x40 </TD>
<TD>Menu Button </TD></TR>
<TR>
<TD>0x00 0x00 0x00 0x80 </TD>
<TD>OK/Select Button </TD></TR>
<TR>
<TD>0x00 0x00 0x00 0x00 0x01 </TD>
<TD>Scroll Up </TD></TR>
<TR>
<TD>0x00 0x00 0x00 0x00 0x02 </TD>
<TD>Scroll Down </TD></TR></TBODY></TABLE>
<DIV class=3Deditsection style=3D"FLOAT: right; MARGIN-LEFT: 5px">[<A=20
title=3D"Apple Accessory Protocol"=20
href=3D"http://ipodlinux.org/index.php?title=3DApple_Accessory_Protocol&a=
mp;action=3Dedit&section=3D6">edit</A>]</DIV><A=20
name=3DAdvanced_Remote_.28Mode_4.29></A>
<H2>Advanced Remote (Mode 4)</H2>
<P>The mode 4 commands are used for the Advanced iPod Remote (AiR) =
functions.=20
The commands can be used to remotely control much of the iPod functions. =
Unfortunately when switched to this mode the iPod display changes to "OK =
to=20
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -