10 Replies Latest reply on Apr 16, 2017 4:40 PM by user_100785266

    How do you name a Custom Service

    brian.kording
              We are using BLE as a communications tool from an embedded system to a tablet. The software on the tablet will receive and send info to the system through the BLE module. I have defined a custom service and added my custom characteristics, but the tablet only sees the custom service as UNKNOWN - even though I have given it a name. I have added descriptor fields for the characteristics, and the text for them shows up no problem, but even though I have named the service, it still shows as unknown. Sending the data back and forth is not an issue, but the client wants the service name to show. What am I missing?   
        • 1. Re: How do you name a Custom Service
          Madhu Lakshmipathy

           Hi,

             

          Does that custom service have a "User Chatracteristic Descriptor"? 

             

          If not, please add one. (In the BLE Component Configuration Wizard, in the Profiles Tab, Select the Custom Service and then the custom characterisitc. Right click it , select add descriptor and select -> Chavracteristc user description.In that enter the name you wish.

             

          Now check in your Tablet software whether this name is seen.

             

          Regards,

             

          - Madhu Sudhan

          • 2. Re: How do you name a Custom Service
            brian.kording
                    The characteristics are not the problem, it is the service that appears as UNKNOWN. The custom characteristics within the service show their names just fine, but the service shows as unknown. There does not appear to be an option for adding a descriptor to the service level, only to the characteristic. For instance - I have a custom service named DIAGNOSTICS. It has 3 custom characteristics. They are Version, Voltage, and Status. On the tablet, the service shows as UNKNOWN, and when expanding the service to see the characteristics, I can then see Version, Voltage, and Status characteristics. What I am wanting to do is to see the service name of DIAGNOSTICS instead of UNKNOWN.   
            • 3. Re: How do you name a Custom Service
              user_78878863

              I think that is something not provided by the BLE / GATT spec. AFAICS the names come from translating the service UUIDs into something useful.

              • 4. Re: How do you name a Custom Service
                user_78878863

                Look at the (official) guide for defining custom services: https://developer.bluetooth.org/DevelopmentResources/Pages/Custom-Profile-Development.aspx

                   

                There are no display names in the service configm (OK; there is one in the profile definition, but I don't see a use for it)

                • 5. Re: How do you name a Custom Service
                  brian.kording
                          Yeah - I have looked at that previously. The issue I have with the name not working, is that we have a test device from another company that we can connect with, and all of its services are named. They have their company name prefixed to the service name for each service on the device. When you expand the service, all of their characteristics are named as well. I have no problem getting the characteristics named and displayed, but I am curious how they are getting the service name to show. I can connect to it with several different applications, and they all show the name of the services, so it is not just a case where they have created specific software either.   
                  • 6. Re: How do you name a Custom Service
                    user_78878863

                    What exactly are you using to see the service names? Are you able to see them with the CySmart tool on a PC? (It shows you the complete GATT structure so maybe you can see there what to do)

                    • 7. Re: How do you name a Custom Service
                      brian.kording
                              The CySmart PC app shows all of the services as just custom services. The only descriptive text is the characteristic text, which I can already see. At this point, I think it is more an issue for the Tablet developer than it is for me. I am naming the custom service after I create it by right-clicking on the service name and choosing "Rename". I know I have named it, so I will just see if there is anything he can do to find that name. As far as functionality goes, everything works fine, it is just that the Tablet is showing the device to have UNKNOWN services. It would be a little cleaner if he was able to access the service name and display it, but at this point I need to move on to get more of the device software written, so we may just have to live with it. The Tablet developer has told me that he tries to access the service NAME field, but that there is nothing there, so I just wanted to make sure I hadn't left something out on my end.   
                      • 8. Re: How do you name a Custom Service
                        user_78878863

                        I would suggest creating a support case (top right menu, "MyCases"). Please report back here if you get a solution...

                        • 9. Re: How do you name a Custom Service
                          jeff.schmidt_1807091

                          Hello,  

                             

                          Has this problem been solved?  I have the exact same issue.  Trying to develop a custom profile with custom services for a customer and only see Uknown Services on the Cysmart App.  Please let me know what the solution is.  Thank you.

                          • 10. Re: How do you name a Custom Service
                            jrow

                            Hi Jeff et al,

                               

                            It is not possible to name a service in the same way that you can name a characteristic. There is no provision in the Bluetooth spec for storing a custom name for a service; honestly, even custom names for characteristics have relatively little utility in most applications. The only reason that the CySmart BLE app (or any app) has a "friendly" name for any service is that the app has its own internal UUID-to-name lookup table for known services.

                               

                            Mobile apps intended for end-users generally abstract the GATT structure away from the user interface enough that there is no reason to expose any names, whether for services or for characteristics. The user simply performs actions and the app transfers the relevant data to and from the remote GATT server using whatever characteristics and operations are needed. The mobile app developer should have knowledge of the GATT structure at the time of development, and any services and characteristics (whether custom or standard) will be identified uniquely by their UUID, not by any custom name or description that might optionally be also present in the GATT definition.

                            • 11. Re: How do you name a Custom Service
                              user_100785266

                              I've been using custom BLE services with Android apps and agree with what jrow said, the app identifies the name of the service by association with it's UUID.

                                 

                              I'm not sure if it will help, but it you develop an app using Bluetooth Developer Studio, you can name your service and it is used in the generated Android code (which is then ported into Android Developer Studio to build).  The service name clearly appears in the generated app, along with the characteristics in the service and the names you give them.