Date   

nRF Sniffer

Chettimada, Vinayak Kariappa
 

Hi,

This e-mail is only for information.
In a recent email chain, I had mentioned nRF Sniffer.
If you own a nRF51 dongle/DK or nRF52832 PCA10040 DK, you have a free simple Bluetooth Low Energy packet sniffer.


I had used older sniffer for nRF51 dongle on Windows OS with no issues before. 
Today I installed it on my Mac Book Pro macOS High Sierra for PCA10040 nRF52832 board without any issues, in very simple steps as described in the User Guide.

The sniffer works seamlessly when using Wireshark, my observations:
- The documented LED1 is off on PCA10040, LED2 keeps blinking when it is sniffer all advertising.
- LED2 is off, LED1 is blinking for every packet (Adv or Connected) sniffing/following a particular device when selected in Wireshark.

Regards,
Vinayak

- LED2 will blink a lot, will not be surprised, every place in the world with a smart phone around, more than 5 BLE devices advertising in a 10m diameter around you!  


Re: Bluetooth Mesh Advertisement issues

Chettimada, Vinayak Kariappa
 

Hi Paul,

 

Regarding the spikes, could you give me more details of your application?

 

Could you turn on CONFIG_BT_CTLR_DEBUG_PINS=y

 

You should be able to observe the BLE event scheduling on GPIOs.

The pins are defined here: https://github.com/zephyrproject-rtos/zephyr/blob/master/subsys/bluetooth/controller/hal/nrf5/debug.h#L11

 

Regards,

Vinayak

 

From: Gavrikov Paul [mailto:Paul.Gavrikov@...]
Sent: Thursday, February 15, 2018 2:23 PM
To: Chettimada, Vinayak Kariappa <vinayak.kariappa.chettimada@...>
Cc: zephyr-devel@...
Subject: AW: Bluetooth Mesh Advertisement issues

 

Hi,

 

The TI CC2540 I am using can only search one channel.

Unfortunately we don’t own a nRF sniffer (and no nRF51 either). If you can send us one, I’ll be happy to do the analysis with it:
NewTec GmbH

c/o Paul Gavrikov

Heinrich-von-Stephan-Str. 8

79100 Freiburg

Germany

 

Other than that please check the energy profile I screenshotted in the previous emails – there you’ll see adv. Spikes spaced faster than 20ms.

 

Best,
Paul

 

Von: Chettimada, Vinayak Kariappa [mailto:vinayak.kariappa.chettimada@...]
Gesendet: Donnerstag, 15
. Februar 2018 08:44
An: Gavrikov Paul <Paul.Gavrikov@...>
Cc: zephyr-devel@...
Betreff: RE: Bluetooth Mesh Advertisement issues

 

Hi,

 

Difference between packet number 85 and 87 is 29969 us, and

Between packet number 87 and 88 is 24963.

 

This is 20 ms +/- 10 ms random delay as per BT spec.

 

There are other advertisers in your log. And, also I don’t see all advertising channels being captured.

 

Could you please use Nordic nRF Sniffer, it has better wireshark support and captures all channels.

http://www.nordicsemi.com/eng/Products/Bluetooth-low-energy/nRF-Sniffer

 

Regards,

Vinayak

 

From: Gavrikov Paul [mailto:Paul.Gavrikov@...]
Sent: Wednesday, February 14, 2018 2:58 PM
To: Chettimada, Vinayak Kariappa <vinayak.kariappa.chettimada@...>
Cc: zephyr-devel@...
Subject: AW: Bluetooth Mesh Advertisement issues

 

Upon checking with a TI sniffer, I have discovered that this seems to be caused by ADV_IND / AND_NON_CONN_IND that are being sent with MSD. However I do not trigger these advertisements … any clue what is going on here?

 

 

Best
Paul

 

Von: Gavrikov Paul
Gesendet: Dienstag, 13. Februar 2018 18:19
An: 'Chettimada, Vinayak Kariappa' <vinayak.kariappa.chettimada@...>
Cc: zephyr-devel@...
Betreff: AW: Bluetooth Mesh Advertisement issues

 

Hi Vinayak,

 

I’ve uploaded the code snippet for your convenience: https://pasteio.com/xfZOuK2Z6HzW

Please note I am NOT start / stopping advertising. Just starting it and doing nothing else.

 

I’ve also uploaded a larger trace: https://pasteboard.co/H7tFVTO.png

Note the “tight” intervals almost  every other advertisement. Those are all out of spec – the highlighted is around 10ms. Again this was only tested with the nRF52-Dk but with Zephyr and SoftDevice 132 (same behavior). Also I understand that advDelay is pseudorandom – but this behavior doesn’t look too random.

 

Best,
Paul

 

Von: Chettimada, Vinayak Kariappa [mailto:vinayak.kariappa.chettimada@...]
Gesendet: Samstag, 10. Febr
uar 2018 06:35
An: Gavrikov Paul <Paul.Gavrikov@...>
Cc: zephyr-devel@...
Betreff: Re: Bluetooth Mesh Advertisement issues

 

Hi Paul,

 

I do not have visibility to your code, in terms of how you are starting the advertisements, if you stop and start them too close you will see the behaviour as you observed. 

As I cannot infer from your image that the interval being 7-8ms with just 2 event, please send me a longer capture.

 

Regards,

Vinayak

 

On 9 Feb 2018, at 15:48, Gavrikov Paul <Paul.Gavrikov@...> wrote:

 

Also I just checked and the same happens with SoftDevice 132 – am I measuring something wrong?

 

Von: Gavrikov Paul 
Gesendet: Freitag, 9. Februar 2018 15:43
An: 'Chettimada, Vinayak Kariappa' <vinayak.kariappa.chettimada@...>; zephyr-devel@...
Betreff: AW: Bluetooth Mesh Advertisement issues

 

I measured the time between two starting points like here: https://ibb.co/dqa5Ox

 

Code:

               struct bt_le_adv_param param;

               param.options = 0;

               param.interval_min = ADV_INT(K_MSEC(20));

               param.interval_max = param.interval_min;

               param.own_addr = NULL;

               int err = bt_le_adv_start(&param, ad, ARRAY_SIZE(ad), NULL, 0);

 

Von: Chettimada, Vinayak Kariappa [mailto:vinayak.kariappa.chettimada@...] 
Gesendet: Freitag, 9. Februar 2018 15:32
An: Gavrikov Paul <Paul.Gavrikov@...>; zephyr-devel@...
Betreff: RE: Bluetooth Mesh Advertisement issues

 

1.      Advertising Interval too short and out of spec: Sometimes the interval between 2 transmits of the Friend Poll is under 20ms (even tho it is set to 20ms). I measured intervals of just 7ms.

[vich]  Are you sure this not due to a close stop to start sequence? Do you see 7 ms intervals or one-off 7 ms spacing?

 


Re: Bluetooth Mesh Advertisement issues

Gavrikov Paul <Paul.Gavrikov@...>
 

Hi,

 

The TI CC2540 I am using can only search one channel.

Unfortunately we don’t own a nRF sniffer (and no nRF51 either). If you can send us one, I’ll be happy to do the analysis with it:
NewTec GmbH

c/o Paul Gavrikov

Heinrich-von-Stephan-Str. 8

79100 Freiburg

Germany

 

Other than that please check the energy profile I screenshotted in the previous emails – there you’ll see adv. Spikes spaced faster than 20ms.

 

Best,
Paul

 

Von: Chettimada, Vinayak Kariappa [mailto:vinayak.kariappa.chettimada@...]
Gesendet: Donnerstag, 15
. Februar 2018 08:44
An: Gavrikov Paul <Paul.Gavrikov@...>
Cc: zephyr-devel@...
Betreff: RE: Bluetooth Mesh Advertisement issues

 

Hi,

 

Difference between packet number 85 and 87 is 29969 us, and

Between packet number 87 and 88 is 24963.

 

This is 20 ms +/- 10 ms random delay as per BT spec.

 

There are other advertisers in your log. And, also I don’t see all advertising channels being captured.

 

Could you please use Nordic nRF Sniffer, it has better wireshark support and captures all channels.

http://www.nordicsemi.com/eng/Products/Bluetooth-low-energy/nRF-Sniffer

 

Regards,

Vinayak

 

From: Gavrikov Paul [mailto:Paul.Gavrikov@...]
Sent: Wednesday, February 14, 2018 2:58 PM
To: Chettimada, Vinayak Kariappa <vinayak.kariappa.chettimada@...>
Cc: zephyr-devel@...
Subject: AW: Bluetooth Mesh Advertisement issues

 

Upon checking with a TI sniffer, I have discovered that this seems to be caused by ADV_IND / AND_NON_CONN_IND that are being sent with MSD. However I do not trigger these advertisements … any clue what is going on here?

 

 

Best
Paul

 

Von: Gavrikov Paul
Gesendet: Dienstag, 13. Februar 2018 18:19
An: 'Chettimada, Vinayak Kariappa' <vinayak.kariappa.chettimada@...>
Cc: zephyr-devel@...
Betreff: AW: Bluetooth Mesh Advertisement issues

 

Hi Vinayak,

 

I’ve uploaded the code snippet for your convenience: https://pasteio.com/xfZOuK2Z6HzW

Please note I am NOT start / stopping advertising. Just starting it and doing nothing else.

 

I’ve also uploaded a larger trace: https://pasteboard.co/H7tFVTO.png

Note the “tight” intervals almost  every other advertisement. Those are all out of spec – the highlighted is around 10ms. Again this was only tested with the nRF52-Dk but with Zephyr and SoftDevice 132 (same behavior). Also I understand that advDelay is pseudorandom – but this behavior doesn’t look too random.

 

Best,
Paul

 

Von: Chettimada, Vinayak Kariappa [mailto:vinayak.kariappa.chettimada@...]
Gesendet: Samstag, 10. Febr
uar 2018 06:35
An: Gavrikov Paul <Paul.Gavrikov@...>
Cc: zephyr-devel@...
Betreff: Re: Bluetooth Mesh Advertisement issues

 

Hi Paul,

 

