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.

Beginner : Building a beacon using CC2540

Other Parts Discussed in Thread: CC2540, CC2541-POSTAGE-STAMP-RD, SENSORTAG-SW

Firstly, I would like to mention that this is my FIRST hardware project. I program in C and Java and develop web, android and Web applications. Please post answers that will help a beginner.

 I want to develop a coin sized BLE beacon and for that the size(and cost) of a CC2540 is impressive. I read a tutorial that uses a CC2540 Mini Development Kit to use . I would like build my own PERIPHERAL using a CC2540. How do I begin ?  is there a standard that I can follow to build a COIN SIZED peripheral ?

  • We actually have a postage stamp reference design here: http://www.ti.com/tool/CC2541-POSTAGE-STAMP-RD

    It contains a schematic,bom,layout files,etc.so that might be useful for you to check out for your HW design.

    For SW you should download our BLE Stack, http://www.ti.com/tool/ble-stack?DCMP=wbu-blestack&HQS=blestack, and within that download you will find a simpleBLEPeripheral project that will give you a good starting app/framework for developing your peripheral application. Note that the provided library and projects files are provided only for IAR EW 8051.

    -Matt

    edit: If you are developing a device that will only advertise and will not connect (which may be what you refer to with the word beacon) then take a look at the simpleBLEBroadcaster project. It'll be smaller and less complex since it only includes functionality for advertising.

  • It is a great reference. Something I still do not understand is, how do I get the necessary information (UUID, Major and Minor values) to the chip ? In the Developer's Tool Kit, the chip is permanently (A guess) fixed to the  "keyfob". How to get the information to the chip ?

  • If you look at the keyfob you'll notice there are two headers. One says "debug". Via that header, more specifically the debug data (pin P2_1) and debug clock (pin P2_2), you load new firmware to the board. This allows you to reprogram and also debug from IAR.

    You can use a CC Debugger (http://www.ti.com/tool/cc-debugger) to connect that header to your computer. You can flash the board using a couple different PC utils. Either from IAR or you can use the SmartRF Flash Programmer (http://www.ti.com/tool/flash-programmer) to load compiled .hex files on to the board.

    -Matt

  • Is there an interface using which I can program the chip after after it has been placed on the balun (  Johanson Chip balun(2450BM15A0002)  as mentioned in http://www.ti.com/tool/CC2541-POSTAGE-STAMP-RD ) ? If I'm very likely to change the UUID, Major and Minor values periodically after it has been placed on a balun, is it possible do so ?

  • The balun will only be connected to the RF_P and RF_N pins. As long as you have access to the debug pins (p2_1 and p2_2) on your board then you will be able to reprogram the device (using the CC Debugger) with any firmware you want.  

    If you want to change the major, minor, UUID values in the field (meaning you don't want to flash new firmware on the board using the debug pins) there are a few ways to do this. The easiest is probably to just have two different modes that the device operates in. The actual beacon mode where it broadcasts the values you set and an update mode where you can form a connection to the device and write new characteristics to it. You can switch between modes using a button or some other user input.

    You should look at our example firmware here as it does something similar (http://processors.wiki.ti.com/index.php/SensorTag_with_iBeacon). Note to get the actual firmware you have to go through some licensing steps first.

    -Matt

  • Matt,


    Two queries now.

    In the postage reference design schematic (http://www.ti.com/lit/df/tidr203a/tidr203a.pdf),  to what pin should I need to connect TPVDD ( to the left of the inductor with model number BLM15HG102SN1) ? If need not be connected to any pin, the circuit is open and how does it affect the design ?

    This firmware is exactly what I need. I would to like know more about the licensing steps and purchasing process. Also, with what permission should I use the code you have provided, if I want to design my own application in iOS and Android to do the same operations ?
     

  • TPVDD isn't connected to any pins on the board, it represents a test point. You'll see a few other "TP" connections in the schematicand they're put in place to represent which pins you will bring out or give access to on your board. If you look at the layout file (http://www.ti.com/lit/df/tidc154a/tidc154a.pdf) or just the picture you'll see a group of through hole vias on the perimeter of the board. Those are the test point connections and one of them is TPVDD.

    In order to get access to the iBeacon firmware that TI provides you'll have to follow the instructions on that wiki (you'll find them in the first paragraph of the "introduction" section). You'll have to sign up for an iBeacon license through the MFi program (there is an Apple MFi Program link in the wiki) and then you can request our firmware at the sensorTag SW page (http://www.ti.com/tool/sensortag-sw). I think there are also US government export restrictions as well but if you click the "request" link in the above link it will take you to a page that gives you more info about restrictions.

    I'm not sure I understand your last sentence. The iBeacon firmware we provide is for our CC254x devices and not for iOS. Either way any source code provided from TI should come with an end users license agreement (sometimes you'll just see EULA) which should provide you all of our licensing information for that product.

    -Matt

  • I was asking about the android and iOS app code available at http://www.ti.com/tool/sensortag-sw . I want to provide the same functionalities with a different ui/ux. Am I free to edit the code to customize it ?

  • Sorry about the confusion, you are free to modify the source code for both the android and iOS apps we provide.  

    -Matt