Hi,
I am using ncs 2.1.0 on a custom nRF52832 BLE peripheral board. SHELL_BT_NUS is awesome, I can fully control the board through the command line interface, and see the LOG messages via the SHEL_LOG backend. And I am doing that conveniently from my windows laptop, on Edge or Chrome browsers via Web Bluetooth page (https://wiki.makerdiary.com/web-device-cli/)!
So everything was fine, until I enabled authentication (CONFIG_BT_NUS_AUTHEN=y). Now I can connect to the board from my Android phone (nRF Connect, nRF UART, Chrome, ...) with no problems (pairing, bonding, subscribe to NUS notifications), however, connecting from the Windows browser is a hit and miss: After several retries I can bond with the device, but I rarely manage to exchange NUS data. It fails somewhere during link encryption phase and disconnects immediately.
It could be considered a Web Bluetooth problem and not ncs, however, in the previous nRF5 SDK implementation (15.2) before porting to Zepyr, it used to work flawlessly both from Android / IOS apps and Windows web browsers.
I can provide .config and BLE debug logs, although the easiest way to reproduce is to run peripheral_uart sample, add line CONFIG_BT_NUS_AUTHEN=y in prj.conf and try to connect from a windows browser. I also had to add bt_conn_auth_passkey_confirm(conn); inside auth_passkey_confirm(..) as threre are no buttons in my board (perhaps setting NULL to .auth_passkey_confirm callback would be another solution).
Kindly check and let me know, securing NUS (and also DFU/MCUMgr) and working from sites lile Web Device CLI (makerdiary.com) or Wavecake (getwavecake.com) is more than useful.
Thanks!