Date   

Re: How to enable DMA transfers for UART?

Erwan Gouriou
 

Hi Stefan,

On Tue, 26 Mar 2019 at 13:01, Stefan Jaritz <stefan@...> wrote:
Hey

I done a demo driver implementation:

https://github.com/StefJar/zephyr_stm32_uart3_dma_driver

Some problems I was facing:

- DMA API: the current one doesn't support ring buffer setups

- UART API: the current API is not mapping the IDLE event.

- UART API: no callbacks possible for event driven rx

With the current design of the UART and DMA API it seems to be
challenging to get a nice fusion.

So I was implementing a simple API for the demo, making block writes
possible and calling a callback when data is received. I didn't used the
UART and DMA API because it would became a dirty hack, while calling
functions form that API & overwriting/patching the ISRs. So I decided
for a lean straight forward implementation.

Thanks for sharing code and experience, this is useful!
 
In my case I am interested into SPI + DMA and USB ACM + DMA. From an
energy perspective it is much better to use DMA transfers for the
peripheral IOs (We can put the MCU to sleep).

Indeed, we should have a proper DMA driver that could be called from other drivers.

Maybe it is worth to put a thought on using DMA for peripherals by
default and only the special case is doing polling or RX/TX handling via
uart etc. ISRs.

While I agree DMA has numerous benefits, I don't think this should be the only configuration,
nor the default one. Main issue is initial complexity and configuration needs.
People should be able to use the async API first and then enable DMA once they feel comfortable
with the API.

 Erwan

Stefan

On 20/03/2019 15:37, Paul Sokolovsky wrote:
> Hello Stefan,
>
> On Tue, 19 Mar 2019 15:18:02 +0000
> "Stefan Jaritz" <stefan@...> wrote:
>
>> Hey,
>>
>> I am currently experimenting with ZephyrOS on different tasks. My
>> base is an own dev board which has a stm32f4xx MCU that connects
>> different ICs etc. via UART, I2C, SPI & GPIOs.
>>
>> Currently the UART ISR is too slow to catch all chars at a rx burst.
>> Usually I am using UART + DMA transfers to relieve the MCU and save
>> energy.
>>
> []
>
>> So I am asking for help or some example how to do an UART & DMA.
>>
>> Think having an ringbuffer for rx and an intr firing after n Bytes
>> received via DMA. Also doing the tx via DMA would be perfect. Any
>> ideas to setup the Zephyr drivers to do so?
> Recently, a new "async" UART API was added to Zephyr, whose
> implementation could leverage DMA support (that was one of usecases for
> this API). There's an open ticket to implement it for STM32:
> https://github.com/zephyrproject-rtos/zephyr/issues/13955
>
> You're welcome to cooperate with the STM32 maintainers on implementing
> it.
>
> []
>




SPI slave on nRF52840-PCA10059 #nrf52480

Riccardo
 

Hi all,

I’m trying to get a simple SPI slave application running on nRF52840-PCA10059 dongle. So far, no success. I tried a couple of things that all lead to compilation error of the kind “symbol undeclared…”. Here’s how to reproduce:

riccardo@debian:~/zephyr_builds$ cp -r /media/sf_zephyr/samples/bluetooth/hci_spi/ .
riccardo@debian:~/zephyr_builds/hci_spi$ mkdir b
riccardo@debian:~/zephyr_builds/hci_spi$ cd b
riccardo@debian:~/zephyr_builds/hci_spi/b$ cmake -GNinja -DBOARD=nrf52840_pca10059 ..
riccardo@debian:~/zephyr_builds/hci_spi/b$ ninja

see error_hci_spi.txt (attached) for the errors.

I also tried to start from a blinky application, and enable SPI in menuconfig. If I enable

Device Drivers → SPI hardware bus support → nRF SPI nrfx drivers → SPI Port 1 Driver type → nRF SPIM 1, everything is cool. If I enable
Device Drivers → SPI hardware bus support → nRF SPI nrfx drivers → SPI Port 1 Driver type → nRF SPIS 1, I got errors as attached in error_spi_slave.txt

The symbols it mentioned are defined in an autogenerated .h, that seems to be ignored somehow.

Do you know what's going on?

Regards,
Riccardo


SPI slave on nRF52840-PCA10059 #nrf52480

Cavallari, Riccardo <riccardo.cavallari@...>
 

Hi all,

I’m trying to get a simple SPI slave application running on nRF52840-PCA10059 dongle. So far, no success. I tried a couple of things that all lead to compilation error of the kind “symbol undeclared…”. Here’s how to reproduce:

