<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">On 22.03.19 05:33, Mohammed Sha wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAA6+HYWhzR83cAJHk-wfPpQ9F78vV=h1aOAtWyz2t20ySxEpWA@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">
        <div dir="ltr">
          <p>Hi All,</p>
          <p> I am attempting to implement hands-free telephony on my
            board, I successfully connected my android phone to the
            board via bluetooth module in phone and media audio sharing
            mode.<br>
          </p>
        </div>
      </div>
    </blockquote>
    <p><br>
    </p>
    <p>You should consider using ofono to connect your phone to the PC.
      It has all the<br>
      telephony functions you need and it works well together with PA.
      See here<br>
      for a short introduction:<br>
<a class="moz-txt-link-freetext" href="https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Bluetooth/">https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Bluetooth/</a><br>
    </p>
    <p><br>
    </p>
    <blockquote type="cite"
cite="mid:CAA6+HYWhzR83cAJHk-wfPpQ9F78vV=h1aOAtWyz2t20ySxEpWA@mail.gmail.com">
      <div dir="ltr">
        <div dir="ltr">
          <p>
            I was able to play media files via bluetooth by this. But
            when a call connected the bluetooth speaker works properly,
            i.e. I can hear what is said on the Mobile Phone, but audio
            is not transmitted from Board to Mobile Phone is not heard (
            I guess there is some error in getting the data from mic or
            in transmitting data from bluetooth device). I get the
            following log message keeps appearing many times as soon as
            a call is initiated </p>
          <pre class="m_-6614994200275467248gmail-default m_-6614994200275467248gmail-prettyprint m_-6614994200275467248gmail-prettyprinted"><code><span class="m_-6614994200275467248gmail-str">"***Bluetooth: hci0 SCO packet for unknown connection handle 0***

***Bluetooth: hci0 sending frame failed (-27)***

***Bluetooth: hci0 sending frame failed (-27)***"</span></code></pre>
        </div>
      </div>
    </blockquote>
    <p><br>
    </p>
    <p>This looks like an error from the bluetooth stack, probably
      pulseaudio<br>
      cannot correct it. I experienced problems with some Bluetooth
      dongles,<br>
      have you tried another one?<br>
    </p>
    <p><br>
    </p>
    <blockquote type="cite"
