Community discussions

MikroTik App
 
JonnyM
just joined
Topic Author
Posts: 5
Joined: Sat Mar 17, 2018 5:09 pm

[IoT] KNOT & TG-BT5-OUT - Missing advertisements

Fri Jul 01, 2022 9:55 pm

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.
 
wavespan
newbie
Posts: 37
Joined: Sat Mar 21, 2009 9:05 am
Location: Springfield, MA - USA

Re: [IoT] KNOT & TG-BT5-OUT - Missing advertisements

Fri Jul 08, 2022 11:35 pm

I am having similar issue with advertisements not updating using a ble tag with a button. Button is programmed for one press or two press and sends a different uuid for each. I was testing with one button press then tried two button press but kept getting data for the single press. after thinking it was the BLE button I tried a BLE app on my phone and button does exactly as its supposed to. If i reboot the KNOT and try double button press first I get correct data then try single button I keep getting data for the double press until I reboot it again. The Mikroitk KNOT seems to not be refreshing the data only the signal and timestamp.
 
denissMT
MikroTik Support
MikroTik Support
Posts: 49
Joined: Wed May 26, 2021 12:00 pm

Re: [IoT] KNOT & TG-BT5-OUT - Missing advertisements

Wed Sep 07, 2022 11:29 am

We have recently added a new guide on how to send an e-mail notification from the KNOT in case the "trigger" is detected.
You can find the guide by following the link:
https://help.mikrotik.com/docs/display/ ... r+triggers
You can find the video demonstration over at:
https://www.youtube.com/watch?v=vrKqXMfUCR4

Basically, the only difference in your case, is that the tilt condition will trigger the email notification. As you can see from the script, the script "collects" all possible triggers, so if you "tilt" the tag and see the payload's 21 octets as "02" --> it will send an email notification indicating that the "tilt trigger was detected".
The last thing to change is the /tool e-mail part. You will just need to alter it for the "http post" /tool fetch scenario.

KNOT's scanner should detect 37, 38 and 39 Bluetooth advertising channel data.
Can you try relocating your KNOT to another location with less 2.4 GHz interference and try checking how well the payloads are received there? Maybe it is a location issue.

I would highly advise you to create a ticket in our support system so we can check more detailed information there:
https://mikrotik.com/support
 
JonnyM
just joined
Topic Author
Posts: 5
Joined: Sat Mar 17, 2018 5:09 pm

Re: [IoT] KNOT & TG-BT5-OUT - Missing advertisements

Sun Oct 02, 2022 12:03 am

Thanks Deniss. Is there a way within the KNOT itself to see if there is interference on the BLE channels? If I turn on the Wi-Fi radio and go to the status page it shows a noise floor of -119dBm.
 
damianzyrex
just joined
Posts: 1
Joined: Tue Nov 22, 2022 2:01 pm

Re: [IoT] KNOT & TG-BT5-OUT - Missing advertisements

Fri Nov 25, 2022 1:44 pm

Hi There Deniss, i have tried this guide and followed each step setting up the email server, and created the schedule. However I still do not get any emails or output from the Knot router at all to email.

Apart from the email server setup, is there any thing in the firewall settings that might cause this not to send any email?
 
denissMT
MikroTik Support
MikroTik Support
Posts: 49
Joined: Wed May 26, 2021 12:00 pm

Re: [IoT] KNOT & TG-BT5-OUT - Missing advertisements

Tue Dec 20, 2022 12:01 pm

Thanks Deniss. Is there a way within the KNOT itself to see if there is interference on the BLE channels? If I turn on the Wi-Fi radio and go to the status page it shows a noise floor of -119dBm.
Unfortunately, there is no such feature. I would highly suggest trying to see if the payloads are lost in another location.
 
denissMT
MikroTik Support
MikroTik Support
Posts: 49
Joined: Wed May 26, 2021 12:00 pm

Re: [IoT] KNOT & TG-BT5-OUT - Missing advertisements

Tue Dec 20, 2022 12:03 pm

Hi There Deniss, i have tried this guide and followed each step setting up the email server, and created the schedule. However I still do not get any emails or output from the Knot router at all to email.

Apart from the email server setup, is there any thing in the firewall settings that might cause this not to send any email?
Check if you can actually send simple email messages:
https://help.mikrotik.com/docs/display/ROS/E-mail
https://help.mikrotik.com/docs/display/ ... ndingEmail
https://help.mikrotik.com/docs/display/ ... icexamples

If you can, check the logs what happens there. I would suggest making a support ticket in our system if you still have the issue:
https://mikrotik.com/support
 
JonnyM
just joined
Topic Author
Posts: 5
Joined: Sat Mar 17, 2018 5:09 pm

Re: [IoT] KNOT & TG-BT5-OUT - Missing advertisements

Tue Dec 20, 2022 1:48 pm

Thanks Deniss. Is there a way within the KNOT itself to see if there is interference on the BLE channels? If I turn on the Wi-Fi radio and go to the status page it shows a noise floor of -119dBm.
Unfortunately, there is no such feature. I would highly suggest trying to see if the payloads are lost in another location.
Thanks, I will try that before contacting support. I've had to put this on hold for now but I will pick it up as soon as I get a chance.

Who is online

Users browsing this forum: Google [Bot] and 75 guests