I'm wondering if this is strictly necessary at all. Once you receive
your first broadcast, you will receive one every message period or
an RX fail. You need an initial timestamp for the first broadcast
and you could perhaps throw one in every so often as a fake ANT message.
Other than that, you just need to cound the broadcasts to determine
the time.
Paul
I think not losing the ANT message on time failure is a good thing
certainly, so a seperate checksum for whole message would be nice in
any case.
> There is a way, apparently, to wire the RTC so that it always draws power
> from a battery if the board is on or not. I haven't looked this very
> closely.
This looked to be rather tricky, certainly I don't trust my hacking on
the board to be able to lift a pin.
> Next step is getting the device ID and the device type. According to
> Paul, this can only be done after the device issues its first broadcast
> message.
Is this as simple as sending a MESG_REQUEST_ID (as it's called in
nant) and then leaving the parsing of the response to the Parser
later?
I guess one problem is that the period will need to change depending
on which device appears - what's the process for doing that? As I
thought the period was defined when you first started listening?
Definitely both happy and have time to help with these things over the weekend.
Cheers,
Jim.
I'm wondering if this is strictly necessary at all. Once you receive
your first broadcast, you will receive one every message period or
an RX fail.
By "*one*" you mean a time stamp ?
No, I mean a broadcast. The way ANT works is that it will transmit the last
value sent every message period unless it is updated. i.e.
send("foo")
sleep(10)
send(bar")
is received as:
foo
foo
foo
foo
foo
..
bar
bar
bar
bar
And if you didn't receive abroadcast at the expected time, you'd
see a RX fail instead.
Paul
No, I mean a broadcast. The way ANT works is that it will transmit the last
value sent every message period unless it is updated. i.e.
Yes it is. And indeed I do exactly that in my ant library. As soon as
I see the first transmission on a channel, I issue the 0x51 request.
The application code doesn't even have to do that.
> I guess one problem is that the period will need to change depending
> on which device appears - what's the process for doing that? As I
> thought the period was defined when you first started listening?
You usually set the message period when you open the channel expecting
to see a device of a certain type that transmits at that message
period. However, if you want you can use any message period, open
the channel which does a search and is effectively ignoring the
message period, see what device type you find and then update
the message period. I expect though, that you'll probably have to
reopen the channel after doing that though as the ANT chip needs to
be clocked onto the new message period.
Paul
Logic to handle what? There is logic on the slave (PC) for each
device profile to detect duplicates. i.e. the HRM profile uses
a sequence number and the other device profiles use values that
are cumulative and not absolute. But, you receive messages at
a constant rate, so just counting them tells you when you received
them.
Paul