Giter VIP home page Giter VIP logo

Comments (12)

loudnate avatar loudnate commented on August 18, 2024

Have you captured the packet that needs to be sent back?

On Jul 23, 2015, at 5:21 AM, Pete Schwamb [email protected] wrote:

MySentry has the user put the pump into a discovery mode, where it broadcasts packets including the pump id. The MySentry sends a response with its own id, which the pump then adds to its list of devices it accepts queries from. The pump also then starts broadcasting pump status messages every five minutes.

The screen should walk the user through this process, using a paired RileyLink, and display status updates as it receives packets from the pump and verifies it can talk to the pump.

β€”
Reply to this email directly or view it on GitHub.

from rileylink.

ps2 avatar ps2 commented on August 18, 2024

I believe the packets involved have these types:

https://github.com/ps2/minimed_rf/blob/master/lib/minimed_rf/messages/message_type_map.rb#L10-L11

I'll see if I can find full examples in my packet log.

from rileylink.

ps2 avatar ps2 commented on August 18, 2024

It looks like this:

a2 AAAAAA 0a BB CCCCCC DD EE

AAAAAA = pump id
BB = ? (my example had 8f)
CCCCCC = mysentry id (mine was 000695)
DD = ? (my example had 01)
EE = crc

from rileylink.

loudnate avatar loudnate commented on August 18, 2024

Will the RileyLink capture the pump's broadcast packets during discovery mode? I lack a lot of understanding in how the actual IC Rx/Tx flows work, but I'm eager to figure this out.

from rileylink.

ps2 avatar ps2 commented on August 18, 2024

Yes, the Rileylink will listen for the pump's message, since it has the pump ID in it, and that way the user doesn't have to enter it in.

On Jul 29, 2015, at 8:13 PM, Nathan Racklyeft [email protected] wrote:

Will the RileyLink capture the pump's broadcast packets during discovery mode? I lack a lot of understanding in how the actual IC Rx/Tx flows work, but I'm eager to figure this out.

β€”
Reply to this email directly or view it on GitHub.

from rileylink.

loudnate avatar loudnate commented on August 18, 2024

Have you started this feature? I can take a stab at it this week since I'm going to have to go through this process anyway with my rig.

from rileylink.

ps2 avatar ps2 commented on August 18, 2024

I haven't started it quite yet; I am working on the packet sending code, so this particular area is in a bit of flux. I think I'm close, though. Feel free to start if you want; just be warned that the sending code in RileyLinkBLEDevice is changing.

from rileylink.

loudnate avatar loudnate commented on August 18, 2024

What's the significance of "0a" in the MySentry discovery confirmation packet?

Here's the packet format sent by the pump in "Find Device" mode:
a2 594040 09 BB 999999 00 EE

BB increments, usually as a single counter, which keeps the CRC (EE) changing, but the byte prior is always 09. Does 09 signify a discovery while 0a signifies a confirmation?

from rileylink.

ps2 avatar ps2 commented on August 18, 2024

That's my take on it as well: https://github.com/ps2/minimed_rf/blob/master/lib/minimed_rf/messages/message_type_map.rb#L10-L11

from rileylink.

loudnate avatar loudnate commented on August 18, 2024

I played with this for a bit but didn't have any luck pairing yet. Any idea on the frequency and repetitiveness of the link messages?

The BB sequence in the pump message is a counter that increments by 1, though it sometimes repeats in the same second. It's not time-based, though: if you exit the Find Device mode and start over, it will pick up where it left off. I wonder if it needs to be replayed in the link message?

from rileylink.

loudnate avatar loudnate commented on August 18, 2024

From @ps2: https://gist.github.com/ps2/f80ff7a400bcecfd9479

from rileylink.

loudnate avatar loudnate commented on August 18, 2024

Here's what worked for me:

@interface MySentryPairingViewController () {
    unsigned char _messageCounter;
}

- (void)viewDidLoad {
    [super viewDidLoad];
    [self.device setTXChannel:3];
    _messageCounter = 0;
}

- (NSString *)mySentryReplyForPacket:(MinimedPacket *)p
{
    static NSString *MySentryID = @"000888";

    NSString *packetStr = [@"a2" stringByAppendingFormat:@"%@%02x%02x%@00%02x000000",
                           [[Config sharedInstance] pumpID],
                           MESSAGE_TYPE_PUMP_STATUS_ACK,
                           messageCounter++,
                           MySentryID,
                           p.messageType];

    return packetStr;
}

It's possible to replay multiple messageTypes in a single 06 packet, and @ps2's paring log shows this, but I simply replied immediately during my spoofing.

from rileylink.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.