LoPy4 BLE GATTS Write only
-
Hi, I`m trying to enhance my connection with android by adding some security.
Now I have GATT Service running on lopy4 and GATT client app on android.My idea is to send command code on first byte, and bytes 2 & 3 reserved for security key.
Command run only when security code bytes are the same that defined on lopy.The problem is that anybody can see this key by reading characteristic, so disable read for this characteristic is required.
I found topic https://forum.pycom.io/topic/2953/bluetooth-gattscharacteristic-set-permissions/2
where is the line'The below characteristic supports only READ and NOTIFY:
service.characteristic(uuid=0x2001, permissions=(1<<0), properties=(1 << 1) | (1 << 4), value=0)'I was trying to make write only in a similar way but, it doesn't work, is possible to make write only characteristic? Or any other way to verify the characteristic writer?
-
write only finally done with code:
chr2 = srv2.characteristic(uuid=1234,permissions=0x02 | 0x10,properties=0x08 | 0x04, value=11)
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login