I'm running 2 sets of legacy advertising, scanning, and a connection. If the connection is terminated, it impacts rest of the operations. I'm using the SDK version 2.40. In my case, the procedure to see the problem is as follows. You can easily reproduce the issue using HCI Tester and host_test.
1. On Device A, enable 2 sets of legacy non-connectable advertising.
2. On Device A, disable duplicate filter for scanner and enable scanning.
3. With sniffer, check if Device A is advertising 2 sets of advertisement. At the same time, check if Device A receiving AdvRpt.
4. On Device B, enable 1 set of legacy connectable advertising.
5. Make a connection from A with B.
6. With sniffer, check if the connection is maintained. At the same time, do Step 3 again.
7. Turn off Device B so that supervision timeout followed by disconnection happens.
8. Do Step 3 again. You will see all stopped.
9. On Device A, enable scanning again. You will see AdvRpt again.
10. On Device A, enable one of the advertising sets again. You will see nothing happen.
11. On Device A, disable the same advertising set anyway. You will see nothing happen to advertising, but will see scanning stop.
The steps 9-11 can vary by timing and parameters. It's a little unpredictable. The bottom line is, disconnection while some other roles are active messes up the state.
In our project, we must use the three roles at the same time. Please let me know if there is any workaround and plans to fix the problems if any. Thanks.
- Cetri