Hello,
Im developing a custom BLE mouse plus receiver, where they both implement the BAS BT service to keep track of the mouse battery.
So far I got it to work using my mouse with the BAS peripheral code together with the BAS Central Sample, but if I copy the BAS Central Sample code into my receiver, the bt_bas_handles_assign(dm, &bas); function fails, because the bt_uuid_cmp(gatt_service->uuid, BT_UUID_BAS); inside of it (from bas_client.c) fails. It compares the UUID of the current GATT service and BT_UUID_BAS by subtracting the first from the second:
I modified bt_uuid_cmp() to print out the values:
Running the code I get:
My peripheral + my central gives different of UUID's, returns 3 and fails
My peripheral + BAS Central Sample has same UUID's, returns 0 and proceeds.
As you can see the UUID of my gatt_service changes in the two situations, how do I get it to be the same?
I don't understand how it is set in the first place.
Thanks