WARNING: Unable to close bike power sensor

Hi,

A user of one of my Apps is getting the IQ! on start-up on the Epix. If asked for a copy of the log CIQ_LOG.TXT and it's full of the messages 'WARNING: Unable to close bike power sensor'

Now my app is not using or requesting the Bike Power Sensor, only a Heart Rate with the call

Sensor.setEnabledSensors([Sensor.SENSOR_HEARTRATE]);

Does anybody have any ideas?

Thanks
Chris
  • The power sensor warning is almost certainly a red herring. The problem lies somewhere else.

    Travis
  • As Travis said, it's likely a bogus message, but have you tried this right before you exit?

    Sensor.setEnabledSensors([]);

    That basically says you want to turn off the sensors,,,
  • Thanks both.

    Any ideas on where else to look or try, as that's the only message in the log?

    He's reporting it fails on start-up, so I don't think it's getting to any exit code, which stops the sensors.

    However on a related point, I've been calling:
    Sensor.enableSensorEvents(null);

    Rather than your code Jim.

    Is there any difference?

    Cheers
    Chris
  • Here's what it says in the doc:
    - (Array) setEnabledSensors(sensors)

    Use setEnabledSensors() to request system sensors. This will also enable the system sensors if possible.

    Parameters:
    sensors (Array) — Array of Sensor types to enable, or [] to disable all sensors
  • The CIQ_LOG.TXT is used by all CIQ applications, have you confirmed that he/she isn't also running another APP that is leaving that message in the logs? The Epix also doesn't support a lot of newer things in the CIQ SDK, are you using ":has" to check any functions used used that were implemented after 1.2.1 and 1.2.2 which includes the user has the latest firmware for the device?
  • The CIQ_LOG.TXT is used by all CIQ applications, have you confirmed that he/she isn't also running another APP that is leaving that message in the logs? The Epix also doesn't support a lot of newer things in the CIQ SDK, are you using ":has" to check any functions used used that were implemented after 1.2.1 and 1.2.2 which includes the user has the latest firmware for the device?


    Thanks for the feedback. I had been prepared for other Apps generating messages, which is why I was surprised that if mine was generating an IQ! It would have left a log footprint.

    I am not aware of using any 1.2.x functionality, plus I started writing the App in July last year, so I wouldn't have had access to any version that new. Also, would that not generate an log error?

    Cheers
    Chris
  • Here's what it says in the doc:


    Ok, I can see the confusion, I am only calling enableSensorEvents not setSensorEvents and enableSensorEvents should take a null
    Use enableSensorEvents() to request a sensor event. This enables sensor events at 1Hz.

    Parameters:
    listener (Method) — Method Object to call with sensor updates. Null for no listener
  • Hi Chris,

    Wondering if you ever managed to find out what was causing the problem? I've got an app with what seems like an identical problem. Its crashing (on startup) for an Epix user, even though the app runs fine in the Simulator. I got him to send me his error logs, and it just contains:

    ERROR: Illegal Frame Error DETAILS: Failed invoking <symbol> STORE_ID: dcc0fdaf88af4ee898f64ddb46b703fe CALLSTACK: TVM/api/Ant.mb (initialize:124) WARNING: Unable to close bike power sensor STORE_ID: dcc0fdaf88af4ee898f64ddb46b703fe ERROR: Illegal Frame Error DETAILS: Failed invoking <symbol> STORE_ID: dcc0fdaf88af4ee898f64ddb46b703fe CALLSTACK: TVM/api/Ant.mb (initialize:124) WARNING: Unable to close bike power sensor STORE_ID: dcc0fdaf88af4ee898f64ddb46b703fe
    I'm not using any sensor stuff, and not using any Ant stuff (its a pretty simple app - link here) I don't have an Epix so troubleshooting this is pretty difficult. Saw your post, and thought it looked pretty similar. Would appreciate any tips if you got yours working.
  • Without a real Epix device in your hands it is very hard to develop something for the Epix as the simulator acts quite differently.

    I've added Epix compatibility to a few of my apps by mailing back and forth to a user whom has an Epix, but this is quite labor intensive process (adding debug code here and there to figure out where it goes wrong).