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.

How to reconnect to iphone use BT2.1 bluestack

Other Parts Discussed in Thread: CC2564

Dear StoneStreet:

We transplant CC256x STM32 Bluetopia SDK to EFM32GG395 platform , now we add SPPLEDemo and HFPDemo and AUDDemo profiles to project ,

and they can work , the iphone can search it's advertise and connect it (BT2.1) , but when their blue disconnect , the iphone don't reconnect device , so

we want to it also audo reconnect when their blue disconnect , What should I do in project ?

Thanks !

  • Hi,

    Can you please clarify? Do you want the CC256x device to reconnect to the iPhone? If so, then you can add the reconnect logic when you receive the disconnect indication (etDisconnection_Complete_Event/etLE_Disconnection_Complete) or during the profile disconnection.

    Regards,
    Gigi Joseph.
  • Thanks for you answer ,
    Yes , I want the CC256x device to reconnect to the iphone , I find the etDisconnection_Complete_Event , but how can I add the reconnect logic ?
    What is the reconnect logic interface or function ? example for SPPDemo or HFPDemo or AUDDemo profile (they all as device role) , what should I do ?
  • Dear Gigi Joseph,
    We used the SPPLEDemo sample of the STM3240G-EVAL platform, and Porting code on the efm32GG395 platform,
    We are implement auto reconnect logic when the Bluetooth low energy device disconnect,
    But we want to implement auto reconnect when the Classic Bluetooth device disconnect.
    Thanks
  • Hi,

    There are no specific APIs for reconnecting. It is the same connect APIs.
    Like I mentioned earlier, you can have this connect logic during profile disconnection as well. But please bear in mind that the connect will timeout (LSTO, usually 5 seconds) if the remote device is switched off or out of range.

    Regards,
    Gigi Joseph.
  • the question of CC2564 reconnect :
    Now , we add SPPLEDemo HFPDemo and AUDDemo profile to project , they can work , Connection process is as follows :
    First , we enter the iphone bluetooth system settings , and we can manually connect abluetooth device , as follow we manually connect the "K3_Watch(Classic)" device.
    Then connect finish as follow:
    Now , we close iphone bluetooth , and then open iphone bluetooth , 
    buf  the iphone don't reconnect the "K3_Watch(Classic)" device , as follows :
    So , we want the iphone can auto reconnect the "K3_Watch(Classic)" device when the bluetooth disconnect , what should I do ?
    And , in AUDDemo , when the bluetooth disconnect , I call AUD_Open_Remote_Control  function , then it can connect iphone , and after a little time (maybe 5S) the iphone can auto connect the HFPDemo successful , then the device also can dial call and answer call and so on .  We use this way do it reconnect the iphone , but is the way all right ? And , if we use this way , we must query call AUD_Open_Remote_Control function when bluetooth  disconnect , and the query time interval is 6S ,  so the electric current is very much high (in AUD Open Remote it at 25mA !!!) , as follows :
    So , the problem is :
    1. we want to know how the bluetooth auto reconnect , is it by iphone auto connect device or by  device  call some function connect iphone ?  
    2. how can we reduce the power consumption when  we call AUD_Open_Remote_Control function ?
      
  • Hi,feng
    maybe i can solve your problem, just sent a email to me and ill discuss with my engineers about your problem,thanks,
    chambers.wu@wi-linktech.com
    +86 18217175213
  • Hi ,
    I want to know the following questions :
    1.What's the classic bluetooth reconnect , is it by phone active connected the device , or the device active connected the phone ?
    2. If it's reconnected by phone , what can I set the advertise data in device program (or others)?
    3. If it's reconnected by device , what's the reconnect interface function in device program ?
    thanks !
  • Feng,

    1. Classic Bluetooth auto-reconnect is a feature of a Bluetooth end product, it's not a feature of the Bluetooth protocol. The end product device needs to initiate a connection to the phone to implement auto-reconnection.

    2. Advertising is a procedure in Bluetooth Low Energy, it is not related to Classic Bluetooth. When thinking about connections in Classic Bluetooth and Bluetooth Low Energy, it's best to think of each connection as if it were to a completely separate device, even if the Remote Device's Bluetooth Address (BD_ADDR) is the same. In general, the 2 connections don't know anything about each other and aren't related.

    3. You have to reconnect each profile. To reconnect the Hands-Free Profile use the HFRE_Open_Remote_Audio_Gateway_Port() function. To reconnect the A2DP profile use the AUD_Open_Remote_Stream() function.

    4. You mentioned that you saw high power consumption when trying to reconnect. This is true and you will see this when initiating a Classic Bluetooth connection. When trying reconnect using Classic Bluetooth I recommend to increase the time between attempts as much as possible in order to not waste energy. If the device is not within proximity the connection attempt will timeout after about 5 seconds.

    Thanks,
    Samuel