Re: [Zephyr-devel] Zephyr Based Bluetooth Mesh implementation on nRF52840-PDK boards


Vikrant More <vikrant8051@...>
 

It is working now !!
I run hcitool lescan on another terminal & { discover-unprovisioned on , provision dddd0000000000000000000000000000 } on messhctl terminal.

Output -->
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

[meshctl]# discover-unprovisioned on
set_scan_filter_uuids 00001827-0000-1000-8000-00805f9b34fb
SetDiscoveryFilter success
Discovery started
Adapter property changed 
[CHG] Controller F0:03:8C:B7:5A:18 Discovering: yes
Mesh Provisioning Service (00001827-0000-1000-8000-00805f9b34fb)
Device UUID: dddd0000000000000000000000000000
OOB: 0000
[NEW] Device EA:E8:05:9B:16:1D Zephyr
[meshctl]# provision dddd0000000000000000000000000000
Trying to connect Device EA:E8:05:9B:16:1D Zephyr
Adapter property changed 
[CHG] Controller F0:03:8C:B7:5A:18 Discovering: no
[Zephyr]# Connection successful
[Zephyr]# Service added /org/bluez/hci0/dev_EA_E8_05_9B_16_1D/service0006
Service added /org/bluez/hci0/dev_EA_E8_05_9B_16_1D/service000a
Char added /org/bluez/hci0/dev_EA_E8_05_9B_16_1D/service000a/char000b:
Char added /org/bluez/hci0/dev_EA_E8_05_9B_16_1D/service000a/char000d:
Services resolved yes
Found matching char: path /org/bluez/hci0/dev_EA_E8_05_9B_16_1D/service000a/char000b, uuid 00002adb-0000-1000-8000-00805f9b34fb
Found matching char: path /org/bluez/hci0/dev_EA_E8_05_9B_16_1D/service000a/char000d, uuid 00002adc-0000-1000-8000-00805f9b34fb
Start notification on /org/bluez/hci0/dev_EA_E8_05_9B_16_1D/service000a/char000d
Characteristic property changed /org/bluez/hci0/dev_EA_E8_05_9B_16_1D/service000a/char000d
Notify started
Notify for Mesh Provisioning Out Data started
Open-Node: 0x1444640
Open-Prov: 0x1446380
Open-Prov: proxy 0x144a150
GATT-TX:  03 00 10 
Attempting to write /org/bluez/hci0/dev_EA_E8_05_9B_16_1D/service000a/char000b
Initiated provisioning
Characteristic property changed /org/bluez/hci0/dev_EA_E8_05_9B_16_1D/service000a/char000d
GATT-RX: 03 01 01 00 01 00 00 04 00 08 00 00 00 
Got provisioning data (12 bytes)
01 01 00 01 00 00 04 00 08 00 00 00 
GATT-TX:  03 02 00 00 02 03 04 
Attempting to write /org/bluez/hci0/dev_EA_E8_05_9B_16_1D/service000a/char000b
GATT-TX:  03 03 a8 09 93 50 18 6f 0d 3a cb af 39 40 28 60 
GATT-TX:  9b fa 15 c9 
Attempting to write /org/bluez/hci0/dev_EA_E8_05_9B_16_1D/service000a/char000b
Characteristic property changed /org/bluez/hci0/dev_EA_E8_05_9B_16_1D/service000a/char000d
GATT-RX: 03 03 3a bd 0b 6e 8a d8 dd a9 92 22 a9 3c e4 c7 
GATT-RX: fe c3 f1 08 d9 5b ef ff 56 49 87 aa 64 ca 74 af 
GATT-RX: ed 3d 89 b9 60 9c b8 19 a3 54 16 a4 dd 12 8d 3c 
GATT-RX: f3 79 1c 18 15 2e 64 3a 4a e2 c1 34 19 c7 39 ab 
GATT-RX: 9f e3 
Got provisioning data (65 bytes)
03 3a bd 0b 6e 8a d8 dd a9 92 22 a9 3c e4 c7 fe 
c3 f1 08 d9 5b ef ff 56 49 87 aa 64 ca 74 af ed 
3d 89 b9 60 9c b8 19 a3 54 16 a4 dd 12 8d 3c f3 
79 1c 18 15 2e 64 3a 4a e2 c1 34 19 c7 39 ab 9f 
e3 
Request decimal key (0 - 9999)
[mesh] Enter Numeric key: 1234
GATT-TX:  03 05 79 75 31 d9 3c ce a3 27 2c d7 1b 5d 90 f3 
GATT-TX:  30 27 
Attempting to write /org/bluez/hci0/dev_EA_E8_05_9B_16_1D/service000a/char000b
Characteristic property changed /org/bluez/hci0/dev_EA_E8_05_9B_16_1D/service000a/char000d
GATT-RX: 03 05 eb 68 f7 99 be 18 ef 71 6e 51 10 f6 f5 05 
GATT-RX: d2 40 
Got provisioning data (17 bytes)
05 eb 68 f7 99 be 18 ef 71 6e 51 10 f6 f5 05 d2 
40 
GATT-TX:  03 06 af 78 37 46 88 64 92 8f f1 f4 9c c1 18 95 
GATT-TX:  a7 8d 
Attempting to write /org/bluez/hci0/dev_EA_E8_05_9B_16_1D/service000a/char000b
[Zephyr]#

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Now what to do next ??
I've repeat this procedure on all three board.