riccardo@debian:~/zephyr_builds$ cp -r /media/sf_zephyr/samples/bluetooth/hci_spi/ .
riccardo@debian:~/zephyr_builds/hci_spi$ mkdir b
riccardo@debian:~/zephyr_builds/hci_spi$ cd b
riccardo@debian:~/zephyr_builds/hci_spi/b$ cmake -GNinja -DBOARD=nrf52840_pca10059 ..
riccardo@debian:~/zephyr_builds/hci_spi/b$ ninja

see error_hci_spi.txt (attached) for the errors.

I also tried to start from a blinky application, and enable SPI in menuconfig. If I enable

Device Drivers → SPI hardware bus support → nRF SPI nrfx drivers → SPI Port 1 Driver type → nRF SPIM 1, everything is cool. If I enable
Device Drivers → SPI hardware bus support → nRF SPI nrfx drivers → SPI Port 1 Driver type → nRF SPIS 1, I got errors as attached in error_spi_slave.txt

The symbols it mentioned are defined in an autogenerated .h, that seems to be ignored somehow.

Do you know what's going on?

Regards,
Riccardo


Re: How to enable DMA transfers for UART?

Stefan Jaritz
 

Hey

I done a demo driver implementation:

https://github.com/StefJar/zephyr_stm32_uart3_dma_driver

Some problems I was facing:

- DMA API: the current one doesn't support ring buffer setups

- UART API: the current API is not mapping the IDLE event.

- UART API: no callbacks possible for event driven rx

With the current design of the UART and DMA API it seems to be challenging to get a nice fusion.

So I was implementing a simple API for the demo, making block writes possible and calling a callback when data is received. I didn't used the UART and DMA API because it would became a dirty hack, while calling functions form that API & overwriting/patching the ISRs. So I decided for a lean straight forward implementation.

In my case I am interested into SPI + DMA and USB ACM + DMA. From an energy perspective it is much better to use DMA transfers for the peripheral IOs (We can put the MCU to sleep).

Maybe it is worth to put a thought on using DMA for peripherals by default and only the special case is doing polling or RX/TX handling via uart etc. ISRs.

Stefan

On 20/03/2019 15:37, Paul Sokolovsky wrote:
Hello Stefan,

On Tue, 19 Mar 2019 15:18:02 +0000
"Stefan Jaritz" <stefan@kokoontech.com> wrote:

Hey,

I am currently experimenting with ZephyrOS on different tasks. My
base is an own dev board which has a stm32f4xx MCU that connects
different ICs etc. via UART, I2C, SPI & GPIOs.

Currently the UART ISR is too slow to catch all chars at a rx burst.
Usually I am using UART + DMA transfers to relieve the MCU and save
energy.
[]

So I am asking for help or some example how to do an UART & DMA.

Think having an ringbuffer for rx and an intr firing after n Bytes
received via DMA. Also doing the tx via DMA would be perfect. Any
ideas to setup the Zephyr drivers to do so?
Recently, a new "async" UART API was added to Zephyr, whose
implementation could leverage DMA support (that was one of usecases for
this API). There's an open ticket to implement it for STM32:
https://github.com/zephyrproject-rtos/zephyr/issues/13955

You're welcome to cooperate with the STM32 maintainers on implementing
it.

[]


Particle Xenon SPI ports

Marcio Montenegro
 

Hi all,
I am developing a new project using Particle Xenon and SPI port 1.
According docs Xenon has 3 dtsi files and  SPI1 is selectable with overlay (SPI).

mesh_feather_spi_spi1.dtsi exposes SPI1 on labeled Feather SPI pins
mesh_feather_spi_spi3.dtsi exposes SPI3 on labeled Feather SPI pins
mesh_feather_spi1_spi3.dtsi exposes SPI3 on labeled Feather SPI1 pins

I'm confused about which pins I should use.The Xenon datasheet shows SPI and SPI3 and not SPI1 .Best regards,

Marcio



Re: One-for-all overlay file for each sensor

Jukka Rissanen
 

Hi Aaron,

I have similar needs for networking overlay config files which are
typically the same. I created enhancement req in
https://github.com/zephyrproject-rtos/zephyr/issues/14740 for tracking
this. Please comment there if needed.


Cheers,
Jukka

On Tue, 2019-03-26 at 10:45 +0800, Aaron Xu wrote:
Hi,

For evaluating sensor samples, I need to add overlay file for every
board into every sample. But the content of the overlay file is
almost the same, for example :
'''
&i2c0 {
hts221@5f {
compatible = "st,hts221";
reg = <0x5f>;
label = "HTS221";
};
};
'''
Only different is the overlay file's name, and need to adapt i2c
interface for different boards sometimes. After that we can fetch
data in polling mode at least.

