This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2541 not advertising using SimpleBLEPeripheral project

Other Parts Discussed in Thread: CC2541, CC2540

Hey,

should the SimpleBLEPeripheral code work on every CC2541 chip according to  the BLE components, no matter which peripherals are connected?

I developed a custom PCB with the CC2541 on it and I want my chip to do the advertisement, and put the SimpleBLEPeripheral code on it, but nothing happens. I'm sniffing the communication with the USB dongle.

Do I have to change something in source code according to get the advertising work fine?

Thanks for yout help.

  • Hello Marcus,

    Advertising is the same across all the CC254x devices.  The differences in the various examples for different chips and EVMs is the button that is used to initiate advertising.  You can set advertising to start automatically by searching for and setting, 

    uint8 initial_advertising_enable = TRUE;

    Thanks,

  • Hello greenja,

    thanks for your quick replie. The parameter you are naming is already set to TRUE. It is also the default-setting in the SimpleBLEPeripheral project as long as you aren't setting the preprocessor option "MiniDK" to TRUE.

    But even with advertising_enable set to TRUE my Board stays silent... No advertising could be found with the sniffing tool. I also checked every three advertising channels...


    Thanks,

  • Hi,

    Did you try to run the same code on SensorTag or any other hardware?

    Can you check by putting breakpoint that code is reaching to the advertisement or not?

    Thanks.

  • Hi,

    I put the same code on a SmartRF05 Development Board, and it worked. The only difference was, that the DEV-Board has a CC2540, and so i compiled the 2540-project for it.

    But these projects should be the same..

    Could you tell me which function is sending the advertising messages so that I can put a breakpoint on it? I tried to find this function but the only thing i found were functions that register task-IDs for the GAP-processes.

    Thanks.

  • Hi,

    Try to put breakpoint at follow:

    In peripheralStateNotificationCB function try to check that whether it comes case " GAPROLE_ADVERTISING".

  • Hi,

    I tried it on my own PCB and on the DEV-Board. On the DEV-Board it hit the breakpoint several times. And there was a "GAPROLE_ADVERTISING" as a state in it.

    But on my own board the breakpoint was never reached.

    Thanks for your help.

  • HI, 

    It may be the hardware issue, May be related to 32 Khz crystal Oscillator.

    Can you check that hardware connection is properly working? because cc254x is not able to receive peripheral state change notification. 

  • Hi,

    I used SmartRF Studio 7 with my own PCB and was able to see the advertising packets. They are a bit broken because of an eventualy impedance mismatch but there is some data to sniff.


    So I have to figure out why the software on my own PCB couldn't go into the advertising mode...

    Thanks for your help so far!!