I bought a KNOT and a TG-BT5-OUT tag to try and learn something about BLE and IoT. My aim is to complete a simple project where an HTTP POST is made when the tag detects a tilt.
I think I am running into a limitation with how BLE works but just wanted to check that it's not my fault. I started off with the tag set to advertise when it detects that it's been tilted, with periodic advertisements disabled. I was not seeing every tilt event when I looked at the advertising reports received on the KNOT - I am guessing this is a result of the radio not listening on whatever channel was used to broadcast the advertisement at the moment it was sent, and so I am missing it. If I set the tag to advertise every 3s then I get most of the advertisements but am still losing some - this can be one-off drops or sometimes 15-20s can pass without a packet being received. I would say about 20% of the advertisements aren't being received. Signal strength is -64dB with line of sight between the tag and the KNOT so I don't think that is the issue, the scanner interval and window are on their 10ms defaults.
Is there any way to improve this, or would it just be a case of reducing the advertisement interval (and pushing up the power consumption) to compensate for some of the messages being lost? I assume that I won't be able to use the feature on the tag where it sends one message each time it detects a tilt as I have no guarantee of the KNOT receiving it, and the tag only sends one advertisement on each event (it would be great if it could send a burst of advertisements over a couple of seconds, not sure if that can be changed in future firmware), so it looks like I will need to look at the data coming back from the tag and decide in my script whether that counts as a tilt or not.