All of lore.kernel.org
 help / color / mirror / Atom feed
* bluez meshctl error: socket operation on non-socket
@ 2019-11-27  4:16 Venkat Vallapaneni
  2019-11-27 22:52 ` Gix, Brian
  0 siblings, 1 reply; 8+ messages in thread
From: Venkat Vallapaneni @ 2019-11-27  4:16 UTC (permalink / raw)
  To: linux-bluetooth

Hi,

I am trying to use bluez 5.52 for provisioning a bluetooth mesh capable 
device. When I gave provision <uuid>, I get this below error. Please let 
me know what I am missing.

I am using ell 0.26 on ubuntu 18.04. I am able to provision successfully 
with bluez 5.50.

AcquireWrite success: fd 8 MTU 69
GATT-TX:     03 00 10
*sendmsg: Socket operation on non-socket*[Zephyr]#

Rgds,
Venkat.



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: bluez meshctl error: socket operation on non-socket
  2019-11-27  4:16 bluez meshctl error: socket operation on non-socket Venkat Vallapaneni
@ 2019-11-27 22:52 ` Gix, Brian
  2019-11-28 10:58   ` Venkat Vallapaneni
  0 siblings, 1 reply; 8+ messages in thread
From: Gix, Brian @ 2019-11-27 22:52 UTC (permalink / raw)
  To: Venkat Vallapaneni; +Cc: linux-bluetooth

Hi Venkat,

Are you attempting to provision a device that requires PB-GATT provisioning?  If so, the bluetoothd daemon must be up and running. However, this tool is old, and will probably be deprecated at some point.

However most Mesh devices should support Advertising based provisioning.

The Mesh daemon (Bluetooth-meshd) and the mesh-cfgclient tool (in the tools directory) has been undergoing modification even since v5.52, so you will want to checkout the tip.

./tools/mesh-cfgclient is the tool most appropriate for mesh development today. 



> On Nov 26, 2019, at 8:16 PM, Venkat Vallapaneni <vallapaneni@socoptimum.com> wrote:
> 
> Hi,
> 
> I am trying to use bluez 5.52 for provisioning a bluetooth mesh capable device. When I gave provision <uuid>, I get this below error. Please let me know what I am missing.
> 
> I am using ell 0.26 on ubuntu 18.04. I am able to provision successfully with bluez 5.50.
> 
> AcquireWrite success: fd 8 MTU 69
> GATT-TX:     03 00 10
> *sendmsg: Socket operation on non-socket*[Zephyr]#
> 
> Rgds,
> Venkat.
> 
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: bluez meshctl error: socket operation on non-socket
  2019-11-27 22:52 ` Gix, Brian
@ 2019-11-28 10:58   ` Venkat Vallapaneni
  2019-11-28 16:07     ` Gix, Brian
  0 siblings, 1 reply; 8+ messages in thread
From: Venkat Vallapaneni @ 2019-11-28 10:58 UTC (permalink / raw)
  To: Gix, Brian; +Cc: linux-bluetooth

Hi Brian,

Thanks for the response. Yes, I am using PB-GATT barrier. With 
bluetooothd running, I am able to provision my device.

I also tried mesh-cfgclient but unsuccessful. I launched the shell with 
mesh-cfgclient (with bluetooth-meshd running) and I gave create command 
in the shell. I see segmentation fault. Any steps I am missing?

Is mesh-cfgclient only for provisioning or also for sending mesh 
messages also?

Rgds,

Venkat.


