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:
|
|
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:
|
|
Re: How to disable optimization in sanitycheck
alberto.piedras@...
> 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
From: devel@... [mailto:devel@...]
On Behalf Of Ooi, Cinly via Lists.Zephyrproject.Org
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
|
|
How to disable optimization in sanitycheck
Ooi, Cinly
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: Triggering Z_SYSCALL_HANDLER calls
Boie, Andrew P
You need to call the API from user mode in order to exercise the handler functions. If you call the APIs from supervisor mode, the software interrupt and handler function are bypassed and control goes directly into the implementation function.
HTH, Andrew
From: devel@... [mailto:devel@...]
On Behalf Of Ooi, Cinly
Dear All
I am trying to write some coverage test to cover Z_SYSCALL_HANDLERs and I need some clue on how to start. I know I have to set CONFIG_USERSPACE.
Normally for Z_SYSCALL_HANDLER(funcA), gcov reports that z_impl_funcA() were called, but the line Z_SYSCALL_HANDLER() might not be called. This is despite other Z_SYSCALL_HANDLER() are called. I see this in kernel/timer.c where (1) Z_SYSCALL_HANDLER(k_timer_status_get) and z_impl_k_timer_status_get() were both being called, but (2) Z_SYSCALL_HANDLER(k_timer_stop) not called but z_impl_k_timer_stop() was called
Many thanks in advance Cinly
|
|
Re: How to enable DMA transfers for UART?
Paul Sokolovsky
Hello Stefan,
On Tue, 19 Mar 2019 15:18:02 +0000 "Stefan Jaritz" <stefan@...> wrote: Hey,[] So I am asking for help or some example how to do an UART & DMA.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. [] -- Best Regards, Paul Linaro.org | Open source software for ARM SoCs Follow Linaro: http://www.facebook.com/pages/Linaro http://twitter.com/#!/linaroorg - http://www.linaro.org/linaro-blog
|
|
Triggering Z_SYSCALL_HANDLER calls
Ooi, Cinly
Dear All
I am trying to write some coverage test to cover Z_SYSCALL_HANDLERs and I need some clue on how to start. I know I have to set CONFIG_USERSPACE.
Normally for Z_SYSCALL_HANDLER(funcA), gcov reports that z_impl_funcA() were called, but the line Z_SYSCALL_HANDLER() might not be called. This is despite other Z_SYSCALL_HANDLER() are called. I see this in kernel/timer.c where
(1) Z_SYSCALL_HANDLER(k_timer_status_get) and z_impl_k_timer_status_get() were both being called, but
(2) Z_SYSCALL_HANDLER(k_timer_stop) not called but z_impl_k_timer_stop() was called
Many thanks in advance
Cinly
|
|
Building multiple images
Sebastian Boe
Hi all,
due to how advanced security features (TEE) and device firmware upgrade (MCUBoot) is organized we are seeing the need to boot Zephyr applications in multiple stages. A real-world use-case of even a 3-stage boot process has been identified and tested at Nordic. Each bootloader needs to be individually upgrade-able and have it's own configurations of Zephyr libraries. To achieve this each bootloader must be organized as it's own executable. To make matters worse, in a multi-core AMP system each core would also require at least one executable. The problem is that the build system can only build one executable. This creates a usability issue as the user must invoke a large set of arcane commands to build, sign, and flash each executable. After considering many options we have finally ended up with a solution proposal that is merge-ready. See the PR for details https://github.com/zephyrproject-rtos/zephyr/pull/13672 Please add your feedback in the PR and let us know what you think of the proposed change. SEBASTIAN BØE | Software Developer Trondheim, Norway nordicsemi.com | devzone.nordicsemi.com
|
|
Building multiple images
Sebastian Boe
Hi all,
due to how advanced security features (TEE) and device firmware upgrade (MCUBoot) is organized we are seeing the need to boot Zephyr applications in multiple stages. A real-world use-case of even a 3-stage boot process has been identified and tested at Nordic. Each bootloader needs to be individually upgrade-able and have it's own configurations of Zephyr libraries. To achieve this each bootloader must be organized as it's own executable. To make matters worse, in a multi-core AMP system each core would also require at least one executable. The problem is that the build system can only build one executable. This creates a usability issue as the user must invoke a large set of arcane commands to build, sign, and flash each executable. After considering many options we have finally ended up with a solution proposal that is merge-ready. See the PR for details https://github.com/zephyrproject-rtos/zephyr/pull/13672 Please add your feedback in the PR and let us know what you think of the proposed change. SEBASTIAN BØE | Software Developer Trondheim, Norway nordicsemi.com | devzone.nordicsemi.com
|
|
Re: [Bluetooth mesh]How can I change device name at runtime in ./sample/bluetooth/mesh/?
Kai Ren
Thanks Johan, it's handy to use.
toggle quoted messageShow quoted text
Best Regards, Kai
-----Original Message-----
From: Hedberg, Johan <johan.hedberg@...> Sent: Tuesday, March 19, 2019 4:14 PM To: Kai Ren <kren@...> Cc: devel@... Subject: Re: [Zephyr-devel] [Bluetooth mesh]How can I change device name at runtime in ./sample/bluetooth/mesh/? Hi Kai, On 19 Mar 2019, at 6.55, Kai Ren <kren@...> wrote: I’m using Zephyr v1.12.0 release, the sample code I used is ./sample/bluetooth/mesh/.The bt_set_name() and bt_get_name() APIs were introduced in Zephyr 1.13. Johan
|
|
Re: How to enable DMA transfers for UART?
Li, Jun R
Stefan,
I've ever implemented a DMA-enabled UART on STM32F4 boards, but based on much old version of zephyr. I can try rebasing it to the latest zephyr if you are interested. Regards, Jun On 3/19/19, 08:18, "devel@... on behalf of Stefan Jaritz" <devel@... on behalf of 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. I checked the UART stm32 api and saw that it is not utilizing things like uart DMA transfers. But there is an complete DMA API available. Yeah! Now I looked at the sample section to get a blueprint for doing so. Ups! Nothing 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? Kind regards! Stefan PS: there is an nice article on that here http://stm32f4-discovery.net/2017/07/stm32-tutorial-efficiently-receive-uart-data-using-dma/
|
|
Building multiple images
Sebastian Boe
Hi all,
due to how advanced security features (TEE) and device firmware upgrade (MCUBoot) is organized we are seeing the need to boot Zephyr applications in multiple stages. A real-world use-case of even a 3-stage boot process has been identified and tested at Nordic. Each bootloader needs to be individually upgrade-able and have it's own configurations of Zephyr libraries. To achieve this each bootloader must be organized as it's own executable. The problem is that the build system can only build one executable. This creates a usability issue as the user must invoke a large set of arcane commands to build, sign, and flash each bootloader. After considering many options we have finally ended up with a solution proposal that is merge-ready. See the PR for details https://github.com/zephyrproject-rtos/zephyr/pull/13672 Please add your feedback in the PR and let us know what you think of the proposed change. SEBASTIAN BØE | Software Developer Trondheim, Norway nordicsemi.com | devzone.nordicsemi.com
|
|
How to enable DMA transfers for UART?
Stefan Jaritz
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. I checked the UART stm32 api and saw that it is not utilizing things like uart DMA transfers. But there is an complete DMA API available. Yeah! Now I looked at the sample section to get a blueprint for doing so. Ups! Nothing 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? Kind regards! Stefan PS: there is an nice article on that here http://stm32f4-discovery.net/2017/07/stm32-tutorial-efficiently-receive-uart-data-using-dma/
|
|
Re: [Bluetooth mesh]How can I change device name at runtime in ./sample/bluetooth/mesh/?
Hi Kai,
On 19 Mar 2019, at 6.55, Kai Ren <kren@...> wrote: I’m using Zephyr v1.12.0 release, the sample code I used is ./sample/bluetooth/mesh/.The bt_set_name() and bt_get_name() APIs were introduced in Zephyr 1.13. Johan
|
|
[Bluetooth mesh]How can I change device name at runtime in ./sample/bluetooth/mesh/?
Kai Ren
Hello, I’m using Zephyr v1.12.0 release, the sample code I used is ./sample/bluetooth/mesh/. In this project, I know the device name (used at provisioning phase over PB-GATT) is predefined in *.prj file, CONFIG_BT_DEVICE_NAME . Is it possible to change the device name at runtime? I plan to use chip’s factory ID to replace the predefined device name. Thanks.
Best Regards, Kai
|
|
Re: LE pair disconnected
Tommy Lin (林志聰) <Tommy.Lin@...>
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 (林志聰)
Sorry, I also add bluetoothd file to /usr/libexec/bluetooth/
Thanks Tommy From: Tommy Lin (林志聰)
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-----
Hi,
The Linux kernel has a 2 second timeout for any connection that doesn’t 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 there’s 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 run samples/subsys/usb/console on windows with nrf52840_pac10056?
Andrei
Hi Lars,
On Sat, Mar 16, 2019 at 12:57:52PM +0100, Lars Knudsen wrote: Hi Carles,Do they use MS OS Descriptors to pick right driver? We have this capability in Zephyr, it is used in RNDIS to pick RNDIS compatible device driver. You can also create issue for the sample. Best regards Andrei Emeltchenko [1]https://github.com/empirikit/empirikit-controller
|
|
Re: How to run samples/subsys/usb/console on windows with nrf52840_pac10056?
Andrei
Hi,
On Sat, Mar 16, 2019 at 11:42:17AM +0000, Cufi, Carles wrote: Hi Aaron,The inf file is needed only for older versions of Windows, the latest one (Win10) only needs this patch from the PR below: https://github.com/zephyrproject-rtos/zephyr/pull/14106/commits/bfc3b563aff5025108f625240f24fff31fda38bf Best regards Andrei Emeltchenko
|
|
Re: How to run samples/subsys/usb/console on windows with nrf52840_pac10056?
Lars Knudsen
I just found this awesome article by Reilly Grant covering all the quirks:
On Sat, Mar 16, 2019 at 12:58 PM Lars Knudsen via Lists.Zephyrproject.Org <larsgk=gmail.com@...> wrote:
|
|