Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8452533
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T11:31:28+00:00 2026-06-10T11:31:28+00:00

I am working on a Bluetooth LE application for iOS. I am using the

  • 0

I am working on a Bluetooth LE application for iOS. I am using the Core Bluetooth framework within iOS to handle all communications.

Question & Description:

When I use a single tag, despite numerous connections and disconnections, the single tag connects seamlessly and the phone discovers it services.

Also, when multiple Bluetooth LE tags connect for the first time, they connect seamlessly and the phone discovers their services.

When the tags get disconnected and then reconnect to the phone, the tags connect fine. But one of the two tags (either one) does not seem to advertise its services. i.e when the app is open and the tag reconnects, the DiscoverServices method does not call the didDiscoverServices delegate.

Why is this happening only when connection with multiple devices takes place.

I have set the peripheral.delegate correctly. I have tried everything, including doing repeated re-connect, repeated DiscoverServices calls to the tag. Nothing seems to work.

How can I re-connect to multiple tags to the phone and still discover all services.

Please help

Thanks,
Manju

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T11:31:30+00:00Added an answer on June 10, 2026 at 11:31 am

    Turns out that there was command I was issuing to the device in the”didDiscovercharacteristicsForService” delegate method which was causing the connection instability.

    If you are facing similar issues, I suggest you to let the delegate method complete without any intervention (of any kind) and pass the CBPeripheral to another function designed by you to pass any values / issue a command to the devices.

    Thanks anyway Wilhemsen.

    So the steps are as follows..
    1> Search for Tag,
    2> If in range, CONNECT to Tag
    3> If Connected, call DISCOVER services method (do not interrupt)
    4> IN DidDiscoverServices, call DISCOVER Characteristics Method
    ..
    In DidDiscoverCharacteristics Method, wait until all Characteristics are discovered..
    Then , at the end, call a function in your code that will do the necessary setup..
    …
    Code Sample

    -(void)peripheral:(CBPeripheral *)peripheral didDiscoverServices:(NSError *)error
    {
    
        for (int i=0; i < peripheral.services.count; i++) {
            CBService *s = [peripheral.services objectAtIndex:i];
            printf("Fetching characteristics for service with UUID : %s\r\n",[self CBUUIDToString:s.UUID]);
            [peripheral discoverCharacteristics:nil forService:s];
        }
    
    }
    
    
    - (void)peripheral:(CBPeripheral *)peripheral didDiscoverCharacteristicsForService:(CBService *)service error:(NSError *)error
    {        
        if (!error)
        {
            CBService *s = [peripheral.services objectAtIndex:(peripheral.services.count - 1)];
            if([self compareCBUUID:service.UUID UUID2:s.UUID])
            {
               // This is when the **Tag** is completely connected to the Phone and is in a mode where it can accept Instructions from Device well.
    
                printf("Finished discovering characteristics");
               // Now Do the Setup of the Tag
                [self setupPeripheralForUse:peripheral];
    
            }
        }
    
        else
        {
            printf("Characteristic discorvery unsuccessfull !\r\n");
        }
    }
    
    -(void) setupPeripheralForUse:(CBPeripheral *)peripheral
    {
    
        // DO all your setup in this function. Separate Perpiheral Setup from the process that synchronizes the tag and the phone. 
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I got the bluetooth low energy Heart Rate Monitor working using corebluetooth.framework on IOS
I am working on an iOS core Bluetooth application, I am able to connect
i am working on making bluetooth application which makes use of bluetooth api. i
I am currently working on an android application which requires reading data from bluetooth
I'm working on an app using Bluetooth discovery pretty heavily (some detail here ).
I am working on an appliction that requires bluetooth connectivity, which i use GameKit
I made an application that is using Android SDK 2.1. This application uses bluetooth
I am working with bluetooth application. After running the app two bluetooth enabled devices
I am working with the Android Bluetooth Chat sample application. I am trying to
I've written Client Server application for Android mobile and PC using bluetooth connectivity, in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.