Skip to content

UpdateDevice IsConnectable Flag not Reset #73

@SamuelKnobel

Description

@SamuelKnobel

I'm working in the Unity Editor

During the Scan of devices, we filter for devices that are connectable. In the Demo, when I have my Device Reset, then it's detectable and I can subscribe. When I quit the Playmode and start it again, the device does not appear anymore. After a long search, I realised it's just because the this part:

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
    public struct DeviceUpdate
    {
        [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 100)]
        public string id;
        [MarshalAs(UnmanagedType.I1)]
        public bool isConnectable;
        [MarshalAs(UnmanagedType.I1)]
        public bool isConnectableUpdated;
        [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 50)]
        public string name;
        [MarshalAs(UnmanagedType.I1)]
        public bool nameUpdated;
    }

The variable isConnectable of the device is not reset, meaning it stays false, as if the connection is still there.
as there is no disconnect function I don't see what I would have to do to have it reset?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions