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: Problems connecting via BLE when certain services are added

Part Number: CC2640

Hello,

I'm working on a custom device with the CC2640 - µC.

So far I added 3 services to the projectzero and everything works out fine. But when I add a new service and try to connect with the BLE - Scanner it gets stuck in the procedur
"discovering services". 
Somehow if I combine certain services it works, other combinations won't.

That looks like this:

These two combinations works:

// Add services to GATT server and give ID of this task for Indication acks.
//LedService_AddService( selfEntity );
//ButtonService_AddService( selfEntity );
//DataService_AddService( selfEntity );
Status_Service_AddService();
SystemState_Service_AddService();
Mode_Service_AddService();
//Test_service_AddService();
Led_serviceCC_AddService();

and

// Add services to GATT server and give ID of this task for Indication acks.
LedService_AddService( selfEntity );
ButtonService_AddService( selfEntity );
DataService_AddService( selfEntity );
Status_Service_AddService();
SystemState_Service_AddService();
Mode_Service_AddService();
//Test_service_AddService();
//Led_serviceCC_AddService();

Whereas this one for example doesn't:

// Add services to GATT server and give ID of this task for Indication acks.
//LedService_AddService( selfEntity );
//ButtonService_AddService( selfEntity );
//DataService_AddService( selfEntity );
Status_Service_AddService();
SystemState_Service_AddService();
Mode_Service_AddService();
Test_service_AddService();
Led_serviceCC_AddService();

I have no idea what is the problem here and where I can start debugging. Do you have any hint what might be the cause fo this?
Any help is appreciated very much, thank you.

Alex

  • Alex,

    Can you review this SimpleLink Academy? There are a number of things that may be improper but to help narrow it down, can you walk through this lab on making custom profiles/services etc?

    At the end of this lab, there is even code generation for all the stuff you need for custom services etc.

    dev.ti.com/.../ble_01_custom_profile.html
  • Thank you for your reply Evan.

    I implemented all the services and characteristics using the example service generator following the lab.
    It worked all fine so far, but then when adding a new service to the 6 existing services, the app BLE - Scanner is not able to show the list of discovered services anymore.
    As soon as I comment out the new added service, all works fine again.

    Is there some kind of limit to the number of services/characteristics that may be implemented?

    Regards Alex

  • Alex,

    Do you have any code you can share? I don't know of any limit on the number of characteristics or services, other than that which can fit in your code/flash size, but that's definitely not the issue here.
  • I'm going to close this post due to inactivty. if you have any updates, please feel free to post if you have a question related to this thread and it will reopen. After 30 days of no activity it will lock.
  • Hi Evan,

    the problem occured very randomly and I struggled to find some code that seemed to be related to the issue.
    I included the services exactly as suggested in the lab which worked fine until now.

    But I got a new smartphone these days and the problems occured since then. I then tried it on other devices and there it worked.
    So it's highly likely that my phone is rubbish, whereas the CC2640 is working nicely.

    Thank you for your help! Alex

  • Hey Alex

    After hearing you describe that, one thing that may be good to remember in the future is that iPhones tend to store the GATT/connection info in it's cache. Hence, if you update the GATT profile/services/characteristics it will not update in the iPhone unless you erase your cache. To do this, you can go to Settings > Bluetooth > click the i with a circle around it, and forget it and then turn bluetooth off and on again and it may show up now.

    Otherwise, glad you got it working!