linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* bluez/android
@ 2015-06-15 11:36 Prabhu Chawandi
  2015-06-15 12:12 ` bluez/android Szymon Janc
  0 siblings, 1 reply; 6+ messages in thread
From: Prabhu Chawandi @ 2015-06-15 11:36 UTC (permalink / raw)
  To: linux-bluetooth

Hi,


 This is with respect to HFP profile.

While I pressed the Button on my HF device, service level connection
is happening - BTHF_STATE_CONNECTED is coming.

But next callbacks are not coming on pressing of buttons - like voice
recognition.

Can any body help me
ManyThanks,
Prabhu

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: bluez/android
  2015-06-15 11:36 bluez/android Prabhu Chawandi
@ 2015-06-15 12:12 ` Szymon Janc
  2015-06-15 13:41   ` bluez/android Prabhu Chawandi
  0 siblings, 1 reply; 6+ messages in thread
From: Szymon Janc @ 2015-06-15 12:12 UTC (permalink / raw)
  To: Prabhu Chawandi; +Cc: linux-bluetooth

Hi Prabhu,

On Monday 15 of June 2015 17:06:41 Prabhu Chawandi wrote:
>  This is with respect to HFP profile.
> 
> While I pressed the Button on my HF device, service level connection
> is happening - BTHF_STATE_CONNECTED is coming.
> 
> But next callbacks are not coming on pressing of buttons - like voice
> recognition.
> 
> Can any body help me

HFP is a bit special since BfA provides only part of the implementation and 
rest is implemented in Android Framework. When HF device is connected SLC 
creation must happen. Most likely your HF device is sending some AT commands 
and you must response to those as per HFP specification. Only when all 
required SLC AT commands are handled state will be set to 
BTHF_STATE_SCL_CONNECTED. This is normally handled by Android Framework but if 
you are using haltest you must handle those on your own.

For details on how to setup SLC I recommend HFP specification lecture.

-- 
BR
Szymon Janc

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: bluez/android
  2015-06-15 12:12 ` bluez/android Szymon Janc
@ 2015-06-15 13:41   ` Prabhu Chawandi
  2015-06-15 14:15     ` bluez/android Szymon Janc
  0 siblings, 1 reply; 6+ messages in thread
From: Prabhu Chawandi @ 2015-06-15 13:41 UTC (permalink / raw)
  To: Szymon Janc; +Cc: linux-bluetooth

Hi Szymon,

   Thanks for your reply. I was debugging further, I noticed that
while connecting at service level, there is CIND callback
(cind_cmd_cb) is coming which is for Call Indicator AT CMD.
I am curious to know, how it is happening, which can help me to
understand and  try for other call backs.

MayThanks,
Prabhu

