jonas-schievink / rubble

(going to be a) BLE stack for embedded Rust
BSD Zero Clause License
397 stars 56 forks source link

Don't give up when missing the initial transmit window #155

Closed JOE1994 closed 1 year ago

JOE1994 commented 3 years ago

Hello :crab: , this PR aims to close #77.

In the example from bluetooth specs (5.2) where the master misses the initial transmit window, the slave hops to a new channel for the next connection event. So I followed the example, to hop channels when the master device misses the initial transmit window. image

Thank you for reviewing this PR ! :smile_cat:

JOE1994 commented 3 years ago

Looks correct, thanks!

Did you manage to test this, by chance?

I haven't yet tested it on hardware, but I can try testing once I receive the nRF52840 board I ordered a few days ago :)

p.s. I found a weird mistake I made in this PR: I pushed the transmit window by (connInterval - win_size) and not by connInterval.. :shrug: I'll add a follow-up fix commit right away :)

JOE1994 commented 3 years ago

I made a force-push to squash the follow-up fix with the previous commit.