I do not have visibility to your code, in terms of how you are starting the advertisements, if you stop and start them too close you will see the behaviour as you observed. 

As I cannot infer from your image that the interval being 7-8ms with just 2 event, please send me a longer capture.

 

Regards,

Vinayak

 

On 9 Feb 2018, at 15:48, Gavrikov Paul <Paul.Gavrikov@...> wrote:

 

Also I just checked and the same happens with SoftDevice 132 – am I measuring something wrong?

 

Von: Gavrikov Paul 
Gesendet: Freitag, 9. Februar 2018 15:43
An: 'Chettimada, Vinayak Kariappa' <vinayak.kariappa.chettimada@...>; zephyr-devel@...
Betreff: AW: Bluetooth Mesh Advertisement issues

 

I measured the time between two starting points like here: https://ibb.co/dqa5Ox

 

Code:

               struct bt_le_adv_param param;

               param.options = 0;

               param.interval_min = ADV_INT(K_MSEC(20));

               param.interval_max = param.interval_min;

               param.own_addr = NULL;

               int err = bt_le_adv_start(&param, ad, ARRAY_SIZE(ad), NULL, 0);

 

Von: Chettimada, Vinayak Kariappa [mailto:vinayak.kariappa.chettimada@...] 
Gesendet: Freitag, 9. Februar 2018 15:32
An: Gavrikov Paul <Paul.Gavrikov@...>; zephyr-devel@...
Betreff: RE: Bluetooth Mesh Advertisement issues

 

1.      Advertising Interval too short and out of spec: Sometimes the interval between 2 transmits of the Friend Poll is under 20ms (even tho it is set to 20ms). I measured intervals of just 7ms.

[vich]  Are you sure this not due to a close stop to start sequence? Do you see 7 ms intervals or one-off 7 ms spacing?

 


Re: Bluetooth Mesh Advertisement issues

Chettimada, Vinayak Kariappa
 

Hi,

 

Difference between packet number 85 and 87 is 29969 us, and

Between packet number 87 and 88 is 24963.

 

This is 20 ms +/- 10 ms random delay as per BT spec.

 

There are other advertisers in your log. And, also I don’t see all advertising channels being captured.

 

Could you please use Nordic nRF Sniffer, it has better wireshark support and captures all channels.

http://www.nordicsemi.com/eng/Products/Bluetooth-low-energy/nRF-Sniffer

 

Regards,

Vinayak

 

From: Gavrikov Paul [mailto:Paul.Gavrikov@...]
Sent: Wednesday, February 14, 2018 2:58 PM
To: Chettimada, Vinayak Kariappa <vinayak.kariappa.chettimada@...>
Cc: zephyr-devel@...
Subject: AW: Bluetooth Mesh Advertisement issues

 

Upon checking with a TI sniffer, I have discovered that this seems to be caused by ADV_IND / AND_NON_CONN_IND that are being sent with MSD. However I do not trigger these advertisements … any clue what is going on here?

 

 

Best
Paul

 

Von: Gavrikov Paul
Gesendet: Dienstag, 13. Februar 2018 18:19
An: 'Chettimada, Vinayak Kariappa' <vinayak.kariappa.chettimada@...>
Cc: zephyr-devel@...
Betreff: AW: Bluetooth Mesh Advertisement issues

 

Hi Vinayak,

 

I’ve uploaded the code snippet for your convenience: https://pasteio.com/xfZOuK2Z6HzW

Please note I am NOT start / stopping advertising. Just starting it and doing nothing else.

 

I’ve also uploaded a larger trace: https://pasteboard.co/H7tFVTO.png

Note the “tight” intervals almost  every other advertisement. Those are all out of spec – the highlighted is around 10ms. Again this was only tested with the nRF52-Dk but with Zephyr and SoftDevice 132 (same behavior). Also I understand that advDelay is pseudorandom – but this behavior doesn’t look too random.

 

Best,
Paul

 

Von: Chettimada, Vinayak Kariappa [mailto:vinayak.kariappa.chettimada@...]
Gesendet: Samstag, 10. Febr
uar 2018 06:35
An: Gavrikov Paul <Paul.Gavrikov@...>
Cc: zephyr-devel@...
Betreff: Re: Bluetooth Mesh Advertisement issues

 

Hi Paul,

 

I do not have visibility to your code, in terms of how you are starting the advertisements, if you stop and start them too close you will see the behaviour as you observed. 

As I cannot infer from your image that the interval being 7-8ms with just 2 event, please send me a longer capture.

 

Regards,

Vinayak

 

On 9 Feb 2018, at 15:48, Gavrikov Paul <Paul.Gavrikov@...> wrote:

 

Also I just checked and the same happens with SoftDevice 132 – am I measuring something wrong?

 

Von: Gavrikov Paul 
Gesendet: Freitag, 9. Februar 2018 15:43
An: 'Chettimada, Vinayak Kariappa' <vinayak.kariappa.chettimada@...>; zephyr-devel@...
Betreff: AW: Bluetooth Mesh Advertisement issues

 

I measured the time between two starting points like here: https://ibb.co/dqa5Ox

 

Code:

               struct bt_le_adv_param param;

               param.options = 0;

               param.interval_min = ADV_INT(K_MSEC(20));

               param.interval_max = param.interval_min;

               param.own_addr = NULL;

               int err = bt_le_adv_start(&param, ad, ARRAY_SIZE(ad), NULL, 0);

 

Von: Chettimada, Vinayak Kariappa [mailto:vinayak.kariappa.chettimada@...] 
Gesendet: Freitag, 9. Februar 2018 15:32
An: Gavrikov Paul <Paul.Gavrikov@...>; zephyr-devel@...
Betreff: RE: Bluetooth Mesh Advertisement issues

 

1.      Advertising Interval too short and out of spec: Sometimes the interval between 2 transmits of the Friend Poll is under 20ms (even tho it is set to 20ms). I measured intervals of just 7ms.

[vich]  Are you sure this not due to a close stop to start sequence? Do you see 7 ms intervals or one-off 7 ms spacing?

 


Re: Bluetooth Mesh: Bad values for continuous scan

Chettimada, Vinayak Kariappa
 

Hi Paul,

I have some related fixes here, hope you can re-run your tests.

Summary, the improvement to continuous scan had regression, introducing varying scan windows, which should be fixed in the above PR (I will do more test in the coming days).

Regards,
Vinayak

On 9 Feb 2018, at 12:09, Gavrikov Paul <Paul.Gavrikov@...> wrote:

Hi Vinayak,
 
I re-ran my analysis with 0x4, 0x10, 0x100 and 0x4000 values (continuous scan, 1000 sent advertisements, re run 3x).
I do see an improvement of roughly 5% for 0x10. A very slight improvement for 0x100 – but it was very good before anyway. 
Interestingly 0x4 is now performing worse with a drop rate of 41% (before 32%). Also 0x4000 dropped 19% of advertisements which seems very weird (before under 1%).  
 
Best,
Paul
Von: Chettimada, Vinayak Kariappa [mailto:vinayak.kariappa.chettimada@...] 
Gesendet: Mittwoch, 7. Februar 2018 11:37
An: Gavrikov Paul <Paul.Gavrikov@...>
Cc: zephyr-devel@...; Johan Hedberg <johan.hedberg@...>
Betreff: RE: [Zephyr-devel] Bluetooth Mesh: Bad values for continuous scan
 
Hi Paul,
 
FYI. The below two PRs should be merged soon into upstream master, could you please re-run your analysis and let me know if there has been any improvement?
 
Improved radio utilization in continuous scanning:
 
And, fixed a bug that prevented advertising while in continuous scanning with 2 second window:
 
Thanks in advance.
 
-Vinayak
 
 
From: zephyr-devel-bounces@... [mailto:zephyr-devel-bounces@...] On Behalf Of Chettimada, Vinayak Kariappa
Sent: Thursday, February 01, 2018 9:14 PM
To: Johan Hedberg <johan.hedberg@...>
Cc: Gavrikov Paul <Paul.Gavrikov@...>; zephyr-devel@...
Subject: Re: [Zephyr-devel] Bluetooth Mesh: Bad values for continuous scan
 
Every event has a 1.5ms preparation/idling, hence you are right 1.5ms of 10ms or 15% missed adv reports. 
 
The reason for 10ms was to reduce the radio idling when advertising event would overlap in time with scan window,
in such cases scan will only resume every 10ms.
Imagine if using a scan interval and window of 2 seconds, and it where to be skipped due to a advertising event of mere 3 ms.
I am working on a newer architecture that would increase radio utilisation significantly, but its going to take sometime until I finish porting everything.
 
That said, there is an advanced Kconfig option CONFIG_BT_CTLR_XTAL_THRESHOLD
you can increase this to above 10 ms so that the 1.5ms idling reduces dynamically down, reducing the miss percentage down.
 
Also, there is a controller bug, which I will fix soon. If the scan window is more than twice the advertising interval, the controller asserts.
 
-Vinayak

 

On 1 Feb 2018, at 18:15, Johan Hedberg <johan.hedberg@...> wrote:
 

Hi Paul,

On Thu, Feb 01, 2018, Gavrikov Paul wrote:

the default MESH_SCAN_INTERVAL and MESH_SCAN_WINDOW
(/subsys/bluetooth/host/mesh/adv.c) are both set to 0x10, thus
enabling a continuous scan which switches the channel every 10ms.
However as you may know, most radios can't switch channels immediately
and thus cause a delay period in which no advertisement can be
detected. (see e.g.
https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5375785/).
I did some experiments with a Nordic Semicon nRF52-PCA100400 and saw
that with the default Zephyr values I miss 15% of all advertisements
in an almost inactive radio environment.  Increasing
MESH_SCAN_INTERVAL to 0x100 (i.e. 160ms) results in 1.5%, 0x4000 (the
max)  <0.5% miss rate. (Measurement: Sending 5x 1000 advertisements
with 20ms interval).

Thus I'd propose increasing these values or exposing them to config.

