Skip to content

Bluetooth UUID #2483

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
otacon6530 opened this issue May 22, 2025 · 5 comments
Closed

Bluetooth UUID #2483

otacon6530 opened this issue May 22, 2025 · 5 comments
Assignees

Comments

@otacon6530
Copy link

otacon6530 commented May 22, 2025

Howdy,

Thank you for your time!

I just wanted to confirm if it is expected behavior that UUIDs are not retained when utilizing BTstack?

I am setting up my service with a UUID of B8E06067-62AD-41BA-9231-206AE80AB552, but the connected pico is ignoring it and sees it as 62AD41BA-9231-206A-E80A-B55100070001.

Steps to reproduce:

  1. Create service
  2. Start advertising

Second Pico:

  1. Create Service
  2. start blescanning
  3. Verify connecting device by getAddressString()
  4. Start discoverGATTServices();
  5. get uuid via bleService->getUUID()->getUuidString()

Image

my code: https://github.com/otacon6530/Area-51-Arcade-IR-Gun/tree/master/BTtest

Not sure if this is a BTstack issue or I am just doing it wrong or something, but let me know if you have any direction for me.

------------------------Edit--------------------------------------------------
I used a GATT browser on my phone and the service/characteristic UUIDs are appearing correctly on my phone, so they have to be setting up correctly. I am not sure why the connected service is returning a different UUID though.

To confirm the devices are connected to each other, I removed power to one at a time and the other reports a disconnect, so it appears they are connected to each other.

@peterharperuk
Copy link
Contributor

Where does 62AD41BA-9231-206A-E80A-B55100070001 come from?
Can you try to "nuke" flash and see if you still have the problem. Maybe you paired with this device when it had different software on it. BTStack has non-volatile storage for pairing - a couple of sectors at the end of flash.

@otacon6530
Copy link
Author

otacon6530 commented May 22, 2025

I followed https://www.raspberrypi.com/documentation/microcontrollers/pico-series.html#resetting-flash-memory to reset the flash memory with the u2f file. Let me know if there is another way to "nuke" it. However, I am getting the same results.

62AD41BA-9231-206A-E80A-B55100070001 comes from line "Serial.println(bleService->getUUID()->getUuidString());"

void gattServiceDiscovered(BLEStatus status, BLEDevice *device, BLEService *bleService) {
  switch (status) {
    case BLE_STATUS_OK:
      Serial.print("Service Discovered: :");
      Serial.println(bleService->getUUID()->getUuidString());
      if (bleService->matches(&bleShieldServiceV2UUID)) {
        serviceFound = true;
        Serial.println("Our service located!");
        myBLEService = *bleService;
      }
      break;
    case BLE_STATUS_DONE:
      Serial.println("Service discovery finished");
      //if (serviceFound) {
        device->discoverCharacteristicsForService(&myBLEService);
      //}
      break;
    default:
      Serial.println("Service discovery error");
      break;
  }
}

I swear this all worked in November. I am trying to pick up the project again.

Thank you for your help.

@lurch
Copy link
Contributor

lurch commented May 22, 2025

Let me know if there is another way to "nuke" it.

Which hardware are you using? Note that the flash_nuke that you linked to may not work as expected if you're using a 3rd-party board with more Flash memory than the official Pico and Pico 2 devices - see raspberrypi/pico-examples#642 (comment)

@otacon6530
Copy link
Author

It is the raspberry pi pico w.

Image

@otacon6530
Copy link
Author

I just noticed I posted this to the wrong git repository. I don't think this is an sdk issue. Rather an issue with the hardware library being used, so I am going to close it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants