Android Question Set ble advertising data


i need to set ble advertising data, in particular i need to set manufacturer data for 25 bytes:

19 ff ......

i tested ble2peripheral library but some bytes are fixed from the library,

how can i do ?


I've tried but i have an error, what's the problem? thanks

Upvote 0


Active Member
Licensed User
Longtime User
Can someone help me please? It's the first time i try to change a library and i'm not expert...
You should post some code with what you are doing. Maybe then, someone can help you!
In the code that Erel posted (, there is a function already to set Manufacturer Data.
     * Gets or sets the manufacturer specific data that will be advertised.
     *Each item in the map should have a positive int number as the key and an array of bytes as the value.
    public void setManufacturerData(Map Map) {
    public Map getManufacturerData() {
        return manufacturerData;
So what happens when you declare something like this:
Private peripheral As BlePeripheral2
and then use
peripheral.ManufacturerData =
with the Map of your manufacturer data.
I haven't used this library so can't help you anymore. Have a look there,
or do a search for "ManufacturerData.
Upvote 0