Can't change Bluetooth advertised name when using IOS App with OpenCatEsp32
I just complete a port of OpenCatEsp32 to the M5Stack Core2, and most everything is working correctly. Since I am using the Nybble hardware design, it advertised the bluetooth connection as "Nybble54_SSP" and my iPhone 12 is reporting is correctly. I quickly realized that the IOS app will not work unless the advertised name contains "Bittle or Petoi" so I updated the name to be Bittle. I get the following message:
The device doesn't seem to be a Petoi robot.
I have confirmed that the call
SerialBT.begin(strcat(readBleID(), "_SSP")); //Bluetooth device name
is now passing "Bittle6E_SSP" to the SerialBT.begin(); method. However, in the Petoi IOS, I still see the device showing up as "Nybble54_SSP" no matter what I seem to do. I have deleted the Petoi IOS app and cleared its data, I have turned off bluetooth on both the Petoi app and the iPhone and back on again. I have tried using new UUIDs for the bluetooth system, RX and TX and recompiling and I cannot seem to get the device to advertise to anything other than "Nybble54_SSP". When I was trying to figure out the issue, early on; I also connected with my iPad (before I realized that I needed to include "Bittle" or "Petoi" in the name and it has an advertised name of "Nybble1B_SSP" that is also not changing. I can confirm that if I turn the M5Stack Core2 off, the device goes away on the iPhone and iPad.
I don't know if there is a way to force a new advertised name (if so, I have not found it), or if there is some way to get an IOS device to forget the advertised name, as it seems to be cached somehow.
Any help would be greatly appreciated!
Thanks!
Issue resolved. The Testflight version of the Petoi iOS software solved the issue and worked correctly with the M5Stack ported code (based on ESP32 based BiBoard) without modification to the released BiBoard BLE portion of the code. Thanks to Rongzhong Li for the quick response and access to the TestFliight version of the Petoi App!