On 28/11/19 4:22 am, Gix, Brian wrote:
> Hi Venkat,
>
> Are you attempting to provision a device that requires PB-GATT provisioning?  If so, the bluetoothd daemon must be up and running. However, this tool is old, and will probably be deprecated at some point.
>
> However most Mesh devices should support Advertising based provisioning.
>
> The Mesh daemon (Bluetooth-meshd) and the mesh-cfgclient tool (in the tools directory) has been undergoing modification even since v5.52, so you will want to checkout the tip.
>
> ./tools/mesh-cfgclient is the tool most appropriate for mesh development today.
>
>
>
>> On Nov 26, 2019, at 8:16 PM, Venkat Vallapaneni <vallapaneni@socoptimum.com> wrote:
>>
>> Hi,
>>
>> I am trying to use bluez 5.52 for provisioning a bluetooth mesh capable device. When I gave provision <uuid>, I get this below error. Please let me know what I am missing.
>>
>> I am using ell 0.26 on ubuntu 18.04. I am able to provision successfully with bluez 5.50.
>>
>> AcquireWrite success: fd 8 MTU 69
>> GATT-TX:     03 00 10
>> *sendmsg: Socket operation on non-socket*[Zephyr]#
>>
>> Rgds,
>> Venkat.
>>
>>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: bluez meshctl error: socket operation on non-socket
  2019-11-28 10:58   ` Venkat Vallapaneni
@ 2019-11-28 16:07     ` Gix, Brian
  2019-11-28 17:11       ` Venkat Vallapaneni
  0 siblings, 1 reply; 8+ messages in thread
From: Gix, Brian @ 2019-11-28 16:07 UTC (permalink / raw)
  To: Venkat Vallapaneni; +Cc: linux-bluetooth

Hi Venkat,

> On Nov 28, 2019, at 2:59 AM, Venkat Vallapaneni <vallapaneni@socoptimum.com> wrote:
> 
> Hi Brian,
> 
> Thanks for the response. Yes, I am using PB-GATT barrier. With bluetooothd running, I am able to provision my device.

Ok... well if this is specifically to play with Zephyr, you can build it to accept PB-ADV based provisioning as well. But i think Zephyrs mesh tip is PN-GATT by default.

> I also tried mesh-cfgclient but unsuccessful. I launched the shell with mesh-cfgclient (with bluetooth-meshd running) and I gave create command in the shell. I see segmentation fault. Any steps I am missing?

Are you on the tip of both the BlueZ tree, and the ELL tree? Also, what linux distro are you using?

> Is mesh-cfgclient only for provisioning or also for sending mesh messages also?

mesh-cfgclient not only provisions devices with PB-ADV, but it also is a full featured Config Client. It can send keys, bindings, subscriptions, and publications.


> Rgds,
> 
> Venkat.
> 
> 
>> On 28/11/19 4:22 am, Gix, Brian wrote:
>> Hi Venkat,
>> 
>> Are you attempting to provision a device that requires PB-GATT provisioning?  If so, the bluetoothd daemon must be up and running. However, this tool is old, and will probably be deprecated at some point.
>> 
>> However most Mesh devices should support Advertising based provisioning.
>> 
>> The Mesh daemon (Bluetooth-meshd) and the mesh-cfgclient tool (in the tools directory) has been undergoing modification even since v5.52, so you will want to checkout the tip.
>> 
>> ./tools/mesh-cfgclient is the tool most appropriate for mesh development today.
>> 
>> 
>> 
>>>> On Nov 26, 2019, at 8:16 PM, Venkat Vallapaneni <vallapaneni@socoptimum.com> wrote:
>>> 
>>> Hi,
>>> 
>>> I am trying to use bluez 5.52 for provisioning a bluetooth mesh capable device. When I gave provision <uuid>, I get this below error. Please let me know what I am missing.
>>> 
>>> I am using ell 0.26 on ubuntu 18.04. I am able to provision successfully with bluez 5.50.
>>> 
>>> AcquireWrite success: fd 8 MTU 69
>>> GATT-TX:     03 00 10
>>> *sendmsg: Socket operation on non-socket*[Zephyr]#
>>> 
>>> Rgds,
>>> Venkat.
>>> 
>>> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: bluez meshctl error: socket operation on non-socket
  2019-11-28 16:07     ` Gix, Brian
@ 2019-11-28 17:11       ` Venkat Vallapaneni
  2019-11-28 23:05         ` Steve Brown
  0 siblings, 1 reply; 8+ messages in thread
From: Venkat Vallapaneni @ 2019-11-28 17:11 UTC (permalink / raw)
  To: Gix, Brian; +Cc: linux-bluetooth

Hi Brian,
I am using latest bluez and ell trees on ubuntu 18.04. Log windows 
showing segmentation fault if it helps. I ran demon first and then 
mesh-cfgclient

vallapaneni@venkat-laptop:~$ sudo ~/tools/bluez/mesh/bluetooth-meshd
D-Bus ready
Request name success
Loading node configuration from /var/lib/bluetooth/mesh
filter_set id: 1, --> 2b
filter_set id: 2, --> 29
filter_set id: 3, --> 2a
filter_set id: 4, --> 2b
Controller hci 0 is in use

vallapaneni@venkat-laptop:~/tools/bluez$ sudo 
~/tools/bluez/tools/mesh-cfgclient

Warning: config file "/home/vallapaneni/.config/meshcfg/config_db.json" 
not found
[mesh-cfgclient]# create
Segmentation fault
vallapaneni@venkat-laptop:~/tools/bluez$

Rgds,
Venkat.

