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 Broadcast mode

Other Parts Discussed in Thread: CC2541

Hi,

I'm using the cc2541 Development Kit and I would like to send the sensor data  (temperature, acceleration...) in broadcasting mode (like an illuminated beacon, with no connection events during between two sendings).

1°) Which mode should I use between Broacaster and PeripheralBroadcaster?

2°) How to properly add the services like the battservice one to this mode?

I added battserviece.c and battserviece.h to the PROFILES section but when it comes to add Batt_Addservice(); within the SimpleBLEBroadcaster_Init() function it doesn't work.

3°) How can I read the data on BTool if the KeyFob is not connected to the dongle (Broadcaster mode)?

Thank you in advance for your help

Berst regards,

Boris NOMERTIN

  • Hi Boris,

    1. If you need to use services, you'd start with SimpleBLEPeripheral which can act as broadcaster and peripheral. You can choose if you want connectible or non-connectible advertisements by modifying advertisement type (see SimpleBLEBroadcaster for example code);

    • Use this when you want to send broadcasts;
      • uint8 advType = GAP_ADTYPE_ADV_NONCONN_IND; // use non-connectable advertisements
    • Use this when you want to be able to connect and interact with services;
      • uint8 advType = GAP_ADTYPE_ADV_SCAN_IND; // use scannable unidirected advertisements

    2. Again, use SimpleBLEPeripheral instead as it can operate at broadcaster as well

    3. you cant, therefore you need it to be connectible. If you mean read the advertisement, they are available in the log if you perform a scan.

    Best Regards

    Joakim

  • Hi oaKim

    Where can I find SimpleBLEPeripheral sample code for cc2541?

    And I am using sensortag as well, can you tell where can i find broadcast sample for sensor tag as well?

    Last, would cc2541 will be working  if I use BlueZ code and how to download on SoC?

    Thanks