Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

PSoC™ 4 Forum Discussions

Yashu
Level 4
25 sign-ins First solution authored 25 replies posted
Level 4

If I disable all scanning channels for receiving advertisements in the "Observer" demo workspace as below, the module keeps sending UART output of advertisements that are received from clients. Why?

 

 

void StackEventHandler(uint32 event, void* eventParam)
{
    /*local variables*/
   CYBLE_GAPC_ADV_REPORT_T advReport;
   uint8 i;
     
    switch(event)
    {
        
        case CYBLE_EVT_STACK_ON:    /*BLE stack ON*/
        
                printf("Bluetooth ON:\r\n");
/*JY
                // Start Scanning
                if(CYBLE_ERROR_OK==CyBle_GapcStartScan(CYBLE_SCANNING_SLOW))
                  printf("Started to Scan Slow\r\n");
*/
//JY.add.begin  Disable all advertisement scanning channels
                #define CYREG_BLE_BLELL_SCAN_CONFIG_USER (*(uint32*) CYREG_BLE_BLELL_SCAN_CONFIG)
                CYREG_BLE_BLELL_SCAN_CONFIG_USER = CYREG_BLE_BLELL_SCAN_CONFIG_USER & 0xFFFF0FFF;

                // Start Scanning
                if(CYBLE_ERROR_OK==CyBle_GapcStartScan(CYBLE_SCANNING_FAST))
                  printf("Started to Scan Fast\r\n");
//JY.add.end
                
            break;

 

 

0 Likes
1 Solution
PratikshaV
Moderator
Moderator 50 solutions authored 10 likes received 100 replies posted
Moderator

Hi @Yashu 

You can use this CYREG_BLE_BLELL_TXRX_HOP register to check which channel is being used for scanning.

 

Thanks & Regards

Pratiksha V

View solution in original post

0 Likes
3 Replies
PratikshaV
Moderator
Moderator 50 solutions authored 10 likes received 100 replies posted
Moderator

Hi @Yashu 

I am trying to reproduce this issue on my side and I will get back to you asap.

 

Thanks & Regards

Pratiksha V 

0 Likes
Yashu
Level 4
25 sign-ins First solution authored 25 replies posted
Level 4

My testing appears to show that Ch 37 is still enabled when a value of 0 is configured. Not an issue. I am only trying to confirm that the PSoC4 does indeed heed the channel enables since my vector signal generator is currently in repair.

It also seems that the channel frequency change during 'scanning' is based on the 'scan interval' setting. ie.. 'Scan Interval' = 1 sec means the PSoC4 will dwell for 1 sec on each of the three channel frequencies.

Is there any way to read back which channel is currently being used?

0 Likes
PratikshaV
Moderator
Moderator 50 solutions authored 10 likes received 100 replies posted
Moderator

Hi @Yashu 

You can use this CYREG_BLE_BLELL_TXRX_HOP register to check which channel is being used for scanning.

 

Thanks & Regards

Pratiksha V

0 Likes