On 28/11/19 9:37 pm, Gix, Brian wrote:
> Hi Venkat,
>
>> On Nov 28, 2019, at 2:59 AM, Venkat Vallapaneni <vallapaneni@socoptimum.com> wrote:
>>
>> Hi Brian,
>>
>> Thanks for the response. Yes, I am using PB-GATT barrier. With bluetooothd running, I am able to provision my device.
> Ok... well if this is specifically to play with Zephyr, you can build it to accept PB-ADV based provisioning as well. But i think Zephyrs mesh tip is PN-GATT by default.
>
>> I also tried mesh-cfgclient but unsuccessful. I launched the shell with mesh-cfgclient (with bluetooth-meshd running) and I gave create command in the shell. I see segmentation fault. Any steps I am missing?
> Are you on the tip of both the BlueZ tree, and the ELL tree? Also, what linux distro are you using?
>
>> Is mesh-cfgclient only for provisioning or also for sending mesh messages also?
> mesh-cfgclient not only provisions devices with PB-ADV, but it also is a full featured Config Client. It can send keys, bindings, subscriptions, and publications.
>
>
>> Rgds,
>>
>> Venkat.
>>
>>
>>> On 28/11/19 4:22 am, Gix, Brian wrote:
>>> Hi Venkat,
>>>
>>> Are you attempting to provision a device that requires PB-GATT provisioning?  If so, the bluetoothd daemon must be up and running. However, this tool is old, and will probably be deprecated at some point.
>>>
>>> However most Mesh devices should support Advertising based provisioning.
>>>
>>> The Mesh daemon (Bluetooth-meshd) and the mesh-cfgclient tool (in the tools directory) has been undergoing modification even since v5.52, so you will want to checkout the tip.
>>>
>>> ./tools/mesh-cfgclient is the tool most appropriate for mesh development today.
>>>
>>>
>>>
>>>>> On Nov 26, 2019, at 8:16 PM, Venkat Vallapaneni <vallapaneni@socoptimum.com> wrote:
>>>> Hi,
>>>>
>>>> I am trying to use bluez 5.52 for provisioning a bluetooth mesh capable device. When I gave provision <uuid>, I get this below error. Please let me know what I am missing.
>>>>
>>>> I am using ell 0.26 on ubuntu 18.04. I am able to provision successfully with bluez 5.50.
>>>>
>>>> AcquireWrite success: fd 8 MTU 69
>>>> GATT-TX:     03 00 10
>>>> *sendmsg: Socket operation on non-socket*[Zephyr]#
>>>>
>>>> Rgds,
>>>> Venkat.
>>>>
>>>>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: bluez meshctl error: socket operation on non-socket
  2019-11-28 17:11       ` Venkat Vallapaneni
@ 2019-11-28 23:05         ` Steve Brown
  2019-11-29  1:28           ` Venkat Vallapaneni
  2019-12-03 23:42           ` Stotland, Inga
  0 siblings, 2 replies; 8+ messages in thread
From: Steve Brown @ 2019-11-28 23:05 UTC (permalink / raw)
  To: Venkat Vallapaneni, Gix, Brian; +Cc: linux-bluetooth

I've successfully provisioned the zephyr onoff-app with both meshctl
and mesh-cfgclient.

However, when installing meshd, I found that you have to enable
bluetooth-mesh with systemctl or I get this when I issue the "create".

GNU gdb (Ubuntu 8.3-0ubuntu1) 8.3
Copyright (C) 2019 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "aarch64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>;.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>;.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from mesh-cfgclient...
(gdb) run
Starting program: /usr/bin/mesh-cfgclient 

Warning: config file "/home/ubuntu/.config/meshcfg/config_db.json" not found
[mesh-cfgclient]# create 0100

Program received signal SIGSEGV, Segmentation fault.
l_dbus_proxy_method_call (proxy=0x0, method=0xaaaaaaada7a8 "CreateNetwork", setup=0xaaaaaaab6ba0 <create_net_setup>, reply=0xaaaaaaab69e0 <create_net_reply>, user_data=0x0, destroy=0x0)
    at ell/dbus-client.c:305
305		req->proxy = proxy;
(gdb) bt
#0  l_dbus_proxy_method_call (proxy=0x0, method=0xaaaaaaada7a8 "CreateNetwork", setup=0xaaaaaaab6ba0 <create_net_setup>, reply=0xaaaaaaab69e0 <create_net_reply>, user_data=0x0, destroy=0x0)
    at ell/dbus-client.c:305
#1  0x0000aaaaaaac1c34 in cmd_exec (argv=0xaaaaaab40650, argc=2, entry=0xaaaaaaafdf18 <main_menu+16>) at src/shared/shell.c:441
#2  menu_exec (entry=0xaaaaaaafdf18 <main_menu+16>, argc=argc@entry=2, argv=argv@entry=0xaaaaaab40650) at src/shared/shell.c:468
#3  0x0000aaaaaaac2008 in shell_exec (argc=2, argv=0xaaaaaab40650) at src/shared/shell.c:511
#4  0x0000aaaaaaac312c in rl_handler (input=0xaaaaaab41900 "create 0100") at src/shared/shell.c:713
#5  0x0000ffffbf6809e8 in rl_callback_read_char () from /lib/aarch64-linux-gnu/libreadline.so.8
#6  0x0000aaaaaaac1ecc in input_read (io=<optimized out>, user_data=<optimized out>) at src/shared/shell.c:1256
#7  0x0000aaaaaaac7440 in io_callback (fd=<optimized out>, events=1, user_data=0xaaaaaab40780) at ell/io.c:126
#8  0x0000aaaaaaac83f8 in l_main_iterate (timeout=<optimized out>) at ell/main.c:473
#9  0x0000aaaaaaac84d8 in l_main_run () at ell/main.c:520
#10 l_main_run () at ell/main.c:502
#11 0x0000aaaaaaac86f4 in l_main_run_with_signal (callback=callback@entry=0xaaaaaaac3c20 <l_sig_func>, user_data=user_data@entry=0x0) at ell/main.c:642
#12 0x0000aaaaaaac3cf4 in mainloop_run_with_signal (func=func@entry=0xaaaaaaac2130 <signal_callback>, user_data=user_data@entry=0x0) at src/shared/mainloop-ell.c:87
#13 0x0000aaaaaaac3394 in bt_shell_run () at src/shared/shell.c:1174
#14 0x0000aaaaaaab42d8 in main (argc=<optimized out>, argv=<optimized out>) at tools/mesh-cfgclient.c:1970
(gdb) quit
A debugging session is active.

	Inferior 1 [process 5112] will be killed.
