I am using nrf54l15 with NCS v3.1.0 with the following error when i connect it(i worked in NCS v2.9.1 successfully):

for matching ncs 3.1.0 I change this code:

So, I modified the functionality implemented with bt_hci_cmd_create to the code shown in the above image. Now it compiles successfully, but when connecting to the device and trying to reset the transmit power, the errors mentioned earlier occur.
My solution is to place set_tx_power inside a k_work_init_delayable for initialization and call it upon connection, while also stopping advertising during the connection. With this approach, the device can now connect successfully.


MY BT configs:
Thank you very much!





