How to add the write permission to device name on GAP.

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
WaSe_1778651
Level 2
Level 2
10 replies posted 50 sign-ins First solution authored

Dear Infineon team,

I'm using the 89820 in my project. And I found some weird things in my project.

And I use the hello sensor application.

I found the device name of the GAP can have the write permission in the Bluetooth spec.

So I want to add that in my project but that is not working fine.

====================================================

//BEFORE

    // characteristics of GAP service

    PRIMARY_SERVICE_UUID16( HANDLE_PHUB_GAP_SERVICE, UUID_SERVICE_GAP ),

// Declare mandatory GAP service characteristic: Dev Name

CHARACTERISTIC_UUID16( HANDLE_PHUB_GAP_SERVICE_CHAR_DEV_NAME, HANDLE_PHUB_GAP_SERVICE_CHAR_DEV_NAME_VAL,

UUID_CHARACTERISTIC_DEVICE_NAME, LEGATTDB_CHAR_PROP_READ, LEGATTDB_PERM_READABLE ),

//AFTER

// Declare mandatory GAP service. Device Name and Appearance are mandatory

    // characteristics of GAP service

    PRIMARY_SERVICE_UUID16( HANDLE_PHUB_GAP_SERVICE, UUID_SERVICE_GAP ),

// Declare mandatory GAP service characteristic: Dev Name

CHARACTERISTIC_UUID16( HANDLE_PHUB_GAP_SERVICE_CHAR_DEV_NAME, HANDLE_PHUB_GAP_SERVICE_CHAR_DEV_NAME_VAL,

UUID_CHARACTERISTIC_DEVICE_NAME, LEGATTDB_CHAR_PROP_READ|LEGATTDB_CHAR_PROP_WRITE, LEGATTDB_PERM_READABLE|LEGATTDB_PERM_WRITABLE ),

====================================================

I'm adding the green high-light line but I could not find my whole characteristics in the phone application. (even though pairing is done.)

====================================================

pastedImage_1.png

====================================================

Could you help me how to add the write permission to the device name characteristic?

Regards,

Wayne

0 Likes
1 Solution
Owen_Zhang123
Moderator
Moderator
Moderator
5 questions asked 500 solutions authored 250 sign-ins

As the spec says, if the device is discoverable, the device name should only be readable.

pastedImage_0.png

View solution in original post

0 Likes
1 Reply
Owen_Zhang123
Moderator
Moderator
Moderator
5 questions asked 500 solutions authored 250 sign-ins

As the spec says, if the device is discoverable, the device name should only be readable.

pastedImage_0.png

0 Likes