I am using both the SmartRF05 board and the mini DK keyfob. I have loaded several different TI examples into each of them. All of them have the code shown below that looks like it sets the name. I also have code running on an Iphone 4S (IOS 5.1) and a MAC mini (MAC OS).
// GAP GATT Attributes
static uint8 attDeviceName[GAP_DEVICE_NAME_LEN] = "CC2540DK-mini Keyfob";
// Set the GAP Attributes
GGS_SetParameter( GGS_DEVICE_NAME_ATT, GAP_DEVICE_NAME_LEN, attDeviceName );
I use the following to read the device name when running from the iPhone 4S or the MAC mini.
printf("Name: %s\n",[peripheral.name UTF8String]);
My questions are the following:
1. the name seen does not seem to match what is in quotes. keyfob example printed "Keyfobdemo". other examples were similar. They seemd to correspond to the file name but not exactly.
2. the name did not change when I flashed a different example into the smartrf board or the keyfob.
3. the names were not the same depending on whether they were read on the iPhone 4S or the MAC mini. MAC Mini would read "null" a lot for the name.
4. how can I set this name based on the example I am running. It is essential to my application that I read a unique device name so as to make sure it is the proper BLE hardware before I try to connect.
yes I can make a characteristic in my device and try to read that to verify but that requires that I connect first. I could have several BLE devices in the vicinity. I want to ensure I have the correct one by name before I connect.