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

PSoC™ 4

Anonymous
Not applicable

Dear all,

we are experimenting some issues while scanning our devices with CYBLE-222014-01. In fact, when we are running few dozens of devices (e.g. 20ish), they take some time to appear in scannings. The time that those devices take to appear in scannings do not depend majorly by scanning time, but it seems to depend majorly by the time that those devices have been running (e.g. 30 minutes). What are we missing?

We are using CYBLE-222014-01 on our devices with last application and stack. These devices are used as peripheral nodes with advertisement parameters as: "general discovery", "connectable undirected", advertisement interval as random from 30ms to 100ms, all channels, "scan request and connect request from any", timeout disabled, and advertisement behavior as "factory default".

We are currently using a custom android app, an android app from play store (i.e. Bluetooth LE Scanner), and cysmart to do our scannings. In cysmart we also tried several combination of scan window (i.e. from 10ms to 500ms) and scan interval (i.e from 500ms to 1000ms).

Anyone can point us what were are doing wrong, please?

All the best,

Lorenzo

0 Likes
1 Solution
SayaniS_66
Moderator
Moderator 10 likes received First like received
Moderator

Hello,

The name of the BLE device should not ideally create a problem. But the commands are being sent from the external microcontroller so I presume some timing issues could have triggered the problem.

-Sayani.

View solution in original post

0 Likes
7 Replies
SayaniS_66
Moderator
Moderator 10 likes received First like received
Moderator

Hello,

Please can you set the ECO Capacitance trim values for your module using the following KBA - ECO Capacitance Trim Values for EZ-BLE™ Modules - KBA218990 and test again.

-Sayani.

Anonymous
Not applicable

Hi sxsi

thank you for your reply! That was quietly tricky to know.

We are not developing our custom firmware yet, but I saw that there is "system_set_eco_parameters (SECO, ID=2/15) " command that should allow to set ECO trim value as well.

As soon as we tested it, I'll give a feedback! Thanks again for pointing us in this direction

Lorenzo

0 Likes
Anonymous
Not applicable

Hi sxsi

we checked the values of ECO trim in our modules, and it is already set to expected value (i.e. 0xA0A0 value in our case); it seems that the issue should be somewhere else.

If it could be helpful, we are "advertising" the services in scan response messages, while the module "advertise" them in advertisement messages by default. Could it be the root of the issue?

Anyone has experience of several "fresh-turned-on" modules which are all available on scan?

BR, Lorenzo

0 Likes
Anonymous
Not applicable

Hi everyone,

we changed scan response and advertisement packets settings, but we were not able to reduce required time to appear.

Any idea on what we are missing?


Here, our pseudo-code to set scan response and advertisement packets:

// Build Advertisement message.

uint8_t adv_data[32];
adv_data = ... // Set connectivity, manufacturer code, GAP device name

if ((ble_packet = EZS_SEND_AND_WAIT(ezs_cmd_gap_set_adv_data(adv_data), COMMAND_TIMEOUT_MS)) == 0)

{

  // Something went wrong.

}

else

{

  // All good.

}

// Build Scan Response message.

uint8_t sr_data[] = { 0x12,

  0x11, 0x07, 0x00, 0xA1, 0x0C, 0x20, 0x00, 0x08, 0x9A, 0x9E, 0xE2, 0x11, 0x15, 0xA1, 0x33, 0x33, 0x33, 0x65

};

// Set new scan response data.

if ((ble_packet = EZS_SEND_AND_WAIT(ezs_cmd_gap_set_sr_data(sr_data), COMMAND_TIMEOUT_MS)) == 0)

{

  // Something went wrong.

}

else

{

  // All good.

}

0 Likes
SayaniS_66
Moderator
Moderator 10 likes received First like received
Moderator

Hello,

Please can you check if the module alone is working correctly by sending commands over a serial terminal. If the module behaves correctly, then please check the commands sent from your microcontroller to the module. There might be some timing issues in the code due to which the module is taking time to appear in scanning.

-Sayani.

0 Likes
Anonymous
Not applicable

Hello,

thank you for you answer.

The module alone is working correctly and the commands are fine: we checked that.

We "resolved" the issue by using "complete name" parameter instead of the "short name" parameter to set BLE device name. However, we still did not understand the root cause.

0 Likes
SayaniS_66
Moderator
Moderator 10 likes received First like received
Moderator

Hello,

The name of the BLE device should not ideally create a problem. But the commands are being sent from the external microcontroller so I presume some timing issues could have triggered the problem.

-Sayani.

0 Likes