Steve

On Thu, 2019-11-28 at 22:41 +0530, Venkat Vallapaneni wrote:
> Hi Brian,
> I am using latest bluez and ell trees on ubuntu 18.04. Log windows 
> showing segmentation fault if it helps. I ran demon first and then 
> mesh-cfgclient
> 
> vallapaneni@venkat-laptop:~$ sudo ~/tools/bluez/mesh/bluetooth-meshd
> D-Bus ready
> Request name success
> Loading node configuration from /var/lib/bluetooth/mesh
> filter_set id: 1, --> 2b
> filter_set id: 2, --> 29
> filter_set id: 3, --> 2a
> filter_set id: 4, --> 2b
> Controller hci 0 is in use
> 
> vallapaneni@venkat-laptop:~/tools/bluez$ sudo 
> ~/tools/bluez/tools/mesh-cfgclient
> 
> Warning: config file
> "/home/vallapaneni/.config/meshcfg/config_db.json" 
> not found
> [mesh-cfgclient]# create
> Segmentation fault
> vallapaneni@venkat-laptop:~/tools/bluez$
> 
> Rgds,
> Venkat.
> 
> On 28/11/19 9:37 pm, Gix, Brian wrote:
> > Hi Venkat,
> > 
> > > On Nov 28, 2019, at 2:59 AM, Venkat Vallapaneni <
> > > vallapaneni@socoptimum.com> wrote:
> > > 
> > > Hi Brian,
> > > 
> > > Thanks for the response. Yes, I am using PB-GATT barrier. With
> > > bluetooothd running, I am able to provision my device.
> > Ok... well if this is specifically to play with Zephyr, you can
> > build it to accept PB-ADV based provisioning as well. But i think
> > Zephyrs mesh tip is PN-GATT by default.
> > 
> > > I also tried mesh-cfgclient but unsuccessful. I launched the
> > > shell with mesh-cfgclient (with bluetooth-meshd running) and I
> > > gave create command in the shell. I see segmentation fault. Any
> > > steps I am missing?
> > Are you on the tip of both the BlueZ tree, and the ELL tree? Also,
> > what linux distro are you using?
> > 
> > > Is mesh-cfgclient only for provisioning or also for sending mesh
> > > messages also?
> > mesh-cfgclient not only provisions devices with PB-ADV, but it also
> > is a full featured Config Client. It can send keys, bindings,
> > subscriptions, and publications.
> > 
> > 
> > > Rgds,
> > > 
> > > Venkat.
> > > 
> > > 
> > > > On 28/11/19 4:22 am, Gix, Brian wrote:
> > > > Hi Venkat,
> > > > 
> > > > Are you attempting to provision a device that requires PB-GATT
> > > > provisioning?  If so, the bluetoothd daemon must be up and
> > > > running. However, this tool is old, and will probably be
> > > > deprecated at some point.
> > > > 
> > > > However most Mesh devices should support Advertising based
> > > > provisioning.
> > > > 
> > > > The Mesh daemon (Bluetooth-meshd) and the mesh-cfgclient tool
> > > > (in the tools directory) has been undergoing modification even
> > > > since v5.52, so you will want to checkout the tip.
> > > > 
> > > > ./tools/mesh-cfgclient is the tool most appropriate for mesh
> > > > development today.
> > > > 
> > > > 
> > > > 
> > > > > > On Nov 26, 2019, at 8:16 PM, Venkat Vallapaneni <
> > > > > > vallapaneni@socoptimum.com> wrote:
> > > > > Hi,
> > > > > 
> > > > > I am trying to use bluez 5.52 for provisioning a bluetooth
> > > > > mesh capable device. When I gave provision <uuid>, I get this
> > > > > below error. Please let me know what I am missing.
> > > > > 
> > > > > I am using ell 0.26 on ubuntu 18.04. I am able to provision
> > > > > successfully with bluez 5.50.
> > > > > 
> > > > > AcquireWrite success: fd 8 MTU 69
> > > > > GATT-TX:     03 00 10
> > > > > *sendmsg: Socket operation on non-socket*[Zephyr]#
> > > > > 
> > > > > Rgds,
> > > > > Venkat.
> > > > > 
> > > > > 


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: bluez meshctl error: socket operation on non-socket
  2019-11-28 23:05         ` Steve Brown
@ 2019-11-29  1:28           ` Venkat Vallapaneni
  2019-12-03 23:42           ` Stotland, Inga
  1 sibling, 0 replies; 8+ messages in thread
From: Venkat Vallapaneni @ 2019-11-29  1:28 UTC (permalink / raw)
  To: Steve Brown, Gix, Brian, Ananth J; +Cc: linux-bluetooth

Yes, if I run bluetooth-mesh daemon with systemctl, I am able to execute 
create successfully but if I run the daemon with sudo manually, create 
crashes.
Any order dependencies for daemon that are broken when run manually but 
honored with systemctl?

Rgds,
Venkat.

On 29/11/19 4:35 am, Steve Brown wrote:
> I've successfully provisioned the zephyr onoff-app with both meshctl
> and mesh-cfgclient.
>
> However, when installing meshd, I found that you have to enable
> bluetooth-mesh with systemctl or I get this when I issue the "create".
>
> GNU gdb (Ubuntu 8.3-0ubuntu1) 8.3
> Copyright (C) 2019 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.
> Type "show copying" and "show warranty" for details.
> This GDB was configured as "aarch64-linux-gnu".
> Type "show configuration" for configuration details.
> For bug reporting instructions, please see:
> <http://www.gnu.org/software/gdb/bugs/>;.
> Find the GDB manual and other documentation resources online at:
>      <http://www.gnu.org/software/gdb/documentation/>;.
>
> For help, type "help".
> Type "apropos word" to search for commands related to "word"...
> Reading symbols from mesh-cfgclient...
> (gdb) run
> Starting program: /usr/bin/mesh-cfgclient
>
> Warning: config file "/home/ubuntu/.config/meshcfg/config_db.json" not found
> [mesh-cfgclient]# create 0100
>
> Program received signal SIGSEGV, Segmentation fault.
> l_dbus_proxy_method_call (proxy=0x0, method=0xaaaaaaada7a8 "CreateNetwork", setup=0xaaaaaaab6ba0 <create_net_setup>, reply=0xaaaaaaab69e0 <create_net_reply>, user_data=0x0, destroy=0x0)
>      at ell/dbus-client.c:305
> 305		req->proxy = proxy;
> (gdb) bt
> #0  l_dbus_proxy_method_call (proxy=0x0, method=0xaaaaaaada7a8 "CreateNetwork", setup=0xaaaaaaab6ba0 <create_net_setup>, reply=0xaaaaaaab69e0 <create_net_reply>, user_data=0x0, destroy=0x0)
>      at ell/dbus-client.c:305
> #1  0x0000aaaaaaac1c34 in cmd_exec (argv=0xaaaaaab40650, argc=2, entry=0xaaaaaaafdf18 <main_menu+16>) at src/shared/shell.c:441
> #2  menu_exec (entry=0xaaaaaaafdf18 <main_menu+16>, argc=argc@entry=2, argv=argv@entry=0xaaaaaab40650) at src/shared/shell.c:468
> #3  0x0000aaaaaaac2008 in shell_exec (argc=2, argv=0xaaaaaab40650) at src/shared/shell.c:511
> #4  0x0000aaaaaaac312c in rl_handler (input=0xaaaaaab41900 "create 0100") at src/shared/shell.c:713
> #5  0x0000ffffbf6809e8 in rl_callback_read_char () from /lib/aarch64-linux-gnu/libreadline.so.8
> #6  0x0000aaaaaaac1ecc in input_read (io=<optimized out>, user_data=<optimized out>) at src/shared/shell.c:1256
> #7  0x0000aaaaaaac7440 in io_callback (fd=<optimized out>, events=1, user_data=0xaaaaaab40780) at ell/io.c:126
> #8  0x0000aaaaaaac83f8 in l_main_iterate (timeout=<optimized out>) at ell/main.c:473
> #9  0x0000aaaaaaac84d8 in l_main_run () at ell/main.c:520
> #10 l_main_run () at ell/main.c:502
> #11 0x0000aaaaaaac86f4 in l_main_run_with_signal (callback=callback@entry=0xaaaaaaac3c20 <l_sig_func>, user_data=user_data@entry=0x0) at ell/main.c:642
> #12 0x0000aaaaaaac3cf4 in mainloop_run_with_signal (func=func@entry=0xaaaaaaac2130 <signal_callback>, user_data=user_data@entry=0x0) at src/shared/mainloop-ell.c:87
> #13 0x0000aaaaaaac3394 in bt_shell_run () at src/shared/shell.c:1174
> #14 0x0000aaaaaaab42d8 in main (argc=<optimized out>, argv=<optimized out>) at tools/mesh-cfgclient.c:1970
> (gdb) quit
> A debugging session is active.
>
> 	Inferior 1 [process 5112] will be killed.
> Steve
>
> On Thu, 2019-11-28 at 22:41 +0530, Venkat Vallapaneni wrote:
>> Hi Brian,
>> I am using latest bluez and ell trees on ubuntu 18.04. Log windows
>> showing segmentation fault if it helps. I ran demon first and then
>> mesh-cfgclient
>>
>> vallapaneni@venkat-laptop:~$ sudo ~/tools/bluez/mesh/bluetooth-meshd
>> D-Bus ready
>> Request name success
>> Loading node configuration from /var/lib/bluetooth/mesh
>> filter_set id: 1, --> 2b
>> filter_set id: 2, --> 29
>> filter_set id: 3, --> 2a
>> filter_set id: 4, --> 2b
>> Controller hci 0 is in use
>>
>> vallapaneni@venkat-laptop:~/tools/bluez$ sudo
>> ~/tools/bluez/tools/mesh-cfgclient
>>
>> Warning: config file
>> "/home/vallapaneni/.config/meshcfg/config_db.json"
>> not found
>> [mesh-cfgclient]# create
>> Segmentation fault
>> vallapaneni@venkat-laptop:~/tools/bluez$
>>
>> Rgds,
>> Venkat.
>>
>> On 28/11/19 9:37 pm, Gix, Brian wrote:
>>> Hi Venkat,
>>>
>>>> On Nov 28, 2019, at 2:59 AM, Venkat Vallapaneni <
>>>> vallapaneni@socoptimum.com> wrote:
>>>>
>>>> Hi Brian,
>>>>
>>>> Thanks for the response. Yes, I am using PB-GATT barrier. With
>>>> bluetooothd running, I am able to provision my device.
>>> Ok... well if this is specifically to play with Zephyr, you can
>>> build it to accept PB-ADV based provisioning as well. But i think
>>> Zephyrs mesh tip is PN-GATT by default.
>>>
>>>> I also tried mesh-cfgclient but unsuccessful. I launched the
>>>> shell with mesh-cfgclient (with bluetooth-meshd running) and I
>>>> gave create command in the shell. I see segmentation fault. Any
>>>> steps I am missing?
>>> Are you on the tip of both the BlueZ tree, and the ELL tree? Also,
>>> what linux distro are you using?
>>>
>>>> Is mesh-cfgclient only for provisioning or also for sending mesh
>>>> messages also?
>>> mesh-cfgclient not only provisions devices with PB-ADV, but it also
>>> is a full featured Config Client. It can send keys, bindings,
>>> subscriptions, and publications.
>>>
>>>
>>>> Rgds,
>>>>
>>>> Venkat.
>>>>
>>>>
>>>>> On 28/11/19 4:22 am, Gix, Brian wrote:
>>>>> Hi Venkat,
>>>>>
>>>>> Are you attempting to provision a device that requires PB-GATT
>>>>> provisioning?  If so, the bluetoothd daemon must be up and
>>>>> running. However, this tool is old, and will probably be
>>>>> deprecated at some point.
>>>>>
>>>>> However most Mesh devices should support Advertising based
>>>>> provisioning.
>>>>>
>>>>> The Mesh daemon (Bluetooth-meshd) and the mesh-cfgclient tool
>>>>> (in the tools directory) has been undergoing modification even
>>>>> since v5.52, so you will want to checkout the tip.
>>>>>
>>>>> ./tools/mesh-cfgclient is the tool most appropriate for mesh
>>>>> development today.
>>>>>
>>>>>
>>>>>
>>>>>>> On Nov 26, 2019, at 8:16 PM, Venkat Vallapaneni <
>>>>>>> vallapaneni@socoptimum.com> wrote:
>>>>>> Hi,
>>>>>>
>>>>>> I am trying to use bluez 5.52 for provisioning a bluetooth
>>>>>> mesh capable device. When I gave provision <uuid>, I get this
>>>>>> below error. Please let me know what I am missing.
>>>>>>
>>>>>> I am using ell 0.26 on ubuntu 18.04. I am able to provision
>>>>>> successfully with bluez 5.50.
>>>>>>
>>>>>> AcquireWrite success: fd 8 MTU 69
>>>>>> GATT-TX:     03 00 10
>>>>>> *sendmsg: Socket operation on non-socket*[Zephyr]#
>>>>>>
>>>>>> Rgds,
>>>>>> Venkat.
>>>>>>
>>>>>>


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: bluez meshctl error: socket operation on non-socket
  2019-11-28 23:05         ` Steve Brown
  2019-11-29  1:28           ` Venkat Vallapaneni
@ 2019-12-03 23:42           ` Stotland, Inga
  1 sibling, 0 replies; 8+ messages in thread
