NordicPlayground / nRF51-ble-bcast-mesh

Other
323 stars 121 forks source link

Notification not enabled for sdk13 and nRF52832 #182

Open codezork opened 7 years ago

codezork commented 7 years ago

Hi Trond, after some search why the code doesn't hvx to a host device, I found that in mesh_gatt.c in function mesh_value_char_add the characteristic write type must be with response in order to get notifications enabled by the host. So line 294 for branch development must be: ble_char_md.char_props.write = 1; instead of ble_char_md.char_props.write_wo_resp = 1;. Can you confirm my finding? Cheers, Joerg

trond-snekvik commented 7 years ago

From what I remember, this shouldn't be related, since the write_wo_resp is for host to mesh communication, while hvx is enabled by setting notify to 1 on the line below.

Do you get any change in hvx behavior from this?

codezork commented 7 years ago

Hi,

Looks like that SDK13 needs write and notify to be true to work properly and responding to notification. With this change it worked for me, without service discovery of the host didn't recognize the notification link. Great work by the way!

Best regards Joerg Riegel / codezork


Von: Trond Einar Snekvik [mailto:notifications@github.com] Gesendet: Donnerstag, 29. Juni 2017 17:07 An: NordicSemiconductor/nRF51-ble-bcast-mesh Cc: codezork; Author Betreff: Re: [NordicSemiconductor/nRF51-ble-bcast-mesh] Notification not enabled for sdk13 and nRF52832 (#182)

From what I remember, this shouldn't be related, since the write_wo_resp is for host to mesh communication, while hvx is enabled by setting notify to 1 on the line below. Do you get any change in hvx behavior from this? — You are receiving this because you authored the thread. Reply to this email directly, view https://github.com/NordicSemiconductor/nRF51-ble-bcast-mesh/issues/182#issuecomment-311996079 it on GitHub, or mute https://github.com/notifications/unsubscribe-auth/AMthZaaD990H4kMlOZ7vGrcccYfuJ4b9ks5sI72qgaJpZM4NL-iI the thread. https://github.com/notifications/beacon/AMthZaa4NUypwwqIn8rfkLlVyA7jagegks5sI72qgaJpZM4NL-iI.gif