BLE scanning on one channel only

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

BLE scanning on one channel only

1,485件の閲覧回数
arpad_toth
Contributor II

Hello,

Is it possible to limit BLE scanning (Gap_StartScanning) to one specific advertisement channel?


Is the channel scanning order fixed? (Ch37,38,39)

Or is it possible to cancel and restart scanning after scanning is done on first (Ch37) channel, is there a callback for it?

I don't want to transmit on all 3 channels on TX side to save battery, also on the RX side I don't want to waste time listening on not used channels.

None of the Gap_StartScanning parameters allow this.

 "BLE Host stack QN9080DK MCUXpresso SDK 2.2.0" 

ラベル(2)
タグ(1)
0 件の賞賛
返信
4 返答(返信)

1,175件の閲覧回数
estephania_mart
NXP TechSupport
NXP TechSupport

Hello, 

Could you please try changing the configuration in the ble_controller_task_config.h file ? 

/* Advertising channels that are enabled for scanning operation.
* Range 0x01 - 0x07 
* 0x01 - Enables channel 37 for use.
* 0x02 - Enables channel 38 for use.
* 0x04 - Enables channel 39 for use.
*/
#ifndef mcScanChannelMap_c 
#define mcScanChannelMap_c 0x07
#endif
 

Regards, 

Estephania 

0 件の賞賛
返信

1,175件の閲覧回数
arpad_toth
Contributor II

Hello,

I defined the following globally:

    #define mcScanChannelMap_c 0x01 // channel 37

In ble_controller_task.c the following is using it:

     extern volatile const uint8_t gScanChannelMap_c;

     volatile const uint8_t gScanChannelMap_c = mcScanChannelMap_c;

but there is no reference to this const (not even in lib_ble_5-0_host_cm4.a, lib_ble_QN908XC_controller.a), but it exists in the map file.

I couldn't find any other reference to it in examples.

I still receive adv.s from channel 38. So I dont think it is working.

0 件の賞賛
返信

1,175件の閲覧回数
estephania_mart
NXP TechSupport
NXP TechSupport

Hello, 

Do you have a sniffer log? The adv you are receiving is it from the same device? 

Regards, 

Estephania 

0 件の賞賛
返信

1,175件の閲覧回数
arpad_toth
Contributor II

Hello, 

My setup is:

product 1:
BLE beacon, TX only at gAdvChanMapFlag39_c
lib: lib_ble_5-0_host_peripheral_cm4.a, lib_ble_QN908XC_controller.a

product 2:
BLE scanner, RX only
lib: lib_ble_5-0_host_cm4.a, lib_ble_QN908XC_controller.a

/* Enable channel 38 for use. */
#define mcScanChannelMap_c 0x02
#define mcInitiatorChannelMap_c 0x02
volatile const uint8_t gScanChannelMap_c = mcScanChannelMap_c;
volatile const uint8_t gInitiatorChannelMap_c = mcInitiatorChannelMap_c;

But "product 2" still receives the beacon on ch39 (same MAC address as product1), so gScanChannelMap_c is NOT effective.
As I said no one is referencing gScanChannelMap_c.

It is essential for us to listen only 1ch to save power on TX side, and decrease response time on RX side.

Looks like a library bug.

0 件の賞賛
返信