Set following configuration by default,
CONFIG_BT_CLASSIC=y
CONFIG_BT_CENTRAL=y
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_SMP=y
CONFIG_BT_L2CAP_DYNAMIC_CHANNEL=y
CONFIG_BT_PAGE_TIMEOUT=0xFFFF
When building the project, the argument `--extra-conf prj_br.conf`
needs to be appended for BR.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
If the L2CAP connection response of command `listen` is
`BTP_L2CAP_CONNECTION_RESPONSE_INSUFF_SEC_AUTHEN`, set the security
level of L2CAP server to level 4.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
The error code `-EBUSY` of `bt_conn_set_security` means the
pairing/encryption procedure is ongoing. Ignore the error code.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Compare with BTP GAP pair, the pair_v2 add more arguments, including
security mode, security level, and flags.
The argument `security mode` is used to set the security mode.
The argument `security level` is used to set the security level of the
specific security mode.
The argument `flags` is used to add additional setting, such as flag
`BTP_GAP_PAIR_V2_FLAG_FORCE_PAIR` is used to force the pairing
procedure.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Change the channel id rage of BR L2CAP channel to
`ARRAY_SIZE(channels)` ~ `ARRAY_SIZE(channels) + CHANNELS`. The
unified channel ID can help identify whether the channel is BR or BLE
L2CAP channel.
When the address type of L2CAP connect command is
`BTP_BR_ADDRESS_TYPE`, create BR L2CAP channel connect request.
And if the channel ID falls into the range `ARRAY_SIZE(channels)`
~ `ARRAY_SIZE(channels) + CHANNELS` of L2CAP disconnect command,
create BR L2CAP disconnect request.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Create BR connect if the address type is `BTP_BR_ADDRESS_TYPE` when
handling BTP GAP `connect` command.
Disconnect BR connect if the address type is `BTP_BR_ADDRESS_TYPE`
when handling BTP GAP `disconnect` command.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Call `bt_br_discovery_cb_register` to register discovery callbacks.
Define a buffer br_adv_buf to report br discovery result.
Report device found event if discovery received callback triggered.
Start BR device discovery procedure if command `start_discovery` is
received.
Stop BR device discovery procedure if command `stop_discovery` is
received.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Set the pin code request callback `auth_pincode_entry`.
If `highsec` is false, call `bt_conn_auth_pincode_entry` with pin code
"0000".
If `highsec` is true, call `bt_conn_auth_pincode_entry` with pin code
"0000000000000000".
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
If cp->transport is BTP_L2CAP_TRANSPORT_BREDR, register BR L2CAP
server.
If cp->transport is not one of BTP_L2CAP_TRANSPORT_BREDR and
BTP_L2CAP_TRANSPORT_LE, return error code BTP_STATUS_FAILED.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Disable connectable mode for classic if `cp->connectable` is false.
Enable connectable mode for classic if `cp->connectable` is true.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Disable discoverable mode if `cp->discoverable` is
`BTP_GAP_NON_DISCOVERABLE`.
Set general discoverable mode if `cp->discoverable` is
`BTP_GAP_GENERAL_DISCOVERABLE`.
Set limited discoverable mode if `cp->discoverable` is
`BTP_GAP_LIMITED_DISCOVERABLE`.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Set the supported settings `BTP_GAP_SETTINGS_BREDR` and
`BTP_GAP_SETTINGS_SSP` if the Bluetooth classic is enabled.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Background:
In DPP hostapd will put more than 1K bytes text in multiple
wpa_msg calls in one loop. This will drain hostapd monitor
socket pair and fail. Thus DPP connection will fail.
The monitor socket pair of wpa_supplicant and hostapd are not like
ctrl_iface socket pair, which are used for sending command to
hostap from other tasks. The monitor socket pair is used by wpa_msg
to send messages to attatched ctrl_iface monitors. But in zephyr case,
the monitor is hostap task itself.
This means hostap task is both the sender and receiver task.
So it writes all the wpa_msg text into FIFO and read it in next loop.
So there is risk of draining socket pair FIFO and missing msg.
And the reading socket loop can be omitted by directly handling msg
in wpa_msg_cb.
Linux uses monitor socket pair because hostap is a process and wpa_msg
does cross-process communication.
But zephyr hostap is used as module in the same binary with
zephyr kernel.
So the usage is different and we don't need to use socket pair to
notify ctrl_iface monitors.
As long as we don't do time-consuming process in zephyr_wpa_msg_cb,
it won't affect hostap task.
So the zephyr_wpa_msg_cb will only filter and restore interesting logs,
or raise mgmt events to wifi l2 mgmt task.
Fix:
Remove socket send flow in wpa_msg.
Directly filter and handle text in zephyr_wpa_msg_cb,
coding in zephyr repo.
This will save 2K RAM in supplicant case and 4K RAM in
supplicant & hostapd coex case, in current default hostap
socket pair config.
And this will save max 50% loops of hostap task.
Signed-off-by: Fengming Ye <frank.ye@nxp.com>
Adds a dtsi file for the STM32F401XD family of devices. These devices
are closely related to the STM32F401XE family of devices but with a
reduced flash memory from 512kB to 384kB.
Signed-off-by: Ricardo Rivera-Matos <ricardo.rivera-matos@cirrus.com>
Introduces config file entries for STM32F401XD variants. The
STM32F401XD family is related to the STM32F401XE family but with a
reduced flash memory.
Signed-off-by: Ricardo Rivera-Matos <ricardo.rivera-matos@cirrus.com>
This commit resolves lock contention
issues by increasing the probablity of
contention during the test execution.
Increased wait delay when lock is taken
and Reduced wait delay when the lock is
released.
Achieved 99% lock contention probablity,
verified through runtime metrices.
Signed-off-by: S Swetha <s.swetha@intel.com>
Enable DHCPv4 when network interface goes up. This makes it easier
to test IP connectivity with DSA.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
The new DSA framework purpose and changes are as below.
- Aligned to Linux DSA framework which has been already mature framework
for many years, For now in zephyr, the DSA components were splited
as: switch, port, master(not need driver file for now), slave, and tag.
Seperated drivers were used for maintaining and developing new
features.
- The unified dts bindings (aligned to linux) were supported. The port
driver would parse DTS to decide the port type (master port, slave
port, or cpu port) to set up the switch. All the ports registered as
standard ethernet devices. (dsa port and dsa switch tree was not
supported.)
- How to add DSA device driver based on the framework? All the device
driver needing to do is providing dsa_spi implementation and private
data, and calling below initialization.
DSA_INIT_INSTANCE(n, _dapi, data)
- For switch tag case, recv/xmit helpers in dsa_api could be used for
taging/untagging. No modified ethernet drivers.
For no-tag type case, ethernet driver of master port should support
packet injection/extraction for slave ports leaving NULL recv/xmit.
The dsa_nxp_imx_netc.c driver will be the first example of the new DSA
framework.
The future work for DSA will be supporting bridge for ports. We may align
Linux to give users two options to use DSA device:
- Standalone mode: the switch ports work as regular ethernet ports.
- Bridge mode: switch mode with virtual bridge device which could be
assigned IP address.
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Current DSA TX/RX way was hard-coded in ethernet devices driver
with ETH_DSA_SUPPORT and NET_DSA.
This patch is to make such way obsolete, as we actually will support
a better DSA framework to handle this in NET/DSA core driver.
To make legacy devices not affected, below options are used instead.
- ETH_DSA_SUPPORT_DEPRECATED
- NET_DSA_DEPRECATED
Once the legacy devices are converted to new DSA framework, this code
could be removed.
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Add Bouffalo Lab serial driver. The driver uses pinctrl to configure
pins and have power management capabilities.
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
Add clamattia as collaborator in the area of ethernet to the
MAINTAINERS.yml file.
Signed-off-by: Cla Mattia Galliard <cla-mattia.galliard@zuehlke.com>
The commit 1e0af58b51 ("pmci: Move MCTP into the PMCI subsys") changes
'mctp' directory adding to unconditionally, which will cause:
CMake Warning at ./zephyrproject/zephyr/CMakeLists.txt:1022 (message):
No SOURCES given to Zephyr library: subsys__pmci__mctp
Excluding target from build.
Signed-off-by: Haiyue Wang <haiyuewa@163.com>
Add an entry to the release notes and migration guide regarding
moving OpenThread-related Kconfig options from
subsys/net/l2/openthred/Kconfig to modules/openthread/Kconfig.
Signed-off-by: Arkadiusz Balys <arkadiusz.balys@nordicsemi.no>
Moved OpenThread-related Kconfigs from L2 layer to
modules/openthread. All of those configs were not strictly related
to the L2 layer, so they fits better to OpenThread module.
This operation allows using OpenThread Kconfigs even if L2 layer is
disabled.
Enabling NET_L2_OPENTHREAD also configures those configs by
selecting the OPENTHREAD kconfig, so there is no change regarding
backwards compatibility. The only change is that the Kconfigs
related to Thread were moved to the modules space, so their
location in the menuconfig also changed.
Once it is done, a choice for setting different L2 implementations
seems to be redundant.
Signed-off-by: Arkadiusz Balys <arkadiusz.balys@nordicsemi.no>