Skip to content

macOS subscribe not work #346

Description

@jinbaekho
async function cubeNotify(characteristic) {
    console.log(`notifyID:${characteristic.uuid}`);

    await characteristic.subscribe((error) => {
        if (error) {
            console.error(`subscribe fail: ${error}`);
        } else {
            console.log('subscribe success');
        }
    });

    characteristic.on('data', (data) => {
        if (data.length === 0) {
            return;
        }
        console.log(data);
    });
}

This code works fine on Windows. It doesn't work on MacOS. The subscription success message is printed. But no data is received. What did I miss?. I need help.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions