Date   

UART flash

Alan
 

Hi,
we're using Zephyr for providing the HCI for a NRF52 chip.
The example from samples/bluetooth/hci_uart is working
very well.

However the flashing is done using jtag (the integrated Segger chip
on the PAC10040 dev board).

Is there an option in Zephyr to have a bootloader that would support
flashing firmware through UART?

Be Well,
Alan


Problem in working with Ozone and nRF52840

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

Hello everyone !!!

I'm just starting to work with Ozone for hardware debugging of nRF52840 uC.

When I enter a variable named cnt which is declared in main function, it says the variable is out of scope. I can't figure out what this means here, and how to resolve this.

Also, is there any way look at status of PINs of uC e.g. I want to look at changing status of pins as a graph.

I'm attaching snapshot of Ozone window. 

--
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: Making use of Hardware debugger available with nrf52840 preview development kit

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

Hello all,

I got Ozone working for nrf52840 PDK. Thanks a lot. 


--
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


On Tue, Dec 19, 2017 at 2:16 AM, Cufi, Carles <Carles.Cufi@...> wrote:

Hi there,

 

Once the PR below is merged, you will be able to use GDB by simply typing “make debug” if you prefer it to Ozone:

 

https://github.com/zephyrproject-rtos/zephyr/pull/5435

 

Regards,

 

Carles

 

From: zephyr-users-bounces@lists.zephyrproject.org [mailto:zephyr-users-bounces@lists.zephyrproject.org] On Behalf Of ashish.shukla@...
Sent: 18 December 2017 13:20
To: zephyr-users@lists.zephyrproject.org; zephyr-devel@lists.zephyrproject.org
Subject: [Zephyr-users] Making use of Hardware debugger available with nrf52840 preview development kit

 

Hi !

I've got nrf52840 pdk and I'm working with blue tooth mesh developed by zephyr community.

I want to make use of hardware debugger available with development kit, i.e. I should be able see values of registers, values in memory address, halt processing at any specific line of code and examine those values.

I read documentation but didn't find anything related to what I'm looking for.

 

--

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: Making use of Hardware debugger available with nrf52840 preview development kit

Carles Cufi
 

Hi there,

 

Once the PR below is merged, you will be able to use GDB by simply typing “make debug” if you prefer it to Ozone:

 

https://github.com/zephyrproject-rtos/zephyr/pull/5435

 

Regards,

 

Carles

 

From: zephyr-users-bounces@... [mailto:zephyr-users-bounces@...] On Behalf Of ashish.shukla@...
Sent: 18 December 2017 13:20
To: zephyr-users@...; zephyr-devel@...
Subject: [Zephyr-users] Making use of Hardware debugger available with nrf52840 preview development kit

 

Hi !

I've got nrf52840 pdk and I'm working with blue tooth mesh developed by zephyr community.

I want to make use of hardware debugger available with development kit, i.e. I should be able see values of registers, values in memory address, halt processing at any specific line of code and examine those values.

I read documentation but didn't find anything related to what I'm looking for.

 

--

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: Making use of Hardware debugger available with nrf52840 preview development kit

Carles Cufi
 

Hi there,

 

You can use both GDB and Ozone using the built-in Segger chip.

 

Take a look at this page:

 

http://docs.zephyrproject.org/tools/nordic_segger.html#nordic-segger

 

Regards,

 

Carles

 

From: zephyr-users-bounces@... [mailto:zephyr-users-bounces@...] On Behalf Of ashish.shukla@...
Sent: 18 December 2017 13:20
To: zephyr-users@...; zephyr-devel@...
Subject: [Zephyr-users] Making use of Hardware debugger available with nrf52840 preview development kit

 

Hi !

I've got nrf52840 pdk and I'm working with blue tooth mesh developed by zephyr community.

I want to make use of hardware debugger available with development kit, i.e. I should be able see values of registers, values in memory address, halt processing at any specific line of code and examine those values.

I read documentation but didn't find anything related to what I'm looking for.

 

--

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: Sending notification with MTU size more than 23 bytes - BLE

dhguja@gmail.com
 

Hello Johan,
              Many thanks for the reply. I tried changing the configuration for CONFIG_BT_L2CAP_TX_MTU to my required size (30 bytes to test)
and used the nRF connect app as client on my phone. I only received data when there is 20 bytes (i assume some 3 bytes are used in GATT) in the buffer.
If i send one more character in the buffer (21 bytes) i did not receive any data at all in client. I used indications for my custom attribute.

Is it possible that my peripheral device itself is not sending any data beyond the 20 chars or client application is ignoring the data beyond default 23 bytes.
I did not try "bt_gatt_exchange_mtu()" call yet. May be i will test with simple client on zephyr also with that call.

I would like your opinion whether this is in right direction and if there any other app like nRFconnect to test BT connections with modifiable MTU size during connection.

Thanks in advance.

Regards,
DJ

On Sat, Dec 16, 2017 at 7:19 AM, Johan Hedberg <johan.hedberg@...> wrote:
Hi DJ,

On Fri, Dec 15, 2017, dhananjay gj wrote:
>       I have a question regarding handling MTU size more than 23 bytes
> during notification. I have a custom service on a peripheral device app to
> which client app(lets say android app) will subscribe to. When the
> peripheral device has some data ( usually more than 23 bytes) it will send
> the data to the client via 'notification'. I saw many solutions with
> respect to nRF SDK but i am not using any SDK but just developing the
> peripheral device app using zephyr's BLE APIs. I would like to know how to
> handle this?
>
> I came across MTU negotiation during connection while searching on this. I
> couldn't find any sample code on zephyr using this method. Does peripheral
> device app has to do anything during this negotiation?

The maxium ATT MTU Zephyr will use is based on the values you've given
to CONFIG_BT_L2CAP_TX_MTU and CONFIG_BT_L2CAP_RX_MTU. Additionally,
there's a runtime API bt_gatt_exchange_mtu() that can be used to trigger
the MTU negotiation if it doesn't otherwise happen.

Johan


Making use of Hardware debugger available with nrf52840 preview development kit

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

Hi !

I've got nrf52840 pdk and I'm working with blue tooth mesh developed by zephyr community.

I want to make use of hardware debugger available with development kit, i.e. I should be able see values of registers, values in memory address, halt processing at any specific line of code and examine those values.

I read documentation but didn't find anything related to what I'm looking for.

--
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: Sending notification with MTU size more than 23 bytes - BLE

Johan Hedberg
 

Hi DJ,

On Fri, Dec 15, 2017, dhananjay gj wrote:
I have a question regarding handling MTU size more than 23 bytes
during notification. I have a custom service on a peripheral device app to
which client app(lets say android app) will subscribe to. When the
peripheral device has some data ( usually more than 23 bytes) it will send
the data to the client via 'notification'. I saw many solutions with
respect to nRF SDK but i am not using any SDK but just developing the
peripheral device app using zephyr's BLE APIs. I would like to know how to
handle this?

I came across MTU negotiation during connection while searching on this. I
couldn't find any sample code on zephyr using this method. Does peripheral
device app has to do anything during this negotiation?
The maxium ATT MTU Zephyr will use is based on the values you've given
to CONFIG_BT_L2CAP_TX_MTU and CONFIG_BT_L2CAP_RX_MTU. Additionally,
there's a runtime API bt_gatt_exchange_mtu() that can be used to trigger
the MTU negotiation if it doesn't otherwise happen.

Johan


Re: [Zephyr-devel] I2C driver for nrf52840 not being compiled

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

Hi,

Thanks, it compiles and run successfully.


--
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


On Fri, Dec 15, 2017 at 1:53 PM, Puzdrowski, Andrzej <Andrzej.Puzdrowski@...> wrote:

Hi.

 

For nRF52840 I2C driver is zephyr. All its option are in general i2c Kconfig file.

I attached configuration I had used to compile example you mentioned.

 

BR

 

Andrzej

 

 

From: zephyr-devel-bounces@lists.zephyrproject.org [mailto:zephyr-devel-bounces@lists.zephyrproject.org] On Behalf Of ashish.shukla@...
Sent: Friday, December 15, 2017 5:56 AM
To: zephyr-users@lists.zephyrproject.org; zephyr-devel@lists.zephyrproject.org
Subject: [Zephyr-devel] I2C driver for nrf52840 not being compiled

 

Hello everyone !

I'm trying to interface an I2C device with nrf52840 controller.

When I look into ../zephyr/drivers/i2c directory, there is no Kconfig file corresponding to i2c_nrf5.c 

Again in Kconfig, this driver isn't included, consequently I'm not being able to compile ../zephyr/samples/drivers/i2c_fujitsu_fram  demo for nrf52840.

what needs to be done to fix this issue?  

 

--

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

 



Confusion about Zephyr ADC API semantics

Marti Bolivar
 

Hi,

I've been reading through the ADC API, its users, and its test cases,
and I'm confused about the semantics of struct adc_seq_entry, in
particular the field named "buffer". The API docs are vague and the
users contradict each other; something seems wrong to me.

(I volunteer to try to improve the documentation if we can clear
things up; I'm working on an ADC driver and would like to make sure
I'm doing the right thing.)

The main header says "buffer" is a byte array:

https://github.com/zephyrproject-rtos/zephyr/blob/master/include/adc.h#L39

But it doesn't say anything about the contents. That's strange,
especially since common ADC IPs can do 12+ bit conversions. (I at
least expected a u16*, and something written about the left- or
right-alignment of sample data, e.g. how a 12 bit sample is stored in
a 16 bit word.)

That same header only has this to say about the returned values from
an adc_read() call:

* The sample data can be retrieved from the memory buffers in
* the sequence table structure.

So I looked at the API users to find out more, but the results were
even more confusing.

This "simple" test wants to interpret the results as though the buffer
field points at an array of u32 (note the _print_sample_in_hex
implementation and the "delta" printk in adc_test):

https://github.com/zephyrproject-rtos/zephyr/blob/master/tests/drivers/adc/adc_simple/src/main.c#L36

It also says buffer should be void*, which isn't true:

https://github.com/zephyrproject-rtos/zephyr/blob/master/tests/drivers/adc/adc_simple/src/main.c#L78

This "api" test thinks buffer is u16*:

https://github.com/zephyrproject-rtos/zephyr/blob/master/tests/drivers/adc/adc_api/src/test_adc.c#L53

The ADC-based grove temperature driver treats Zephyr samples as if
they were 12 bit right aligned values in a u16 array, and has a
comment saying that's the common convention:

https://github.com/zephyrproject-rtos/zephyr/blob/master/drivers/grove/temperature_sensor.c#L46

Can anyone clarify what the correct interpretation of this field is?

Thanks,
Marti


CMSIS linking problem

Inaki Malerba
 

Hi all!

Im having a problem when linking my app. It's not linking to cmsis
libraries.

```

src/libs/kalman.c:7: undefined reference to `arm_mat_init_f32'
```

``` src/libs/kalman.c

    1 #include "kalman.h"
    2 #include "sensors.h"
    3
    4 void
    5 kalman_filter_alloc (kalman_filter_t * kf)
    6 {
    7   arm_mat_init_f32(kf->x, 4, 1, kf->x_data);
```

Am I missing something?


Thanks!

--
Martin Iñaki Malerba
inakimmalerba@gmail.com | +54 02945 15468443
inaki@satellogic.com


Sending notification with MTU size more than 23 bytes - BLE

dhguja@gmail.com
 

Hello all,
      I have a question regarding handling MTU size more than 23 bytes during notification. I have a custom service on a peripheral device app to which client app(lets say android app) will subscribe to. When the peripheral device has some data ( usually more than 23 bytes) it will send the data to the client via 'notification'. I saw many solutions with respect to nRF SDK but i am not using any SDK but just developing the peripheral device app using zephyr's BLE APIs. I would like to know how to handle this?

I came across MTU negotiation during connection while searching on this. I couldn't find any sample code on zephyr using this method. Does peripheral device app has to do anything during this negotiation?

Is there a easier and cleaner way to do this or we have to do data segmentation and reassembly ourselves in the application layer?

Will be helpful if someone can point me in the right direction. Thanks in advance.

Regards,
DJ



Re: per app device tree overlay

Kumar Gala
 

On Dec 15, 2017, at 3:33 AM, Wagenknecht, Daniel <Daniel.Wagenknecht@clage.de> wrote:

Hi!

I haven’t found any Documentation, how to make changes to a boards device tree from inside my app.
I’m neither really familiar with device tree or cmake, so looking thorugh the source didn’t help me much either.

Goal is to change zephyr console from usart1 to usart2 without touching the zephyr repo pulled from upstream. So changes should reside in my app directory alongside prj.conf etc.

The boards .dts file contains this:
chosen {
zephyr,console = &usart1;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
};

Can someone point me at to helpful information?

Thanks
Daniel Wagenknecht
You should be able to use an device tree overlap file. There’s examples in ./samples/bluetooth/hci_uart. The overlay file needs to be named BOARD_NAME.overlay.

I opened up Issue #5408 in GitHub to work on improving the docs & sample for overlays.

https://github.com/zephyrproject-rtos/zephyr/issues/5408

- k


per app device tree overlay

Daniel Wagenknecht
 

Hi!

 

I haven’t found any Documentation, how to make changes to a boards device tree from inside my app.

I’m neither really familiar with device tree or cmake, so looking thorugh the source didn’t help me much either.

 

Goal is to change zephyr console from usart1 to usart2 without touching the zephyr repo pulled from upstream. So changes should reside in my app directory alongside prj.conf etc.

 

The boards .dts file contains this:

                chosen {

                               zephyr,console = &usart1;

                               zephyr,sram = &sram0;

                               zephyr,flash = &flash0;

                };

 

Can someone point me at to helpful information?

 

Thanks

Daniel Wagenknecht

 


Re: [Zephyr-devel] I2C driver for nrf52840 not being compiled

Puzdrowski, Andrzej <Andrzej.Puzdrowski@...>
 

Hi.

 

For nRF52840 I2C driver is zephyr. All its option are in general i2c Kconfig file.

I attached configuration I had used to compile example you mentioned.

 

BR

 

Andrzej

 

 

From: zephyr-devel-bounces@... [mailto:zephyr-devel-bounces@...] On Behalf Of ashish.shukla@...
Sent: Friday, December 15, 2017 5:56 AM
To: zephyr-users@...; zephyr-devel@...
Subject: [Zephyr-devel] I2C driver for nrf52840 not being compiled

 

Hello everyone !

I'm trying to interface an I2C device with nrf52840 controller.

When I look into ../zephyr/drivers/i2c directory, there is no Kconfig file corresponding to i2c_nrf5.c 

Again in Kconfig, this driver isn't included, consequently I'm not being able to compile ../zephyr/samples/drivers/i2c_fujitsu_fram  demo for nrf52840.

what needs to be done to fix this issue?  

 

--

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: I2C driver for nrf52840 not being compiled

Chettimada, Vinayak Kariappa
 

Hi Ashish,

Did you select CONFIG_I2C_NRF5 in menuconfig or set CONFIG_I2C_NRF5=y in prj.conf file?

Also, you need to set CONFIG_I2C_NRF5_GPIO_SCA_PIN , CONFIG_I2C_NRF5_GPIO_SCA_PIN ,CONFIG_I2C_0=y, and CONFIG_I2C_0_IRQ_PRI.

Regards,
Vinayak

On 15 Dec 2017, at 05:56, ashish.shukla@corvi.com wrote:

Hello everyone !

I'm trying to interface an I2C device with nrf52840 controller.

When I look into ../zephyr/drivers/i2c directory, there is no Kconfig file corresponding to i2c_nrf5.c

Again in Kconfig, this driver isn't included, consequently I'm not being able to compile ../zephyr/samples/drivers/i2c_fujitsu_fram demo for nrf52840.

what needs to be done to fix this issue?

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


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

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


I2C driver for nrf52840 not being compiled

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

Hello everyone !

I'm trying to interface an I2C device with nrf52840 controller.

When I look into ../zephyr/drivers/i2c directory, there is no Kconfig file corresponding to i2c_nrf5.c 

Again in Kconfig, this driver isn't included, consequently I'm not being able to compile ../zephyr/samples/drivers/i2c_fujitsu_fram  demo for nrf52840.

what needs to be done to fix this issue?  

--
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: [Zephyr-devel] Zephyr IPSP sample crashes and ble controller crashes (IPv6 over BLE)

Luiz Augusto von Dentz
 

Hi Priyanka,

Upgrading is recommended since the IPSP implementation on Linux was
broken when generating the IID, though we are preparing to deprecate
the debugfs interface as that was never meant for production.

On Tue, Dec 12, 2017 at 2:18 PM, Priyanka Rawat <priyanka.rawat@nxp.com> wrote:
Hi Luiz


I am on

$ uname -r
4.4.0-98-generic

Linux 4.4.0-98-generic #121-Ubuntu SMP Tue Oct 10 14:24:03 UTC 2017 x86_64
x86_64 x86_64 GNU/Linux

So if I enable ZEP1656 config option kconifg option in prj.conf (IPSP
sample) should it work ?

Or I should upgrade my Linux kernel version?


Thanks

Priyanka


________________________________
From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Sent: Tuesday, December 12, 2017 5:00 PM
To: Priyanka Rawat
Cc: zephyr-users@lists.zephyrproject.org
Subject: Re: [Zephyr-devel] Zephyr IPSP sample crashes and ble controller
crashes (IPv6 over BLE)

Hi Priyanka,

Current IPSP configuration only works with Linux kernel version 4.12
or later, zephyr 1.9 used to have the infamous ZEP1656 config option
set which has been removed in 1.10.

On Tue, Dec 12, 2017 at 1:55 PM, Priyanka Rawat <priyanka.rawat@nxp.com>
wrote:
Hi Luiz


The HCI firmware hci_blackbox is from KW41Z SDK2.2.

BLE controller remains connected and bt0 does not go down if most of the
debug logs are disabled in prj.conf

As with debug logs enabled, it prints error

[bt] [ERR] read_payload: Not enough space in buffer

With my test set up k64f (zephyr IPSP)+ kw41z (ble controller), host flow
control is not enabled.


[bt] [WRN] set_flow_control: Controller to host flow control not supported


I wonder if we can enable UART flow control on frdm_k64f for HCI transport
with frdm_kw41z?

[Kw41z (ble controller)+ k64f (zephyr IPSP)] <---------->[Kw41z (ble
controller)+Linux host]

In addition, with recent zephyr master, I have another issue, while
testing
with sample IPSP, ping fails.

Please note I did not have this issue with zephyr-1.9.1. With same
configurations, ping worked fine with zephyr-1.9.1


Issue with IPSP sample (recent master branch) :


BLE address is assigned to k64f board. bluetoothctl utility and its scan
discover IPSP node.
BLE connection is up, interface bt0 is up.
On zephyr side, iface shows interface bluetooth.

Ping to k64f board fails. Ping from Zephyr side to Linux host fails.

Wireshark capture shows Multicast Listener Report Message V2,

Neighbor Solicitation for 2001:db8::2



zephyr

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


[bt] [WRN] set_flow_control: Controller to host flow control not supported
[bt] [WRN] hci_vs_init: Vendor HCI extensions not available
[bt] [INF] show_dev_info: Identity: 00:04:9f:00:00:15 (public)
[bt] [INF] show_dev_info: HCI: version 4.2 (0x08) revision 0x000b,
manufacturer 0x0025
[bt] [INF] show_dev_info: LMP: version 4.2 (0x08) subver 0x0121
[bt] [DBG] bt_l2cap_le_fixed_chan_register: (0x20001998) CID 0x0004
[bt] [DBG] bt_l2cap_le_fixed_chan_register: (0x20001998) CID 0x0006
[bt] [DBG] bt_smp_init: (0x20001998) LE SC enabled
[bt] [DBG] bt_l2cap_le_fixed_chan_register: (0x20001998) CID 0x0005
[bt] [DBG] bt_smp_pkey_ready: (0x200003b4)
[ipsp] [INF] init_app: Run IPSP sample

[ipsp] [ERR] get_context: Cannot bind IPv6 mcast (-2)
[ipsp] [ERR] listen: Cannot get network contexts

[bt] [DBG] bt_keys_find_irk: (0x200003b4) 00:60:37:00:00:16 (public)
[bt] [DBG] bt_l2cap_chan_add: (0x200003b4) conn 0x200008d4 chan 0x20000a28
[bt] [DBG] bt_smp_accept: (0x200003b4) conn 0x200008d4 handle 32


net> ping 2001:db8::2
Sent a ping to 2001:db8::2
[bt] [DBG] bt_l2cap_chan_send: (0x20001210) chan 0x20009bcc buf 0x20006e48
len 57
[bt] [DBG] l2cap_chan_create_seg: (0x20001210) ch 0x20009bcc seg
0x20006c8c
len 59
[bt] [DBG] l2cap_chan_le_send: (0x20001210) ch 0x20009bcc cid 0x0040 len
59
credits 4
[bt] [DBG] bt_l2cap_send_cb: (0x20001210) conn 0x200008d4 cid 64 len 59
[bt] [DBG] l2cap_chan_le_send_sdu: (0x20001210) ch 0x20009bcc cid 0x0040
sent 57 total_len 57
Ping timeout
net> iface

Interface 0x2000a020 (Bluetooth)
================================
Link addr : 00:04:9F:00:00:15
MTU : 1280
IPv6 unicast addresses (max 3):
2001:db8::1 manual preferred infinite
fe80::4:9fff:fe00:15 autoconf preferred infinite
IPv6 multicast addresses (max 2):
ff02::1
ff02::1:ff00:1
IPv6 prefixes (max 2):
<none>
IPv6 hop limit : 64
IPv6 base reachable time : 30000
IPv6 reachable time : 17260
IPv6 retransmit timer : 0
net>

Thanks
Priyanka

________________________________
From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Sent: Tuesday, December 5, 2017 6:23 PM
To: Priyanka Rawat
Cc: zephyr-users@lists.zephyrproject.org;
zephyr-devel@lists.zephyrproject.org
Subject: Re: [Zephyr-devel] Zephyr IPSP sample crashes and ble controller
crashes (IPv6 over BLE)

Hi Priyanka,

On Tue, Dec 5, 2017 at 5:30 PM, Priyanka Rawat <priyanka.rawat@nxp.com>
wrote:
Hello

My test set up for IPv6 over BLE is following :

At one end : Two boards frdm-kw41z and frdm-k64f are stacked together.
kw41z (flashed with hci_blackbox firmware) is ble controller with k64f as
ble host (flashed with zephyr sample IPSP).
I assume hci_blackbox is not a zephyr based controller is it?

At the other end: Second kw41z (flashed with hci_blackbox firmware) is
ble
controller attached to Linux host.


[Kw41z (ble controller)+ k64f (zephyr IPSP)] <---------->[Kw41z (ble
controller)+Linux host]

Issue with testing IPv6 over BLE :

Once the BLE connection is established, within few seconds BLE controller
gets disconnected.
Either zephyr (recent master branch) crashes or BLE controller crashes or
both. Often it is BLE controller that gets disconnected within few
seconds.
Restarting zephyr might enable establishing the connection once again,
but
then ble controller goes down immediately.
Im not sure if will be able to help in case the controller is not
really zephyr based in the other hand we should be able to fix the
host crash if you provide some traces when that happens.

After that, I should disconnect the boards and connect again (via usb
connection) in order to set up the ble connection again.

While on Zephyr side, it always prints connection handle 32
On Linux side, the first time connection handle is 32, afterwards it is
different (handle 65, 128 etc.,) as shown with "hcitool conn".
btmon log shows for specific handle : remote user terminated connection
or
connection terminated by local host
I guess with Zephyr the controller crashes and restart using the same
handle, while with Linux it manages to work fine, perhaps this is
because zephyr attempts to use the host flow control?


--
Luiz Augusto von Dentz
--
Luiz Augusto von Dentz


Re: [Zephyr-devel] Zephyr IPSP sample crashes and ble controller crashes (IPv6 over BLE)

Priyanka
 

Hi Luiz


I am on

$ uname -r
4.4.0-98-generic

Linux 4.4.0-98-generic #121-Ubuntu SMP Tue Oct 10 14:24:03 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

So if I enable  ZEP1656 config option kconifg option in prj.conf (IPSP sample) should it work ?

Or I should upgrade my Linux kernel version?


Thanks

Priyanka



From: Luiz Augusto von Dentz <luiz.dentz@...>
Sent: Tuesday, December 12, 2017 5:00 PM
To: Priyanka Rawat
Cc: zephyr-users@...
Subject: Re: [Zephyr-devel] Zephyr IPSP sample crashes and ble controller crashes (IPv6 over BLE)
 
Hi Priyanka,

Current IPSP configuration only works with Linux kernel version 4.12
or later, zephyr 1.9 used to have the infamous ZEP1656 config option
set which has been removed in 1.10.

On Tue, Dec 12, 2017 at 1:55 PM, Priyanka Rawat <priyanka.rawat@...> wrote:
> Hi Luiz
>
>
> The HCI firmware hci_blackbox is from KW41Z SDK2.2.
>
> BLE controller remains connected and bt0 does not go down if most of the
> debug logs are disabled in prj.conf
>
> As with debug logs enabled, it prints error
>
> [bt] [ERR] read_payload: Not enough space in buffer
>
> With my test set up k64f (zephyr IPSP)+ kw41z (ble controller), host flow
> control is not enabled.
>
>
> [bt] [WRN] set_flow_control: Controller to host flow control not supported
>
>
> I wonder if we can enable UART flow control on frdm_k64f for HCI transport
> with frdm_kw41z?
>
>  [Kw41z  (ble controller)+ k64f (zephyr IPSP)] <---------->[Kw41z (ble
> controller)+Linux host]
>
> In addition, with recent zephyr master, I have another issue, while testing
> with sample IPSP,  ping fails.
>
> Please note I did not have this issue with zephyr-1.9.1. With same
> configurations, ping worked fine with zephyr-1.9.1
>
>
> Issue with IPSP sample (recent master branch) :
>
>
> BLE address is assigned to k64f board. bluetoothctl utility and its scan
> discover IPSP node.
> BLE connection is up, interface bt0 is up.
> On zephyr side, iface shows interface bluetooth.
>
> Ping to k64f board fails. Ping from Zephyr side to Linux host fails.
>
> Wireshark capture shows Multicast Listener Report Message V2,
>
> Neighbor Solicitation for 2001:db8::2
>
>
>
> zephyr
>
> -----------------
>
>
> [bt] [WRN] set_flow_control: Controller to host flow control not supported
> [bt] [WRN] hci_vs_init: Vendor HCI extensions not available
> [bt] [INF] show_dev_info: Identity: 00:04:9f:00:00:15 (public)
> [bt] [INF] show_dev_info: HCI: version 4.2 (0x08) revision 0x000b,
> manufacturer 0x0025
> [bt] [INF] show_dev_info: LMP: version 4.2 (0x08) subver 0x0121
> [bt] [DBG] bt_l2cap_le_fixed_chan_register: (0x20001998) CID 0x0004
> [bt] [DBG] bt_l2cap_le_fixed_chan_register: (0x20001998) CID 0x0006
> [bt] [DBG] bt_smp_init: (0x20001998) LE SC enabled
> [bt] [DBG] bt_l2cap_le_fixed_chan_register: (0x20001998) CID 0x0005
> [bt] [DBG] bt_smp_pkey_ready: (0x200003b4)
> [ipsp] [INF] init_app: Run IPSP sample
>
> [ipsp] [ERR] get_context: Cannot bind IPv6 mcast (-2)
> [ipsp] [ERR] listen: Cannot get network contexts
>
> [bt] [DBG] bt_keys_find_irk: (0x200003b4) 00:60:37:00:00:16 (public)
> [bt] [DBG] bt_l2cap_chan_add: (0x200003b4) conn 0x200008d4 chan 0x20000a28
> [bt] [DBG] bt_smp_accept: (0x200003b4) conn 0x200008d4 handle 32
>
>
> net> ping 2001:db8::2
> Sent a ping to 2001:db8::2
> [bt] [DBG] bt_l2cap_chan_send: (0x20001210) chan 0x20009bcc buf 0x20006e48
> len 57
> [bt] [DBG] l2cap_chan_create_seg: (0x20001210) ch 0x20009bcc seg 0x20006c8c
> len 59
> [bt] [DBG] l2cap_chan_le_send: (0x20001210) ch 0x20009bcc cid 0x0040 len 59
> credits 4
> [bt] [DBG] bt_l2cap_send_cb: (0x20001210) conn 0x200008d4 cid 64 len 59
> [bt] [DBG] l2cap_chan_le_send_sdu: (0x20001210) ch 0x20009bcc cid 0x0040
> sent 57 total_len 57
> Ping timeout
> net> iface
>
> Interface 0x2000a020 (Bluetooth)
> ================================
> Link addr : 00:04:9F:00:00:15
> MTU       : 1280
> IPv6 unicast addresses (max 3):
>         2001:db8::1 manual preferred infinite
>         fe80::4:9fff:fe00:15 autoconf preferred infinite
> IPv6 multicast addresses (max 2):
>         ff02::1
>         ff02::1:ff00:1
> IPv6 prefixes (max 2):
>         <none>
> IPv6 hop limit           : 64
> IPv6 base reachable time : 30000
> IPv6 reachable time      : 17260
> IPv6 retransmit timer    : 0
> net>
>
> Thanks
> Priyanka
>
> ________________________________
> From: Luiz Augusto von Dentz <luiz.dentz@...>
> Sent: Tuesday, December 5, 2017 6:23 PM
> To: Priyanka Rawat
> Cc: zephyr-users@...;
> zephyr-devel@...
> Subject: Re: [Zephyr-devel] Zephyr IPSP sample crashes and ble controller
> crashes (IPv6 over BLE)
>
> Hi Priyanka,
>
> On Tue, Dec 5, 2017 at 5:30 PM, Priyanka Rawat <priyanka.rawat@...>
> wrote:
>> Hello
>>
>> My test set up for IPv6 over BLE is following :
>>
>> At one end : Two boards frdm-kw41z and frdm-k64f are stacked together.
>> kw41z (flashed with hci_blackbox firmware) is ble controller with k64f as
>> ble host (flashed with zephyr sample IPSP).
>
> I assume hci_blackbox is not a zephyr based controller is it?
>
>> At the other end: Second kw41z (flashed with hci_blackbox firmware) is ble
>> controller attached to Linux host.
>>
>>
>> [Kw41z  (ble controller)+ k64f (zephyr IPSP)] <---------->[Kw41z (ble
>> controller)+Linux host]
>>
>> Issue with testing IPv6 over BLE :
>>
>> Once the BLE connection is established, within few seconds BLE controller
>> gets disconnected.
>> Either zephyr (recent master branch) crashes or BLE controller crashes or
>> both. Often it is BLE controller that gets disconnected within few
>> seconds.
>> Restarting zephyr might enable establishing the connection once again, but
>> then ble controller goes down immediately.
>
> Im not sure if will be able to help in case the controller is not
> really zephyr based in the other hand we should be able to fix the
> host crash if you provide some traces when that happens.
>
>> After that, I should disconnect the boards and connect again (via usb
>> connection) in order to set up the ble connection again.
>>
>> While on Zephyr side, it always prints connection handle 32
>> On Linux side, the first time connection handle is 32, afterwards it is
>> different (handle 65, 128 etc.,) as shown with "hcitool conn".
>> btmon log shows for specific handle : remote user terminated connection or
>> connection terminated by local host
>
> I guess with Zephyr the controller crashes and restart using the same
> handle, while with Linux it manages to work fine, perhaps this is
> because zephyr attempts to use the host flow control?



--
Luiz Augusto von Dentz


Re: [Zephyr-devel] Zephyr IPSP sample crashes and ble controller crashes (IPv6 over BLE)

Luiz Augusto von Dentz
 

Hi Priyanka,

Current IPSP configuration only works with Linux kernel version 4.12
or later, zephyr 1.9 used to have the infamous ZEP1656 config option
set which has been removed in 1.10.

On Tue, Dec 12, 2017 at 1:55 PM, Priyanka Rawat <priyanka.rawat@nxp.com> wrote:
Hi Luiz


The HCI firmware hci_blackbox is from KW41Z SDK2.2.

BLE controller remains connected and bt0 does not go down if most of the
debug logs are disabled in prj.conf

As with debug logs enabled, it prints error

[bt] [ERR] read_payload: Not enough space in buffer

With my test set up k64f (zephyr IPSP)+ kw41z (ble controller), host flow
control is not enabled.


[bt] [WRN] set_flow_control: Controller to host flow control not supported


I wonder if we can enable UART flow control on frdm_k64f for HCI transport
with frdm_kw41z?

[Kw41z (ble controller)+ k64f (zephyr IPSP)] <---------->[Kw41z (ble
controller)+Linux host]

In addition, with recent zephyr master, I have another issue, while testing
with sample IPSP, ping fails.

Please note I did not have this issue with zephyr-1.9.1. With same
configurations, ping worked fine with zephyr-1.9.1


Issue with IPSP sample (recent master branch) :


BLE address is assigned to k64f board. bluetoothctl utility and its scan
discover IPSP node.
BLE connection is up, interface bt0 is up.
On zephyr side, iface shows interface bluetooth.

Ping to k64f board fails. Ping from Zephyr side to Linux host fails.

Wireshark capture shows Multicast Listener Report Message V2,

Neighbor Solicitation for 2001:db8::2



zephyr

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


[bt] [WRN] set_flow_control: Controller to host flow control not supported
[bt] [WRN] hci_vs_init: Vendor HCI extensions not available
[bt] [INF] show_dev_info: Identity: 00:04:9f:00:00:15 (public)
[bt] [INF] show_dev_info: HCI: version 4.2 (0x08) revision 0x000b,
manufacturer 0x0025
[bt] [INF] show_dev_info: LMP: version 4.2 (0x08) subver 0x0121
[bt] [DBG] bt_l2cap_le_fixed_chan_register: (0x20001998) CID 0x0004
[bt] [DBG] bt_l2cap_le_fixed_chan_register: (0x20001998) CID 0x0006
[bt] [DBG] bt_smp_init: (0x20001998) LE SC enabled
[bt] [DBG] bt_l2cap_le_fixed_chan_register: (0x20001998) CID 0x0005
[bt] [DBG] bt_smp_pkey_ready: (0x200003b4)
[ipsp] [INF] init_app: Run IPSP sample

[ipsp] [ERR] get_context: Cannot bind IPv6 mcast (-2)
[ipsp] [ERR] listen: Cannot get network contexts

[bt] [DBG] bt_keys_find_irk: (0x200003b4) 00:60:37:00:00:16 (public)
[bt] [DBG] bt_l2cap_chan_add: (0x200003b4) conn 0x200008d4 chan 0x20000a28
[bt] [DBG] bt_smp_accept: (0x200003b4) conn 0x200008d4 handle 32


net> ping 2001:db8::2
Sent a ping to 2001:db8::2
[bt] [DBG] bt_l2cap_chan_send: (0x20001210) chan 0x20009bcc buf 0x20006e48
len 57
[bt] [DBG] l2cap_chan_create_seg: (0x20001210) ch 0x20009bcc seg 0x20006c8c
len 59
[bt] [DBG] l2cap_chan_le_send: (0x20001210) ch 0x20009bcc cid 0x0040 len 59
credits 4
[bt] [DBG] bt_l2cap_send_cb: (0x20001210) conn 0x200008d4 cid 64 len 59
[bt] [DBG] l2cap_chan_le_send_sdu: (0x20001210) ch 0x20009bcc cid 0x0040
sent 57 total_len 57
Ping timeout
net> iface

Interface 0x2000a020 (Bluetooth)
================================
Link addr : 00:04:9F:00:00:15
MTU : 1280
IPv6 unicast addresses (max 3):
2001:db8::1 manual preferred infinite
fe80::4:9fff:fe00:15 autoconf preferred infinite
IPv6 multicast addresses (max 2):
ff02::1
ff02::1:ff00:1
IPv6 prefixes (max 2):
<none>
IPv6 hop limit : 64
IPv6 base reachable time : 30000
IPv6 reachable time : 17260
IPv6 retransmit timer : 0
net>

Thanks
Priyanka

________________________________
From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Sent: Tuesday, December 5, 2017 6:23 PM
To: Priyanka Rawat
Cc: zephyr-users@lists.zephyrproject.org;
zephyr-devel@lists.zephyrproject.org
Subject: Re: [Zephyr-devel] Zephyr IPSP sample crashes and ble controller
crashes (IPv6 over BLE)

Hi Priyanka,

On Tue, Dec 5, 2017 at 5:30 PM, Priyanka Rawat <priyanka.rawat@nxp.com>
wrote:
Hello

My test set up for IPv6 over BLE is following :

At one end : Two boards frdm-kw41z and frdm-k64f are stacked together.
kw41z (flashed with hci_blackbox firmware) is ble controller with k64f as
ble host (flashed with zephyr sample IPSP).
I assume hci_blackbox is not a zephyr based controller is it?

At the other end: Second kw41z (flashed with hci_blackbox firmware) is ble
controller attached to Linux host.


[Kw41z (ble controller)+ k64f (zephyr IPSP)] <---------->[Kw41z (ble
controller)+Linux host]

Issue with testing IPv6 over BLE :

Once the BLE connection is established, within few seconds BLE controller
gets disconnected.
Either zephyr (recent master branch) crashes or BLE controller crashes or
both. Often it is BLE controller that gets disconnected within few
seconds.
Restarting zephyr might enable establishing the connection once again, but
then ble controller goes down immediately.
Im not sure if will be able to help in case the controller is not
really zephyr based in the other hand we should be able to fix the
host crash if you provide some traces when that happens.

After that, I should disconnect the boards and connect again (via usb
connection) in order to set up the ble connection again.

While on Zephyr side, it always prints connection handle 32
On Linux side, the first time connection handle is 32, afterwards it is
different (handle 65, 128 etc.,) as shown with "hcitool conn".
btmon log shows for specific handle : remote user terminated connection or
connection terminated by local host
I guess with Zephyr the controller crashes and restart using the same
handle, while with Linux it manages to work fine, perhaps this is
because zephyr attempts to use the host flow control?
--
Luiz Augusto von Dentz

2341 - 2360 of 2733