m-gorecki commented on code in PR #192: URL: https://github.com/apache/mynewt-newtmgr/pull/192#discussion_r1052005242
########## newtmgr/bll/bll_common.go: ########## @@ -53,18 +53,25 @@ func exchangeMtu(cln ble.Client, preferredMtu uint16) (uint16, error) { break } - // If macOS returned a value other than 23, then MTU exchange has + // If macOS returned a value higher than 23, then MTU exchange has // completed. - if mtu != bledefs.BLE_ATT_MTU_DFLT { + if mtu > bledefs.BLE_ATT_MTU_DFLT { break } // Otherwise, give the OS some time to perform the exchange. - log.Debugf("macOS reports an MTU of 23. " + + log.Debugf("macOS reports an MTU of <=23. " + "Assume exchange hasn't completed; wait and requery.") time.Sleep(time.Second) } + // On some versions of mac (e.g. monterey) workaround with + // looping three times seems to not work anymore. If after + // performing three loops MTU is still <=23 than hardcode it to 185. + if mtu <= bledefs.BLE_ATT_MTU_DFLT { Review Comment: Fixed it -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org