In my application, I want to be able to scan and advertise non connectable advertisement packets/beacons at the same time. Advertising works fine, but after advertising starts and I proceed to start scanning, scan fails and I get the following error in scanCallback:
gHciCommandDisallowed_c
How to resolve this?
Just to add context, in my application I am trying to send and receive very short amount of data using advertisement packets. My device tries to advertise fixed data, when nearby devices see this advertisment, they try to broadcast some data back as advertisment (ideal would be to use directed advertisment here).
I have also tried advertising in bigger intervals, for example every 4 seconds. But still no matter what, scanning failes when advertising is already started.
Hi @umx ,
The QN9090 is Bluetooth LE 5 compliant and covers the mandatory features, but some features such as the extended advertisement, long range or coded PHY are optional features that QN9090 does not support. Our available MCU that supports the complete Bluetooth LE 5 spec is the KW38.
Also, it is only possible to generate the Scan Request event and PDU under Extended Advertising as per the Bluetooth Core specification.
I apologize for any inconvenience this may cause you.
Best regards,
Gavin
Thank you for you response, but I think I did not convey my question clearly. What I am trying to do is, advertise and scan for other advertising devices at the same time. In other words, I want my device to be in observer and broadcaster GAP roles at the same time.
Following is the flow of my function calls:
1. App_StartAdvertising(BleApp_AdvertisingCallback, NULL); This works and advertising starts. I can see non connectable adverts on the other device.
2. App_StartScanning(scanningParameters, scanningCallback, enableFilterDuplicates, duration, period); this one returns gBleSuccess_c, but immediagtly afterwards I get gHciCommandDisallowed_c event in scanningCallback function.
Hi @umx ,
Hope you are doing well and thanks for your kind patience!
After my internal confirmation, the response I got from the experts was that QN9090 does not support scanning and advertising simultaneously . However, there is an alternative that may be able to be implemented that alternates scanning and advertising using a timer.
Hope this helps!
Best regards,
Gavin