As most of those sensors support i2c interface or SPI or both, I
think we can simplify this process with the standard interface name,
like arduino_i2c/arduino_spi. And save user's time for creating such
kind of overlay files.

Can I have a one-for-all overlay file for each sensor, which I don't
need to specify the board's name?


One-for-all overlay file for each sensor

Aaron Xu
 

Hi,

For evaluating sensor samples, I need to add overlay file for every board into every sample. But the content of the overlay file is almost the same, for example :
'''
&i2c0 {
hts221@5f {
        compatible = "st,hts221";
        reg = <0x5f>;
        label = "HTS221";
    };
};
'''
Only different is the overlay file's name, and need to adapt i2c interface for different boards sometimes. After that we can fetch data in polling mode at least.

As most of those sensors support i2c interface or SPI or both, I think we can simplify this process with the standard interface name, like arduino_i2c/arduino_spi. And save user's time for creating such kind of overlay files.

Can I have a one-for-all overlay file for each sensor, which I don't need to specify the board's name?


Re: the defect of memory pool bitmap

Nashif, Anas
 

Can you please post a PR or a bug with more information about the proposed changes below?

 

Thanks,

Anas

 

From: devel@... [mailto:devel@...] On Behalf Of ??
Sent: Monday, March 25, 2019 10:05 AM
To: devel@...
Subject: [Zephyr-devel] the defect of memory pool bitmap

 

My opinion is as follows

 


the defect of memory pool bitmap

吴升 <wusheng@...>
 

My opinion is as follows

 


Re: Get BT MAC addr in zephyr

Johan Hedberg
 

Hi Tommy,

On 25 Mar 2019, at 6.10, Tommy Lin (林志聰) <Tommy.Lin@quantatw.com> wrote:
We use Nordic 51824 with Zephyr 1.13 version.
By default, the Nordic BLE address is derived from the NRF_FICR->DEVICEADDR[] register.
We use “bluetoothctl show” and can get a random mac address.
1.I don’t know if the random mac address is from NRF_FICR->DEVICEADDR[] register ?
2.Every time , the mac address will be different value , if I delete /var/lib/Bluetooth/static-xx:xx:xx:xx:xx:xx folder and then reboot device.
I expect the random mac address from NRF_FICR->DEVICEADDR[] register should be fixed , am I right ?
It’s always the responsibility of the host to set the random address. When you do a combined build of Zephyr (both controller and host) the FICR address will be used. However, if you’re running BlueZ as the host, it’s the responsibility of BlueZ to set the random address. There’s no standard HCI command to read the FICR value from the controller. Zephyr does have HCI vendor commands for that, but if I remember right BlueZ does not support those yet. If you don’t care about the FICR address specifically, but just want a fixed static random address, then any recent bluetoothd version (>= 5.44) will generate this for you automatically (that’s the /var/lib/bluetooth/static- file that you referred to).

Johan


Get BT MAC addr in zephyr

Tommy Lin (林志聰) <Tommy.Lin@...>
 

Hi Zephyr,

We use Nordic 51824 with Zephyr 1.13 version.

By default, the Nordic BLE address is derived from the NRF_FICR->DEVICEADDR[] register.

We use “bluetoothctl show” and can get a random mac address.

1.I don’t know if the random mac address is from NRF_FICR->DEVICEADDR[] register ?

2.Every time , the mac address will be different value , if I delete /var/lib/Bluetooth/static-xx:xx:xx:xx:xx:xx folder and then reboot device.

 I expect the random mac address from NRF_FICR->DEVICEADDR[] register should be fixed , am I right ?

 

 

 

Thanks

Tommy


Use GH labels, save time

alpi@...
 

Hi,

Lots of GitHub issues and PRs are being created daily.

To help us manage them we have “labels”: to classify them by area, type, priority, or to mark them in need of attention.

 

When creating a GitHub issue or pull request, remember to add the appropriate labels.

It takes a couple of seconds.

If you are reviewing a PR, and there is missing or incorrect labels, fix it *

This will save us all time when searching,

reduce the chances of your PR/issue being forgotten,

speed up reviewing,

reduce the changes of duplicates, etc.

 

Best regards,

Alberto Escolar Piedras

 

*(1st time contributors cannot add labels)


Re: [Bluetooth Mesh] How is the correct way to make a self provision #bluetoothmesh #zephyrbluetoothmesh

Johan Hedberg
 

Hi Lucas,

(added zephyr-devel back to CC since this info may benefit others as well)

