You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by "Fanhang32 (via GitHub)" <gi...@apache.org> on 2023/12/30 15:24:04 UTC
[I] nimble-linux: ble_hci_sock_init: Assertion `rc == 0' failed. [mynewt-nimble]
Fanhang32 opened a new issue, #1669:
URL: https://github.com/apache/mynewt-nimble/issues/1669
The linux examples failed to run in the latest code
```
bind() failed 16 hci0
nimble-linux: ../../../nimble/transport/socket/src/ble_hci_socket.c:828: ble_hci_sock_init: Assertion `rc == 0' failed.
Aborted
```
The root cause was `ble_hci_sock_init` duplicated called in `ble_transport_ll_init` and linux example code.
It was introduced by this PR https://github.com/apache/mynewt-nimble/pull/1597.
@sjanc @CW-B-W Could you tell me why we need to initialize `ble_transport_ll_init` when use external controller?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@mynewt.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] nimble-linux: ble_hci_sock_init: Assertion `rc == 0' failed. [mynewt-nimble]
Posted by "andrzej-kaczmarek (via GitHub)" <gi...@apache.org>.
andrzej-kaczmarek commented on issue #1669:
URL: https://github.com/apache/mynewt-nimble/issues/1669#issuecomment-1872558276
`ble_hci_sock_init` calls should be removed from apps.
`ble_transport_ll_init` initializes LL side of transport which in case of external controller is a HCI socket so the socket should be initialized there.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@mynewt.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] nimble-linux: ble_hci_sock_init: Assertion `rc == 0' failed. [mynewt-nimble]
Posted by "Fanhang32 (via GitHub)" <gi...@apache.org>.
Fanhang32 commented on issue #1669:
URL: https://github.com/apache/mynewt-nimble/issues/1669#issuecomment-1872550715
If it is indeed necessary to do so,i can fix it by remove `ble_hci_sock_init ` from `ble_transport_ll_init ` in `ble_hci_socket.c`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@mynewt.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] nimble-linux: ble_hci_sock_init: Assertion `rc == 0' failed. [mynewt-nimble]
Posted by "andrzej-kaczmarek (via GitHub)" <gi...@apache.org>.
andrzej-kaczmarek closed issue #1669: nimble-linux: ble_hci_sock_init: Assertion `rc == 0' failed.
URL: https://github.com/apache/mynewt-nimble/issues/1669
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@mynewt.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] nimble-linux: ble_hci_sock_init: Assertion `rc == 0' failed. [mynewt-nimble]
Posted by "Fanhang32 (via GitHub)" <gi...@apache.org>.
Fanhang32 commented on issue #1669:
URL: https://github.com/apache/mynewt-nimble/issues/1669#issuecomment-1872635850
@andrzej-kaczmarek @CW-B-W Got it , thanks a lot! I‘ve removed `ble_hci_sock_init` in example apps in https://github.com/apache/mynewt-nimble/pull/1670
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@mynewt.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] nimble-linux: ble_hci_sock_init: Assertion `rc == 0' failed. [mynewt-nimble]
Posted by "CW-B-W (via GitHub)" <gi...@apache.org>.
CW-B-W commented on issue #1669:
URL: https://github.com/apache/mynewt-nimble/issues/1669#issuecomment-1872598661
Hello @Fanhang32,
I'm only a user of this project, and I only played it with FreeRTOS, therefore the below might not be completely correct.
---
In **mynewt-nimble v1.5.0**, the architecture of HCI transport had been modified.
(You may refer to [nimble/doc/transport.md](https://github.com/apache/mynewt-nimble/blob/master/nimble/doc/transport.md) for the current architecture.)
When I was migrating my personal project from **v1.4.0** to **v1.5.0**, I found the examples at that time were not compatible with **v1.5.0**.
For adapting to the v1.5.0 architecture, I opened PR https://github.com/apache/mynewt-nimble/pull/1597 to resolve the issue.
Is the example you used [porting/examples/linux](https://github.com/apache/mynewt-nimble/blob/master/porting/examples/linux/main.c)?
As I saw [porting/examples/linux](https://github.com/apache/mynewt-nimble/blob/master/porting/examples/linux/main.c) has not been maintained for a long time, I think this example might be kinda outdated and need to be adapted to the new HCI transport architecture.
Would it be better if we keep `ble_hci_sock_init()` in `ble_transport_ll_init()`
https://github.com/apache/mynewt-nimble/blob/64067f5168bd4de097b7830a078862a5df95d9a5/nimble/transport/socket/src/ble_hci_socket.c#L836-L841
and the remove `ble_hci_sock_init()` in the example (`porting/examples/linux`)?
https://github.com/apache/mynewt-nimble/blob/64067f5168bd4de097b7830a078862a5df95d9a5/porting/examples/linux/main.c#L69-L70
I think `ble_transport_ll_init()` is a more upper-level API for users to initialize the controller, while `ble_hci_socket_init()` may be the platform-specific implementation for `ble_transport_ll_init()`?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@mynewt.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org