3 Replies Latest reply on Dec 14, 2015 5:56 AM by mapac_2161196

    Characteristic not discovered

      Hi all,

       

      I have a GATT profile with 2 services and their respective characteristic. For some reason the 2nd service is not get fully discovered by the remote peers:

      1) A Linux box discovers the CONSOLE_RX characteristic only

      2) and iPhone discovers the CONSOLE_TX characteristic only

       

      Sure, I would expect both of them get discovered regardless of the peer. Here is by GATT profile (note the UUIDs and handles are unique within the database):

       

      const UINT8 puart_control_gatt_database[]=

      {

             PRIMARY_SERVICE_UUID16 (0x0001, UUID_SERVICE_GATT),

       

       

             PRIMARY_SERVICE_UUID16 (0x0014, UUID_SERVICE_GAP),

       

       

             CHARACTERISTIC_UUID16 (0x0015, 0x0016, UUID_CHARACTERISTIC_DEVICE_NAME,

                         LEGATTDB_CHAR_PROP_READ, LEGATTDB_PERM_READABLE, 10),

                         'G','T','A','M',' ','N','a','n','o', 0x00,

       

       

             CHARACTERISTIC_UUID16 (0x0017, 0x0018, UUID_CHARACTERISTIC_APPEARANCE,

                LEGATTDB_CHAR_PROP_READ, LEGATTDB_PERM_READABLE, 2),

                BIT16_TO_8(APPEARANCE_GENERIC_TAG),

       

             //-------------------------------------------------------------------------------------------------------------

       

          PRIMARY_SERVICE_UUID128 (WIFI_LIST_SERVICE, UUID_WIFI_LIST_SERVICE),

       

          CHARACTERISTIC_UUID128_WRITABLE (WIFI_LIST_CHARACTERISTIC, WIFI_LIST_CHARACTERISTIC_VALUE, UUID_WIFI_LIST_VALUE,

            /*LEGATTDB_CHAR_PROP_NOTIFY,

              LEGATTDB_PERM_NONE,*/

              LEGATTDB_CHAR_PROP_READ | LEGATTDB_CHAR_PROP_WRITE | LEGATTDB_CHAR_PROP_NOTIFY,

              LEGATTDB_PERM_READABLE | LEGATTDB_PERM_WRITE_REQ,

            WIFI_LIST_CHARACTERISTIC_LEN),

            0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,

            0x00, 0x00, 0x00, 0x00,

       

       

          CHAR_DESCRIPTOR_UUID16_WRITABLE (WIFI_LIST_CHARACTERISTIC_DESCRIPTOR,

                UUID_DESCRIPTOR_CLIENT_CHARACTERISTIC_CONFIGURATION,

                LEGATTDB_PERM_READABLE | LEGATTDB_PERM_WRITE_CMD | LEGATTDB_PERM_WRITE_REQ | LEGATTDB_PERM_RELIABLE_WRITE | LEGATTDB_PERM_AUTH_WRITABLE,

                2),

                0x00, 0x00,

             //-------------------------------------------------------------------------------------------------------------

             PRIMARY_SERVICE_UUID128 (CONSOLE_SERVICE, UUID_CONSOLE_SERVICE),

       

             CHARACTERISTIC_UUID128_WRITABLE (CONSOLE_RX_CHARACTERISTIC, CONSOLE_RX_CHARACTERISTIC_VALUE, UUID_CONSOLE_RX_VALUE,

                    LEGATTDB_CHAR_PROP_READ | LEGATTDB_CHAR_PROP_WRITE,

                    LEGATTDB_PERM_READABLE | LEGATTDB_PERM_WRITE_REQ,

                20),

                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,

                         0x00, 0x00, 0x00, 0x00,

       

             CHAR_DESCRIPTOR_UUID16 (CONSOLE_RX_USER_DESCRIPTION,

                         UUID_DESCRIPTOR_CHARACTERISTIC_USER_DESCRIPTION,

                         LEGATTDB_PERM_READABLE, 10),

                         'C','o','n','s','o','l','e',' ','R','X',

       

             CHARACTERISTIC_UUID128 (CONSOLE_TX_CHARACTERISTIC, CONSOLE_TX_CHARACTERISTIC_VALUE, UUID_CONSOLE_TX_VALUE,

                LEGATTDB_CHAR_PROP_READ | LEGATTDB_CHAR_PROP_NOTIFY | LEGATTDB_CHAR_PROP_INDICATE,

                LEGATTDB_PERM_READABLE,

                    20),

                    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,

                    0x00, 0x00, 0x00, 0x00,

       

         CHAR_DESCRIPTOR_UUID16 (CONSOLE_TX_USER_DESCRIPTION,

                         UUID_DESCRIPTOR_CHARACTERISTIC_USER_DESCRIPTION,

                         LEGATTDB_PERM_READABLE, 10),

                         'C','o','n','s','o','l','e',' ','T','X',

       

             CHAR_DESCRIPTOR_UUID16_WRITABLE (CONSOLE_TX_CHARACTERISTIC_DESCRIPTOR,

                       UUID_DESCRIPTOR_CLIENT_CHARACTERISTIC_CONFIGURATION,

                       LEGATTDB_PERM_READABLE | LEGATTDB_PERM_WRITE_CMD | LEGATTDB_PERM_WRITE_REQ | LEGATTDB_PERM_RELIABLE_WRITE | LEGATTDB_PERM_AUTH_WRITABLE,

                       2),

                       0x00, 0x00,

      };

        • 1. Re: Characteristic not discovered
          JacobT_81

          Hello mapac_2161196,

           

          A couple things to note on your GATT database:

           

          The naming of the characteristics should be attached to the characteristic itself, generally not to the descriptor as you have done.

           

          Additionally, we cannot see the values of your characteristic UUID's. Please ensure that that the values of the UUID's are incrementing as you descend the database.

           

          Finally, be careful when using phones for testing. They sometimes exhibit strange behavior when making changes to the GATT database. Even though you may have made significant changes, the phone still remembers the previous database. "Forgetting this device" usually works, not always. (Linux is the much more reliable source of information)

           

          Let me know if any of these changes fix the problem or cause new behavior. 

           

          Jacob

          1 of 1 people found this helpful
          • 2. Re: Characteristic not discovered

            Hello thanks for the tips JacobT_81 !

             

            May I ask you what do you exactly mean by this:

            "The naming of the characteristics should be attached to the characteristic itself, generally not to the descriptor as you have done."


            Can you give me an example using my database ?


            I didn't know the UUIDs have to be incremental. Will check if they are.


            As for the phones I do use "forget about hte deivce". I have learned this teh hard way


            Marko

            • 3. Re: Characteristic not discovered

              Regenerating UUIs via wiced and then copying them over my project did the job. Looks like the have to be incremental through the database.