On Mon, Jun 15, 2015 at 5:42 PM, Szymon Janc <szymon.janc@tieto.com> wrote:
> Hi Prabhu,
>
> On Monday 15 of June 2015 17:06:41 Prabhu Chawandi wrote:
>>  This is with respect to HFP profile.
>>
>> While I pressed the Button on my HF device, service level connection
>> is happening - BTHF_STATE_CONNECTED is coming.
>>
>> But next callbacks are not coming on pressing of buttons - like voice
>> recognition.
>>
>> Can any body help me
>
> HFP is a bit special since BfA provides only part of the implementation and
> rest is implemented in Android Framework. When HF device is connected SLC
> creation must happen. Most likely your HF device is sending some AT commands
> and you must response to those as per HFP specification. Only when all
> required SLC AT commands are handled state will be set to
> BTHF_STATE_SCL_CONNECTED. This is normally handled by Android Framework but if
> you are using haltest you must handle those on your own.
>
> For details on how to setup SLC I recommend HFP specification lecture.
>
> --
> BR
> Szymon Janc

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: bluez/android
  2015-06-15 13:41   ` bluez/android Prabhu Chawandi
@ 2015-06-15 14:15     ` Szymon Janc
  2015-06-15 14:59       ` bluez/android Prabhu Chawandi
  0 siblings, 1 reply; 6+ messages in thread
From: Szymon Janc @ 2015-06-15 14:15 UTC (permalink / raw)
  To: Prabhu Chawandi; +Cc: linux-bluetooth

Hi Prabhu,

On Monday 15 of June 2015 19:11:32 Prabhu Chawandi wrote:
> Hi Szymon,
> 
>    Thanks for your reply. I was debugging further, I noticed that
> while connecting at service level, there is CIND callback
> (cind_cmd_cb) is coming which is for Call Indicator AT CMD.
> I am curious to know, how it is happening, which can help me to
> understand and  try for other call backs.

Please don't top-post on ML.

As for your question: HFP HAL has methods that should be called as a reply for 
some callbacks ie for cind that would be cind_response. You can check 
"android/hardware/bt_hf.h". 

Yet, Android HAL is rather lowlevel interface not recommended for direct use.
If for whatever reason you are stuck with it I suggest checking Android 
Framework source code as this (and header comments) is the only documentation 
you get for it.

> On Mon, Jun 15, 2015 at 5:42 PM, Szymon Janc <szymon.janc@tieto.com> wrote:
> > Hi Prabhu,
> > 
> > On Monday 15 of June 2015 17:06:41 Prabhu Chawandi wrote:
> >>  This is with respect to HFP profile.
> >> 
> >> While I pressed the Button on my HF device, service level connection
> >> is happening - BTHF_STATE_CONNECTED is coming.
> >> 
> >> But next callbacks are not coming on pressing of buttons - like voice
> >> recognition.
> >> 
> >> Can any body help me
> > 
> > HFP is a bit special since BfA provides only part of the implementation
> > and
> > rest is implemented in Android Framework. When HF device is connected SLC
> > creation must happen. Most likely your HF device is sending some AT
> > commands and you must response to those as per HFP specification. Only
> > when all required SLC AT commands are handled state will be set to
> > BTHF_STATE_SCL_CONNECTED. This is normally handled by Android Framework
> > but if you are using haltest you must handle those on your own.
> > 
> > For details on how to setup SLC I recommend HFP specification lecture.
> > 
> > --
> > BR
> > Szymon Janc

-- 
BR
Szymon Janc

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: bluez/android
  2015-06-15 14:15     ` bluez/android Szymon Janc
@ 2015-06-15 14:59       ` Prabhu Chawandi
  2015-06-15 16:23         ` bluez/android Szymon Janc
  0 siblings, 1 reply; 6+ messages in thread
From: Prabhu Chawandi @ 2015-06-15 14:59 UTC (permalink / raw)
  To: Szymon Janc; +Cc: linux-bluetooth

Hi Szymon,

 Sorry for posting with ML, my mistake.

Thanks for the information.  Again, I was trying to find where the
unknown AT Commands are coming;
I tried to catch @ static void at_cmd_unknown(const char *command,
void *user_data);
But, no luck, no AT commands are caught there.  If you can let me
know, where all the AT commands will be handled would be of great help
( unknown - so that I can handle then)

ManYThanks
Prabhu

On Mon, Jun 15, 2015 at 7:45 PM, Szymon Janc <szymon.janc@tieto.com> wrote:
> Hi Prabhu,
>
> On Monday 15 of June 2015 19:11:32 Prabhu Chawandi wrote:
>> Hi Szymon,
>>
>>    Thanks for your reply. I was debugging further, I noticed that
>> while connecting at service level, there is CIND callback
>> (cind_cmd_cb) is coming which is for Call Indicator AT CMD.
>> I am curious to know, how it is happening, which can help me to
>> understand and  try for other call backs.
>
> Please don't top-post on ML.
>
> As for your question: HFP HAL has methods that should be called as a reply for
> some callbacks ie for cind that would be cind_response. You can check
> "android/hardware/bt_hf.h".
>
> Yet, Android HAL is rather lowlevel interface not recommended for direct use.
> If for whatever reason you are stuck with it I suggest checking Android
> Framework source code as this (and header comments) is the only documentation
> you get for it.
>
>> On Mon, Jun 15, 2015 at 5:42 PM, Szymon Janc <szymon.janc@tieto.com> wrote:
>> > Hi Prabhu,
>> >
>> > On Monday 15 of June 2015 17:06:41 Prabhu Chawandi wrote:
>> >>  This is with respect to HFP profile.
>> >>
>> >> While I pressed the Button on my HF device, service level connection
>> >> is happening - BTHF_STATE_CONNECTED is coming.
>> >>
>> >> But next callbacks are not coming on pressing of buttons - like voice
>> >> recognition.
>> >>
>> >> Can any body help me
>> >
>> > HFP is a bit special since BfA provides only part of the implementation
>> > and
>> > rest is implemented in Android Framework. When HF device is connected SLC
>> > creation must happen. Most likely your HF device is sending some AT
>> > commands and you must response to those as per HFP specification. Only
>> > when all required SLC AT commands are handled state will be set to
>> > BTHF_STATE_SCL_CONNECTED. This is normally handled by Android Framework
>> > but if you are using haltest you must handle those on your own.
>> >
>> > For details on how to setup SLC I recommend HFP specification lecture.
>> >
>> > --
>> > BR
>> > Szymon Janc
>
> --
> BR
> Szymon Janc

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: bluez/android
  2015-06-15 14:59       ` bluez/android Prabhu Chawandi
@ 2015-06-15 16:23         ` Szymon Janc
  0 siblings, 0 replies; 6+ messages in thread
