LoPy stops detecting BLE advertisements
-
@alanm101
Thank you, that information is very helpful.Yes it would be interesting to compare with the C level ESP-IDF code on the ESP32.
I'll look into it in the coming days.
-
@alanm101 What's the advertising interval of your beacons? If you change the advertising interval or the number of beacons, does the time scanning fails change?
-
@jcaron Time to failure is random. Just ran another test in same controlled environment (home). Failed after 13 minutes.
Unfortunately I'm using Estimotes that cannot be transferred to me so frequency is a) fixed, b) unknown. The Estimote app refuses to divulge the info. Nordic's app can't list it either. If it will help, I can move them out of range and turn my phone into an iBeacon for a new test.
Update: Can't seem to set update frequency for virtual beacon. At least not with the software I have.
-
@alanm101 AFAIK there’s no frequency selection in BLE, it uses frequency hopping on predefined frequencies.
-
@jcaron ah sorry you meant the frequency of the advertisements. It’s usually not possible to find on the receiver side (as it does not necessarily listen all the time), but there are often ways to change it on the beacon (it’s a matter of compromise between time to discovery and power consumption)
-
@jcaron Yes, I meant broadcast rate/frequency. Apologies. Sadly I can't configure these.
-
@alanm101 this: https://community.estimote.com/hc/en-us/articles/204100806-What-are-the-default-settings-of-Estimote-Beacons-How-to-edit-settings- says you should be able to adjust them.
Alternatively you may want to try to see if varying the number of beacons has an influence on the time to failure. Just in case it’s a simple matter of the code failing after receiving a given number of advertisements (which would also explain the issue you had at the exhibition).
-
@jcaron Sadly, you have to "own" the Estimotes to make changes. The ones I have were allocated to someone else who now has no access to the registered email.
I'm running a test with the native IDF on a DOIT ESP32 board. Hacked the gatt_client.c code. No problems so far (58 minutes).
-
@alanm101 haven’t checked the whole thread to see if you already explored this option, but it might be interesting to log free memory and/or call the garbage collector periodically...
-
@jcaron In a past experiment, I called the gc every few cycles. No difference. Free mem. Hmm. That's a good call. Btw, it's now 3 hours with native IDF on a DOIT ESP32 board. No problems.
@all (Edited for clarity) Question: is it safe to flash the native IDF onto a Lopy? That would potentially eliminate hardware and IDF. I suspect flashing the standard IDF won't brick the Lopy, but opinions welcome before I try that.
-
20000 then I made a keyboard interrupt, on the latest software.
I have Ruuvi tags running in the other end of my house and recieve from them.
20000 ~ 5.55... hours.20000 10edb0e93366 74
-
@frida That's good news. So what must we conclude? Does the Pycom version of the BLE code break when the beacons are from Estimote? Sadly I don't have other physical beacons, but I can make a couple of devices emulate beacons. I'll try that.
-
@alanm101 said in LoPy stops detecting BLE advertisements:
So what must we conclude? Does the Pycom version of the BLE code break when the beacons are from Estimote?
Same thing for Estimote and EMbeacons on WiPy. See here.
-
@duffo64 Thanks, that's good info. Maybe one needs to buy a few ESP32s and use them to broadcast BLE ads. I wonder whether that would be better. Anyone tried that yet?
-
@jcaron I ran a test with gc every few cycles. Free RAM was around 50000. After 33 minutes scanning died. <Sigh>
-
@alanm101 Tried a ton of times, but at this point I am pretty sure that this behaviour is not due to a free memory issue.
Just having high hopes about IDF 3.0 that is due in a few days. Oh, well.... -
My next demo is on the 16th <shudder...>. Any ideas? Use Lopy for WiFi scanning and Lora broadcast, with a separate ESP32 for BLE scanning? Or abandon the Lopy and use an ESP32 with a Lora chip? Both options will stress my ability, so advice gratefully accepted,
-
@duffo64 I empathise duff. But I don't think it's an IDF issue. Seems fine with native IDF 2.1 and raw C code.
-
On reflection, I proposed a stupid solution. In a complex environment, you cannot dictate specific technologies. Estimotes abound, whether we like it or not.
-
@alanm101 you may be right. Increase the complexity in your test environment.
It seems that you are using unblocked communication. So yor timings are not the same when your device is connected to your PC or runs stand alone. Femove the print statements or write to an SD card to make the timings compareable.
You may receive corrupt data in your demo. Fix A beacon on yourself and your pet. Walk in and out of the BT range during the test. Send data over BT with your mobile.
And more important. Test your system wit the same settings as the demo. If you cannot increase the amount of beacons in your test, reduce the amount in the demo.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login