From: Stotland, Inga @ 2019-12-03 23:42 UTC (permalink / raw)
  To: Gix, Brian, sbrown, vallapaneni; +Cc: linux-bluetooth

Hi Steve and all,

On Thu, 2019-11-28 at 16:05 -0700, Steve Brown wrote:
> I've successfully provisioned the zephyr onoff-app with both meshctl
> and mesh-cfgclient.
> 
> However, when installing meshd, I found that you have to enable
> bluetooth-mesh with systemctl or I get this when I issue the
> "create".
> 
> GNU gdb (Ubuntu 8.3-0ubuntu1) 8.3
> Copyright (C) 2019 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later <
> http://gnu.org/licenses/gpl.html
> >
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.
> Type "show copying" and "show warranty" for details.
> This GDB was configured as "aarch64-linux-gnu".
> Type "show configuration" for configuration details.
> For bug reporting instructions, please see:
> <
> http://www.gnu.org/software/gdb/bugs/
> >;.
> Find the GDB manual and other documentation resources online at:
>     <
> http://www.gnu.org/software/gdb/documentation/
> >;.
> 
> For help, type "help".
> Type "apropos word" to search for commands related to "word"...
> Reading symbols from mesh-cfgclient...
> (gdb) run
> Starting program: /usr/bin/mesh-cfgclient 
> 
> Warning: config file "/home/ubuntu/.config/meshcfg/config_db.json"
> not found
> [mesh-cfgclient]# create 0100
> 
> Program received signal SIGSEGV, Segmentation fault.
> l_dbus_proxy_method_call (proxy=0x0, method=0xaaaaaaada7a8
> "CreateNetwork", setup=0xaaaaaaab6ba0 <create_net_setup>,
> reply=0xaaaaaaab69e0 <create_net_reply>, user_data=0x0, destroy=0x0)
>     at ell/dbus-client.c:305
> 305		req->proxy = proxy;
> (gdb) bt
> #0  l_dbus_proxy_method_call (proxy=0x0, method=0xaaaaaaada7a8
> "CreateNetwork", setup=0xaaaaaaab6ba0 <create_net_setup>,
> reply=0xaaaaaaab69e0 <create_net_reply>, user_data=0x0, destroy=0x0)
>     at ell/dbus-client.c:305
> #1  0x0000aaaaaaac1c34 in cmd_exec (argv=0xaaaaaab40650, argc=2,
> entry=0xaaaaaaafdf18 <main_menu+16>) at src/shared/shell.c:441
> #2  menu_exec (entry=0xaaaaaaafdf18 <main_menu+16>, argc=argc@entry=2
> , argv=argv@entry=0xaaaaaab40650) at src/shared/shell.c:468
> #3  0x0000aaaaaaac2008 in shell_exec (argc=2, argv=0xaaaaaab40650) at
> src/shared/shell.c:511
> #4  0x0000aaaaaaac312c in rl_handler (input=0xaaaaaab41900 "create
> 0100") at src/shared/shell.c:713
> #5  0x0000ffffbf6809e8 in rl_callback_read_char () from /lib/aarch64-
> linux-gnu/libreadline.so.8
> #6  0x0000aaaaaaac1ecc in input_read (io=<optimized out>,
> user_data=<optimized out>) at src/shared/shell.c:1256
> #7  0x0000aaaaaaac7440 in io_callback (fd=<optimized out>, events=1,
> user_data=0xaaaaaab40780) at ell/io.c:126
> #8  0x0000aaaaaaac83f8 in l_main_iterate (timeout=<optimized out>) at
> ell/main.c:473
> #9  0x0000aaaaaaac84d8 in l_main_run () at ell/main.c:520
> #10 l_main_run () at ell/main.c:502
> #11 0x0000aaaaaaac86f4 in l_main_run_with_signal (
> callback=callback@entry=0xaaaaaaac3c20 <l_sig_func>, 
> user_data=user_data@entry=0x0) at ell/main.c:642
> #12 0x0000aaaaaaac3cf4 in mainloop_run_with_signal (func=func@entry=0
> xaaaaaaac2130 <signal_callback>, user_data=user_data@entry=0x0) at
> src/shared/mainloop-ell.c:87
> #13 0x0000aaaaaaac3394 in bt_shell_run () at src/shared/shell.c:1174
> #14 0x0000aaaaaaab42d8 in main (argc=<optimized out>, argv=<optimized
> out>) at tools/mesh-cfgclient.c:1970
> (gdb) quit
> A debugging session is active.
> 
> 	Inferior 1 [process 5112] will be killed.
> Steve
> 
> On Thu, 2019-11-28 at 22:41 +0530, Venkat Vallapaneni wrote:
> > Hi Brian,
> > I am using latest bluez and ell trees on ubuntu 18.04. Log windows 
> > showing segmentation fault if it helps. I ran demon first and then 
> > mesh-cfgclient
> > 
> > vallapaneni@venkat-laptop:~$ sudo ~/tools/bluez/mesh/bluetooth-
> > meshd
> > D-Bus ready
> > Request name success
> > Loading node configuration from /var/lib/bluetooth/mesh
> > filter_set id: 1, --> 2b
> > filter_set id: 2, --> 29
> > filter_set id: 3, --> 2a
> > filter_set id: 4, --> 2b
> > Controller hci 0 is in use
> > 
> > vallapaneni@venkat-laptop:~/tools/bluez$ sudo 
> > ~/tools/bluez/tools/mesh-cfgclient
> > 
> > Warning: config file
> > "/home/vallapaneni/.config/meshcfg/config_db.json" 
> > not found
> > [mesh-cfgclient]# create
> > Segmentation fault
> > vallapaneni@venkat-laptop:~/tools/bluez$
> > 
> > Rgds,
> > Venkat.
> > 
> > On 28/11/19 9:37 pm, Gix, Brian wrote:
> > > Hi Venkat,
> > > 
> > > > On Nov 28, 2019, at 2:59 AM, Venkat Vallapaneni <
> > > > vallapaneni@socoptimum.com
> > > > > wrote:
> > > > 
> > > > Hi Brian,
> > > > 
> > > > Thanks for the response. Yes, I am using PB-GATT barrier. With
> > > > bluetooothd running, I am able to provision my device.
> > > 
> > > Ok... well if this is specifically to play with Zephyr, you can
> > > build it to accept PB-ADV based provisioning as well. But i think
> > > Zephyrs mesh tip is PN-GATT by default.
> > > 
> > > > I also tried mesh-cfgclient but unsuccessful. I launched the
> > > > shell with mesh-cfgclient (with bluetooth-meshd running) and I
> > > > gave create command in the shell. I see segmentation fault. Any
> > > > steps I am missing?
> > > 
> > > Are you on the tip of both the BlueZ tree, and the ELL tree?
> > > Also,
> > > what linux distro are you using?
> > > 
> > > > Is mesh-cfgclient only for provisioning or also for sending
> > > > mesh
> > > > messages also?
> > > 
> > > mesh-cfgclient not only provisions devices with PB-ADV, but it
> > > also
> > > is a full featured Config Client. It can send keys, bindings,
> > > subscriptions, and publications.
> > > 
> > > 
> > > > Rgds,
> > > > 
> > > > Venkat.
> > > > 
> > > > 
> > > > > On 28/11/19 4:22 am, Gix, Brian wrote:
> > > > > Hi Venkat,
> > > > > 
> > > > > Are you attempting to provision a device that requires PB-
> > > > > GATT
> > > > > provisioning?  If so, the bluetoothd daemon must be up and
> > > > > running. However, this tool is old, and will probably be
> > > > > deprecated at some point.
> > > > > 
> > > > > However most Mesh devices should support Advertising based
> > > > > provisioning.
> > > > > 
> > > > > The Mesh daemon (Bluetooth-meshd) and the mesh-cfgclient tool
> > > > > (in the tools directory) has been undergoing modification
> > > > > even
> > > > > since v5.52, so you will want to checkout the tip.
> > > > > 
> > > > > ./tools/mesh-cfgclient is the tool most appropriate for mesh
> > > > > development today.
> > > > > 
> > > > > 
> > > > > 
> > > > > > > On Nov 26, 2019, at 8:16 PM, Venkat Vallapaneni <
> > > > > > > vallapaneni@socoptimum.com
> > > > > > > > wrote:
> > > > > > 
> > > > > > Hi,
> > > > > > 
> > > > > > I am trying to use bluez 5.52 for provisioning a bluetooth
> > > > > > mesh capable device. When I gave provision <uuid>, I get
> > > > > > this
> > > > > > below error. Please let me know what I am missing.
> > > > > > 
> > > > > > I am using ell 0.26 on ubuntu 18.04. I am able to provision
> > > > > > successfully with bluez 5.50.
> > > > > > 
> > > > > > AcquireWrite success: fd 8 MTU 69
> > > > > > GATT-TX:     03 00 10
> > > > > > *sendmsg: Socket operation on non-socket*[Zephyr]#
> > > > > > 
> > > > > > Rgds,
> > > > > > Venkat.
> > > > > > 

