ps2 / rileylink_ios

iOS Frameworks for working with RileyLink and RileyLink compatible BLE devices
MIT License
74 stars 172 forks source link

Send ACK for all `a2` packets #2

Closed ps2 closed 8 years ago

ps2 commented 9 years ago

From @loudnate on August 17, 2015 5:52

Should we keep track of paired MySentry IDs, then?

Copied from original issue: ps2/rileylink#23

ps2 commented 9 years ago

From @loudnate on August 17, 2015 6:6

Pete suggested we don't have to worry about "real" MySentry devices, and of course we'd only ACK for the Pump IDs we know about.

loudnate commented 9 years ago

@ps2 envisions a stricter hierarchy for "RLKit". The control layer can accept a pump ID at initialization and automatically ACK all matching packets. Clients (e.g. NightScoutUploader) can subscribe to the control layer for notifications.

loudnate commented 9 years ago

@ps2 Can you double-check what this MySentry response message is?

The one I send during pairing is:

a2 PPPPPP 06 ++ MMMMMM 00 AAAAAAAA CC P = Pump ID ++ = Counter M = MySentry ID A = message types to acknowledge (up to 4, pad with 0)

a2 350535 06 59 000695 00 04000000 e2

If this is the proper message, the app would have to know (or better yet, derive) its MySentry ID.

ps2 commented 9 years ago

Yes, I believe to do a proper ack, one would need to remember the MySentry ID used to pair. Does that answer your question?

loudnate commented 9 years ago

Yeah, I just wanted to confirm. I've been sending those ACK packets for ~2 weeks now (on channel 3) and the pump still sends 2 additional copies to follow.

loudnate commented 8 years ago

Per my last comment, this doesn't seem to make a difference.