case RFCOMM_EVENT_INCOMING_CONNECTION:
// data: event (8), len(8), address(48), channel (8), rfcomm_cid (16)
rfcomm_event_incoming_connection_get_bd_addr(packet, event_addr);
rfcomm_channel_nr = rfcomm_event_incoming_connection_get_server_channel(packet);
rfcomm_channel_id = rfcomm_event_incoming_connection_get_rfcomm_cid(packet);
rfcomm_accept_connection(rfcomm_channel_id);
gap_discoverable_control(0); // make device undiscoverable to save power
break;
Justin John <johnm...@gmail.com>: Aug 06 06:27PM +0530
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
Matthias Ringwald <matthias...@gmail.com>: Aug 07 11:03AM +0200
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
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.