Preparing for the Switch
The first stage of a master-slave switch can be done even before devices first find one another: The host must send an HCI_Write_Link_Policy_Settings command with the lowest bit of the Link_Policy_settings bit set. This allows the Link Manager to create a master-slave switch. The link policy must be set correctly, both on a LAN access point and on the connecting device.
In the next stage, a device decides to connect to the LAN access point. Its host sends an HCI_Create_Connection command with Allow_Role_Switch = 0x01. This gives the device's Link Manager permission to accept a role switch on the connection.
The connection begins as usual, with the device that wants to connect to the access point paging and the access point page scanning. An ACL connection is established, and an HCI Connection Request event is sent up to the host on the LAN access point. The LAN access point's host replies with an HCI_Accept_Connection_Request with Role = 0x00. This indicates that the LAN access point must become the master for this connection and tells the LAN access point's Link Manager to perform the role switch.
Normally at this point, the LAN access point's Link Manager would send an LMP_accepted message accepting the connecting device's LMP_host_connection_request. Instead, it sends an LMP_slot_offset message to warn the connecting device that a role change is about to happen and to give it the information that it needs to make the role change.