Hi,
Is there any example of a Central device which is able to connect to a peripheral and update it ? Im guessing the bluetooth_central_dfu_smp sample is probably the closest one to what I want.
Thank you!
Hi,
Is there any example of a Central device which is able to connect to a peripheral and update it ? Im guessing the bluetooth_central_dfu_smp sample is probably the closest one to what I want.
Thank you!
Miguel Ferreira said:Do you notice anything wrong here ?
I do not see anything, but it is hard to stare at code until an error pops out.
Sigurd Hellesvik said:If you give these, I can try to see if I get the same.
Aha, I now realize that my example works, but not your custom one.
Then it is a bit hard to test myself.
But I will help you debug it instead.
Sigurd Hellesvik said:From SMP Error codes, 3 = "Invalid value; a request contains an invalid value."
I might be a bit wrong here. Error 3 could also mean ESRCH 3 /**< No such context */.
Can you check which part of bt_dfu_smp_command() returns the error?
And then maybe even which part of its sub-functions return the error also?
Regards,
Sigurd Hellesvik
Hi again Sigurd,
Thanks for helping me on this. So I figure out the issue and I can send the data correctly. Seems that on the first chunk (where you send the image size and sha) I have to wait some seconds before start sending the data. Was getting error -16 (Timeout).
Now Im on the point of sending a confirm messages for the peripheral , so it can use the new image when it reboots. Im taking a look at the PR you mentioned, really useful! Have you tried to do this also ?
Thanks a lot!
I think my sample on git also can send "test" and "confirm":
Sigurd Hellesvik said:github.com/.../quote]But the PR is probably doing it in a more elegant way.
Regards,
Sigurd Hellesvik
Meanwhile I created the command myself and its working :)
Thanks a lot for your help Sigurd Hellesvik !
Dear Sigurd,
Since this is a relatively recent thread, I thought I quickly chime in to also write down my observations about your smp_client_ble example (which is really useful btw in light of no official examples...).


I'm seeing similar issues with NCS 2.2.0 and NCS 2.3.0 as well.
Reading a bunch of threads in the forum, I think it will be really nice once your mentioned PR will be merged, and/or will be included in the NCS.