Prevent reconnect regardless of disconnect reason



  • Yeah, I think this isn't really an OTA thing, but a problem with reconnection. You were right in thinking that it's still trying to reconnect. I've fixed this in the current dev branch, so 3.0.3 should work for you. I'm doing my best to get it out as soon as possible, but there are a couple of other bugs I want to address before releasing.



  • @ryanbis Any estimates on the 3.0.3 release date? Do you have any additional tips for background scanning with Android 8.1? It is pretty hit and miss for us at the moment. One of our customers has a Samsung Galaxy Note 9 that is running 8.1. Our app does not work in the background at all (scanning is not returning results so our devices never connect). He went back to his Galaxy S8+ running 8.0 and things are working very well. Thanks!



  • I'm trying to get a new version out sometime this week, or next. There are a couple of other bugs I'd like to get worked out before releasing. Unfortunately, I don't have any tips for 8.1 scanning as of this moment, I'll put in a ticket for us to look into it further though.



  • @ryanbis Just tested with the new 3.0.3 release and am now receiving the disconnect notifications as expected. I notice that there is a long delay (~20ish seconds) between pulling the battery from my peripheral and being notified that the connection was dropped. Is this a SweetBlue controlled timeout or is this managed by Android? That is, do I have any control over how long it will take to receive the lost connection / disconnect notification? In iOS it takes just a moment.



  • No, there's no intentional delay in SweetBlue. It may get a little delayed from thread switching, but certainly not 20 seconds. Android's not too good at noticing dropped connections. I'd be curious to see if you get different results from changing the connection priority to high.



  • @ryanbis No real change in dropped connection detection time with the Connection Priority set to HIGH. But, my OTA transaction is about 40% faster. My firmware download went from ~75 seconds to ~45 seconds. This is still 15 seconds slower than under iOS but a huge improvement!



  • That's pretty much what I expected. Make sure to test that thoroughly, as being at the higher connection priority may make the bluetooth stack more unstable. We typically use it for OTAs, then bring it back to MEDIUM for normal use.



  • @ryanbis Ah, good to know. I will be sure to test this thoroughly. Thanks for the tip!



  • @mkurtz was this fixed for you? I have had some cases with latest sweetblue (3.2) where I can't always disconnect reliably.



  • @caeduk

    Please post a new topic with specific steps to reproduce the issue you're having so we can investigate it on our end.