Skip to content

Commit

Permalink
[nrfconnect] enable multiprotocol (#2484)
Browse files Browse the repository at this point in the history
* [zephyr] add friend declaration of BLEManagerImpl to ThreadStackManager

* [zephyr] remove no longer needed workaround functions

* [nrfconnect] enable multiprotocol

* [workflows] bump container version used for CHIP NRF build
  • Loading branch information
e-rk authored and pull[bot] committed Sep 8, 2020
1 parent faa8fe4 commit 1023574
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 30 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/examples.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ jobs:
runs-on: ubuntu-latest

container:
image: connectedhomeip/chip-build-nrf-platform:0.4.2
image: connectedhomeip/chip-build-nrf-platform:0.4.3
volumes:
- "/tmp/bloat_reports:/tmp/bloat_reports"
- "/tmp/output_binaries:/tmp/output_binaries"
Expand Down
9 changes: 8 additions & 1 deletion config/nrfconnect/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,11 @@ source "Kconfig.zephyr"
config CHIP_LIB_SHELL
bool "Enable CHIP's shell library"
help
Link the application with the library containing CHIP shell commands
Link the application with the library containing CHIP shell commands

config MULTIPROTOCOL
bool "Enable multiprotocol support"
select NRF_802154_MULTIPROTOCOL_SUPPORT
depends on BT && NET_L2_OPENTHREAD
help
Enable multiprotocol in the nRF 802.15.4 radio driver
19 changes: 10 additions & 9 deletions examples/lock-app/nrfconnect/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,16 @@ CONFIG_NET_IF_UNICAST_IPV6_ADDR_COUNT=6
CONFIG_NET_IF_MCAST_IPV6_ADDR_COUNT=8
CONFIG_NET_MAX_CONTEXTS=10

# Disable Bluetooth Low Energy temporarily until dynamic multiprotocol is available
# To enable Bluetooth, set CONFIG_BT=y and uncomment the below configs. You will also
# have to set CONFIG_NET_L2_OPENTHREAD=n.
CONFIG_BT=n
# CONFIG_BT_PERIPHERAL=y
# CONFIG_BT_DEVICE_APPEARANCE=0
# CONFIG_BT_DEVICE_NAME_DYNAMIC=y
# CONFIG_BT_DEVICE_NAME_MAX=15
# CONFIG_BT_MAX_CONN=2
# Enable multiprotocol
CONFIG_MULTIPROTOCOL=y

# Bluetooth Low Energy configs
CONFIG_BT=y
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_DEVICE_APPEARANCE=0
CONFIG_BT_DEVICE_NAME_DYNAMIC=y
CONFIG_BT_DEVICE_NAME_MAX=15
CONFIG_BT_MAX_CONN=2

# Use mbedTLS from nrf_security library
CONFIG_NORDIC_SECURITY_BACKEND=y
Expand Down
19 changes: 10 additions & 9 deletions examples/shell/nrfconnect/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,16 @@ CONFIG_NET_IF_UNICAST_IPV6_ADDR_COUNT=6
CONFIG_NET_IF_MCAST_IPV6_ADDR_COUNT=8
CONFIG_NET_MAX_CONTEXTS=10

# Disable Bluetooth Low Energy temporarily until dynamic multiprotocol is available
# To enable Bluetooth, set CONFIG_BT=y and uncomment the below configs. You will also
# have to set CONFIG_NET_L2_OPENTHREAD=n.
CONFIG_BT=n
# CONFIG_BT_PERIPHERAL=y
# CONFIG_BT_DEVICE_APPEARANCE=0
# CONFIG_BT_DEVICE_NAME_DYNAMIC=y
# CONFIG_BT_DEVICE_NAME_MAX=15
# CONFIG_BT_MAX_CONN=2
# Enable multiprotocol
CONFIG_MULTIPROTOCOL=y

# Bluetooth Low Energy configs
CONFIG_BT=y
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_DEVICE_APPEARANCE=0
CONFIG_BT_DEVICE_NAME_DYNAMIC=y
CONFIG_BT_DEVICE_NAME_MAX=15
CONFIG_BT_MAX_CONN=2

# Use mbedTLS from nrf_security library
CONFIG_NORDIC_SECURITY_BACKEND=y
Expand Down
4 changes: 4 additions & 0 deletions src/include/platform/ThreadStackManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ class DeviceNetworkInfo;
class DeviceControlServer;
class BLEManagerImpl;
template <class>
class GenericBLEManagerImpl_Zephyr;
template <class>
class GenericPlatformManagerImpl;
template <class>
class GenericConfigurationManagerImpl;
Expand Down Expand Up @@ -89,6 +91,8 @@ class ThreadStackManager
friend class ConfigurationManagerImpl;
#if CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE
friend class Internal::BLEManagerImpl;
template <class>
friend class Internal::GenericBLEManagerImpl_Zephyr;
#endif
friend class Internal::DeviceControlServer;
template <class>
Expand Down
10 changes: 0 additions & 10 deletions src/inet/ZephyrSocket.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,6 @@

#include <sys/socket.h>

static inline int getsockname(int sock, sockaddr * addr, socklen_t * addrlen)
{
return zsock_getsockname(sock, addr, addrlen);
}

static inline ssize_t sendmsg(int sock, const struct msghdr * msg, int flags)
{
return zsock_sendmsg(sock, msg, flags);
}

static inline ssize_t recvmsg(int sock, struct msghdr * msg, int flags)
{
// Zephyr doesn't implement recvmsg at all, but if the message vector size is > 0 we can simply
Expand Down

0 comments on commit 1023574

Please sign in to comment.