Win11 virt under MacOS host running Python Bleak dies hard on BLE Notifications

Discussion in 'Windows Virtual Machine' started by MarkZ3, Dec 17, 2024.

  1. MarkZ3

    MarkZ3 Bit poster

    Messages:
    2
    Hello,

    I'm not filing this as a support ticket, because I don't technically need it to get fixed anytime soon for me (I moved this aspect of my development testing to a standard Windows laptop), but I have had a range of failures when using Windows under Parallels to test BLE clients ("Central" in BLE parlance) using the Bleak Python module.

    The problems all relate to BLE "notifications," which are data packets "pushed" from the remote BLE device ("Peripheral") back to the controlling / monitoring app. Notifications come in two flavors (unacknowledged NOTIFY and acknowledged INDICATE), and our device only uses INDICATE if that is useful to know. Logfiles suggest the problem occurs as soon as the Python script "enables" notifications on a GATT Characteristic. Sometimes one or two Characteristics might succeed in starting notifications, sometimes none succeed.

    Failures can be anything from an Exception thrown to the Python console (but the system remaining otherwise usable), to a complete shutdown of the entire Parallels environment (the guest OS instantly disappears from the MacOS host, with no "shutting down" or "closing" display -- the icon and GUI is simply no longer there). When this happens, the Parallels "Control" process pops-up an error report capturing all the registers and active threads for submission to Technical Support, and I've submitted those. All contain the text "Python Bleak" in the description of what I was doing.

    There's no rush on this from my end, as it's a niche case and I'm not blocked, but I like Parallels and am grateful that you let me perform 99% of my job from a Mac. IoT isn't going anywhere, so I'm probably not the only user who will experience this issue. Let me know if it would help to have details on our Characteristics and byte protocol, but the devices themselves are proprietary hardware. We could possibly simulate it with a software Central service, I haven't tried troubleshooting that far.
     

Share This Page