• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » Low Power RF & Wireless Connectivity » Low Power RF Bluetooth® Low Energy & ANT Forum » iPhone 4S Sample Project - Connects and interacts with the CC2540 keyfob
Share
Low Power RF & Wireless Connectivity
  • Forums
  • Announcements
  • Files
  • E2E Wiki
Options
  • Subscribe via RSS

Forums

iPhone 4S Sample Project - Connects and interacts with the CC2540 keyfob

  • Joakim Lindh
    Posted by Joakim Lindh
    on Nov 02 2011 06:48 AM
    Genius13370 points

     

    Hi all,

    We have a new sample project, IPhone4SBLEDemo,  which can connect and interact with our CC2540 keyfob. This is an iOS project and source code can be downloaded from the Texas Instruments Wiki;

    http://processors.wiki.ti.com/index.php/Category:IPhone4SBLEDemo

    The Application interacts with the CC2540 keyfob and can,

    • Connects to keyfob
    • Shows live accelerometer data
    • Shows live battery level data
    • Shows live button data
    • Can sound buzzer when button is pressed

    This is a first demo and we have not fully tested it, we just simply want to get you going as soon as possible.

    Note that you would need to join the iOS Developer Program in order to build and download the App to your iPhone 4S. 

    Thanks and good luck

     

    2540 BLE iPhone 4S BLE Demo keyfob Low Power Bluetooth mobile phone
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Sasha Kalmanovich
    Posted by Sasha Kalmanovich
    on Nov 03 2011 01:22 AM
    Intellectual815 points

    Thanks !

    This is very usefull.

    I have a few questions about the iPhone side :

    1. Where is the command to start scanning for devices issued ?

    2. Where you define the desired connection parameters (connection interval, slave latency, supervision timeout) for the master (which is the iPhone) ?

    Thanks.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Joakim Lindh
    Posted by Joakim Lindh
    on Nov 03 2011 02:45 AM
    Genius13370 points

    Hi Sasha,

    In the TIBLECBKeyfob.m you will find the answer for your first question. The scanning is initiated with scanForPeripheralsWithServices. The second question is a really good one ,unfortunately I dont have the answer. I believe we use some kind of default value for the connection parameters.

    Please feel free to correct me or find an answer :)

    BR

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Oded Globerman
    Posted by Oded Globerman
    on Nov 09 2011 07:15 AM
    Prodigy10 points

    Dear Nick,

     

    1. I can"t download the demo.zip. Is there problem with it

    2. Does the 4S support BLE (from the OS side not the HW) or do you run the BLE stock in the app?

     

    Regards

    Oded 

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Joakim Lindh
    Posted by Joakim Lindh
    on Nov 09 2011 07:25 AM
    Genius13370 points

    Hi Oded,

    Oded Globerman
    I can"t download the demo.zip. Is there problem with it

    Should work fine, just verified it.

    Oded Globerman
    Does the 4S support BLE (from the OS side not the HW) or do you run the BLE stock in the app?

    There is an API (Core Bluetooth) for basic stuff such as scan, connect and exchange data (GATT).

    BR

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • jie liu36614
    Posted by jie liu36614
    on Nov 14 2011 02:04 AM
    Prodigy210 points

    have you guys tried that if the screen is locked or the application is not in the forground could a BLE still send data to the iphone? if I want to design something that keep transmitting discret data to iphone4s through BLE, the application that receives the data must be always alive. But as far as I know you can't do that by classic Bluetooth on iPhone since there is no background task in iOS unless you declear your device to be four kinds of application such as musci playing to geo related. I am not sure if Apple has changed that in iOS5 yet.

    iOS5 BLE background
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Joakim Lindh
    Posted by Joakim Lindh
    on Nov 14 2011 02:17 AM
    Genius13370 points

    Hi Jie,

    I am pretty sure that BLE data can be received when the application runs in the background. What I can tell you for sure is that, when application is running in the background or screen is locked, the application notifies the user if something has changed (for example BLE data has been recieved). So that could prove the theory :) But we haven't done any long term testing on this... yet.

    BR 

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • jie liu36614
    Posted by jie liu36614
    on Nov 14 2011 07:39 AM
    Prodigy210 points

    thank you very much! by "application" do you mean the demo application showned in the video?

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • jie liu36614
    Posted by jie liu36614
    on Nov 14 2011 08:22 AM
    Prodigy210 points

    How could a device invoke the proper application which is associated with it? In the demo video the last part shows that the device is asking the phone to run the helloworld application. I know that it is possible to do it through classic bluetooth by using wirelessiAP. But there seems to be no mention of it in the coreBluetooth about this function. Is BLE also part of Accessory framework of iOS?

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Joakim Lindh
    Posted by Joakim Lindh
    on Nov 14 2011 08:50 AM
    Genius13370 points

    Hi Jie,

    jie liu36614
    the device is asking the phone to run the helloworld application

    No, the device is already running in the background :) The iOS application has simply been "minimized" and the screen locked before we send BLE data.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Matthew Brown81533
    Posted by Matthew Brown81533
    on Nov 17 2011 21:11 PM
    Prodigy40 points

    Does any body know if there any theoretical limitations to the number of BLE devices that can be paired with the CoreBluetooth.framework ?

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Tony Siu
    Posted by Tony Siu
    on Nov 21 2011 20:40 PM
    Intellectual520 points

    Dear Sir,

     

    Does it mean that just the IOS development licence is enough for using this demo?

     

    Regards,

     

    Tony

    cc2540 ios iphone
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Joakim Lindh
    Posted by Joakim Lindh
    on Nov 22 2011 01:43 AM
    Genius13370 points

    Hi Tony,

    Tony Siu
    Does it mean that just the IOS development licence is enough for using this demo?

    Yes, and the hardware of course (iPhone 4S and CC2540DK-MINI)

    BR

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Amit Sherman
    Posted by Amit Sherman
    on Nov 22 2011 02:38 AM
    Prodigy20 points

    Dear sir

    1. Does using BLE requires Apple chip on the board, like it used to be with the former bluetooth solution? (connecting iPhone to a bluetooth device, required an apple chip added to the chipset, as well as being a member in the MFI (made for iPod programm).

    2. Does using BLE requires MFI membership (or only apple developer)

    3. Is it possible that BLE event will "wake up" the application (bring it to forground) or at least will enable some background process (like navigation apps)? (I saw it was asked, but didn't see a confirmed answer)

     

    Thanks a lot

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • kazola
    Posted by kazola
    on Nov 22 2011 05:49 AM
    Guru10665 points

    Hi Amit,

    the answer to your question is in:

    http://e2e.ti.com/support/low_power_rf/f/538/t/148268.aspx

    Please, do not post the same thing in two places :) And please press the "verify" button in the answer Nick has given you in the other post in order to other people can learn of your experience.



    Please click the     Verify Answer     button on a post if it answers your question! :)

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
123
TI E2E™ Community
  • Support Forums
  • Blogs
  • Videos
  • Groups
  • Site Support & Feedback
  • Settings
TI E2E™ Community Groups
  • TI University Program
  • Make the Switch
  • Microcontroller Projects
  • Motor Drive & Control
Other Communities
  • Deyisupport
  • Designsomething.org
  • beagleboard.org
  • TI on Element 14
  • TI on TechXchangeSM
Other Technical & Support Resources
  • WEBENCH® Design Center
  • Product Information Centers
  • Technical Documents
  • TI Design Network
  • TI Technical Articles
  • TI Training

All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
embedded processors, along with software, tools and the industry’s largest sales/support staff.

© Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy Policy | Terms of Use