cite="mid:CAA6+HYWhzR83cAJHk-wfPpQ9F78vV=h1aOAtWyz2t20ySxEpWA@mail.gmail.com">
      <div dir="ltr">
        <div dir="ltr">
          <p>The microphone on the phone is also not functioning(after
            bluetooth connection is established).
            Also in <code>*hciconfig -a*</code> it is found as follows</p>
          <pre class="m_-6614994200275467248gmail-default m_-6614994200275467248gmail-prettyprint m_-6614994200275467248gmail-prettyprinted"><code><span class="m_-6614994200275467248gmail-pln">hci0</span><span class="m_-6614994200275467248gmail-pun">:</span><span class="m_-6614994200275467248gmail-pln">   </span><span class="m_-6614994200275467248gmail-typ">Type</span><span class="m_-6614994200275467248gmail-pun">:</span><span class="m_-6614994200275467248gmail-pln"> </span><span class="m_-6614994200275467248gmail-typ">Primary</span><span class="m_-6614994200275467248gmail-pln">  </span><span class="m_-6614994200275467248gmail-typ">Bus</span><span class="m_-6614994200275467248gmail-pun">:</span><span class="m_-6614994200275467248gmail-pln"> USB
    BD </span><span class="m_-6614994200275467248gmail-typ">Address</span><span class="m_-6614994200275467248gmail-pun">:</span><span class="m_-6614994200275467248gmail-pln"> </span><span class="m_-6614994200275467248gmail-lit">00</span><span class="m_-6614994200275467248gmail-pun">:</span><span class="m_-6614994200275467248gmail-lit">0E</span><span class="m_-6614994200275467248gmail-pun">:</span><span class="m_-6614994200275467248gmail-lit">8E</span><span class="m_-6614994200275467248gmail-pun">:</span><span class="m_-6614994200275467248gmail-lit">76</span><span class="m_-6614994200275467248gmail-pun">:</span><span class="m_-6614994200275467248gmail-lit">00</span><span class="m_-6614994200275467248gmail-pun">:</span><span class="m_-6614994200275467248gmail-lit">55</span><span class="m_-6614994200275467248gmail-pln">  ACL MTU</span><span class="m_-6614994200275467248gmail-pun">:</span><span class="m_-6614994200275467248gmail-pln"> </span><span class="m_-6614994200275467248gmail-lit">1024</span><span class="m_-6614994200275467248gmail-pun">:</span><span class="m_-6614994200275467248gmail-lit">8</span><span class="m_-6614994200275467248gmail-pln">  SCO MTU</span><span class="m_-6614994200275467248gmail-pun">:</span><span class="m_-6614994200275467248gmail-pln"> </span><span class="m_-6614994200275467248gmail-lit">50</span><span class="m_-6614994200275467248gmail-pun">:</span><span class="m_-6614994200275467248gmail-lit">8</span><span class="m_-6614994200275467248gmail-pln">
    UP RUNNING PSCAN 
    RX bytes</span><span class="m_-6614994200275467248gmail-pun">:</span><span class="m_-6614994200275467248gmail-lit">810924</span><span class="m_-6614994200275467248gmail-pln"> acl</span><span class="m_-6614994200275467248gmail-pun">:</span><span class="m_-6614994200275467248gmail-lit">982</span><span class="m_-6614994200275467248gmail-pln"> sco</span><span class="m_-6614994200275467248gmail-pun">:</span><span class="m_-6614994200275467248gmail-lit">18885</span><span class="m_-6614994200275467248gmail-pln"> events</span><span class="m_-6614994200275467248gmail-pun">:</span><span class="m_-6614994200275467248gmail-lit">670</span><span class="m_-6614994200275467248gmail-pln"> errors</span><span class="m_-6614994200275467248gmail-pun">:</span><span class="m_-6614994200275467248gmail-lit">0</span><span class="m_-6614994200275467248gmail-pln">
    </span><span class="m_-6614994200275467248gmail-pun">**</span><span class="m_-6614994200275467248gmail-pln">TX bytes</span><span class="m_-6614994200275467248gmail-pun">:</span><span class="m_-6614994200275467248gmail-lit">528349</span><span class="m_-6614994200275467248gmail-pln"> acl</span><span class="m_-6614994200275467248gmail-pun">:</span><span class="m_-6614994200275467248gmail-lit">530</span><span class="m_-6614994200275467248gmail-pln"> sco</span><span class="m_-6614994200275467248gmail-pun">:</span><span class="m_-6614994200275467248gmail-lit">10271</span><span class="m_-6614994200275467248gmail-pln"> commands</span><span class="m_-6614994200275467248gmail-pun">:</span><span class="m_-6614994200275467248gmail-lit">108</span><span class="m_-6614994200275467248gmail-pln"> errors</span><span class="m_-6614994200275467248gmail-pun">:</span><span class="m_-6614994200275467248gmail-lit">111</span><span class="m_-6614994200275467248gmail-pun">**</span><span class="m_-6614994200275467248gmail-pln">
    </span><span class="m_-6614994200275467248gmail-typ">Features</span><span class="m_-6614994200275467248gmail-pun">:</span><span class="m_-6614994200275467248gmail-pln"> </span><span class="m_-6614994200275467248gmail-lit">0xff</span><span class="m_-6614994200275467248gmail-pln"> </span><span class="m_-6614994200275467248gmail-lit">0xfe</span><span class="m_-6614994200275467248gmail-pln"> </span><span class="m_-6614994200275467248gmail-lit">0x8f</span><span class="m_-6614994200275467248gmail-pln"> </span><span class="m_-6614994200275467248gmail-lit">0xfe</span><span class="m_-6614994200275467248gmail-pln"> </span><span class="m_-6614994200275467248gmail-lit">0xd8</span><span class="m_-6614994200275467248gmail-pln"> </span><span class="m_-6614994200275467248gmail-lit">0x3f</span><span class="m_-6614994200275467248gmail-pln"> </span><span class="m_-6614994200275467248gmail-lit">0x5b</span><span class="m_-6614994200275467248gmail-pln"> </span><span class="m_-6614994200275467248gmail-lit">0x87</span><span class="m_-6614994200275467248gmail-pln">
    </span><span class="m_-6614994200275467248gmail-typ">Packet</span><span class="m_-6614994200275467248gmail-pln"> type</span><span class="m_-6614994200275467248gmail-pun">:</span><span class="m_-6614994200275467248gmail-pln"> DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3 
    </span><span class="m_-6614994200275467248gmail-typ">Link</span><span class="m_-6614994200275467248gmail-pln"> policy</span><span class="m_-6614994200275467248gmail-pun">:</span><span class="m_-6614994200275467248gmail-pln"> RSWITCH HOLD SNIFF 
    </span><span class="m_-6614994200275467248gmail-typ">Link</span><span class="m_-6614994200275467248gmail-pln"> mode</span><span class="m_-6614994200275467248gmail-pun">:</span><span class="m_-6614994200275467248gmail-pln"> SLAVE ACCEPT 
    </span><span class="m_-6614994200275467248gmail-typ">Name</span><span class="m_-6614994200275467248gmail-pun">:</span><span class="m_-6614994200275467248gmail-pln"> mydevice
    </span><span class="m_-6614994200275467248gmail-typ">Class</span><span class="m_-6614994200275467248gmail-pun">:</span><span class="m_-6614994200275467248gmail-pln"> </span><span class="m_-6614994200275467248gmail-lit">0x2c041c</span><span class="m_-6614994200275467248gmail-pln">
    </span><span class="m_-6614994200275467248gmail-typ">Service</span><span class="m_-6614994200275467248gmail-pln"> </span><span class="m_-6614994200275467248gmail-typ">Classes</span><span class="m_-6614994200275467248gmail-pun">:</span><span class="m_-6614994200275467248gmail-pln"> </span><span class="m_-6614994200275467248gmail-typ">Rendering</span><span class="m_-6614994200275467248gmail-pun">,</span><span class="m_-6614994200275467248gmail-pln"> </span><span class="m_-6614994200275467248gmail-typ">Capturing</span><span class="m_-6614994200275467248gmail-pun">,</span><span class="m_-6614994200275467248gmail-pln"> </span><span class="m_-6614994200275467248gmail-typ">Audio</span><span class="m_-6614994200275467248gmail-pln">
    </span><span class="m_-6614994200275467248gmail-typ">Device</span><span class="m_-6614994200275467248gmail-pln"> </span><span class="m_-6614994200275467248gmail-typ">Class</span><span class="m_-6614994200275467248gmail-pun">:</span><span class="m_-6614994200275467248gmail-pln"> </span><span class="m_-6614994200275467248gmail-typ">Audio</span><span class="m_-6614994200275467248gmail-pun">/</span><span class="m_-6614994200275467248gmail-typ">Video</span><span class="m_-6614994200275467248gmail-pun">,</span><span class="m_-6614994200275467248gmail-pln"> </span><span class="m_-6614994200275467248gmail-typ">Portable</span><span class="m_-6614994200275467248gmail-pln"> </span><span class="m_-6614994200275467248gmail-typ">Audio</span><span class="m_-6614994200275467248gmail-pln">
    HCI </span><span class="m_-6614994200275467248gmail-typ">Version</span><span class="m_-6614994200275467248gmail-pun">:</span><span class="m_-6614994200275467248gmail-pln"> </span><span class="m_-6614994200275467248gmail-lit">4.2</span><span class="m_-6614994200275467248gmail-pln"> </span><span class="m_-6614994200275467248gmail-pun">(</span><span class="m_-6614994200275467248gmail-lit">0x8</span><span class="m_-6614994200275467248gmail-pun">)</span><span class="m_-6614994200275467248gmail-pln">  </span><span class="m_-6614994200275467248gmail-typ">Revision</span><span class="m_-6614994200275467248gmail-pun">:</span><span class="m_-6614994200275467248gmail-pln"> </span><span class="m_-6614994200275467248gmail-lit">0x0</span><span class="m_-6614994200275467248gmail-pln">
    LMP </span><span class="m_-6614994200275467248gmail-typ">Version</span><span class="m_-6614994200275467248gmail-pun">:</span><span class="m_-6614994200275467248gmail-pln"> </span><span class="m_-6614994200275467248gmail-lit">4.2</span><span class="m_-6614994200275467248gmail-pln"> </span><span class="m_-6614994200275467248gmail-pun">(</span><span class="m_-6614994200275467248gmail-lit">0x8</span><span class="m_-6614994200275467248gmail-pun">)</span><span class="m_-6614994200275467248gmail-pln">  </span><span class="m_-6614994200275467248gmail-typ">Subversion</span><span class="m_-6614994200275467248gmail-pun">:</span><span class="m_-6614994200275467248gmail-pln"> </span><span class="m_-6614994200275467248gmail-lit">0x25a</span><span class="m_-6614994200275467248gmail-pln">
    </span><span class="m_-6614994200275467248gmail-typ">Manufacturer</span><span class="m_-6614994200275467248gmail-pun">:</span><span class="m_-6614994200275467248gmail-pln"> </span><span class="m_-6614994200275467248gmail-typ">Qualcomm</span><span class="m_-6614994200275467248gmail-pln"> </span></code></pre>
          <p>How can I solve this and implement proper hands-free
            telephony?</p>
          The Bluetooth device is connected via USB interface, Below is
          the device package configuration,</div>
        <div style="margin-left:40px"><font size="1">pulseaudio
            --version<br>
          </font></div>
        <div dir="ltr">
          <p style="margin-left:40px"><font size="1">pulseaudio 11.1<br>
              ¬†bluetoothctl --version<br>
              bluetoothctl: 5.49<br>
              <br>
              ofonod --version<br>
              1.22</font><br>
          </p>
          <p>The steps I followed to setup connection are as follows</p>
          <pre class="m_-6614994200275467248gmail-default m_-6614994200275467248gmail-prettyprint m_-6614994200275467248gmail-prettyprinted"><code><span class="m_-6614994200275467248gmail-pln">    $ hciconfig hci0 up
    $ pactl list sources </span><span class="m_-6614994200275467248gmail-kwd">short</span><span class="m_-6614994200275467248gmail-pln">
    $ pactl list sinks </span><span class="m_-6614994200275467248gmail-kwd">short</span><span class="m_-6614994200275467248gmail-pln">
    $ bluetoothctl
    agent on
    scan on
    scan off
    pair </span><span class="m_-6614994200275467248gmail-str"><address></span><span class="m_-6614994200275467248gmail-pln">
    connect</span><span class="m_-6614994200275467248gmail-str"><address>

</span></code></pre>
          <div><br>
            -- <br>
            <div dir="ltr" class="m_-6614994200275467248gmail_signature">
              <div dir="ltr">
                <div>
                  <div dir="ltr">
                    <div>
                      <div dir="ltr">
                        <div>
                          <div dir="ltr">
                            <div>
                              <div dir="ltr">
                                <div>
                                  <div dir="ltr"><span
                                      style="background-color:rgb(243,243,243)"><span
                                        style="font-family:comic sans
                                        ms,sans-serif"><font size="2">Thanks
                                          & Regards<br>
                                          <b>Mohammed Sha Ebrahim</b><br>
                                          VVDN Technologies Pvt.Ltd<br>
                                        </font></span></span></div>
                                  <div><span
                                      style="background-color:rgb(243,243,243)"><span
                                        style="font-family:comic sans
                                        ms,sans-serif"><font size="2"><br>
                                        </font></span></span></div>
                                </div>
                              </div>
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
  </body>
</html>