On 21 Mar 2019, at 21.29, Lucas Peixoto <lucaspeixotoac@gmail.com> wrote:
Interesting, I was using this CONFIG_BT_SETTINGS because I got it on other project. I did what you said and the errors were gone, thank you, apparently is working. One more thing, this messages "<wrn> bt_mesh_cfg_cli: Unexpected App Key Status message" are normal or is missing something?
No, that’s normal. It means you used the configuration client API without requesting it to wait for the response messages from the (local) configuration server. In that case the client code considers the responses unexpected since it didn't saved any context for the pending request.

Johan


Re: [Bluetooth Mesh] How is the correct way to make a self provision #bluetoothmesh #zephyrbluetoothmesh

Lucas Peixoto <lucaspeixotoac@...>
 

Interesting, I was using this CONFIG_BT_SETTINGS because I got it on other project. I did what you said and the errors were gone, thank you, apparently is working. One more thing, this messages "<wrn> bt_mesh_cfg_cli: Unexpected App Key Status message" are normal or is missing something?


Re: [Bluetooth Mesh] How is the correct way to make a self provision #bluetoothmesh #zephyrbluetoothmesh

Johan Hedberg
 

Hi Lucas,

It looks like you’ve enabled CONFIG_BT_SETTINGS, but are not calling settings_load() in your app. It might explain the behaviour you’re seeing, since you’re effectively leaving the stack partially uninitialised without an identity address. Since you mentioned the mesh_demo app, you could e.g. look at where/how it calls settings_load().

Johan

On 21 Mar 2019, at 20.34, Lucas Peixoto <lucaspeixotoac@gmail.com> wrote:

[Edited Message Follows]

Hello, I need help to understand what is the correct way to make a self provision. I have two boards(nrf52_pca10040) and them will be provisioned on the same network to make some tests. So far I was using my phone(nRF mesh) to make the provision. However this approach was delaying the development, so I decided use self provision. Reading some examples like bluetooth/mesh_demo I implemented this:

<bt_ready.png>
<self_configure1.png><self_configure2.png><self_provision.png>


Below I show the necessary elements and srv models to solve my problem:

<elements_models.png>

The problem is that when I flashed the firmware I got this:

<log_self_provision.png>

"Advertising failed: err -22" and "Failed to avertise using Network ID" keep happening all the time, in loop. So what I need to do to solve this?

@EDIT: err -22 is related to "Invalid Argument" according to the errno.h, but I don't know exactly which one.


[Bluetooth Mesh] How is the correct way to make a self provision #bluetoothmesh #zephyrbluetoothmesh

Lucas Peixoto <lucaspeixotoac@...>
 
Edited

Hello, I need help to understand what is the correct way to make a self provision. I have two boards(nrf52_pca10040) and them will be provisioned on the same network to make some tests. So far I was using my phone(nRF mesh) to make the provision. However this approach was delaying the development, so I decided use self provision. Reading some examples like bluetooth/mesh_demo I implemented this:





Below I show the necessary elements and srv models to solve my problem:



The problem is that when I flashed the firmware I got this:



"Advertising failed: err -22" and "Failed to avertise using Network ID" keep happening all the time, in loop.  So what I need to do to solve this?

@EDIT: err -22 is related to "Invalid Argument" according to the errno.h, but I don't know exactly which one.


Re: LE pair disconnected

Tommy Lin (林志聰) <Tommy.Lin@...>
 

Hi Thea Aldrich,

The issue has been fixed.


Thank You,
Tommy

寄件者: Thea Aldrich <aldrich.thea@...>
寄件日期: 2019年3月21日 下午 08:54
收件者: Tommy Lin (林志聰); Thea Aldrich
副本: Hedberg, Johan; Chettimada, Vinayak Kariappa; Isaac Chen (陳尚航); Ryan Erickson; Jamie Mccrae; zephyr-devel@...; Hanyu.Hsu@...; Ryan Hsu (徐振鋒)
主旨: Re: [Zephyr-devel] LE pair disconnected
 
Hi Tommy,
I wanted to circle back around to make sure you were able to get your questions answered. If not, please let me know and I will help get you the answers you need. 

If you have not done so already, you can join our Slack channel where most of the developers and maintainers are available. It is a great place to ask questions and talk to the community.
Best,
Thea Aldrich

On Mon, Mar 18, 2019 at 6:01 AM Tommy Lin (林志聰) <Tommy.Lin@...> wrote:

Hi Johan,

sorry to bother you again.

We try to launch Bluetooth service.

After typing “systemctl status bluetooth.service” , some error messages as following:

Could you give us some suggestions.

 

Thank You,

Tommy

