This object is in archive! 

Locus keeps searching for Ant+ HRM

Paweł Bartuzi shared this problem 8 years ago
Solved

Unfortunately, after solving http://help.locusmap.eu/topic/recording-doesnt-start-ant-hrm there is another small problem with Ant+ HRM in 3.9.0: sometimes HRM is constantly being searched by Locus even after the recording was stopped.


To reproduce:

  1. Start track recording with a profile that has HRM enabled in "Hardware devices" option of a track recording profile.
  2. Stop recording before Locus finds HRM (because you don't wear one - like you started recording with a wrong profile) and before Locus acquires GPS lock.

After that Locus doesn't record a track (correctly), however:

  • it doesn't disable GPS it enabled only to record a track,
  • it keeps searching for HRM forever, periodically calling ANT+ Plugin Service and displaying "Preferred Device Not Found". Pressing "Cancel search" or "Cancel" in these windows doesn't help despite Locus yellow "Process aborted" flash alert - the only way to stop searching is to exit Locus completely.

BTW: in cases like that when a problem is related somewhat to a previous problem fix, do you prefer to continue the previous report (now marked as "Solved") or to start a new topic (like I did here)?

Replies (16)

photo
1

Damn, exactly same issue as was in "starting HRM sensor"!


Thank you Paweł, issue found and fixed!


And if create a new topic or continue in previous, it depends on you. In this case, should be more logical to continue in old. I may simple re-open already "solved" issue and we may continue. Anyway not a big problem ...

photo
1

In which version was this fixed? I have 3.9.3 and Locus is very annoying after recording was stopped. I was even getting "Ant+ plugin service" and "device not found" popups even if Locus was not the active app!

In fact - this popup window is extremely annoying even during the track recording. Especially when i have cadence sensor which does not transmit anything when stationary.

The "Ant+ Plugin service" and "Preferred device not found" IMO should never be shown.

Sensor connection retry should be completely silent. The only time those popups are ok is when you pair a new device and only while you are in the Ant device manager.

There might be a setting to configure interval for retries, but as soon as the sensor is paired and "on", it should be retried indefinitely. If you want to save battery, you can turn sensor off manually.


To notify the user, you can update Ant logo/color to indicate some expected device is not connected - or show number of missing devices within the icon - same style as iphone/android desktop notifications).

photo
1

Hmm I was testing yesterday evening ANT+ HRM monitor and during around an hour when I repeatedly removed and added sensor from chest, I never saw a single popup or any warning. And Locus always correctly connected to sensor.


Do you registered your sensors with "remember me" feature of Ant+ Plugin service?

photo
1

Originally i was getting so many popups that i didnt notice all the details properly.

After lot of testing yesterday (see details in my own ticket http://help.locusmap.eu/topic/not-able-to-unpair-ant-device) - it is quite possible that the problametic scenario was a bit different - ANT+ plugin service is searching for disabled sensor types and tries indefinitely with multiple popups. With so many popups it quite difficult to verify whether enabled sensors cause any problems or not. Lets fix that first, then i will be able to verify sensors connects/disconnets show any popups or not.

photo
1

Hmm should we start from begin? Just open ANT manager in Locus and disable all sensors!


Then start with a single sensor! You should get black screen of ANT+ service where is searching for sensor. Once it is found, you may select it and also set it as "Favorite" or "Remember" (not sure precisely now). If you do it, Locus should never ask for this sensor again. At least, it works for me in this way.

photo
1

Yes - enabled sensors seem to work rather fine (i dont like quick searching popup but with active sensor nearby that just appears for a second). Main problems are caused by disabled sensors.


Exit Locus completely, start a fresh instance (i even tried turning phone off first) and just open Ant manager as a first thing and do nothing. In a few seconds ANT+ plugin service starts searching for disabled sensor types. Details vary a bit - before it was searching for bike speed and cadence, now it searches for bike speed.

If i enable cadence sensor (which transmits only when revolving) - i am enable cadence sensor and it does not transmit, it shows search popup during black ANT search screen.


Most of the time, it stays in the search ANT+ plugin service search screen, if i go back to Ant manager (or any other Locus screen), after a few seconds this is retried infinitely.


(but sometimes i also had a scenario when search screen didnt stay, it disappeared after trying to search for several disabled types followed by error popup about ANT+ plugin service not available (as many times in a row as there were searches for disabled types).

photo
1

Hmm maybe I'm finally starting to understand. So for you, Locus starts searching for also disabled ANT+ sensors?? This anyway should not!


May you should try to every single visible sensor manually enable and disable by small switcher at right side of every sensor? It seems that Locus incorrectly handle this "enabled" state for you. Weird.


----


I'm checking a code. There are only two places/features that cause enabling/disabling of sensors.


First is small switcher next to sensor as I mentioned above. Second, quite new, is automatic connection of sensors in track recording profile. So I have to ask, if you do not have enabled all possible sensors there. Because then Locus tries to connect to all of them when you start recording.

photo
1

I believe there are 5 independent issues:

#1 search screen for disabled sensors

#2 question to download missing Ant radio service

#3 enabling+setting to connected for speed and speed+cadence sensors when cadence is paired

#4 search screen for enabled/connected sensors which are not paired yet

#5 search popups for enabled sensors which are paired


#1 I checked recording profile - and there i only have my actual sensors, so that is not the source of the problem. When i enable all sensor types - i can confirm that they were all set to connected state. If i disconnect unneeded sensor types manually, but keep them enabled, this seems to solve the problem with disabled sensors. So looks like the code only checks for the connected state, not the enabled state - so if you disable a sensor, it should be automatically disconnected. Thanks at least for the workaround.


#2) After i manully disconnected unneeded sensor types - lookup screen for them stopped showing. But after i paired my cadence sensor - suddenly bike speed and bike speed+cadence sensors got enabled+connected!


#3) One small defect related to this - it shows Question "Selected feature require missing library ANT radio service. Do you want to connect to internet and install it" immediately when starting Ant manager the first time. While it waits for an answer, the lookup screen appears within few seconds (usually less than 1s).


#4 Now i only get search screen for cadence sensor. In Ant manager it has a label "Sensor disconnected" or "serching", but button is in connected state. Once i pair the sensor, the search screen is gone. So the only defect here is that search screen should only appear in Ant manager (never in rest of Locus) - and i only in the moment you mark sensor as connected. If the pairing is unsuccessfull, the connected state should be cleared (so that you dont get the search screen automatically next time you enter ant manager).


#5 Paired HR and cadence sensors have "Searching" label, button in connected state. This does not generate search screen, only a search popup. But it is still annoying (even for sensors which are on and within reach). The ones which are not found generate "Preferred device not found Retry/Search all/Cancell" msgbox waiting for an answer.

This only happens if you go to ant manager after fresh Locus start. After you connect the sensor (and keep Locus running) - it works as expected - it handles turning the sensor on/off as it should - silently.


So seems the code remembers connected state of the sensor, and the ones which were not connected always trigger search popup + msgbox (if not found). That should not happen.

Program should only use paired state - if paired, connect/disconnect sensors silently.

If you want to indicate missing sensor - update Ant manager icon.

No popups/msgboxes should be triggered for missing sensors in rest of Locus, any popups is only appropriate after manual action in Ant manager - never automatically.


If you prefer to discuss in Czech, you can give me a call today to explain details (send me an email and i will give you my phone number).

photo
1

This problem is still present.


Steps to reproduce:

1) Configure e.g. Bike profile with HRM Sensor

2) Make sure the sensor is turned off

3) Start recording so that the HRM Sensor gets enabled


The same behavior is without track recording:

1) go to Ant manager

2) Enable HRM sensor


In both cases (if the HRM sensor is turned off) the Ant+ Plugin Service popups keeps popping up indefinitely. Cancel only helps for 5-10s.

Sometimes there is also a prompt to download Ant+ Library.

For some sensors (e.g. Speed) the popup takes full black screen with Proximity on/off toggle.

photo
1

Good day Peter,


I'm sorry, but I'll probably have to forward to use different application as I have no idea how may I help here. What you wrote, works different to me. Since I select an sensor in "popup that takes full black screen with Proximity on/off toggle" and mark it as "Preferred device", such screen appear no more to me. All works silently without a problems. My wife is running with Holux ANT+ HRM for almost two years and never said me about such issue.


So sorry, without ability to simulate such problem, I have no idea how to solve it. Even if I should simulate it, hard to say if there is something to do. ANT library offers single function - "AntPlusHeartRatePcc.requestAccess" , which selected preferred device or display black search screen. And this request has no extra parameters, like "keep silent". So I also do not have any method how to change it. Sorry.

photo
1

Hi,


I understand it might be difficult to fix and I will ry to find out what libraries other apps are using to understand what options are there.

But at least you should be able to reproduce the problem easily (you can ignore full black screen - this might be caused by not storing preferred device). Every time you start recording with preferred sensor turned off you get endless popups appearing every 10-15s. You may not notice the problem if you always have your sensor charged.

photo
1

Hi,

I'm not sure if Pawel is interested in our discussion here, anyway hope it is not a problem.


In new 3.12.0 version of Locus is a new settings at every sensor, where you may define if you wants to connect as now, or silently (so no popup will be visible and Ant in Locus will automatically connect to closest device available).


So give it a try if it helps. Best should be to create some clever logic when to display selecting black screen and when not, but I had no useful idea till now so at least this for now.

photo
1

Not a problem at all. I don't participate as I didn't use ANT+ sensors with Locus for a while, might give it a try with a new version.

photo
1

Thanks, Will try. I would propose showing black search screen only when in Ant+ manager. If you dont have a preferred device stored, maybe your idea to connect first device is the best solution (if the device is remembered to prevent switching mid track). Other alternative would be to simply disable the sensor if no preferred device is stored. Your proposal sounds more practical, let me see how it works in practice.

photo
1

Quick update after using single sensor - with the new behavior, locus is finally usable, with ant sensors, great work! Will do some more testing with more connected/available devices and report back.

photo
1

Hello Peter, thank you for information, I'm glad to hear it!

photo
1

Hello. I'm experiencing essentially the exact same behavior that Peter Kundrat reported 3 years ago. Only in my case, after having completely deleted all of my Ant+ device connections in an attempt to get a "fresh start" with Locus, Locus Map Pro continues to immediately go into a perpetual search for the Ant+ devices that I originally connected (but have since disconnected/unpaired/deleted) as soon as I ask it to record a track. I've found no way to break the search loop short of closing down Locus. This renders the program useless. It's unclear from Peter's final post above (starting with "Quick update...") as to what changed that allowed him to make his version of Locus "usable" with Ant+ sensors. Is there anything specifically that you can suggest I do to correct this issue? Thanks.

photo
1

Good day David,

if Locus Map automatically tries to connect to your sensors when you start track recording, it may only mean that you still have enabled automatic connection to sensors in your track recording profile. Please check "Connected hardware auto-start" settings in the application and disable sensors you no longer want to use. Hope this helps.

photo
1

Menion,

I re-examined my "Connected hardware auto-start" settings and there were no check marks for any of the listed devices. Under those circumstances, I'm able to record a ride (with, of course, no sensor input of any kind). I just put on a Garmin ANT+ heart rate belt and confirmed that it was transmitting by starting up a Garmin eTrex 35T, which correctly displayed my current heart rate. I then booted-up Locus Map Pro, went to my mountain bike recording profile/"Connected hardware auto-start," and checked the box for ANT+ Devices/Heart rate monitor. I went back to the Track Recording screen and tapped the green-circled right-hand arrow to start recording. After a couple of seconds, I saw the "Searching for Speed Sensors" screen with clockwise rotating circular arrow -- it connected with nothing; it then switched to searching for an "Environmental Sensor." After ~30 seconds, the circular arrow stopped rotating, and it was essentially "crashed." Note that it never attempted to search for the one currently valid/"checked" device: the heart rate transmitter strap. But it continues to try to find the Garmin speed sensor and Garmin Tempe (external temperature transmitter) which I tried to connect the very first time I used Lotus Map Pro. Since that initial time (which ultimately caused the infinite device search loop described in my earlier note above), these devices have been unchecked . Yet, LPM continues to search for them.


I have a second heart rate strap, one having both ANT+ and Bluetooth transmission capabilities. I again tried to connect to it via LMP by checking the heart rate box, this time in the Bluetooth Manager screen. When I returned to the map screen, then started the track recording, it didn't hang LMP or cause an infinite looping search screen to appear; but, it didn't display a heart rate, either.


So, this is very frustrating -- what do you suggest that I do now? Thanks.

photo
1

Good day David,

this is really interesting and unfortunate. May you please try to create a completely new recording profile and use it for a quick test? Thanks

photo
1

Menion: I created a new profile ("My Mountain Biking") and didn't touch any of the default "new profile" settings. I put my Garmin heart rate monitor on and Locus Map Pro appeared to be able to record as expected, without any sensors. I then opened the ANT+ Manager and selected only the heart rate checkbox. I closed the ANT+ Manager, returning to the ride recording screen. Within seconds, LMP started searching for a speed sensor, eventually finding an unsaved sensor and displaying its ID. I didn't do anything as I wasn't sure how to proceed (there were no "awake" speed sensors in the area), and before I could decide on any action, it changed to the environmental sensor search window. As before, after a number of seconds, the progress circle stopped moving, and nothing happened. Neither of these devices were checked in either ANT+ or Bluetooth Manager.


So, after I created the new recording profile, LMP essentially did about the same thing as it did with the original Mountain Biking recording profile. At this point, I have no heart rate monitoring, and ride distances as measured by GPS on LMP run about 5-10% short due to the twisty nature of the trails in my area. It would be nice to connect to my external temperature device, too, as internal sensors tend to overheat when exposed to direct sunlight, resulting in erroneously high reported temperatures. Thanks.

photo
1

David, thanks for the description. I'm little in rush does to some problems in the recent app version. Anyway, from what you write, it looks like a problem that "black screen" with list of available sensors, offer also sensors that are not requested. As I see in the code, by enabling Heart rate sensor, app really requests only "heart rate monitors".

You may give a try and tap on "tools" button in the panel with the sensor and choose "Connection type > Silent". Maybe it will solve this problem because Locus Map then should correctly pick available sensor. If this won't work, I'll try it later directly with device & sensors.

Thanks for understanding.

photo
1

Hello, Menion,

Thanks for taking the time from your busy schedule to respond to my questions -- we're making some good progress! After selecting "Connection type>Silent," Locus Map Pro no longer is going into an endless search loop for external devices, including those remaining uncheck or connected in the past. After I made the above change to each of my desired device types, the heart rate and temperature fields began being populated by legitimate data. I'm not sure if my Garmin hub-based speed sensor was connecting, though.

The way that I have distiguished hub sensor generated speed data from GPS derived speed data with past GPS systems is to start recording a ride, but while stationary, lifting the front wheel (where the hub speed sensor is) and spinning it. If the speed data field seems to respond to the changes in speed of the front wheel, that's been good evidence that the hub speed sensor is the source of the data. When I did this test today, spinning the wheel had no effect on the speed data field. The field did show data when I was moving, however, making me think that it was coming from the GPS system, not the hub.

Was my test for the hub speed sensor valid in this case? If so, do you have a suggestion on how to ensure that the speed field gets its data from the hub sensor and not the GPS data (haven't found any references to this in the User Manual)?

We're getting closer...thanks!

photo
1

Hello David,

this is really little weird behavior of ANT+ system in app. Sorry for this, unfortunately, my test locally with HR and speed sensor behave correctly :(.

Speed from the sensor: you should see speed directly in ANT manager. When you use the dashboard or you modify track recording panel, choose "Speed" column in the section called "Sensor", not in first "GPS". Then you may be sure this value really come from your sensor.

If my description is not clear or too short, let me know, I'll write more.

photo
1

Hi, Menion,

I've really tried hard to read the manual and figure out these things for myself, but I missed the fact that there are two "speed" settings -- I had seen the first and picked-it...which is the one associated with GPS. I've switched the selection to the "speed" under "Sensor," and I'm sure that will correct things. So, this was not the ANT+ Manager's fault. We've got rain locally here now, but I hope to test this out on a ride soon (or just wake-up the hub speed sensor and test that way). Thanks for all of your assistance!

Replies have been locked on this page!