How to control LEDs on these board using meshctl or any android APP ??

Thank You!!



On Thu, Nov 16, 2017 at 10:10 AM, Vikrant More <vikrant8051@...> wrote:
Now I'm able to run "discover-unprovisioned on" this command & o/p is

set_scan_filter_uuids 00001827-0000-1000-8000-00805f9b34fb
SetDiscoveryFilter success
Discovery started
Adapter property changed 
[CHG] Controller F0:03:8C:B7:5A:18 Discovering: ye


But "provision dddd0000000000000000000000000000" is still giving me this o/p-

Device with UUID dddd0000000000000000000000000000 not found.
Stale services? Remove device and re-discover

I'm able to discover & connect nRF52840-PDK board via nRF connect android app.


On Wed, Nov 15, 2017 at 10:01 PM, Steve Brown <sbrown@...> wrote:
More.

If I run the old bluetoothd, I get

[NEW] Controller B8:27:EB:06:2E:57 raspberrypi [default]
[meshctl]# discover-unprovisioned on
set_scan_filter_uuids 00001827-0000-1000-8000-00805f9b34fb
SetDiscoveryFilter failed: org.bluez.Error.InvalidArguments
Discovery started
Adapter property changed
[CHG] Controller B8:27:EB:06:2E:57 Discovering: yes

The same as you.

I'm pretty sure that's your problem.

Steve


On Wed, 2017-11-15 at 21:17 +0530, Vikrant More wrote:
>
> [meshctl]# discover-unprovisioned on
> set_scan_filter_uuids 00001827-0000-1000-8000-00805f9b34fb
> SetDiscoveryFilter failed: org.bluez.Error.InvalidArguments
> Discovery started
> Adapter property changed
> [CHG] Controller F0:03:8C:B7:5A:18 Discovering: yes
>
> I built BlueZ 5.47 as per your style but I am getting same error
> which is mentioned above.
>
> On Nov 15, 2017 5:47 PM, "Steve Brown" <sbrown@...> wrote:
> > I don't recognize that repository. The one I'm using is
> >
> > https://git.kernel.org/pub/scm/bluetooth/bluez.git
> >
> > The json files are in that repository.
> >
> > I run ./bootstrap-configure, then make and sudo make install.
> >
> > You might want to remove your distribution's bluez from your system
> > so
> > there's no confusion over version.
> >
> > Lastly, are you sure that the bluetooth hardware on your computer
> > does
> > ble? If in doubt, try
> > sudo btmgmt info
> >
> > Steve
> >
> > On Wed, 2017-11-15 at 17:12 +0530, Vikrant More wrote:
> > > could you please help how to build https://github.com/hadess/blue
> > z ??
> > >
> > > since here I am not getting configure file to execute -->
> > > ./configure --prefix=/usr  --sysconfdir=/etc  --
> > localstatedir=/var
> > > --enable-library  --disable-systemd  && make
> > >
> > > On Wed, Nov 15, 2017 at 4:52 PM, Steve Brown <sbrown@...
> > >
> > > wrote:
> > > > It looks like you have some kind of problem on the bluez end.
> > > >
> > > > I get the following on the same board.
> > > >
> > > > [meshctl]# discover-unprovisioned on
> > > > set_scan_filter_uuids 00001827-0000-1000-8000-00805f9b34fb
> > > > SetDiscoveryFilter success
> > > > Discovery started
> > > > Adapter property changed
> > > > [CHG] Controller B8:27:EB:06:2E:57 Discovering: yes
> > > >                 Mesh Provisioning Service (00001827-0000-1000-
> > 8000-
> > > > 00805f9b34fb)
> > > >                         Device UUID:
> > > > dddd0000000000000000000000000000
> > > >                         OOB: 0000
> > > >
> > > >
> > > > Are you sure you have a 5.47 bluetoothd running?
> > > >
> > > > Steve
> > > >
> > > >
> > > > On Wed, 2017-11-15 at 16:29 +0530, Vikrant More wrote:
> > > > > Thank very much !!
> > > > >
> > > > > I used your suggested commands. And I got following response
> > -
> > > > >
> > > > > [meshctl]# discover-unprovisioned on
> > > > > set_scan_filter_uuids 00001827-0000-1000-8000-00805f9b34fb
> > > > > SetDiscoveryFilter failed: org.bluez.Error.InvalidArguments
> > > > > Discovery started
> > > > > Adapter property changed
> > > > > [CHG] Controller F0:03:8C:B7:5A:18 Discovering: yes
> > > > >
> > > > >
> > > > >
> > > > > meshctl]# provision dddd0000000000000000000000000000
> > > > > Device with UUID dddd0000000000000000000000000000 not found.
> > > > > Stale services? Remove device and re-discover
> > > > >
> > > > >
> > > > > On Wed, Nov 15, 2017 at 2:32 PM, Steve Brown <sbrown@cortland
> > .com
> > > > >
> > > > > wrote:
> > > > > > Hi Vikrant,
> > > > > >
> > > > > > On Wed, 2017-11-15 at 13:58 +0530, Vikrant More wrote:
> > > > > > > Hello,
> > > > > > > I to want build Zephyr based lighting system & for
> > testing I
> > > > have
> > > > > > 3
> > > > > > > nRF52840-PDK boards.
> > > > > > >
> > > > > > > I've flashed  zephyr/samples/bluetooth/mesh firmware on
> > all
> > > > three
> > > > > > > board.
> > > > > > > They are advertising themselves as any other GATT
> > peripheral
> > > > > > devices.
> > > > > > >
> > > > > > > As per my understanding they are in unprovisioned state.
> > > > > > >
> > > > > > > Using "NRF connect" Android app I can send data to
> > service
> > > > (Mesh
> > > > > > > Provisioning Service) running on it.
> > > > > > >
> > > > > > > I think this service is for provisioning purpose. Am I
> > right
> > > > ?
> > > > > > >
> > > > > > > How to do provisioning using meshctl utility (BlueZ 5.47)
> > ?
> > > > > > >
> > > > > > > When I execute meshctl on my ubuntu laptop it gives me
> > > > following
> > > > > > > error -
> > > > > > >
> > > > > > >        Local config directory not provided.
> > > > > > >    Failed to parse local node configuration file
> > > > local_node.json
> > > > > > >
> > > > > > >
> > > > > > I assume you built the bluez 5.47 from source.
> > > > > >
> > > > > > The json files live in bluez/mesh. You either have to run
> > > > meshctl
> > > > > > in
> > > > > > that directory or point to it with the "-c" option.
> > > > > >
> > > > > > Once in meshctl, the commands:
> > > > > > discover-unprovisioned on
> > > > > > provision <Device UUID>
> > > > > >
> > > > > > should get you going.
> > > > > >
> > > > > > In the mesh sample the UUID is hardwired to
> > > > > > "dddd0000000000000000000000000000"
> > > > > >
> > > > > > Steve
> > > > > >
> > > > >
> > > > >
> > >
> > >


Join users@lists.zephyrproject.org to automatically receive all group messages.