Nano 33 iot ble

Hi I am trying to change the Manufacturing data each time it advertize but it remains same. Here is the function. Please advice.
void startblecom(char n ){

if(n=='M'){
byte datam[5]= {0x33, 0x33, 0x33, 0x33, 0x33};
BLE.setManufacturerData(datam, 5); BLE.advertise();
}
else
if(n=='F')
{
byte datam[5]= {0x22, 0x22, 0x22, 0x22, 0x22};
BLE.setManufacturerData(datam, 5); BLE.advertise();
}
else{

  byte datam[5]= {0x11, 0x11, 0x11, 0x11, 0x11};
  BLE.setManufacturerData(datam, 5); BLE.advertise();

}

}

Thank you

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.