From: Shaik Mahaboob Nazeer <nazeer.m@phytec.in>
To: Steve Brown <sbrown@ewol.com>,
"Von Dentz, Luiz" <luiz.von.dentz@intel.com>
Cc: linux-bluetooth@vger.kernel.org, Jonas Remmert <j.remmert@phytec.de>
Subject: Re: Issue with mesh provisioning.
Date: Thu, 16 May 2019 11:42:07 +0530 [thread overview]
Message-ID: <c39d487d-7e7f-b4d2-17a8-fe8e9d293159@phytec.in> (raw)
In-Reply-To: <4fa544fa04d907de54ab713eb0d0901593d2687e.camel@ewol.com>
hi Steve,
Yes with this changes it is working as expected.
Best Regards.
On 15/05/19 17:42, Steve Brown wrote:
> Hi Luiz,
>
> Would this be an appropriate fix.
>
> It seems to solve the problem.
>
> diff --git a/tools/mesh/gatt.c b/tools/mesh/gatt.c
> index 2269a20cf..0a942d4eb 100644
> --- a/tools/mesh/gatt.c
> +++ b/tools/mesh/gatt.c
> @@ -415,8 +415,11 @@ static bool sock_read(struct io *io, bool prov, void *user_data)
> msg.msg_iovlen = 1;
>
> while ((len = recvmsg(fd, &msg, MSG_DONTWAIT))) {
> - if (len <= 0)
> + if (len <= 0) {
> + if (errno == EAGAIN)
> + break;
> return false;
> + }
>
> res = buf;
> len_sar = mesh_gatt_sar(&res, len);
>
> If so, I'll submit a patch.
>
> Steve
>
> On Wed, 2019-05-15 at 13:48 +0300, Von Dentz, Luiz wrote:
>> Hi Steve,
>>
>> That specific patch doesn't change the meshctl, the following one
>> does:
>>
>> commit d6eec1b67d6d9e3336b7e3cd8f655baf408d864a
>> Author: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
>> Date: Mon Nov 19 17:35:54 2018 +0200
>>
>> meshctl: Switch from write to sendmsg for Acquire*
>>
>> Use sendmsg with MSG_NOSIGNAL to prevent crashes involving
>> SIGPIPE.
>>
>> Not sure what is the problem with that since we just switch from a
>> pipe to a socketpair.
>>
>> On Wed, May 15, 2019 at 1:01 PM Steve Brown <sbrown@ewol.com> wrote:
>>> On Tue, 2019-05-14 at 15:25 -0400, Steve Brown wrote:
>>>> On Tue, 2019-05-14 at 14:50 +0530, Shaik Mahaboob Nazeer wrote:
>>>>> hi,
>>>>>
>>>>> -> We tried Zephyr Mesh onoff example on nrf52 eval kit to test
>>>>> the
>>>>> Mesh Functionality.For provisioning of the node
>>>>> we are using meshctl, built from the latest current master
>>>>> of
>>>>> the
>>>>> bluez source.So during the provisioning of the node when we
>>>>> start the "meshctl" and run the "discover-unprovisioned on"
>>>>> we
>>>>> are
>>>>> able to get the Device UUID for the provisioning.
>>>>>
>>>>> Later when we try to provision the node using the "provision
>>>>> <UUID>" command it initiate the provision and does not wait
>>>>> for the user to enter OOB .You can find the log as below.
>>>>> /*******************************************/
>>>>>
>>>>
>>>> --- snip ---
>>>>
>>>>> /**************************************/
>>>>>
>>>>> Could you elaborate a little on the status of the current
>>>>> master of
>>>>> bluez in regards to BLE mesh, is it usable or should we look to
>>>>> older
>>>>> versions?
>>>>>
>>>>> Do you know if there is a common issue while provisioning of
>>>>> the
>>>>> node
>>>>> with the current master and
>>>>> is there anything that need to be configured before
>>>>> provisioning?
>>>>>
>>>> I get the same results.
>>>>
>>>> I check out 48a2c3db1ccff28a615fac56066ca7d721f98d0a
>>>>
>>>> That was the last time I used meshctl.
>>>>
>>>> It requests an oob string and completes provisioning.
>>>>
>>>> Steve
>>>>
>>>
>>> I bisected to
>>>
>>> commit 91df85690cc1943e46ef90561dd1ac0d673ee3d7
>>> Author: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
>>> Date: Mon Nov 19 15:36:15 2018 +0200
>>>
>>> client: Switch from write to sendmsg for Acquire*
>>>
>>> Use sendmsg with MSG_NOSIGNAL to prevent crashes involving
>>> SIGPIPE.
>>>
>>>
>>>
>
next prev parent reply other threads:[~2019-05-16 6:12 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-14 9:20 Issue with mesh provisioning Shaik Mahaboob Nazeer
2019-05-14 19:25 ` Steve Brown
2019-05-15 10:01 ` Steve Brown
2019-05-15 10:48 ` Von Dentz, Luiz
2019-05-15 11:20 ` Steve Brown
2019-05-15 11:55 ` Steve Brown
2019-05-15 12:12 ` Steve Brown
2019-05-16 6:12 ` Shaik Mahaboob Nazeer [this message]
2019-05-16 7:32 ` Luiz Augusto von Dentz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c39d487d-7e7f-b4d2-17a8-fe8e9d293159@phytec.in \
--to=nazeer.m@phytec.in \
--cc=j.remmert@phytec.de \
--cc=linux-bluetooth@vger.kernel.org \
--cc=luiz.von.dentz@intel.com \
--cc=sbrown@ewol.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).