From: Szymon Janc @ 2015-06-15 16:23 UTC (permalink / raw)
  To: Prabhu Chawandi; +Cc: Szymon Janc, linux-bluetooth

Hi Prabhu,

On Monday 15 June 2015 20:29:25 Prabhu Chawandi wrote:
> Hi Szymon,
> 
>  Sorry for posting with ML, my mistake.

Yet, you still top post.

> 
> Thanks for the information.  Again, I was trying to find where the
> unknown AT Commands are coming;
> I tried to catch @ static void at_cmd_unknown(const char *command,
> void *user_data);
> But, no luck, no AT commands are caught there.  If you can let me
> know, where all the AT commands will be handled would be of great help
> ( unknown - so that I can handle then)

Please check "android/hardware/bt_hf.h". Most commands that are not handled 
internally by BfA have dedicated callbacks. unknown_cmd callback is mostly for 
vendor specific commands and you can safely always just answer with ERROR for 
unknown command.
 
> ManYThanks
> Prabhu
> 
> On Mon, Jun 15, 2015 at 7:45 PM, Szymon Janc <szymon.janc@tieto.com> wrote:
> > Hi Prabhu,
> > 
> > On Monday 15 of June 2015 19:11:32 Prabhu Chawandi wrote:
> >> Hi Szymon,
> >> 
> >>    Thanks for your reply. I was debugging further, I noticed that
> >> 
> >> while connecting at service level, there is CIND callback
> >> (cind_cmd_cb) is coming which is for Call Indicator AT CMD.
> >> I am curious to know, how it is happening, which can help me to
> >> understand and  try for other call backs.
> > 
> > Please don't top-post on ML.
> > 
> > As for your question: HFP HAL has methods that should be called as a reply
> > for some callbacks ie for cind that would be cind_response. You can check
> > "android/hardware/bt_hf.h".
> > 
> > Yet, Android HAL is rather lowlevel interface not recommended for direct
> > use. If for whatever reason you are stuck with it I suggest checking
> > Android Framework source code as this (and header comments) is the only
> > documentation you get for it.
> > 
> >> On Mon, Jun 15, 2015 at 5:42 PM, Szymon Janc <szymon.janc@tieto.com> 
wrote:
> >> > Hi Prabhu,
> >> > 
> >> > On Monday 15 of June 2015 17:06:41 Prabhu Chawandi wrote:
> >> >>  This is with respect to HFP profile.
> >> >> 
> >> >> While I pressed the Button on my HF device, service level connection
> >> >> is happening - BTHF_STATE_CONNECTED is coming.
> >> >> 
> >> >> But next callbacks are not coming on pressing of buttons - like voice
> >> >> recognition.
> >> >> 
> >> >> Can any body help me
> >> > 
> >> > HFP is a bit special since BfA provides only part of the implementation
> >> > and
> >> > rest is implemented in Android Framework. When HF device is connected
> >> > SLC
> >> > creation must happen. Most likely your HF device is sending some AT
> >> > commands and you must response to those as per HFP specification. Only
> >> > when all required SLC AT commands are handled state will be set to
> >> > BTHF_STATE_SCL_CONNECTED. This is normally handled by Android Framework
> >> > but if you are using haltest you must handle those on your own.
> >> > 
> >> > For details on how to setup SLC I recommend HFP specification lecture.
> >> > 
> >> > --
> >> > BR
> >> > Szymon Janc
> > 
> > --
> > BR
> > Szymon Janc
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-bluetooth"
> in the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
Szymon K. Janc
szymon.janc@gmail.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-06-15 16:23 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-15 11:36 bluez/android Prabhu Chawandi
2015-06-15 12:12 ` bluez/android Szymon Janc
2015-06-15 13:41   ` bluez/android Prabhu Chawandi
2015-06-15 14:15     ` bluez/android Szymon Janc
2015-06-15 14:59       ` bluez/android Prabhu Chawandi
2015-06-15 16:23         ` bluez/android Szymon Janc

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).