Closed xielizyh closed 3 years ago
The master connection substate can only be entered from the initiating state. A device that becomes a master must initiate the connection to the peer device. The slave connection substate can only be entered from the advertising state. A device that becomes a slave must have been advertising to the peer device.
Hi @gengyuchao Thanks for your reply. However, as for the master-slave integration, while connected successfully, it will lead to two connect events, I am still confused about whether the peer device is the master or the slave.
Hi @xielizyh ,
The GATT protocol does not distinguish between master and slave, and directly operates through the method of Server and Client.
Normally, the device that sends connectable broadcast packets acts as a slave, and the device that initiates the connection actively acts as a master.
Thanks for reporting, feel free to reopen.
Hello, I'm using BLE as master and slave simultaneouly based on examples "gatt_client" and "gatt_server". When a device is connected, a connect event will be generated to the “gattc_profile_event_handler” and “gatts_profile_event_handler” at the same time. My problem is how to distinguish whether the connected remote device is a master or a slave.