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.

GAP Observer role VS energy consumption

Other Parts Discussed in Thread: CC2540

Hi everyone,

 

I have a device that is in Peripheral GAP role. It is the Reporter of the Proximity profile. In that state, it is very power efficient.

 

I also want to implement an Observer role and I was wondering what will happen to my power consumption? In my understanding, an observer must always listen for a broadcaster, so this will reduce the battery life of this device.

 

Can anyone confirm how an observer is supposed to work. Can we still sleep while being an observer?

 

Best regards,

Jerome Baron

  • An observer role device essentially just listens (scans) on the three advertising channels. If active scanning is used, the observer will send a scan request when it hears and advertiser, and will listen for a scan response. If passive scanning is used, the observer will simply listen for advertisement packets.

    An observer running on the CC2540, just like any other application on the CC2540, will go to sleep when the radio is not being used and when their is no stack or application processing going on. The key parameters when scanning are the "scan interval" and the "scan window". These two parameters determine how often and how long each scan takes. If the scan interval and scan window are equal, this means that the CC2540 radio receiver will be on essentially 100% of the time. If, for example, the scan window is set to 20ms and the scan interval is set to 100ms, then the CC2540 radio receiver will be on 20% of the time.

    To change the scan interval and scan window, you can call GAP_SetParamValue and change the values TGAP_GEN_DISC_SCAN_INT  and TGAP_GEN_DISC_SCAN_WIND. The values are in units of 0.625ms.

  • Thanks Willis,

     

    Your question made me taught to another question. I saw in the documentation that a Peripheral can coexist with an Observer and a Central with a Broadcaster. And as you said, an observer will scan for request an listen for adviser.

     

    Would it be possible to do the same with a Central ? I mean the Central profile can connect to multiple Peripheral, so even if it has an active connection, it can still send scan request and listen for adviser. Then why a Central cannot be an Observer? What's the difference?

     

    Best regards,

    Jerome Baron

  • Let's clarify some concepts (page 14 of the BLE software developer's guide):

    • Observer – scans for advertisements, but cannot initiate connections.
    • Central  – scans for advertisements and initiates connections; operates as a master in a single or multiple link-layer connections. Currently, the BLE central stack supports up to three simultaneous connections.

    So a Central IS an Observer which additionally initiaties connections :)

     

  • Thanks, well this is the reason of my question. I don't see many difference between them and don't see why in the BLE GAP API I can read:

     

    The application will set the GAP’s profile role and the application may set a combination of profile roles.

    The possible multi profile roles that we will support are:

    ·         Central and Broadcaster - scans for advertisements and operates as a master in a single or multiple link layer connections, but allows the device to broadcast non-connectable advertisements.

    ·         Peripheral and Observer - an advertiser that operates as a slave in a single link layer connection and allows scanning for advertisements without initiating a connection.

     

    As per the BLE GAP API, a Central and an Observer can't coexist.

  • Consider all these GAP roles as follows:

    • Central and Broadcaster: when operating as Central (master behavior) can connect to multiple slaves. When acting as Broadcaster (slave behavior) can advertise but not be connected.
    • Peripheral and Observer: when operating as Observer (master behavior) canNOT connect but CAN be connected as Peripheral (slave behavior).

    I do not understand the question. As far as you do not initiate connections, the Central role is the same as the Observer one. It is logical they cannot coexist because they essentially share most of the non-connection-related code.

     

  • Ill explain what Im trying to do and maybe this will clarify the situation.

     

    I want to be a Central, which can connect to a peripheral. While being connected with that peripheral, I still want to scan for other device around. I want to know who's out there, grab the RSSI of everyone around me, but not necessarily connect to them because I am already in a connection with another Peripheral. All this while being connected with a peripheral.

     

    As I understand, this is possible because a Central can connect to multiple peripheral, so it mean it can scan while being connected with another peripheral in order to connect to a second Peripheral. So for me this is a combination of a Central and an Observer.

  • Hi Jerome,

    I see your confusion.

    Jerome Baron said:
    Central can connect to multiple peripheral, so it mean it can scan while being connected with another peripheral in order to connect to a second Peripheral. So for me this is a combination of a Central and an Observer.

    Yes, the Central has the Observer functionality, in terms of scanning.

    BR

  • Hi

    I want to set a Peripheral - Observer, a device that during a connection can still scan for other advertisements. Since no peripheralobserver profile is included. It is required to modify the existing profiles.

    I have been trying doing similar modifications as described in this thread:
    http://e2e.ti.com/support/low_power_rf/f/538/p/222651/860405.aspx#860405

    though I don't get any error when compiling, it does not quite work correctly. My question is have you actually done it?
    and could you describe how?

    it would be of a great help for me and others,

    thanks
    Luis