From: Tommy Lin (林志聰)
Sent: Wednesday, March 13, 2019 8:19 PM
To: 'Hedberg, Johan' <johan.hedberg@...>; 'Chettimada, Vinayak Kariappa' <vinayak.kariappa.chettimada@...>
Cc: Isaac Chen (
陳尚航) <Isaac_Chen@...>; 'Ryan Erickson' <Ryan.Erickson@...>; 'Jamie Mccrae' <Jamie.Mccrae@...>; 'zephyr-devel@...' <zephyr-devel@...>; 'Hanyu.Hsu@...' <Hanyu.Hsu@...>; Ryan Hsu (徐振鋒) <Ryan.Hsu@...>
Subject: RE: [Zephyr-devel] LE pair disconnected

 

Sorry,

I also add bluetoothd file to /usr/libexec/bluetooth/

 

Thanks

Tommy

From: Tommy Lin (林志聰)
Sent: Wednesday, March 13, 2019 8:14 PM
To: 'Hedberg, Johan' <johan.hedberg@...>; Chettimada, Vinayak Kariappa <vinayak.kariappa.chettimada@...>
Cc: Isaac Chen (
陳尚航) <Isaac_Chen@...>; Ryan Erickson <Ryan.Erickson@...>; Jamie Mccrae <Jamie.Mccrae@...>; zephyr-devel@...; Hanyu.Hsu@...; Ryan Hsu (徐振鋒) <Ryan.Hsu@...>
Subject: RE: [Zephyr-devel] LE pair disconnected

 

Hi Johan,

Thanks for your information

 

I do following things:

1.     add Bluetooth.service file to /lib/systemd/system/bluetooth.service

2.     add bluetooth.conf file to /etc/dbus-1/system.d

 

and start Bluetooth service , but it is still auto disconnection after connection.

 

Could you continue to give us some suggestions

 

Thank You,

Tommy

-----Original Message-----


From: Hedberg, Johan [mailto:johan.hedberg@...]
Sent: Wednesday, March 13, 2019 4:55 PM
To: Chettimada, Vinayak Kariappa <vinayak.kariappa.chettimada@...>
Cc: Tommy Lin (
林志聰) <Tommy.Lin@...>; Isaac Chen (陳尚航) <Isaac_Chen@...>; Ryan Erickson <Ryan.Erickson@...>; Jamie Mccrae <Jamie.Mccrae@...>; zephyr-devel@...; Hanyu.Hsu@...; Ryan Hsu (徐振鋒) <Ryan.Hsu@...>
Subject: Re: [Zephyr-devel] LE pair disconnected

 

Hi,

 

The Linux kernel has a 2 second timeout for any connection that doesnt have users. Users in this context are e.g. any user space sockets that use the connection. Normally when bluetoothd is running it owns the ATT socket, so theres always at least one user. It sounds to me like Tommy might not have bluetoothd or any other GATT server running. Anyway, this is starting to be a bit off-topic for the Zephyr mailing list.

 

Johan

 

> On 13 Mar 2019, at 10.50, Chettimada, Vinayak Kariappa <vinayak.kariappa.chettimada@...> wrote:

>

> Hi Tommy,

> Sorry, I am not able to try out your usecase on Bluez, as it has been quite sometime that I have been using with Bluez, due to my priorities, you may have to wait or ask someone else on the maillist to investigate the reasons for the host to disconnect the link.

> I am suspecting that you are not running at client that subscribes to a service, and hence the lost host decides to disconnect the idle link.

> Regards,

> Vinayak

> From: Tommy Lin (林志聰) <Tommy.Lin@...>

> Sent: 13 March 2019 08:41

> To: Chettimada, Vinayak Kariappa <vinayak.kariappa.chettimada@...>; Isaac Chen (陳尚航) <Isaac_Chen@...>; Ryan Erickson <Ryan.Erickson@...>; Jamie Mccrae <Jamie.Mccrae@...>; zephyr-devel@...

> Cc: Hanyu.Hsu@...; Ryan Hsu (徐振鋒) <Ryan.Hsu@...>

> Subject: RE: [Zephyr-devel] LE pair disconnected

> Hi Vinayak,

> sorry to bother you again.

> In your experience , what reason will cause CONNECTION TERMINATED BY LOCAL HOST

> > HCI Event: Disconnect Complete (0x05) plen 4                                                                                                                                                                          

>         Status: Success (0x00)

>         Reason: Connection Terminated By Local Host (0x16)

> @ MGMT Event: Device Disconnected (0x000c) plen 8                                                                                                                                                             

>         LE Address: 7A:03:05:31:E7:E6 (Resolvable)

>         Reason: Connection terminated by local host (0x02)

> <image001.png>

> Thank You,

> Tommy

> From: Tommy Lin (林志聰)

> Sent: Tuesday, March 5, 2019 11:29 AM

> To: 'Chettimada, Vinayak Kariappa' <vinayak.kariappa.chettimada@...>; Isaac Chen (陳尚航) <Isaac_Chen@...>; 'Ryan Erickson' <Ryan.Erickson@...>; 'Jamie Mccrae' <Jamie.Mccrae@...>; 'zephyr-devel@...' <zephyr-devel@...>

> Cc: 'Hanyu.Hsu@...' <Hanyu.Hsu@...>; Ryan Hsu (徐振鋒) <Ryan.Hsu@...>

> Subject: RE: [Zephyr-devel] LE pair disconnected

> Hi Vinayak,

> btmon logs has been put in Attachment.

> Thank You.

> Tommy

> From: Chettimada, Vinayak Kariappa [mailto:vinayak.kariappa.chettimada@...]

> Sent: Monday, March 4, 2019 3:50 PM

> To: Isaac Chen (陳尚航) <Isaac_Chen@...>; Tommy Lin (林志聰) <Tommy.Lin@...>; Ryan Erickson <Ryan.Erickson@...>; Jamie Mccrae <Jamie.Mccrae@...>; zephyr-devel@...

> Cc: Hanyu.Hsu@...; Ryan Hsu (徐振鋒) <Ryan.Hsu@...>

> Subject: Re: [Zephyr-devel] LE pair disconnected

> Hi,

> Could you please provide the btmon HCI logs?

> Regards,

> Vinayak

> From: "Isaac Chen (陳尚航)" <Isaac_Chen@...>

> Date: Monday, 4 March 2019 at 8:01 AM

> To: "Tommy Lin (林志聰)" <Tommy.Lin@...>, Ryan Erickson <Ryan.Erickson@...>, Jamie Mccrae <Jamie.Mccrae@...>, Vinayak Chettimada <vinayak.kariappa.chettimada@...>, "zephyr-devel@..." <zephyr-devel@...>

> Cc: "Hanyu.Hsu@..." <Hanyu.Hsu@...>, "Ryan Hsu (徐振鋒)" <Ryan.Hsu@...>

> Subject: RE: [Zephyr-devel] LE pair disconnected

> Hi Zephyr team,

> We can find this issue on nRF51 DK and our custom board with zephyr source code(samples/bluetooth/hci_uart). Could you give us your advice on how to solve this issue?

> Best Regards

> Isaac Chen

> Quanta Computer Inc.

> Business Unit 11 BL1

> Tel  : +886-3-327-2345 Ext : 17585

> This transmission is intended only for the use of the addressed recipient and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended recipient, any use of this communication is strictly prohibited. If you have received this communication in error, please kindly notify the sender and delete this message immediately.

> From: Tommy Lin (林志聰)

> Sent: Wednesday, February 27, 2019 4:03 PM

> To: Ryan Erickson; Jamie Mccrae; Isaac Chen (陳尚航); Chettimada, Vinayak Kariappa; zephyr-devel@...

> Cc: Hanyu.Hsu@...; Ryan Hsu (徐振鋒)

> Subject: [Zephyr-devel] LE pair disconnected

>  

> Hi Ryan Erickson,

> We use zephyr source code(samples/bluetooth/hci_uart) , and type following commands:

> After then , we can find out device(named 2019bt) in our phone , and we can pair it.

> But 2019bt will be disconnected after about two second at connected.

> Could you give us some suggestions

> Thank  You.

> <image002.jpg>

 


Re: LE pair disconnected

Thea Aldrich
 

Hi Tommy,
I wanted to circle back around to make sure you were able to get your questions answered. If not, please let me know and I will help get you the answers you need. 

If you have not done so already, you can join our Slack channel where most of the developers and maintainers are available. It is a great place to ask questions and talk to the community.
Best,
Thea Aldrich


On Mon, Mar 18, 2019 at 6:01 AM Tommy Lin (林志聰) <Tommy.Lin@...> wrote:

Hi Johan,

sorry to bother you again.

We try to launch Bluetooth service.

After typing “systemctl status bluetooth.service” , some error messages as following:

Could you give us some suggestions.

 

Thank You,

Tommy

From: Tommy Lin (林志聰)
Sent: Wednesday, March 13, 2019 8:19 PM
To: 'Hedberg, Johan' <johan.hedberg@...>; 'Chettimada, Vinayak Kariappa' <vinayak.kariappa.chettimada@...>
Cc: Isaac Chen (
陳尚航) <Isaac_Chen@...>; 'Ryan Erickson' <Ryan.Erickson@...>; 'Jamie Mccrae' <Jamie.Mccrae@...>; 'zephyr-devel@...' <zephyr-devel@...>; 'Hanyu.Hsu@...' <Hanyu.Hsu@...>; Ryan Hsu (徐振鋒) <Ryan.Hsu@...>
Subject: RE: [Zephyr-devel] LE pair disconnected

 

Sorry,

I also add bluetoothd file to /usr/libexec/bluetooth/

 

Thanks

Tommy

From: Tommy Lin (林志聰)
Sent: Wednesday, March 13, 2019 8:14 PM
To: 'Hedberg, Johan' <johan.hedberg@...>; Chettimada, Vinayak Kariappa <vinayak.kariappa.chettimada@...>
Cc: Isaac Chen (
陳尚航) <Isaac_Chen@...>; Ryan Erickson <Ryan.Erickson@...>; Jamie Mccrae <Jamie.Mccrae@...>; zephyr-devel@...; Hanyu.Hsu@...; Ryan Hsu (徐振鋒) <Ryan.Hsu@...>
Subject: RE: [Zephyr-devel] LE pair disconnected

 

Hi Johan,

Thanks for your information

 

I do following things:

1.     add Bluetooth.service file to /lib/systemd/system/bluetooth.service

2.     add bluetooth.conf file to /etc/dbus-1/system.d

 

and start Bluetooth service , but it is still auto disconnection after connection.

 

Could you continue to give us some suggestions

 

Thank You,

Tommy

-----Original Message-----


From: Hedberg, Johan [mailto:johan.hedberg@...]
Sent: Wednesday, March 13, 2019 4:55 PM
To: Chettimada, Vinayak Kariappa <vinayak.kariappa.chettimada@...>
Cc: Tommy Lin (
林志聰) <Tommy.Lin@...>; Isaac Chen (陳尚航) <Isaac_Chen@...>; Ryan Erickson <Ryan.Erickson@...>; Jamie Mccrae <Jamie.Mccrae@...>; zephyr-devel@...; Hanyu.Hsu@...; Ryan Hsu (徐振鋒) <Ryan.Hsu@...>
Subject: Re: [Zephyr-devel] LE pair disconnected

 

Hi,

 

The Linux kernel has a 2 second timeout for any connection that doesnt have users. Users in this context are e.g. any user space sockets that use the connection. Normally when bluetoothd is running it owns the ATT socket, so theres always at least one user. It sounds to me like Tommy might not have bluetoothd or any other GATT server running. Anyway, this is starting to be a bit off-topic for the Zephyr mailing list.

 

Johan

 

> On 13 Mar 2019, at 10.50, Chettimada, Vinayak Kariappa <vinayak.kariappa.chettimada@...> wrote:

>

> Hi Tommy,

> Sorry, I am not able to try out your usecase on Bluez, as it has been quite sometime that I have been using with Bluez, due to my priorities, you may have to wait or ask someone else on the maillist to investigate the reasons for the host to disconnect the link.

> I am suspecting that you are not running at client that subscribes to a service, and hence the lost host decides to disconnect the idle link.

> Regards,

> Vinayak

> From: Tommy Lin (林志聰) <Tommy.Lin@...>

> Sent: 13 March 2019 08:41

> To: Chettimada, Vinayak Kariappa <vinayak.kariappa.chettimada@...>; Isaac Chen (陳尚航) <Isaac_Chen@...>; Ryan Erickson <Ryan.Erickson@...>; Jamie Mccrae <Jamie.Mccrae@...>; zephyr-devel@...

> Cc: Hanyu.Hsu@...; Ryan Hsu (徐振鋒) <Ryan.Hsu@...>

> Subject: RE: [Zephyr-devel] LE pair disconnected

> Hi Vinayak,

> sorry to bother you again.

> In your experience , what reason will cause CONNECTION TERMINATED BY LOCAL HOST

> > HCI Event: Disconnect Complete (0x05) plen 4                                                                                                                                                                          

>         Status: Success (0x00)

>         Reason: Connection Terminated By Local Host (0x16)

> @ MGMT Event: Device Disconnected (0x000c) plen 8                                                                                                                                                             

>         LE Address: 7A:03:05:31:E7:E6 (Resolvable)

>         Reason: Connection terminated by local host (0x02)

> <image001.png>

> Thank You,

> Tommy

> From: Tommy Lin (林志聰)

> Sent: Tuesday, March 5, 2019 11:29 AM

> To: 'Chettimada, Vinayak Kariappa' <vinayak.kariappa.chettimada@...>; Isaac Chen (陳尚航) <Isaac_Chen@...>; 'Ryan Erickson' <Ryan.Erickson@...>; 'Jamie Mccrae' <Jamie.Mccrae@...>; 'zephyr-devel@...' <zephyr-devel@...>

> Cc: 'Hanyu.Hsu@...' <Hanyu.Hsu@...>; Ryan Hsu (徐振鋒) <Ryan.Hsu@...>

> Subject: RE: [Zephyr-devel] LE pair disconnected

> Hi Vinayak,

> btmon logs has been put in Attachment.

> Thank You.

> Tommy

> From: Chettimada, Vinayak Kariappa [mailto:vinayak.kariappa.chettimada@...]

> Sent: Monday, March 4, 2019 3:50 PM

> To: Isaac Chen (陳尚航) <Isaac_Chen@...>; Tommy Lin (林志聰) <Tommy.Lin@...>; Ryan Erickson <Ryan.Erickson@...>; Jamie Mccrae <Jamie.Mccrae@...>; zephyr-devel@...

> Cc: Hanyu.Hsu@...; Ryan Hsu (徐振鋒) <Ryan.Hsu@...>

> Subject: Re: [Zephyr-devel] LE pair disconnected

> Hi,

> Could you please provide the btmon HCI logs?

> Regards,

> Vinayak

> From: "Isaac Chen (陳尚航)" <Isaac_Chen@...>

> Date: Monday, 4 March 2019 at 8:01 AM

> To: "Tommy Lin (林志聰)" <Tommy.Lin@...>, Ryan Erickson <Ryan.Erickson@...>, Jamie Mccrae <Jamie.Mccrae@...>, Vinayak Chettimada <vinayak.kariappa.chettimada@...>, "zephyr-devel@..." <zephyr-devel@...>

> Cc: "Hanyu.Hsu@..." <Hanyu.Hsu@...>, "Ryan Hsu (徐振鋒)" <Ryan.Hsu@...>

> Subject: RE: [Zephyr-devel] LE pair disconnected

> Hi Zephyr team,

> We can find this issue on nRF51 DK and our custom board with zephyr source code(samples/bluetooth/hci_uart). Could you give us your advice on how to solve this issue?

> Best Regards

> Isaac Chen

> Quanta Computer Inc.

> Business Unit 11 BL1

> Tel  : +886-3-327-2345 Ext : 17585

> This transmission is intended only for the use of the addressed recipient and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended recipient, any use of this communication is strictly prohibited. If you have received this communication in error, please kindly notify the sender and delete this message immediately.

> From: Tommy Lin (林志聰)

> Sent: Wednesday, February 27, 2019 4:03 PM

> To: Ryan Erickson; Jamie Mccrae; Isaac Chen (陳尚航); Chettimada, Vinayak Kariappa; zephyr-devel@...

> Cc: Hanyu.Hsu@...; Ryan Hsu (徐振鋒)

> Subject: [Zephyr-devel] LE pair disconnected

>  

> Hi Ryan Erickson,

> We use zephyr source code(samples/bluetooth/hci_uart) , and type following commands:

> After then , we can find out device(named 2019bt) in our phone , and we can pair it.

> But 2019bt will be disconnected after about two second at connected.

> Could you give us some suggestions

> Thank  You.

> <image002.jpg>

 


Re: How to disable optimization in sanitycheck

alpi@...
 

> there are signs that there may be optimization enabled

 

Note that you can check the configuration sanitycheck used in the sanity-out folder,

for example for hello_world with native_posix the folder is:

sanity-out/native_posix/samples/hello_world/sample.helloworld/zephyr/.config

 

You can check there for CONFIG_NO_OPTIMIZATIONS=y

 

You also have the used make/ninja files there.

 

BR
Alberto

 

From: devel@... [mailto:devel@...] On Behalf Of Ooi, Cinly via Lists.Zephyrproject.Org
Sent: Thursday 21 March 2019 01:19
To: devel@...
Cc: devel@...
Subject: [Zephyr-devel] How to disable optimization in sanitycheck

 

Dear All

 

Is there an option (or any instruction on how to modify the code) to disable all optimization in sanitycheck?

 

Purpose: When I was looking at the code coverage report generated by sanitycheck, there are signs that there may be optimization enabled, e.g., only the middle of three C statements was not covered and the program execution is linear. I was exploring command line option to disable optimization but cannot find any

 

Then I was not sure whether something was optimized away with "Z_SYSCALL_HANDLER(funcName);" statement, i.e. a syscall handler with empty body

 

Many thanks in advance

Cinly


Re: How to disable optimization in sanitycheck

Marc Herbert
 

You may need one extra level of quotation, see --extra-args CMAKE_C_FLAGS example and sanitycheck pointer in https://github.com/zephyrproject-rtos/zephyr/pull/14593/files "test/determinism.sh"
 
http://resources.mpi-inf.mpg.de/departments/rg1/teaching/unixffb-ss98/quoting-guide.html

2221 - 2240 of 8049