Hello,
I've been battling for a while with the following problem: when I have a gatt_server on CSR1010 and try to connect to it using a phone (any android phone and several iPhones) with several other phone clients around, the connection will often fail. From reading up and discussing the matter, apparently it's because other scanners flood the gatt server with scan requests, and the connection request goes unheard. I've tried to solve this with the following methods, using the a setup of an augmented gatt_server, a client phone and 3 interfering client phones. The test is connecting, exchanging info and disconnecting, for 100 times, in intervals of 20 seconds.
- use an empty scan response, in a hope that it will maked the responses quicker, and the gatt_server will quickly become available to connection requests. DIDN'T HELP.
- setting max and min advertising intervals to different values - instead of both being 500ms, I tried 100ms-500ms and 500ms-3000ms. I was hoping that it will allow flexibility in the advertising intervals, so it will be more flexible to accept connection requests. DIDN'T HELP.
- forcefully stopping and starting the advertisement during app_state_fast_advertising and app_state_slow_advertising, as such: When I enter such a state, I stop advertisements after 20ms, and the start again after 480ms, and then stopping again after 20ms etc, so effectively, I'm advertising 20ms out of 500ms, in hope that it will prevent other scanners to get responses out of the gatt_server, so it can notice conection requests in peace. DIDN'T HELP.
I'm stumped and I REALLY need to solve this. I'm positive I'm not the only bluetooth lowEnergy user ever to have this problem, can you please assist me with a solution or an advice on this? Thanks! P.S. by DIDN'T HELP I mean it didn't affect the results in a positive manne