BLE / ARGON - MESH : Can the mesh service be disabled?

I am working to create a new service with a characteristic.

The code compiles. LightBlue can list the service after I connect to it. However, when connecting to it with code, I can’t seem to list MY service. i do however get the 6fa90001-5c4e-48a8-94f4-8030546f36fc service which I am guessing is the mesh service. This also consequently eats up all the advertising space.

Here is the current iteration of the code if anyone has ideas. Thanks!

SYSTEM_THREAD(ENABLED);

const char* serviceUuidId = "98AE4000-7F06-4BF1-AA40-FA79B014467D";
const char* touchResultId = "98AE4001-7F06-4BF1-AA40-FA79B014467D";
const BleUuid serviceUuid(serviceUuidId);
const BleUuid valueUuid(touchResultId);


void setup() {
    BleCharacteristic touchCharacteristic("touch", BleCharacteristicProperty::NOTIFY, valueUuid, serviceUuid);

    BLE.addCharacteristic(touchCharacteristic);
    
    BleAdvertisingData data;
    
    data.appendServiceUUID(serviceUuid);

    BLE.advertise(&data);
    
    pinMode(D0, INPUT_PULLDOWN);
    pinMode(D7, OUTPUT);
}

void loop() {
    // if (BLE.connected()) {       
    //     touchCharacteristic.setValue((uint8_t)77);
    // } else {
    if(digitalRead(D0) == 0) {
        digitalWrite(D7, 1);
        // touchCharacteristic.setValue((uint8_t)0);
    } else {
        digitalWrite(D7, 0);
        // touchCharacteristic.setValue((uint8_t)1);
    }
    
    // }
    

}

Mesh.off() would spring to mind :wink:
You can also use SYSTEM_MODE(SEMI_AUTOMATIC) and only spin up the radios you need.

However, future device OS versions will not have any mesh features anymore, so the need for that will go away.

BTW, mesh has nothing to do with BLE as it is an entirely different protocol.
The service you see is the Particle setup service for the mobile app.
And that is not advertised, when you have your own BleAdervtisingData pushed.
Also the space restriction for advertising data has no bearing on the ability to list a service or characteristic once you connected to the device.

What code would that be?
Maybe that’s the more likely culprit rather than the device OS interfering.

When a known to be good application can see it and custom code cannot then the first suspect should be that custom code :wink:

I didn’t update this late last night but it looks like when it updated to 1.5.2, the same code successfully produced the characteristic.

:man_shrugging:

Thanks for the help :slight_smile: