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.

CC2640: CC2640 BLE stack question, Link Layer

Part Number: CC2640

Hi,

I have a CC2640 peripheral device we've been using for several years.  We've had no trouble with it until lately, when we started working with a different BLE client device.  This new BLE client is not under development, it's an Android device for sale, and it is failing to connect to our peripheral even though we are able to connect with other Android clients with different Android system versions.  When the connection with this new client fails, our TI device gets no callback notification at the APP level, as if the request never comes in.  With the devices that do connect, of course our device does get notified.

So, my question is, could the connection request be actually coming in to our device and then somehow be rejected at a lower level of the BLE stack, maybe as low as the Link Level?  More specifically, is there a way I can look at the Link Level to see if the connection request is coming in there?  It's hard to know which message queue to look at.

This device is several years old, so the BLE stack on it is 2.2, and that stack is up to the BLE 4.2 spec.

Thanks.

  • Hi,

    Thank you for reaching out. My apologies for the delay. Can you share the SDK version you are using? Do you have access to a Bluetooth LE sniffer? If so, then could you take a sniffer log showing the behavior to see what may be happening over the air? Which Android device are you using and what version of Android (version and build) is being used?

    Best Regards,

    Jan

  • Hi Jan,

    No apology necessary.  When I first posted the question I was trying to decide on the way to most definitely identify my problem, hence the question about trapping it at the BLE Link Level of the TI stack.  Since I posted the question, though, I did use a USB BLE sniffer, and it looks like the problem is on the Android side.  I'm 99.9% sure that's where the problem is, but 99.9 isn't as good as 100%.  I'm interacting with some who are looking at the Android code.

    The BLE SDK is 2.2.1.18, because that is what was used for the production model of the 2640 device.  The two Android devices under test that I am having no trouble at all with are phones, one running Android 16 and the other Android 6.0.  The client that is failing to connect is an Android watch running WearOS 6.0.

    I'm not sure at this point if I'll need to go back to the TI Link Level code--it depends on what I hear from the others with whom I'm working, but in case I need to it would be nice to know, if convenient, which message stack to look at to find the first appearance at the Link Level of a connect request from a central device.

    Thanks for your reply,

    Mike

  • Hey Mike,

    Great observations! Issues like these tend to arise in newer BLE devices that overlook older BLE specs and aren't always backwards compatible.

    From the link layer perspective, the very first message exposed will be the GAP_LINK_ESTABLISHED_EVENT, since connection establishment is completely handled in the controller, which is not exposed.

    I hope this helps!

    Best Regards,

    Tarek D

  • Hey Tarek,

    Thanks for the feedback.  GAP_LINK_ESTABLISHED_EVENT is the message my app receives once a connection is made with the central device initiating it.  If that is the first message passed up to the Link Layer from the controller, and if the Link Layer immediately passes it up to the app, then I think that answers my question.

    What I was wondering was if a connection could be made and then terminated for some reason (timeouts?) at the Link Level before my app got a notification of a successful connect, but I guess that isn't what is going on.  And I think if something like that was the main reason for a central having a problem connecting to my peripheral, then I would see symptoms of a "quick connect/terminate" with the BLE sniffer, and I'm not seeing that.  All I know at this time is that a WearOS device won't connect most of the time to my peripheral (it did twice out of dozens of tries), and two Android phones with different Android versions will always connect.

    If I get any definitive answers, I'll be sure to post them.

    Best Regards,

    Mike