1<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentScriptType="application/ecmascript" contentStyleType="text/css" height="1204px" preserveAspectRatio="none" style="width:1428px;height:1204px;" version="1.1" viewBox="0 0 1428 1204" width="1428px" zoomAndPan="magnify"><defs><filter height="300%" id="fzswovshy8bz" width="300%" x="-1" y="-1"><feGaussianBlur result="blurOut" stdDeviation="2.0"/><feColorMatrix in="blurOut" result="blurOut2" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .4 0"/><feOffset dx="4.0" dy="4.0" in="blurOut2" result="blurOut3"/><feBlend in="SourceGraphic" in2="blurOut3" mode="normal"/></filter></defs><g><text fill="#000000" font-family="sans-serif" font-size="18" lengthAdjust="spacingAndGlyphs" textLength="394" x="516.25" y="26.708">Reactive Authentication in Peripheral Role</text><ellipse cx="1004.1875" cy="40.9531" fill="#000000" filter="url(#fzswovshy8bz)" rx="10" ry="10" style="stroke:none;stroke-width:1.0;"/><rect fill="#FEFECE" filter="url(#fzswovshy8bz)" height="33.9688" rx="12.5" ry="12.5" style="stroke:#A80036;stroke-width:1.5;" width="166" x="921.1875" y="70.9531"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="142" x="935.1875" y="92.0918">App on B connects to A</text><rect fill="#FEFECE" filter="url(#fzswovshy8bz)" height="33.9688" rx="12.5" ry="12.5" style="stroke:#A80036;stroke-width:1.5;" width="254" x="877.1875" y="124.9219"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="230" x="891.1875" y="146.0605">App on A triggers GATT Client request</text><rect fill="#FEFECE" filter="url(#fzswovshy8bz)" height="33.9688" rx="12.5" ry="12.5" style="stroke:#A80036;stroke-width:1.5;" width="173" x="917.6875" y="178.8906"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="149" x="931.6875" y="200.0293">GATT Client request sent</text><polygon fill="#FEFECE" filter="url(#fzswovshy8bz)" points="835.6875,232.8594,1172.6875,232.8594,1184.6875,244.8594,1172.6875,256.8594,835.6875,256.8594,823.6875,244.8594,835.6875,232.8594" style="stroke:#A80036;stroke-width:1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="337" x="835.6875" y="248.6675">GATT Server returns an ATT_ERROR_INSUFFICIENT_X error?</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="21" x="802.6875" y="242.2651">yes</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="14" x="1184.6875" y="242.2651">no</text><polygon fill="#FEFECE" filter="url(#fzswovshy8bz)" points="587.375,266.8594,810.375,266.8594,822.375,278.8594,810.375,290.8594,587.375,290.8594,575.375,278.8594,587.375,266.8594" style="stroke:#A80036;stroke-width:1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="223" x="587.375" y="282.6675">ENABLE_GATT_CLIENT_PAIRING define?</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="21" x="554.375" y="276.2651">yes</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="14" x="822.375" y="276.2651">no</text><rect fill="#FEFECE" filter="url(#fzswovshy8bz)" height="33.9688" rx="12.5" ry="12.5" style="stroke:#A80036;stroke-width:1.5;" width="235" x="269.25" y="349.2617"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="211" x="283.25" y="370.4004">SM_EVENT_REENCRYPTION_STARTED</text><rect fill="#FEFECE" filter="url(#fzswovshy8bz)" height="33.9688" rx="12.5" ry="12.5" style="stroke:#A80036;stroke-width:1.5;" width="233" x="270.25" y="418.2305"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="209" x="284.25" y="439.3691">SM on A sends SECURITY REQUEST</text><rect fill="#FEFECE" filter="url(#fzswovshy8bz)" height="33.9688" rx="12.5" ry="12.5" style="stroke:#A80036;stroke-width:1.5;" width="330" x="221.75" y="472.1992"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="306" x="235.75" y="493.3379">SM on B should encrypt connection if LTK available</text><polygon fill="#FEFECE" filter="url(#fzswovshy8bz)" points="349.75,526.168,423.75,526.168,435.75,538.168,423.75,550.168,349.75,550.168,337.75,538.168,349.75,526.168" style="stroke:#A80036;stroke-width:1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="74" x="349.75" y="541.9761">re-encrypted</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="21" x="316.75" y="535.5737">yes</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="14" x="435.75" y="535.5737">no</text><rect fill="#FEFECE" filter="url(#fzswovshy8bz)" height="33.9688" rx="12.5" ry="12.5" style="stroke:#A80036;stroke-width:1.5;" width="393" x="11" y="560.168"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="369" x="25" y="581.3066">SM_EVENT_REENCRYPTION_COMPLETE(ERROR_CODE_SUCCESS)</text><rect fill="#FEFECE" filter="url(#fzswovshy8bz)" height="33.9688" rx="12.5" ry="12.5" style="stroke:#A80036;stroke-width:1.5;" width="191" x="112" y="614.1367"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="167" x="126" y="635.2754">GATT Client request re-sent</text><rect fill="#23DB2B" filter="url(#fzswovshy8bz)" height="33.9688" rx="12.5" ry="12.5" style="stroke:#A80036;stroke-width:1.5;" width="204" x="105.5" y="668.1055"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="180" x="119.5" y="689.2441">App receives GATT Response</text><ellipse cx="207.5" cy="733.0742" fill="#FFFFFF" filter="url(#fzswovshy8bz)" rx="11" ry="11" style="stroke:#000000;stroke-width:1.0;"/><ellipse cx="207.5" cy="733.0742" fill="#000000" rx="6" ry="6" style="stroke:#7F7F7F;stroke-width:1.0;"/><rect fill="#FEFECE" filter="url(#fzswovshy8bz)" height="33.9688" rx="12.5" ry="12.5" style="stroke:#A80036;stroke-width:1.5;" width="284" x="424" y="560.168"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="260" x="438" y="581.3066">SM_EVENT_REENCRYPTION_COMPLETE(error)</text><rect fill="#FEFECE" filter="url(#fzswovshy8bz)" height="33.9688" rx="12.5" ry="12.5" style="stroke:#A80036;stroke-width:1.5;" width="187" x="472.5" y="614.1367"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="163" x="486.5" y="635.2754">delete bonding information</text><polygon fill="#FEFECE" filter="url(#fzswovshy8bz)" points="345.75,300.8594,427.75,300.8594,439.75,312.8594,427.75,324.8594,345.75,324.8594,333.75,312.8594,345.75,300.8594" style="stroke:#A80036;stroke-width:1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="21" x="390.75" y="335.0698">yes</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="82" x="345.75" y="316.6675">LTK available?</text><polygon fill="#FEFECE" filter="url(#fzswovshy8bz)" points="386.75,764.0742,398.75,776.0742,386.75,788.0742,374.75,776.0742,386.75,764.0742" style="stroke:#A80036;stroke-width:1.5;"/><rect fill="#FEFECE" filter="url(#fzswovshy8bz)" height="33.9688" rx="12.5" ry="12.5" style="stroke:#A80036;stroke-width:1.5;" width="194" x="289.75" y="808.0742"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="170" x="303.75" y="829.2129">SM_EVENT_PAIRING_STARTED</text><rect fill="#FEFECE" filter="url(#fzswovshy8bz)" height="33.9688" rx="12.5" ry="12.5" style="stroke:#A80036;stroke-width:1.5;" width="233" x="270.25" y="862.043"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="209" x="284.25" y="883.1816">SM on A sends SECURITY REQUEST</text><rect fill="#FEFECE" filter="url(#fzswovshy8bz)" height="33.9688" rx="12.5" ry="12.5" style="stroke:#A80036;stroke-width:1.5;" width="279" x="247.25" y="916.0117"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="255" x="261.25" y="937.1504">SM on B should perform pairing sequence</text><polygon fill="#FEFECE" filter="url(#fzswovshy8bz)" points="340.25,969.9805,433.25,969.9805,445.25,981.9805,433.25,993.9805,340.25,993.9805,328.25,981.9805,340.25,969.9805" style="stroke:#A80036;stroke-width:1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="93" x="340.25" y="985.7886">pairing success?</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="21" x="307.25" y="979.3862">yes</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="14" x="445.25" y="979.3862">no</text><rect fill="#FEFECE" filter="url(#fzswovshy8bz)" height="33.9688" rx="12.5" ry="12.5" style="stroke:#A80036;stroke-width:1.5;" width="352" x="52" y="1003.9805"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="328" x="66" y="1025.1191">SM_EVENT_PAIRING_COMPLETE(ERROR_CODE_SUCCESS)</text><rect fill="#FEFECE" filter="url(#fzswovshy8bz)" height="33.9688" rx="12.5" ry="12.5" style="stroke:#A80036;stroke-width:1.5;" width="191" x="132.5" y="1057.9492"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="167" x="146.5" y="1079.0879">GATT Client request re-sent</text><rect fill="#23DB2B" filter="url(#fzswovshy8bz)" height="33.9688" rx="12.5" ry="12.5" style="stroke:#A80036;stroke-width:1.5;" width="204" x="126" y="1111.918"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="180" x="140" y="1133.0566">App receives GATT Response</text><ellipse cx="228" cy="1176.8867" fill="#FFFFFF" filter="url(#fzswovshy8bz)" rx="11" ry="11" style="stroke:#000000;stroke-width:1.0;"/><ellipse cx="228" cy="1176.8867" fill="#000000" rx="6" ry="6" style="stroke:#7F7F7F;stroke-width:1.0;"/><rect fill="#FEFECE" filter="url(#fzswovshy8bz)" height="33.9688" rx="12.5" ry="12.5" style="stroke:#A80036;stroke-width:1.5;" width="243" x="424" y="1003.9805"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="219" x="438" y="1025.1191">SM_EVENT_PAIRING_COMPLETE(error)</text><rect fill="#FD5B41" filter="url(#fzswovshy8bz)" height="33.9688" rx="12.5" ry="12.5" style="stroke:#A80036;stroke-width:1.5;" width="223" x="434" y="1057.9492"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="199" x="448" y="1079.0879">App receives a GATT Client error</text><ellipse cx="545.5" cy="1122.918" fill="#FFFFFF" filter="url(#fzswovshy8bz)" rx="11" ry="11" style="stroke:#000000;stroke-width:1.0;"/><ellipse cx="545.5" cy="1122.918" fill="#000000" rx="6" ry="6" style="stroke:#7F7F7F;stroke-width:1.0;"/><rect fill="#FD5B41" filter="url(#fzswovshy8bz)" height="33.9688" rx="12.5" ry="12.5" style="stroke:#A80036;stroke-width:1.5;" width="333" x="844.5" y="300.8594"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="309" x="858.5" y="321.998">ATT_QUERY_COMPLETE(ATT_ERROR_INSUFFICIENT_X)</text><path d="M760,369.8281 L760,410.0938 A0,0 0 0 0 760,410.0938 L980,410.0938 A0,0 0 0 0 980,410.0938 L980,393.9609 L1000,389.9609 L980,385.9609 L980,379.8281 L970,369.8281 L760,369.8281 A0,0 0 0 0 760,369.8281 " fill="#FBFB77" filter="url(#fzswovshy8bz)" style="stroke:#A80036;stroke-width:1.0;"/><path d="M970,369.8281 L970,379.8281 L980,379.8281 L970,369.8281 " fill="#FBFB77" style="stroke:#A80036;stroke-width:1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="173" x="766" y="386.895">App can trigger pairing and</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="199" x="766" y="402.0278">repeat the GATT Client request</text><ellipse cx="1011" cy="389.9609" fill="#FFFFFF" filter="url(#fzswovshy8bz)" rx="11" ry="11" style="stroke:#000000;stroke-width:1.0;"/><ellipse cx="1011" cy="389.9609" fill="#000000" rx="6" ry="6" style="stroke:#7F7F7F;stroke-width:1.0;"/><rect fill="#23DB2B" filter="url(#fzswovshy8bz)" height="33.9688" rx="12.5" ry="12.5" style="stroke:#A80036;stroke-width:1.5;" width="204" x="1207.5" y="266.8594"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="180" x="1221.5" y="287.998">App receives GATT Response</text><ellipse cx="1309.5" cy="346.8281" fill="#FFFFFF" filter="url(#fzswovshy8bz)" rx="11" ry="11" style="stroke:#000000;stroke-width:1.0;"/><ellipse cx="1309.5" cy="346.8281" fill="#000000" rx="6" ry="6" style="stroke:#7F7F7F;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.5;" x1="1004.1875" x2="1004.1875" y1="50.9531" y2="70.9531"/><polygon fill="#A80036" points="1000.1875,60.9531,1004.1875,70.9531,1008.1875,60.9531,1004.1875,64.9531" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.5;" x1="1004.1875" x2="1004.1875" y1="104.9219" y2="124.9219"/><polygon fill="#A80036" points="1000.1875,114.9219,1004.1875,124.9219,1008.1875,114.9219,1004.1875,118.9219" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.5;" x1="1004.1875" x2="1004.1875" y1="158.8906" y2="178.8906"/><polygon fill="#A80036" points="1000.1875,168.8906,1004.1875,178.8906,1008.1875,168.8906,1004.1875,172.8906" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.5;" x1="386.75" x2="386.75" y1="383.2305" y2="418.2305"/><polygon fill="#A80036" points="382.75,408.2305,386.75,418.2305,390.75,408.2305,386.75,412.2305" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.5;" x1="386.75" x2="386.75" y1="452.1992" y2="472.1992"/><polygon fill="#A80036" points="382.75,462.1992,386.75,472.1992,390.75,462.1992,386.75,466.1992" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.5;" x1="207.5" x2="207.5" y1="594.1367" y2="614.1367"/><polygon fill="#A80036" points="203.5,604.1367,207.5,614.1367,211.5,604.1367,207.5,608.1367" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.5;" x1="207.5" x2="207.5" y1="648.1055" y2="668.1055"/><polygon fill="#A80036" points="203.5,658.1055,207.5,668.1055,211.5,658.1055,207.5,662.1055" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.5;" x1="207.5" x2="207.5" y1="702.0742" y2="722.0742"/><polygon fill="#A80036" points="203.5,712.0742,207.5,722.0742,211.5,712.0742,207.5,716.0742" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.5;" x1="566" x2="566" y1="594.1367" y2="614.1367"/><polygon fill="#A80036" points="562,604.1367,566,614.1367,570,604.1367,566,608.1367" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.5;" x1="337.75" x2="207.5" y1="538.168" y2="538.168"/><line style="stroke:#A80036;stroke-width:1.5;" x1="207.5" x2="207.5" y1="538.168" y2="560.168"/><polygon fill="#A80036" points="203.5,550.168,207.5,560.168,211.5,550.168,207.5,554.168" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.5;" x1="435.75" x2="566" y1="538.168" y2="538.168"/><line style="stroke:#A80036;stroke-width:1.5;" x1="566" x2="566" y1="538.168" y2="560.168"/><polygon fill="#A80036" points="562,550.168,566,560.168,570,550.168,566,554.168" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.5;" x1="566" x2="566" y1="648.1055" y2="749.0742"/><line style="stroke:#A80036;stroke-width:1.5;" x1="566" x2="386.75" y1="749.0742" y2="749.0742"/><line style="stroke:#A80036;stroke-width:1.5;" x1="386.75" x2="386.75" y1="749.0742" y2="764.0742"/><polygon fill="#A80036" points="382.75,754.0742,386.75,764.0742,390.75,754.0742,386.75,758.0742" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.5;" x1="386.75" x2="386.75" y1="506.168" y2="526.168"/><polygon fill="#A80036" points="382.75,516.168,386.75,526.168,390.75,516.168,386.75,520.168" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.5;" x1="386.75" x2="386.75" y1="324.8594" y2="349.2617"/><polygon fill="#A80036" points="382.75,339.2617,386.75,349.2617,390.75,339.2617,386.75,343.2617" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.5;" x1="439.75" x2="728" y1="312.8594" y2="312.8594"/><polygon fill="#A80036" points="724,547.168,728,557.168,732,547.168,728,551.168" style="stroke:#A80036;stroke-width:1.5;"/><line style="stroke:#A80036;stroke-width:1.5;" x1="728" x2="728" y1="312.8594" y2="776.0742"/><line style="stroke:#A80036;stroke-width:1.5;" x1="728" x2="398.75" y1="776.0742" y2="776.0742"/><polygon fill="#A80036" points="408.75,772.0742,398.75,776.0742,408.75,780.0742,404.75,776.0742" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.5;" x1="386.75" x2="386.75" y1="788.0742" y2="808.0742"/><polygon fill="#A80036" points="382.75,798.0742,386.75,808.0742,390.75,798.0742,386.75,802.0742" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.5;" x1="386.75" x2="386.75" y1="842.043" y2="862.043"/><polygon fill="#A80036" points="382.75,852.043,386.75,862.043,390.75,852.043,386.75,856.043" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.5;" x1="386.75" x2="386.75" y1="896.0117" y2="916.0117"/><polygon fill="#A80036" points="382.75,906.0117,386.75,916.0117,390.75,906.0117,386.75,910.0117" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.5;" x1="228" x2="228" y1="1037.9492" y2="1057.9492"/><polygon fill="#A80036" points="224,1047.9492,228,1057.9492,232,1047.9492,228,1051.9492" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.5;" x1="228" x2="228" y1="1091.918" y2="1111.918"/><polygon fill="#A80036" points="224,1101.918,228,1111.918,232,1101.918,228,1105.918" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.5;" x1="228" x2="228" y1="1145.8867" y2="1165.8867"/><polygon fill="#A80036" points="224,1155.8867,228,1165.8867,232,1155.8867,228,1159.8867" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.5;" x1="545.5" x2="545.5" y1="1037.9492" y2="1057.9492"/><polygon fill="#A80036" points="541.5,1047.9492,545.5,1057.9492,549.5,1047.9492,545.5,1051.9492" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.5;" x1="545.5" x2="545.5" y1="1091.918" y2="1111.918"/><polygon fill="#A80036" points="541.5,1101.918,545.5,1111.918,549.5,1101.918,545.5,1105.918" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.5;" x1="328.25" x2="228" y1="981.9805" y2="981.9805"/><line style="stroke:#A80036;stroke-width:1.5;" x1="228" x2="228" y1="981.9805" y2="1003.9805"/><polygon fill="#A80036" points="224,993.9805,228,1003.9805,232,993.9805,228,997.9805" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.5;" x1="445.25" x2="545.5" y1="981.9805" y2="981.9805"/><line style="stroke:#A80036;stroke-width:1.5;" x1="545.5" x2="545.5" y1="981.9805" y2="1003.9805"/><polygon fill="#A80036" points="541.5,993.9805,545.5,1003.9805,549.5,993.9805,545.5,997.9805" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.5;" x1="386.75" x2="386.75" y1="949.9805" y2="969.9805"/><polygon fill="#A80036" points="382.75,959.9805,386.75,969.9805,390.75,959.9805,386.75,963.9805" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.5;" x1="1011" x2="1011" y1="334.8281" y2="378.9609"/><polygon fill="#A80036" points="1007,368.9609,1011,378.9609,1015,368.9609,1011,372.9609" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.5;" x1="575.375" x2="386.75" y1="278.8594" y2="278.8594"/><line style="stroke:#A80036;stroke-width:1.5;" x1="386.75" x2="386.75" y1="278.8594" y2="300.8594"/><polygon fill="#A80036" points="382.75,290.8594,386.75,300.8594,390.75,290.8594,386.75,294.8594" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.5;" x1="822.375" x2="1011" y1="278.8594" y2="278.8594"/><line style="stroke:#A80036;stroke-width:1.5;" x1="1011" x2="1011" y1="278.8594" y2="300.8594"/><polygon fill="#A80036" points="1007,290.8594,1011,300.8594,1015,290.8594,1011,294.8594" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.5;" x1="1309.5" x2="1309.5" y1="300.8281" y2="335.8281"/><polygon fill="#A80036" points="1305.5,325.8281,1309.5,335.8281,1313.5,325.8281,1309.5,329.8281" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.5;" x1="823.6875" x2="698.875" y1="244.8594" y2="244.8594"/><line style="stroke:#A80036;stroke-width:1.5;" x1="698.875" x2="698.875" y1="244.8594" y2="266.8594"/><polygon fill="#A80036" points="694.875,256.8594,698.875,266.8594,702.875,256.8594,698.875,260.8594" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.5;" x1="1184.6875" x2="1309.5" y1="244.8594" y2="244.8594"/><line style="stroke:#A80036;stroke-width:1.5;" x1="1309.5" x2="1309.5" y1="244.8594" y2="266.8594"/><polygon fill="#A80036" points="1305.5,256.8594,1309.5,266.8594,1313.5,256.8594,1309.5,260.8594" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.5;" x1="1004.1875" x2="1004.1875" y1="212.8594" y2="232.8594"/><polygon fill="#A80036" points="1000.1875,222.8594,1004.1875,232.8594,1008.1875,222.8594,1004.1875,226.8594" style="stroke:#A80036;stroke-width:1.0;"/><!--MD5=[489a52c0bd2e5ce4d5336c75ab6dfc24]
2@startuml
3title Reactive Authentication in Peripheral Role
4start
5: App on B connects to A;
6: App on A triggers GATT Client request;
7: GATT Client request sent;
8if (GATT Server returns an ATT_ERROR_INSUFFICIENT_X error?) then (yes)
9  if (ENABLE_GATT_CLIENT_PAIRING define?) then (yes)
10    if (LTK available?) then (yes)
11      : SM_EVENT_REENCRYPTION_STARTED;
12      : SM on A sends SECURITY REQUEST;
13      : SM on B should encrypt connection if LTK available;
14      if (re-encrypted) then (yes)
15        : SM_EVENT_REENCRYPTION_COMPLETE(ERROR_CODE_SUCCESS);
16        : GATT Client request re-sent;
17        #23DB2B : App receives GATT Response;
18        stop
19      else (no)
20        : SM_EVENT_REENCRYPTION_COMPLETE(error);
21        : delete bonding information;
22      endif
23    endif
24    : SM_EVENT_PAIRING_STARTED;
25    : SM on A sends SECURITY REQUEST;
26    : SM on B should perform pairing sequence;
27    if (pairing success?) then (yes)
28        : SM_EVENT_PAIRING_COMPLETE(ERROR_CODE_SUCCESS);
29        : GATT Client request re-sent;
30        #23DB2B : App receives GATT Response;
31        stop
32    else (no)
33        : SM_EVENT_PAIRING_COMPLETE(error);
34        #FD5B41 : App receives a GATT Client error;
35        stop
36    endif
37  else (no)
38    #FD5B41: ATT_QUERY_COMPLETE(ATT_ERROR_INSUFFICIENT_X);
39    stop
40    note left
41      App can trigger pairing and
42      repeat the GATT Client request
43    end note
44  endif
45else (no)
46  #23DB2B : App receives GATT Response;
47  stop
48endif
49@enduml
50
51PlantUML version 1.2020.22beta2(Unknown compile time)
52(GPL source distribution)
53Java Runtime: Java(TM) SE Runtime Environment
54JVM: Java HotSpot(TM) 64-Bit Server VM
55Default Encoding: UTF-8
56Language: en
57Country: US
58--></g></svg>