1 Reply Latest reply on Jul 22, 2014 2:02 PM by MiTo_1583836

    Is pairing/encryption mandatory to allow a peer to write in GATT


      I am playing with the GATT database and the read/write property.

      I am currently not able to write to the GATT from a peer application running on iPhone (reference: BLE Explorer).

      I am able to "read" all the characteristics defined in my custom GATT. I added the GATT callback in case a write is called via legattdb_regWriteHandleCb((LEGATTDB_WRITE_CB) cb). I see this callback being called when I do a write from the peer/iPhone device, but I don't see the value being modified in the peer device application (it keeps the initialization value).


      I diffed my application with the hello_sensor.c and one of the main difference is the pairing. I decided not to encrypt the connection for now and test a write from the peer/iPhone device.


      Is it mandatory to have a secure connection before initiating a write on SDK1.x TAG20732 from the peer device ?

        • 1. Re: Is pairing/encryption mandatory to allow a peer to write in GATT

          I have been able to test a write of a characteristic without pairing/encryption of the communication. I found one issue with the BCM20732TAG. It sounds that I need to recover the tag before loading my code in case I redefine/change the GATT table. I modified couple of times the GATT table yesterday and I never got the write working properly. The same code worked after a recovery of the TAG board.


          To answer this question, I believe the encryption is not needed to do a write of the GATT from the peer device/iPhone. I commented a call to lesmp_sendSecurityRequest() when the link is UP and I also set the .encr_required to 0 in BLE_PROFILE_CFG structure. All the characteristics have the following parameters:





          My code is very minimalist with handling of the advertisement at boot and when the connection is up.