BLE set beacon major/minor and ADD a battery service

I am posting here, using Nano IOT , as I don't see a ArduinoBLE topic anywhere.

I need to set the major/minor on my device for advertising.. (with a custom 128bit UUID)

the only way I have found to do this is thru the manufacture's data..
now I also want to provide the battery service..

how do those relate? none of the words in the library reference the major/minor values.

i see I can 'create a service' with my UUID, but am stuck after that
and I don't see any examples of base UUID (my custom) , and different set of service UUID's (battery ...)

i saw some references the ble.begin(major, minor, uuid, ...)
but that doc doesn't mention that .. and the BLE.begin() api doesn't use any parameters.

You came to the right place. :slight_smile:

May I ask why?

major and minor are terms used with iBeacon. Both Apple and Google discontinued beacon support a few years ago. It was not part of the BLE specification.

Do you know how GATT works?
Did you have a look at the ArduinoBLE examples?

File -> Examples -> ArduinoBLE -> Peripheral
File -> Examples -> ArduinoBLE -> Central

They will show you the basic structure of BLE applications. Start with a peripheral example e.g., BatteryMonitor and a generic BLE app e.g., BLE Scanner, nRF Connect ... on iOS and Android

Can you tell us a bit more about your application? That will allows us to give you a bit more specific advice.

I'm not at liberty to discuss the details of the design or implementation..
but admit that I am using LE in a non-traditional way

but consider that there are maybe 20 devices in the same room with the same UUID, but represent 4 or 5 major classes of objects and 3-4 minor classes.

i need to be able to detect and differentiate the major/minor combos, without connection.

i couldn't find any way to do that with service

I was not aware of any difference between beacon and BLE. as the mobile App runtime only gives me Beacon type support. and when I search for 'Bluetooth Low Energy' devices, I find beacons which report uuid/major/minor and battery service, and scanning apps that find them that way

as mentioned the examples are in a different conceptual language from where I am.

What are you doing then in a public forum? If it is secret, I hope you get paid. Then you can ask some expert that will sign a NDA.

Is that your design choice or was that already decided for you? If it is the first, give the devices different UUIDs or different local names.

Well, for one iBeacon is Apple proprietary while Eddystone was developed by Google. And because they had to do their own thing, nobody used it and now both companies abandoned the development and remove support. You can create iBeacon and Eddystone advertisement. But it is not supported by the phone. That was the initial intention. You run around and your phone picks up beacons and allows you to get a special offer from your favorite store or the phone tells you where the product is in a store.

well, everyone has to start some place.
and my mobile apps work fine on Android and iOS using UUID/major/minor

Of course, that was not the point of beacons. The goal was to have beacons everywhere and to not need an app. Otherwise how would everyone know which app they would need?