zephyrproject-rtos / zephyr

Primary Git Repository for the Zephyr Project. Zephyr is a new generation, scalable, optimized, secure RTOS for multiple hardware architectures.
https://docs.zephyrproject.org
Apache License 2.0
10.61k stars 6.5k forks source link

Bluetooth: Shell: Add a command cmd_send_traffic to send data traffic in coex scenario. #67472

Open nxf91057 opened 8 months ago

nxf91057 commented 8 months ago

Is your feature request related to a problem? Please describe. The coex application we use bt-shell lacks console access when sending BLE traffic, resulting in us being unable to send wifi commands (wifi scan). The Root cause is that in the current code logic, the commands of ble and wifi are received through the shell_uart task, but ble always occupies the shell_uart task when sending data traffic, which causes the wifi command cannot be processed until the ble data traffic is completed.

Describe the solution you'd like We have added a new command cmd_send_traffic and a timer(g_l2cap_send_timer), and then let ble send traffic process to be processed in this timer cb function(g_l2cap_send_timer_cb), so that ble will not always occupy the shell_task. When ble sends data traffic, the wifi command can also be Process normally. image image

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context I'm making a PR to add this functionality, it will be submitted soon, please help with reviews and suggestions, thanks in advance!

github-actions[bot] commented 8 months ago

Hi @nxf91057! We appreciate you submitting your first issue for our open-source project. 🌟

Even though I'm a bot, I can assure you that the whole community is genuinely grateful for your time and effort. 🤖💙