• It'd be really interesting to see what the 'raw' data is from Bluetooth - but I'm pretty sure I know what the problem is.

    You'll be using NRF.setServices({...},{advertise:[0x1814­]}) I guess, or something like that?

    It's come up a few times but Espruino has an annoying quirk - advertised services get put in the scan response packet rather than the main advertising one. So if the Garmin isn't doing 'active' scanning it won't see it.

    Right now the only solution is to manually append it to the advertising data. Somehow I can't find the post I made about it now, but here's the code you need:

    NRF.setAdvertising({}, {name:"Blah"});
    // get normal advertising data
    var d = NRF.getAdvertisingData({});
    // append service UUID 0x1814
    var e = new Uint8Array(d.length+4);
    e.set(d);
    e.set([3,0x03, 0x14,0x18],d.length);
    // set new advertising data
    NRF.setAdvertising(e);
    

    And don't bother specifying the service on the end of setServices.

About

Avatar for Gordon @Gordon started