Check receive status of ANT Ack message?

Former Member
Former Member
Is there a way to check the result of a Acknowledge message? The sendAcknowledge() function always seems to return true.
  • Former Member
    Former Member over 9 years ago
    First, you need to know, NOT every sent back message will get response from your device like speed meter or power meter.

    Or say, actually, you can send any message to your device (meters), but device can ignore your AckMessage WITHOUT send you any thing.

    So generally, you can only handle onMessage to process ALL payloads you got. And use PageNumber to get to know the type, and analyse the actual values you want to get.

    For example, I develop connection to Power Meter, and I want to send Ack back to Power Meter to enable TE / PS / Phase values.

    So I will handle ALL onMessage payloads.

    Add if block to check whether the payload is basic connection message. If so, I will ackMessage with Parameter page payload back to power meter to enable TE / PS / Phase.
    But if power meter does NOT support this things, he will ignore the request; But if he support, he will send back me a payload with same page number.
    So my onMessage Handler can get the payload, and then I can retrieve the status values from the payload. And I can know this device support TE / PS / Phase.