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.

displaying lost connection

Other Parts Discussed in Thread: CC2540

Hi,

Using the SPPLE demo I'm able to connect to a CC2540 SensorBug from BLEHome but, is there a way to get some notification of a dropped connection?

Best regards,

Forrest Kimbriel

  • Hi,

    You should be getting a "etLE_Disconnection_Complete" event in your app.
    Are you not getting this?

    Regards,
    Gigi Joseph.
  • Hi,

    I initiate a connection but it quickly drops. This is what I see and I need to keep a stable connection until the client device falls out of range

     

    etLE_Coonection_Complete with size 18

    etGATT_Coonection_Device_Coonection with size 12

    etGATT_Connection_Device_Disconnection with size 10

    etLE_Disconnection_Complete with size 10

     

    For the client I'm using BLEHome's SensorBug which contains TI's CC2540 system-on-ship.

    If possible I would like to know why it is dropping out and how can I make it stable? Do I need to but a CC2540 directly from TI? If so how do I program it?

    Thanks for your time!

    Best regards,

    Forrest Kimbriel

  • Hi Forrest,

    Do you see this every time? I guess you can play with the connection parameters and see if it helps.
    The relevant parameters are:

    ConnectionParameters.Connection_Interval_Min = 50;
    ConnectionParameters.Connection_Interval_Max = 200;
    ConnectionParameters.Minimum_Connection_Length = 0;
    ConnectionParameters.Maximum_Connection_Length = 10000;
    ConnectionParameters.Slave_Latency = 0;
    ConnectionParameters.Supervision_Timeout = 20000;


    If you can share the air sniffer logs, it would help to identify why the connection is getting dropped. For any queries specific for CC2540 (programming, etc), you can post it on the CC2540 forum (e2e.ti.com/.../538).

    Regards,
    Gigi Joseph.
  • Hi Gigi,

    The following is what I see and it all happens in sequence in about 1 sec. I'm unable to start sniff mode because there is no connection on the port.

    SPP+LE>connectle ecfe7e10ad0f
    Connection Request successful.

    SPP+LE>
    etLE_Connection_Complete with size 18.
       Status:       0x00.
       Role:         Master.
       Address Type: Public.
       BD_ADDR:      0xECFE7E10AD0F.

    SPP+LE>
    etGATT_Connection_Device_Connection with size 12:
       Connection ID:   1.
       Connection Type: LE.
       Remote Device:   0xECFE7E10AD0F.
       Connection MTU:  23.

    SPP+LE>
    SPP+LE>
    etGATT_Connection_Device_Disconnection with size 10:
       Connection ID:   1.
       Connection Type: LE.
       Remote Device:   0xECFE7E10AD0F.

    SPP+LE>
    etLE_Disconnection_Complete with size 10.
       Status: 0x00.
       Reason: 0x13.
       BD_ADDR: 0xECFE7E10AD0F.

    Really, all I want to do is connect to 10 devices and flag an alarm when any or all the connections drop out. I might need to adjust the tx power level to adjust the range and create a log that will time stamp the device ID when it dropped out. Do you think the SPPLEDemo is the best one to use or is there another?

    Best regards,

    Forrest Kimbriel

  • Hi Forrest,

    Is it possible to get an air sniffer log.

    From the logs you have pasted above, it looks like the remote device (CC2540) is disconnecting. We need the sniffer logs to confirm. I think you can at the same time post this on the CC2540 forum as well.

    Regards,
    Gigi Joseph.
  • Btw, looking at your requirement and based on what I understood, I don't think SPPLEDemo is the best for you. You can take a look at: processors.wiki.ti.com/.../CC256x_MSP430_TI%E2%80%99s_Bluetooth_Stack_Basic_PXPDemo_APP

    Regards,
    Gigi Joseph.
  • Hi Gigi,

    I was able to establish a connection using the PXPDemo. Is it possible to save the connection information and reestablish the connection after a power cycle without using the PC?

    Best regards,
    Forrest Kimbriel
  • Hi Forrest,

    Yes, it is. You need to save the LTK and reuse it.
    Please check "DeviceInfoList" in the PXP demo.

    Regards,
    Gigi Joseph.
  • Hi Gigi,

    What is the LTK and how do I save it?

    Best regards,

    Forrest Kimbriel