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.

Beginners issues CC2540 mini kit

Other Parts Discussed in Thread: CC2540

Hi

I'm totally new in using this CC2540 mini kit(dongle and keyfob).

I'm aiming to use this in my Bachelor project as a serial BT-LE link, so i need to connect the keyfob to an external µcontroller(AVR 8-bit) via UART. the keyfob the need to transmit the recieved data from UART via BT to the dongle where the data then can bee read using Btool, terminal or something like that..

I cant really seem to find out how to start this and if there is a demo application i can modify to my use. I do not need to og have the time to learn all of the Bluetooth features and such, just need a Low-Energy link to demonstrate a concept(embedded platform communication with smartdevices).

Anybody able to give som pointers or perhaps link me to what i need, which firmwares needed in fob and dongle, and so on...?

Thanks in adavance

Michael

  • Install BLE-STACK and there are lots of exampled after your installation. You can start from SimpleBLEPeripheral and add UART support on it accordingly.

  • Hello Michael,

    You would be better off to eliminate the AVR.  If you are in a hurry to create your link, then just use the KeyFob demo and write your code in there.  The KeyFob is already an embedded platform.  You have access to Port Pins for timers and ADC.

    In the KeyFobDemo.c just put your code in the following KeyFobApp_ProcessEvent function section.  All you will have to do is change the BATTERY_CHECK_PERIOD interval to something smaller.

      if ( events & KFD_BATTERY_CHECK_EVT )
      {
        // Restart timer
        if ( BATTERY_CHECK_PERIOD )
        {
          osal_start_timerEx( keyfobapp_TaskID, KFD_BATTERY_CHECK_EVT, BATTERY_CHECK_PERIOD );
        }

        // perform battery level check
        Batt_MeasLevel( ); // ---- remove if you like, or modify the function to read another ADC channel

       // Call your routine here...

        return (events ^ KFD_BATTERY_CHECK_EVT);
      }

    On the dongle side, if you are familiar with C#, download the HealthDemoGUI and modify it to read the parameters you put in your routine.  You will have to look through the code on both sides and substitute the thermometer reading for whatever reading you are making.

    There is really no quick way to understand BLE, the BLE Stack and all the code.  You will be in for a tough time if you don't go through the keyfob example and understand it.  It will probably take a few more reads through the documentation you have to understand what is going on.

    Visit the www.bluetooth.org site and download the QuickStartKit version 2.  It will may formalize your understanding of the literature you already read.

    http://developer.bluetooth.org/DevelopmentResources/Pages/Quick-Start-Kit.aspx

    Also, reading through this post might help. http://e2e.ti.com/support/low_power_rf/f/538/p/259987/909377.aspx#909377

    Good Luck,

  • Thanks a lot, i will look into your suggenstion.

    I know that the entire BLE is a HUGE undertaking to understand completely and i have no intention of trying to do that in the time i have avaiable, so i will only need to undertand the very basics of Bluetooth and roughly how BLE is different.

    I know the cc2540 is a complete embedded setup but since i'm using the AVR for other different things i will need that to be my primary µcontroller(also this platform i have the most experience in using so its the safe choice mor my bachelor thesis, dont want to spend to much time familiarizing my self with multiple new platforms and IDE's).So thats why i need this kit to "simply" provide me with a Low-Energy serial connection...

    but i will look into you suggestions and report back with progress.