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.

RTOS/CC2640R2F: Interfacing CC2640R2F with Cell phone Application

Part Number: CC2640R2F
Other Parts Discussed in Thread: CC2640, BLE-STACK

Tool/software: TI-RTOS

Hello

My application consists of the following:

1.Wakeup of CC2640R2F using MSP430 external interrupt

2. Transmitting sensor value from MSP430 to CC2640R2F using UART

3. Alternately the CC2640R2F can also be woken up by a mobile phone app when the user comes into the correct proximity of the IC. CC2640R2F then transmits this sensor value to the cell phone after pairing.

4. CC2640 to be in sleep mode otherwise.

Is this possible and which examples can i combine to achieve this. I was thinking about pinInterrupt and simple broadcaster, but am confused between its "app" and "stack library" version. Any insights on the same?

BR 

Shubhankar

  • Please take a look at our software user's guide, which explains our software structure under section The CC2640R2F SDK Platform-->Architecture-->BLE-Stack Protocol Stack and Application Configurations

    Also you can take advantage of our SimpleLink Academy training to get to know BLE and our software structure.
  • Hi Christin

    Thanks for the reply. However I notice that the BLE stack v2.2.2 is not yet out and i plan to reference the following for my application

    Thus with my CC2640r2f device how would i interface this reference design with the existing stack.

    BR

    Shubhankar

  • It's BLE STACK V2.2.1 that's referred in the documentation. It said 2.2, not 2.2.2.
  • Hi Christin,

    I wanted to know about the lowest power mode the device can be in to be able to advertise its data to a central ( cell phone app) The datasheet says there's an idle mode that consumes 0.5 mA but that's quite a high current for low power apps. Any information on this?

    BR 

    Shubhankar

  • Hi,

    In order to advertise, the radio core has to be on. TX current is 6.1mA while RX current is 5.9mA. Between advertising event the device will enter lowest power mode possible which is standby 1uA.

    The average current will vary base on your advertising interval and how much data you advertise also if you are a beacon only device or not.
    I would recommend you to take a look at our application report
    Measuring Bluetooth Low Energy Power Consumption
    http://ti.com/lit/pdf/swra478c

    In the application report, it covers how the BLE current profile show look like.
  • Thank you Christin. I have one last question. Regarding the application I wrote above, i think i should combine the pinInterrupt and simple peripheral projects. I went through the SimpleLink Academy trainings and discovered a lot of the subtle nuances involved in development.

    Also I have a doubt regarding the appropriate GATT profile.the sensor isn't directly connected to my device, but all it has is sensor value received from an MSP430 via UART.  Therefore the heart rate monitor wouldn't be appropriate. 

    Kindly help me with the above concerns.

    Best regards

    Shubhankar

  • Shubhankar - unless your device fits into one of the pre-existing GATT categories (i.e. heart rate monitor) you will have to write your own custom GATT profile. It is fairly fiddly but not difficult.

    Alternatively you can load the sensor value into the advertisement response data and pick that up on your phone application by using something like GAP_ADTYPE_MANUFACTURER_SPECIFIC to put into your scan response data. That way, you could read the information without making a connection but it isn't secure which may not matter for you.
  • Hi David

    The alternate approach sounds more appropriate. Would the beacon application be suitable for this? I looked into it and found the eddystone format suitable. my main constraint is low power because the receiver (mobile phone) will not be always available in the vicinity to get data.

    BR 

    SHubhankar

  • A beacon device will consume less current compared to a peripheral device. The average current consumption as stated before will depend on how frequent you want to broadcast your data and how much data you need to broadcast.

    We have a online tool for you to estimate your battery life. Please take a look at it.
    www.ti.com/.../power-calculator.page
    Also there will be an updated version of power calculator tool in excel format available for public soon.
  • I would think if you don't need to connect/query/change the parameters of your device and don't need a GATT interface, then you might be able to just use existing profiles for basic tasks(do you still need to do things like query the device to ask if it has enough battery?).

    The easiest way to save power is to simply advertise less i.e. once every 2 seconds or whatever. The less the radio is going the less power you will consume. I can't say I am familiar with the eddystone project, I would personally keep it as simple as you can but no simpler. Start with the beacon project as it's already doing 90% of what you want - once you work out the calls to put your custom data in the advertisement (which is fairly easy) the really hard bit is going to be getting your phone application to access the advertisement data.
  • Hi David and Christin

    The only eddyston project i came across in the cc2640r2 sdk was the micro eddystone beacon project which uses a scaled down version of the BLE stack. Would i be able to integrate the pinInterrupt project along with this since i need to wake up my controller to receive data from the MSP? 

    BR

  • I wouldn't start with the Eddystone project - it's too specific (and might be difficult to extend for broadcasting the information from your sensor).

    There used to be a simple beacon project, but it's not in the latest version of the resource explorer. I think I would start with simple peripheral instead.
  • Yes, you still can integrate pininterrupt with the eddystone beacon project.
  • Thank you for your help Christin and David!