This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Where would I be sending my data using sd_ble_gatts_hvx?

OK. Weird question. I know, but that's only because I'm in the middle of a large program that I'm reading, believe me, I had done my fair share of homework and I understand the "send" and "receive" operation of GATT is a bit well, unique in that it sort "updates" and "pushes" "characteristics" using mostly notification and indication so conventional wisdom, as in 3 wire UART comm. doesn't really apply... all that well.

So I just copy pasted a bunch of codes that I don't really understand, I can "notify" my nrf51422 mcu with gatt packets, sent from my android phone using a program I coded well, a month ago, everything is fine, but then things got a bit awkward: when I try to hvx-push data FROM nrf51422 to my android phone, I don't really know where I'm sending the data. I have this little text box that will pop up once it receives data, any data, but it's not really doing anything when I execute the sd_ble_gatts_hvx() function, and the mcu program doesn't crash afterwards, everything is fine, with all the right parameters.

Please understand that I understand this could be tricky, because there could be an huge mistake in my android app and I haven't figure it out yet but let's start from something more basic shall we? Where will sd_ble_gatts_hvx send data to? Does it identify with a service? In that it will send data to that service, "shared" by all the characteristics, then that service will try to "relay" the data to the right characteristic, or does it send directly to a specific characteristic?

Please help me! Thanks!

Related