GAP role “Peripheral and Central” NOT Connecting | Cypress Semiconductor
GAP role “Peripheral and Central” NOT Connecting
Hello Cypress PRoC BLE World:
I have a Cypress PRoC BLE configured with a GAP role of: “Peripheral and Central”.
The device starts scanning when calling CyBle_GapcStartScan() and stops scanning when calling CyBle_GapcStopScan() just fine.
However, it will not connect when calling CyBle_GapcConnectDevice(), which apparently uses the “Component Customizer GUI” settings.
It will also not connect when calling CyBle_GapcInitConnection(), which apparently uses the given settings instead of the “Component Customizer GUI” settings, before calling CyBle_GapcConnectDevice().
CyBle_GapcConnectDevice() and CyBle_GapcInitConnection() are both returning CYBLE_ERROR_INVALID_PARAMETER.
CyBle_GapcConnectDevice() resides in BLE.c and is declared in BLE.h.
However, CyBle_GapcInitConnection(), which is called by CyBle_GapcConnectDevice(), is not declared in BLE_StackGap.h, due to “#ifdef GAP_CENTRAL” not being defined, and that is evidently the problem.
Why is “GAP_CENTRAL” not defined (to employ CyBle_GapcInitConnection()) but CYBLE_GAP_ROLE_CENTRAL is defined (to employ CyBle_GapcConnectDevice(), which calls CyBle_GapcInitConnection()) for a GAP role of: “Peripheral and Central”?