I'm printing the value of the UUID of the service(s) discovered on two types devices when the BLE Multi-link Example connects to them, an NRF52 flashed with the blinky app in the same SDK, and my Android phone running this server app.
/**
* This method is the service-discovery call-back in ble_lbs_c.c. I've added a log statement to print out
* of the value of the UUID of the service(s) being discovered.
**/
void ble_lbs_on_db_disc_evt( ble_lbs_c_t * p_ble_lbs_c, ble_db_discovery_evt_t const * p_evt)
{
int num = p_evt->params.discovered_db.srv_uuid.uuid;
char hex[4];
sprintf(hex, "%x", num);
SEGGER_RTT_WriteString(0, "discovered service UUID = ");
SEGGER_RTT_WriteString(0, hex);
SEGGER_RTT_WriteString(0, "\n");
// ... the rest of the body
}
What I've noticed is that that the service UUID of the discovered service(s) on the phone is always 1523
which is strange becuase isn't 1523
also the service UUID of the discovered LED service on blinky app? Why is the short UUID being used and not the long version?
A sample output in my RTT when discovering the services on the Android phone is the following (P027 is the device model of the phone)
0> Intercepted P027 packet
0> Connecting to P027
0> Intercepted P027 packet
0> Connecting to P027
0> discovered service UUID = 1523
0> device disconnected
0> device disconnected
0> device disconnected
0> device disconnected
0> device disconnected
0> device disconnected
0> device disconnected
0> device disconnected
0> Intercepted P027 packet
0> Connecting to P027
0> discovered service UUID = 1523
Why is it that the service UUID of the my phone is 1523
? Is that right?
When the services of the blinky app are discovered, I get this output
0> Connecting to blinky
0> Intercepted blinky packet
0> Connecting to blinky...
0> discovered service UUID = 11
0> discovered service UUID = 11
0> discovered service UUID = 11
0> discovered service UUID = 11
0> discovered service UUID = 11
0> discovered service UUID = 11
0> discovered service UUID = 11
0> discovered service UUID = 11
0> discovered service UUID = 1523
Now what is the significance of the number 11
?
To make a long short, why does the service in the phone have the same short UUID as the blinky app? And what is 11
?