Re: Digest for btstack-dev@googlegroups.com - 1 update in 1 topic

12 views
Skip to first unread message

Justin John

unread,
Aug 6, 2021, 8:57:51 AM8/6/21
to btsta...@googlegroups.com
Hi Matthias,

I am looking forward to BR/EDR (Classic) and the intention is to let the application know that page scan has started after issuing gap_discoverable_control(1) command.
In the same way I want to let the application know about the disconnection after the gap_discoverable_control(0) command is issued.

From the BTStack Manual, Under profiles I see below code snippet

int main(void){ ... // make discoverable gap_discoverable_control(1); btstack_run_loop_execute(); return 0; } void packet_handler (uint8_t packet_type, uint8_t *packet, uint16_t size){ ... switch(state){ case W4_CHANNEL_COMPLETE: // if connection is successful, make device undiscoverable gap_discoverable_control(0); ... } }

However I am not able to trace W4_CHANNEL_COMPLETE in the source code.

Thanks
Justin


On Fri, Aug 6, 2021 at 3:27 PM <btsta...@googlegroups.com> wrote:
Matthias Ringwald <matthias...@gmail.com>: Aug 05 10:01PM +0200

Hi Justin
 
gap_connectable_control() controls the BR/EDR (Classic) Page Scan Mode. For LE, you would call gap_advertisements_enable(on/off) after setting adv params with gap_advertisements_set_params and data with gap_advertisements_set_data
 
Why would you need to verify that? If you insist, you can check if you get a HCI Command Complete for LE Advertisements Enable with status code = 0. (but you still need to trust the stack that it sends on / off as you expect)
 
Cheers
Matthias
 
 
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to btstack-dev...@googlegroups.com.

Matthias Ringwald

unread,
Aug 7, 2021, 5:03:34 AM8/7/21
to btsta...@googlegroups.com
Hi John

Could you tell why you want/need to know when the page/inquiry scan mode has changed?

When you call gap_discoverable_control, the stack will send the corresponding HCI Command immediately and the scan mode will change within a few milliseconds 

Best
 Matthias

Sent from my iPhone

On 6 Aug 2021, at 14:57, Justin John <johnm...@gmail.com> wrote:


--
You received this message because you are subscribed to the Google Groups "btstack-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to btstack-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/btstack-dev/CAGtH5dZuo%3DGrP67vKGw6672XN3ZySDVe7Cxjt13JgW%2Bf9muFLg%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages