On Fri, 2017-09-22 at 21:09 +0300, Luiz Augusto von Dentz wrote: > Hi James, > > On Thu, Sep 21, 2017 at 10:28 PM, James Bottomley > <James.Bottomley at hansenpartnership.com> wrote: [...] > > +static bool hfp_rfcomm_handle(int fd, pa_bluetooth_transport *t, > > const char *buf) > > +{ > > +Â Â Â Â struct hfp_config *c = t->config; > > +Â Â Â Â int val; > > + > > Was this code tested against PTS or you just got it working with some > specific headsets? Im guessing this is for SLC handling but Im afraid > this was never really qualified properly so perhaps some statement > here would be nice. > > If you have no idea what Im talking about you please have a look at: > > https://www.bluetooth.org/docman/handlers/DownloadDoc.ashx?doc_id=411 > 65 The site seems to be login protected, but if this is some type of simulator, it would be useful to run it by that if you can get me access. > There may be commands we would need to implement even if the > indicators are not supported to pass qualification. If this is just a > 'works for me' solution then we better put a disclaimer about not > using this code on Bluetooth certified products. I can ask Marcel what the usual certification route of Linux code is, if it's important. Â I wasn't aware we'd put any pulseaudio code through bluetooth qualifications before (unless the vendors just did it quietly). [...] > > +Â Â Â Â /* > > +Â Â Â Â Â * once we're fully connected, just reply OK to everything > > +Â Â Â Â Â * it will just be the headset sending the occasional status > > +Â Â Â Â Â * update, but we process only the ones we care about > > +Â Â Â Â Â */ > > Im not really sure responding "OK" to everything will do well for > interoperability, some vendors uses HFP with the its own set of > vendor commands which may not always accept OK as a response or it > may trigger some special mode. I modelled that on the android code https://android.googlesource.com/platform/packages/apps/Bluetooth/+/master/src/com/android/bluetooth/hfp/HeadsetStateMachine.java It responds OK to any vendor specific command it doesn't recognise. James