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.

Android and Apple BLE Forum

Guru 22270 points
Other Parts Discussed in Thread: CC2540

Is it possible to set up an new forum that deals specifically with Android and/or Apple hardware?

I think most people are really interested in using the CC2540 BLE for cell phone and tablet interfacing.

Unless I'm the only one, but the only reason I purchased the CC2540 was to be able to connect to a cell phone or the iPad.

Information on how to do this is hard to find and useful examples are non existent.

Perhaps most people are using the BLE for Heart rate monitors and thermometers, but I want to be able to use it for plan old control, automation and datalogging.  The low energy aspect of it really isn't that important.  The CC2540 is an inexpensive way to get connectivity with a multitude of Bluetooth devices.  My main goal was to use it as a gateway between a Zigbee network that is doing the automation and controls and the PC, cell phone or tablet.  Being able to walk into a factory and check the stats, data or make adjustments to the system on your cell phone, or allowing a customer to see their production in real time on their cell phone or tablet is an incredible selling feature. (I've sold a system that I can't develope yet because of the insane learing curve for BLE!)

It would be nice to have working examples like the Zigbee controllers (light switch control, simple communications, etc).  It is easy to see the parallels between Bluetooth and Zigbee for many applications.  For those getting started, more help, more code and more explanations are required.

Get some of the Stellaris people to do the documentation. 

Not to insult any of the Ti staff, but the Stellaris techs are by far the best in writing understandable documentation for their products. The coding and commenting of the software examples is in a class of its own.  Unfortunately, the Stellaris Cortex-M3 was my first Ti microcontroller experience.  I became accustomed to having useful examples that you could read through and understand completely.  Modifying the example code was very easy because it was so well documented.  All this reduced the learning curve from months to days.

From all this, perhaps someone could write a book on the CC2540.

Not one book exist on the interfacing, programming the CC2540 and any device!  Sure the technology is new, but everyone getting started has done a search for a CC2540 book and the results come up empty.  Ti should publish a book that has useful examples with simple, straight forward explanations.  If Ti or anyone else could write a book on the CC2540 similar to the  "The Final Word on the 8051" by Matthew Chapman 1994, it would be great!

If I have made any invalid comments, please let me know.

Thanks,

  • greenja, I am Interested in the same thing ...

    I am an Instrument Tech / Electrician and have been working with Cellular device's for the last year to Interface to Industrial Controls. I downloaded a Low Power Bluetooth "Deep Dive" from a University in San Diego, read the whole thing in a day and was Very confused afterward :>)

    I am using the 2540 with my iPhone 4S and would like to just start out by Interfacing the KeyFob unit in the mini-kit to a Opto-Coupler or (Transistor ) to turn on a Remote switch. I have delved into iPhone programming as well so I am facing a Hugh learning curve ! 

    I'm with you ( A good example goes a long way) I don't consider myself a programmer but can bang my Head against the wall a couple times and manage to get things working :>)

    Maybe we can help each other, if you would like to converse you can also e-mail me at johnloganmail@aol.com

    JMLStamp2p

  • Hello JMLStamp2p,

    It's good to know I'm not the only one!

    I think the biggest hurdle is the fact that most programmers/techs/engineers are use to using PC based IDEs for developing embedded controls.  Having to learn/buy Apple and Android products and development software is a huge expense, in terms of time and money.

    I have also read most of the materials out there on BLE, twice!  It is slowly starting to make sense.  However, going through the Ti BLE software leads to more confusion.

    I found these Bluetooth videos to be helpful.  There was also another posting on this forum that had some useful information that included a flow chart.

    Starting to develop a BLE device and learning how to create an Apple app at the same time is very difficult.  But, in the next year, when the iPad3 and iPhone 4S extended warantees run out, I think you will start to see more third party apps being developed.  This is because you will no longer need to be bound by Apple and can jailbreak your device.

    I will be posting some code in the next few days on the CC2540 that goes through the how BLE works (at least in my mind).  It is one file so you don't have to be looking all over the place to see what the program is doing.  It should be helpful.  I'm going to have to bite the bullet and pay the $99 to Apple to become a developer.  I can't invest in a mac right now, so I'll have to get some software for the PC. 

    The DragonFireSDK seems like the best program to use since it allows for programming in C/C++ with Visual Studio.  I am waiting for a reply from them about their support for BLE.

  • Let's share with the entire community.

  • Hello greenja, I apologize for taking so long to reply. I will be getting married within the next few weeks so things are kinda busy right now! I have been able to deploy my apps to my iPhone through xCode version 4.3.2 successfully. I have designed a few icons to go with the app and have been able to attach sound files to the Button clicked events. I am Brand new to Apple programming so I won't be a lot of help like the others here on the Forum. I will do anything that I can to Help if I can, not sure about submitting an app containing the Bluetooth code that "TI" submitted in their example. I don't mind doing that as long as I have their permission or it is (Truly) open source, it seems as though someone on their staff would have already done that ??? Also, don't know if Apple will allow you to submit an app just for testing Hardware ...

    I will be Glad to submit my Apple Code to you if you like but tou can probably get the same thing off of YouTube :>)

    John.

  • Congratulations!

    A Mac is on its way!  The Mac Pro, Mac Air and Mac Mini support BLE 4.0.  The Mac Mini is the cheapest of the three.

    I don't have a choice really if I  want to write apps to interface with the CC2540 and Apple products. 

    I still haven't been given a valid reason, legal or otherwise, why the TI-BLE-DEMO can,t be put in the app store.  Perhaps someone has tried and it was rejected.

  • Well actually the Motorola RAZR had BLE just after the Iphone 4s, but yes it's a shame being in the board of directors Microsoft, Intel, Nokia and Ericsson haven't widely adopted the technology yet. 

    There's also Samsumg Galaxy S3 supporting BLE so I guess from now on every smartphone would support it, altough it's been 2 years since the standard released.

    In the Motorola dev. there's some documentation on how to work with the BLE stack in the phone.... not as bulky as the one in apple dev. but you know (*whispers* it's for free)

  • A quick way to dive in and start learning BLE at the basic GATT level is to get techBASIC for iOS and, for example, the TI SensorTag. I used this combination, and an iPad, to do a lot of my original BLE research. The main advantage here is a fairly simple language with full BLE support that lives entirely on the iPad. You write the code on the iPad, you debug it on the iPad, you run it on the iPad. (You'll probably want a Bluetooth [classic] keyboard for all that.)

    I've created a multi-beacon, RSSI-based indoor location program using it and a half dozen Estimote devices. Well, it's a work in progress. :)

    If iOS development is foreign to you, techBasic might be a good way to get your feet wet.

  • A few comments:

    1. The Final Word on the 8051appears to have moved to a new URL:

    <a href="http://www.stcmcu.com/mcu-book/THE_FINAL_WORD_ON_THE_8051.pdf">here</a> .

    2. If you're trying to develop a BLE application that will use Android as one of its ends, then right now, you're going to have a tough time. As far as I know, there aren't ANY feature-complete, reasonably bug-free Android implementations of BLE. The Google BlueDroid stack (available on the latest Android build) is pretty good but still seems to have a lot of areas to be implemented and many of the earlier stacks work very badly when they work at all. You'll notice that most vendors of BLE devices (Nest Protect, Kwikset, Wahoo, etc.) disclaim any support on Android right now.

    3. Like the original poster, I'd welcome a comprehensive book describing how to implement using the TI chips and stack. The documentation right now is incomplete and very scattered; you have to simultaneously read all of it including the source code and none of it lays out "the big picture" for any of the critical feature areas.