In kw41z bluetooth beacon demo code, I modify it to do a scanning first, right after Initialization,
bleResult_t result = App_StartScanning(&gScanParams, BleApp_ScanningCallback);
however, the result is always 4 (gBleFeatureNotSupported_c). Scan cannot be started. How do I fix this?
Later I try modified the hid_host code, where the scan function works, and add advertise functions,
bleResult_t result = Gap_SetAdvertisingParameters((gapAdvertisingParameters_t*)&gAppAdvParams);
And the result is also 4 (gBleFeatureNotSupported_c). Advertise cannot be started. What a bummer!
I think there's some place specify the role of device, and then central can only scan, and peripheral can only advertise.
But I cannot find the place where such role is specified in these project codes.
I want my device be capable of both scan and advertise, it seems Observer and Broadcaster are capable both rx & tx.
From BLE Application Developer's Guide:
o Scans for advertisers, but does not initiate connections; Transmit is optional
o Advertises, but does not accept connection requests from Centrals; Receive is optional