Skip to content

macOS subscribe not work #346

@jinbaekho

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.

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