Thanks for analyzing this. I picked 0x10 after consulting with the
Nordic Semiconductor engineers who are behind Zephyr's controller
implementation. I'll let them comment before doing the change.

Johan
_______________________________________________
Zephyr-devel mailing list
Zephyr-devel@...
https://lists.zephyrproject.org/mailman/listinfo/zephyr-devel


Re: Which cloud service zephyr already supported?

Leandro Pereira
 

Aaron,

On 02/13/2018 12:52 AM, Aaron Xu wrote:
I want to upload some sensors data, like temperature/humidity/pressure and so on, upstream to cloud.
I am wonder that is there any example to show how to do it?
While not a cloud provider itself, there are HTTP, CoAP, LWM2M, SNTP, NATS and JSON libraries in Zephyr. Some of these are available as libraries bundled with the project, some of these are implemented as sample applications. It should be possible to upload this kind of data to a provider of your choice using these libraries.

Cheers,
Leandro


Re: Which cloud service zephyr already supported?

Marti Bolivar
 

Hi Aaron,

Sorry for the delay in responding.

They're not upstream, but we (Open Source Foundries) have two reference systems, which support end to end sensor data upstreaming to the cloud, via LWM2M and also MQTT. There is complete documentation, including setup instructions for a Linux gateway to get the data off of a Zephyr device via BT and into the network.

To get started (we have a public release with code on Github, but you will need to register for documentation for now -- we were hoping to get public docs working before responding, but those are not 100% ready yet):


Overview:


(This is a subscription product, but we do periodic public open source releases. Hope that's OK for zephyr-devel.)

Please let us know via our support mechanisms (in our docs) if you try it out and have any issues!

Thanks,
Marti


On Tue, Feb 13, 2018 at 6:07 AM, Cufi, Carles <Carles.Cufi@...> wrote:

Hi Aaron,

 

I recommend talking to Open Source Foundries, who have integrated cloud services with Zephyr.

 

I have copied Martí from OSF.

 

Regards,

 

Carles

 

From: zephyr-devel-bounces@lists.zephyrproject.org [mailto:zephyr-devel-bounces@lists.zephyrproject.org] On Behalf Of Aaron Xu
Sent: 13 February 2018 09:53
To: zephyr-devel@lists.zephyrproject.org
Subject: [Zephyr-devel] Which cloud service zephyr already supported?

 

Hi,

 

I want to upload some sensors data, like temperature/humidity/pressure and so on, upstream to cloud.

I am wonder that is there any example to show how to do it?

 

 

Regards,

Aaron



Re: Bluetooth Mesh Advertisement issues

Gavrikov Paul <Paul.Gavrikov@...>
 

Upon checking with a TI sniffer, I have discovered that this seems to be caused by ADV_IND / AND_NON_CONN_IND that are being sent with MSD. However I do not trigger these advertisements … any clue what is going on here?

 

 

Best
Paul

 

Von: Gavrikov Paul
Gesendet: Dienstag, 13. Februar 2018 18:19
An: 'Chettimada, Vinayak Kariappa' <vinayak.kariappa.chettimada@...>
Cc: zephyr-devel@...
Betreff: AW: Bluetooth Mesh Advertisement issues

 

Hi Vinayak,

 

I’ve uploaded the code snippet for your convenience: https://pasteio.com/xfZOuK2Z6HzW

Please note I am NOT start / stopping advertising. Just starting it and doing nothing else.

 

I’ve also uploaded a larger trace: https://pasteboard.co/H7tFVTO.png

Note the “tight” intervals almost  every other advertisement. Those are all out of spec – the highlighted is around 10ms. Again this was only tested with the nRF52-Dk but with Zephyr and SoftDevice 132 (same behavior). Also I understand that advDelay is pseudorandom – but this behavior doesn’t look too random.

 

Best,
Paul

 

Von: Chettimada, Vinayak Kariappa [mailto:vinayak.kariappa.chettimada@...]
Gesendet: Samstag, 10. Febr
uar 2018 06:35
An: Gavrikov Paul <Paul.Gavrikov@...>
Cc: zephyr-devel@...
Betreff: Re: Bluetooth Mesh Advertisement issues

 

Hi Paul,

 

I do not have visibility to your code, in terms of how you are starting the advertisements, if you stop and start them too close you will see the behaviour as you observed. 

As I cannot infer from your image that the interval being 7-8ms with just 2 event, please send me a longer capture.

 

Regards,

Vinayak

 

On 9 Feb 2018, at 15:48, Gavrikov Paul <Paul.Gavrikov@...> wrote:

 

Also I just checked and the same happens with SoftDevice 132 – am I measuring something wrong?

 

Von: Gavrikov Paul 
Gesendet: Freitag, 9. Februar 2018 15:43
An: 'Chettimada, Vinayak Kariappa' <vinayak.kariappa.chettimada@...>; zephyr-devel@...
Betreff: AW: Bluetooth Mesh Advertisement issues

 

I measured the time between two starting points like here: https://ibb.co/dqa5Ox

 

Code:

               struct bt_le_adv_param param;

               param.options = 0;

               param.interval_min = ADV_INT(K_MSEC(20));

               param.interval_max = param.interval_min;

               param.own_addr = NULL;

               int err = bt_le_adv_start(&param, ad, ARRAY_SIZE(ad), NULL, 0);

 

Von: Chettimada, Vinayak Kariappa [mailto:vinayak.kariappa.chettimada@...] 
Gesendet: Freitag, 9. Februar 2018 15:32
An: Gavrikov Paul <Paul.Gavrikov@...>; zephyr-devel@...
Betreff: RE: Bluetooth Mesh Advertisement issues

 

1.      Advertising Interval too short and out of spec: Sometimes the interval between 2 transmits of the Friend Poll is under 20ms (even tho it is set to 20ms). I measured intervals of just 7ms.

[vich]  Are you sure this not due to a close stop to start sequence? Do you see 7 ms intervals or one-off 7 ms spacing?

 


sensor driver access

Anand Panchal <anandpanchal91@...>
 

Hi,

i am making an custom Android App for smartwatch. i need to access the drivers of heart rate, gyroscope etc sensors . could you please help me in this regard?

Thanks
Anand


Re: Introduction of Youtube video, "Bluetooth Mesh Demo at ELCE Prague 2017"

Kai Ren
 

Thank you, Johan. It started to work following your suggestion. 😊

Regards,
Kai

-----Original Message-----
From: Johan Hedberg [mailto:johan.hedberg@intel.com]
Sent: Monday, February 12, 2018 3:30 PM
To: Kai Ren <kren@bluetooth.com>
Cc: zephyr-devel@lists.zephyrproject.org
Subject: Re: [Zephyr-devel] Introduction of Youtube video, "Bluetooth Mesh Demo at ELCE Prague 2017"

Hi Kai,

On Mon, Feb 12, 2018, Kai Ren wrote:
I have two micro:bit boards, I built the firmware,
./sample/bluetooth/mesh_demo/ and flashed it on these two boards.
After completing it, I could see that:
1. one micro:bit address is 0x0b01, the other is 0x0b02;
Note that button B cycles the destination address from 0x0001 to 0x0009, then jumps to the group address and then back to 0x0001 again, so nodes with 0x0b.. addresses will only be able to receive on the group address but you can never send to their unicasts with the demo. I'd therefore recommend sticking to the 0x0001-0x0009 range.

2. when the boards powered up, I could see the unique address floating
on LED matrix; 3. attached is the UART console screenshot, the board
initialization was successful, when I press buttonA, button callback
function seemed to work well.

But I couldn't capture heartbeat and when I press buttonA, I couldn't
see that message broadcasting. Is there anything wrong for my
configuration?
Button A is not supposed to send a heartbeat message, rather it should send a kind of dummy vendor model message which should trigger the recipient to print the least significant digit of the address of the sender.

If you want to make one node send period heartbeat messages you need to give it the unicast address 0x000f, which is treated in a special way with the demo. If you haven't done so already I suggest you try to explore a bit the following source files, which should hopefully give a better idea of the logic and possibilities with the demo:

samples/bluetooth/mesh_demo/src/main.c
samples/bluetooth/mesh_demo/src/microbit.c

These two files communicate with each other through the exported functions in samples/bluetooth/mesh_demo/src/board.h.

Johan


Re: How to make Zephyr Based BLE device'd MAC address static ?

Vikrant More <vikrant8051@...>
 

Hi Johan,

Thanks for clarification.

But what to add or modify so that, we can avoid pairing of Device after every reset ?

How to take control of (6 digits ) pairing key, instead of generating random one ?

Regards,
vikrant8051


On Tue, Feb 13, 2018 at 10:43 PM, Johan Hedberg <johan.hedberg@...> wrote:
Hi Vikrant,

On Tue, Feb 13, 2018, Vikrant More wrote:
> Using available Zephyr Bluetooth APIs, I've develop BLE Device which is
> compatible with Nordic Blinky App. I'm doing testing on nrf52840-PDK board.
>
> But after every reset, it's MAC address gets changed with random one. How
> to make it static, so that no need of pairing with smartphone again & again
> ?
>
> How to take control of pairing key, instead of generating random one ?

All nRF boards *should* be using a static random identity address that's
read out from the FICR, i.e. you should then see the same address
printed out to the console every time Bluetooth initializes (assuming
you have a console, and CONFIG_BT_DEBUG_LOG=y). That said, if you have
CONFIG_BT_PRIVACY=y, then a Resolvable Private Address will be used, and
remote devices can only resolve this to the identity address after
pairing.

Johan


Re: Bluetooth Mesh Advertisement issues

Gavrikov Paul <Paul.Gavrikov@...>
 

Hi Vinayak,

 

I’ve uploaded the code snippet for your convenience: https://pasteio.com/xfZOuK2Z6HzW

Please note I am NOT start / stopping advertising. Just starting it and doing nothing else.

 

I’ve also uploaded a larger trace: https://pasteboard.co/H7tFVTO.png

Note the “tight” intervals almost  every other advertisement. Those are all out of spec – the highlighted is around 10ms. Again this was only tested with the nRF52-Dk but with Zephyr and SoftDevice 132 (same behavior). Also I understand that advDelay is pseudorandom – but this behavior doesn’t look too random.

 

Best,
Paul

 

Von: Chettimada, Vinayak Kariappa [mailto:vinayak.kariappa.chettimada@...]
Gesendet: Samstag, 10. Febr
uar 2018 06:35
An: Gavrikov Paul <Paul.Gavrikov@...>
Cc: zephyr-devel@...
Betreff: Re: Bluetooth Mesh Advertisement issues

 

Hi Paul,

 

I do not have visibility to your code, in terms of how you are starting the advertisements, if you stop and start them too close you will see the behaviour as you observed. 

As I cannot infer from your image that the interval being 7-8ms with just 2 event, please send me a longer capture.

 

Regards,

Vinayak



On 9 Feb 2018, at 15:48, Gavrikov Paul <Paul.Gavrikov@...> wrote:

 

Also I just checked and the same happens with SoftDevice 132 – am I measuring something wrong?

 

Von: Gavrikov Paul 
Gesendet: Freitag, 9. Februar 2018 15:43
An: 'Chettimada, Vinayak Kariappa' <vinayak.kariappa.chettimada@...>; zephyr-devel@...
Betreff: AW: Bluetooth Mesh Advertisement issues

 

I measured the time between two starting points like here: https://ibb.co/dqa5Ox

 

Code:

               struct bt_le_adv_param param;

               param.options = 0;

               param.interval_min = ADV_INT(K_MSEC(20));

               param.interval_max = param.interval_min;

               param.own_addr = NULL;

               int err = bt_le_adv_start(&param, ad, ARRAY_SIZE(ad), NULL, 0);

 

Von: Chettimada, Vinayak Kariappa [mailto:vinayak.kariappa.chettimada@...] 
Gesendet: Freitag, 9. Februar 2018 15:32
An: Gavrikov Paul <Paul.Gavrikov@...>; zephyr-devel@...
Betreff: RE: Bluetooth Mesh Advertisement issues

 

1.      Advertising Interval too short and out of spec: Sometimes the interval between 2 transmits of the Friend Poll is under 20ms (even tho it is set to 20ms). I measured intervals of just 7ms.

[vich]  Are you sure this not due to a close stop to start sequence? Do you see 7 ms intervals or one-off 7 ms spacing?

 


Re: How to make Zephyr Based BLE device'd MAC address static ?

Johan Hedberg
 

Hi Vikrant,

On Tue, Feb 13, 2018, Vikrant More wrote:
Using available Zephyr Bluetooth APIs, I've develop BLE Device which is
compatible with Nordic Blinky App. I'm doing testing on nrf52840-PDK board.

But after every reset, it's MAC address gets changed with random one. How
to make it static, so that no need of pairing with smartphone again & again
?

How to take control of pairing key, instead of generating random one ?
All nRF boards *should* be using a static random identity address that's
read out from the FICR, i.e. you should then see the same address
printed out to the console every time Bluetooth initializes (assuming
you have a console, and CONFIG_BT_DEBUG_LOG=y). That said, if you have
CONFIG_BT_PRIVACY=y, then a Resolvable Private Address will be used, and
remote devices can only resolve this to the identity address after
pairing.

Johan


Zephyr BLE Device pairing

Vikrant More <vikrant8051@...>
 

Hello, 


I wanna do pairing of my nrf52840-PDK based BLE device (with nRF Blinky Service) with smartphone using method describe in above video link. 

How to achieve it, so that as soon as PDK receive pairing request from smartphone onboard Led4 should turn ON and by just pressing Button4 it should paired with smartphone ?

Plus Device should go in pairing mode only after pressing Button3 on PDK board.

Is this possible, with available Zephyr Bluetooth APIs ?

In this method, is distance between Device & smartphone matter ?

Is it secure method ?

Thank You !!


How to make Zephyr Based BLE device'd MAC address static ?

Vikrant More <vikrant8051@...>
 

Hello,

Using available Zephyr Bluetooth APIs, I've develop BLE Device which is compatible with Nordic Blinky App. I'm doing testing on nrf52840-PDK board.

But after every reset, it's MAC address gets changed with random one. How to make it static, so that no need of pairing with smartphone again & again ?

How to take control of pairing key, instead of generating random one ?

Thank You !!


Installing matrix library in c in zephyr

ashish.shukla@corvi.com <ashish.shukla@...>
 

Hi everyone,

I've to work with matrix operations, It's difficult to write my own functions correctly.

Can someone suggest some workaround for the same?

Is it possible to compile python code along with c ?

--
Warm regards,
Ashish Shukla
Jr. Embedded Engineer
Research & Development


Please consider the environment before printing this e-mail or its attachments.

Disclaimer: The information contained herein (including any accompanying documents) is confidential and is intended solely for the addressee(s). If you have erroneously received this message, please immediately delete it and notify the sender. Also, if you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or taking any action in reliance on the contents of this message or any accompanying document is strictly prohibited and is unlawful. The organization is not responsible for any damage caused by a virus or alteration of the e-mail by a third party or otherwise. The contents of this message may not necessarily represent the views or policies of Corvi


Re: Which cloud service zephyr already supported?

Carles Cufi
 

Hi Aaron,

 

I recommend talking to Open Source Foundries, who have integrated cloud services with Zephyr.

 

I have copied Martí from OSF.

 

Regards,

 

Carles

 

From: zephyr-devel-bounces@... [mailto:zephyr-devel-bounces@...] On Behalf Of Aaron Xu
Sent: 13 February 2018 09:53
To: zephyr-devel@...
Subject: [Zephyr-devel] Which cloud service zephyr already supported?

 

Hi,

 

I want to upload some sensors data, like temperature/humidity/pressure and so on, upstream to cloud.

I am wonder that is there any example to show how to do it?

 

 

Regards,

Aaron


Re: [Zephyr-users] Securing BLE device Services & Characteristics from unauthorized user

Luiz Augusto von Dentz
 

Hi Vikrant,

On Mon, Feb 12, 2018 at 2:34 PM, Vikrant More <vikrant8051@gmail.com> wrote:
Hello World !!

Suppose there is BLE device with following custom characteristics -
1. main
2. enc_text
3. plain_text
4. aes_key

"enc_text" characteristic receives 16 bytes of encrypted string.

"plain_text" characteristic receives 16 bytes of plain string.

"aes_key" characteristic receives 16 bytes of AES key.

int bt_encrypt_le(constu8_t key[16], const8_t plaintext[16], u8_t
enc_data[16])

Using this function I'm planning to encrypting received plain string & gonna
compare its output with
received encrypted string.

If both matches, then only "main" characteristic accepts data from client.

But what type of AES encryption is used behind this bt_encrypt_le( ) ?

How to disconnect BLE connection from BLE Device side ?

I wanna show "aes_key" characteristic only after device is in factory-reset
mode.
Once it receive AES key from user, it should disappear. How to do that ?
You will have to add a service containing the characteristic which
probably comes from a different application than the 'normal' mode,
now regarding the AES key exchange I don't think that would be secure
enough so you might as well just add a characteristic that requires
encryption and then once the app attempts to write triggers pairing,
if that manages to create a valid key and write is complete, it can be
any value really since it will be protected by having to pair, then
you can restart on normal mode.


Thanks !!




_______________________________________________
Zephyr-users mailing list
Zephyr-users@lists.zephyrproject.org
https://lists.zephyrproject.org/mailman/listinfo/zephyr-users


--
Luiz Augusto von Dentz


Which cloud service zephyr already supported?

Aaron Xu
 

Hi,

I want to upload some sensors data, like temperature/humidity/pressure and so on, upstream to cloud.
I am wonder that is there any example to show how to do it?


Regards,
Aaron


[ #BluetoothMesh ] possible Bug .. without assigning subscription address to Model, it is reacting to subscription address assign to other Model #bluetoothmesh

Vikrant More <vikrant8051@...>
 

Hello World !!

This is observation based on following configuration done by #meshctl.
Two nRF52840-PDK boards has been used for it.

For Board 1. after provisioning, I used following commands to configure it
**************************************************************************************

appkey-add 1

bind 0 1 1000
bind 0 1 1001
bind 0 1 1002
bind 0 1 1003

sub-add 0100 c000 1000
pub-set 0100 c000 1 0 5 1001

sub-add 0100 c000 1002
pub-set 0100 c000 1 0 5 1003


For Board 2. after provisioning, I used following commands to configure it
**************************************************************************************

appkey-add 1

bind 0 1 1000
bind 0 1 1001
bind 0 1 1002
bind 0 1 1003

sub-add 0101 c000 1000
pub-set 0101 c000 1 0 5 1001

In case of Board 2, I didn't assign pub & sub addresses to Models 1002 & 1003

**************************************************************************************

Button 1 & 2 are related to GEN_ONOFF_CLIENT
Button 3 & 4 are related to GEN_LEVEL_CLIENT

As per my implementation,
1. if Button 1 is pressed, then LED1 on all Boards turns ON.

2. if Button 2 is pressed, then LED1 on all Boards turns OFF.

3.if Button 3 is pressed, then it publishes value for eg. 2000.
   On subscriber side, it checks that value (since it is less than 10000 it turns ON LED3 & turns OFF LED4 )

4. if Button 4 is pressed, then it publishes value for eg. 15000.
   On subscriber side, it checks that value (since it is greater than 10000 it turns OFF LED 3 & turns ON LED4)

******************************************************************************************

Ideally, as per #meshctl configuration,

if I pressed Button1 on any board, then LED1 on all boards should turn ON & if pressed
pressed Button2 then LED1 should OFF.

And if I pressed Button3 or Button4 on Board1, it should affect LED3&4 only on Board1(self).

And if I pressed Button3 or Button4 on Board2, it should not affect LEDs on any Board.

********************************************************************************************

But here, I found strange behavior in case of Board2. Here without assigning subscription
addresses to Model 1002, LED 3 & LED 4 on Board2 are reacting as soon as I pressed
Button 3&4 on Board 1.


Is it Bug ?

Thank You !!

3781 - 3800 of 7936