The debug output indicates that the daemon started, but hasn't found an
available hci device, so it is stuck in semi-initialized mode:
the dbus-service name has been registered, but not the interfaces.

There are multiple thins going on here:
- Currently bluetoothd & bluetooth-meshd cannot run on the same
controller (addressing this requires kernel changes). So if there is
only one controller it's either bluetoothd or meshd daemons, but not
both. Please check if bluetoothd is running.
Perhaps, with systemctl meshd starts before bluetoothd starts and grabs
the single hci device?

- mesh-cfgclient needs to have an additional check for Network1 being
detected. This would deal with the symptom not the reason.

- I believe the daemon should be fixed so that d-bus service is not
exposed unless there is a BT controller available. Will look into this.

Best regards,

Inga
 
 




^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-12-03 23:42 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-27  4:16 bluez meshctl error: socket operation on non-socket Venkat Vallapaneni
2019-11-27 22:52 ` Gix, Brian
2019-11-28 10:58   ` Venkat Vallapaneni
2019-11-28 16:07     ` Gix, Brian
2019-11-28 17:11       ` Venkat Vallapaneni
2019-11-28 23:05         ` Steve Brown
2019-11-29  1:28           ` Venkat Vallapaneni
2019-12-03 23:42           ` Stotland, Inga

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.