

This will make sure that all the support files are in the right places before we start making our own changes.įor our basic hello world application we only need to make a few changes in the file simpleBLEBroadcaster.c. That way you will be able to reference the original project if you get into trouble.īefore we start editing the code, compile it and verify that it compiles. Copy the SimpleBLEBroadcaster example into the same directory with a different name, e.g.Put the whole directory with all the projects and common code into some type of source control because you will be editing more than just the source code for the individual projects.Before we start editing the source code I have two suggestions: We are lucky that someone else has already figured out how to modify the SimpleBLEBroadcaster example to broadcast iBeacons. At the time of this writing there is a slightly newer version of Embedded Workbench, but version 8.20.2 is what the TI BLE stack v1.4.0 was tested with, so that is what we will use. We are using the TI BLE stack, version 1.4.0 in this example, with IAR Embedded Workbench for the 8051, version 8.20.2.
We’re working with the actual chip firmware today. Your other option is to load the “network processor” firmware on the chip and talk to it via UART from another device. You can get a 30 day eval for it to try at least. There has been much grousing about this in person, over the support lines and in various forums, but IAR is all you have, with its almost $4k price tag. You can use whatever compiler you want as long as it is IAR Embedded Workbench. When using the CC2541DK-MINI, make sure you have an extra CR2032 battery available, as the one provided with the kit is probably depleted. Luckily my Nexus 7 has BLE and there is a handy iBeacon Locate app for Android that allows me to see the beacons and their payload. A slight irony with this project is that I’m not an Apple developer or iWhatever person, so I don’t have Apple hardware to test this on. The USB dongle will be useful later for sniffing the packets and doing low level validation of what and when we are transmitting. I suggest this kit for two reasons, first it comes with the CC Debugger and it also comes with the CC2540 USB dongle. I did my initial testing with the CC2541DK-MINI. For those not familiar, an iBeacon uses a Low Energy Bluetooth (BLE) advertisement to tell devices, “you are here.” I chose the TI CC2541 for the project because it is very integrated (low external part count) and the power draw is low. I’ve been working on a new project that involves the creation of an iBeacon.
